Examples of ModRuntimeTest2


Examples of org.apache.openjpa.persistence.kernel.common.apps.ModRuntimeTest2

        }

        OpenJPAEntityManager pm = getPM();
        startTx(pm);

        ModRuntimeTest2 b = createTest2();
        pm.persist(b);
        _id = b.getId();

        endTx(pm);
        endEm(pm);
    }
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.ModRuntimeTest2

    public void testFlagTransitions1()
        throws Exception {
        if (!supportsPessimistic)
            return;

        ModRuntimeTest2 b = createTest2();
        assertTransient(b);
        assertTransient(b.getSelfOneOne());

        OpenJPAEntityManager pm = getPM(false, false);
        startTx(pm);
        pm.persist(b);

        assertPersistent(b, true, true, false, true);

        rollbackTx(pm);

        assertTransient(b);
        assertTransient(b.getSelfOneOne());
        endEm(pm);
    }
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.ModRuntimeTest2

    public void testFlagTransitions2()
        throws Exception {
        if (!supportsPessimistic)
            return;

        ModRuntimeTest2 b = createTest2();
        assertTransient(b);
        assertTransient(b.getSelfOneOne());

        OpenJPAEntityManager pm = getPM(false, false);
        startTx(pm);
        pm.persist(b);

        assertPersistent(b, true, true, false, true);

        endTx(pm);

        assertPersistent(b, false, false, false, false);
        assertPersistent(b.getSelfOneOne(), false, false, false, false);
        endEm(pm);
    }
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.ModRuntimeTest2

            return;

        OpenJPAEntityManager pm = getPM(false, false);
        startTx(pm);

        ModRuntimeTest2 b = pm.find(ModRuntimeTest2.class, _id);
        assertPersistent(b, true, false, false, false);
        assertPersistent(b.getSelfOneOne(), true, false, false, false);

        endTx(pm);

        assertPersistent(b, false, false, false, false);
        assertPersistent(b.getSelfOneOne(), false, false, false, false);
        endEm(pm);
    }
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.ModRuntimeTest2

            return;

        OpenJPAEntityManager pm = getPM(false, false);
        startTx(pm);

        ModRuntimeTest2 b = pm.find(ModRuntimeTest2.class, _id);
        assertPersistent(b, true, false, false, false);
        assertPersistent(b.getSelfOneOne(), true, false, false, false);

        rollbackTx(pm);
        //pm.getTransaction().rollback();

        assertPersistent(b, false, false, false, false);
        assertPersistent(b.getSelfOneOne(), false, false, false, false);
        endEm(pm);
    }
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.ModRuntimeTest2

        throws Exception {
        if (!supportsPessimistic)
            return;

        OpenJPAEntityManager pm = getPM(false, false);
        ModRuntimeTest2 b = pm.find(ModRuntimeTest2.class, _id);

        assertPersistent(b, false, false, false, false);
        assertPersistent(b.getSelfOneOne(), false, false, false, false);

        endEm(pm);
    }
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.ModRuntimeTest2

            return;

        OpenJPAEntityManager pm = getPM(false, false);
        startTx(pm);

        ModRuntimeTest2 b = pm.find(ModRuntimeTest2.class, _id);
        ModRuntimeTest1 parent = b.getSelfOneOne();
        pm.remove(b);
        assertPersistent(b, true, false, true, true);
        assertPersistent(parent, true, false, false, false);

        endTx(pm);
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.ModRuntimeTest2

            return;

        OpenJPAEntityManager pm = getPM(false, false);
        startTx(pm);

        ModRuntimeTest2 b = pm.find(ModRuntimeTest2.class, _id);
        ModRuntimeTest1 parent = b.getSelfOneOne();
        pm.remove(b);
        assertPersistent(b, true, false, true, true);
        assertPersistent(parent, true, false, false, false);

        rollbackTx(pm);
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.ModRuntimeTest2

    public void testStateTransitions1()
        throws Exception {
        if (!supportsPessimistic)
            return;

        ModRuntimeTest2 b = createTest2();

        OpenJPAEntityManager pm = getPM(false, false);
        startTx(pm);

        pm.persist(b);
        pm.persist(b.getSelfOneOne());
        assertTest2Orig(b);
        changeTest2(b);

        rollbackTx(pm);
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.ModRuntimeTest2

    public void testStateTransitions2()
        throws Exception {
        if (!supportsPessimistic)
            return;

        ModRuntimeTest2 b = createTest2();

        OpenJPAEntityManager pm = getPM(false, false);
        startTx(pm);

        pm.persist(b);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.