Package org.apache.openjpa.persistence

Examples of org.apache.openjpa.persistence.OpenJPAEntityManager.find()


    }

    public void testNonDefaultLockGroupFailure1() {
        OpenJPAEntityManager pm1 = getPM(false, false);
        startTx(pm1);
        LockGroupPC pc1 = (LockGroupPC) pm1.find(LockGroupPC.class, oid);
        pc1.setLockGroup0IntField(1);

        OpenJPAEntityManager pm2 = getPM(false, false);
        startTx(pm2);
        LockGroupPC pc2 = (LockGroupPC) pm2.find(LockGroupPC.class, oid);
View Full Code Here


        LockGroupPC pc1 = (LockGroupPC) pm1.find(LockGroupPC.class, oid);
        pc1.setLockGroup0IntField(1);

        OpenJPAEntityManager pm2 = getPM(false, false);
        startTx(pm2);
        LockGroupPC pc2 = (LockGroupPC) pm2.find(LockGroupPC.class, oid);
        pc2.setLockGroup0IntField(2);

        endTx(pm1);
        endEm(pm1);
View Full Code Here

    }

    public void testNonDefaultLockGroupFailure2() {
        OpenJPAEntityManager pm1 = getPM(false, false);
        startTx(pm1);
        LockGroupPC pc1 = (LockGroupPC) pm1.find(LockGroupPC.class, oid);
        pc1.setLockGroup0IntField(1);

        OpenJPAEntityManager pm2 = getPM(false, false);
        startTx(pm2);
        LockGroupPC pc2 = (LockGroupPC) pm2.find(LockGroupPC.class, oid);
View Full Code Here

        LockGroupPC pc1 = (LockGroupPC) pm1.find(LockGroupPC.class, oid);
        pc1.setLockGroup0IntField(1);

        OpenJPAEntityManager pm2 = getPM(false, false);
        startTx(pm2);
        LockGroupPC pc2 = (LockGroupPC) pm2.find(LockGroupPC.class, oid);
        pc2.setLockGroup0StringField("pm2");

        endTx(pm1);
        endEm(pm1);
View Full Code Here

    }

    public void testMultipleLockGroupSuccess1() {
        OpenJPAEntityManager pm1 = getPM(false, false);
        startTx(pm1);
        LockGroupPC pc1 = (LockGroupPC) pm1.find(LockGroupPC.class, oid);
        pc1.setDefaultLockGroupStringField("pm1 value");
        pc1.setExplicitDefaultLockGroupIntField(1);

        OpenJPAEntityManager pm2 = getPM(false, false);
        startTx(pm2);
View Full Code Here

        pc1.setDefaultLockGroupStringField("pm1 value");
        pc1.setExplicitDefaultLockGroupIntField(1);

        OpenJPAEntityManager pm2 = getPM(false, false);
        startTx(pm2);
        LockGroupPC pc2 = (LockGroupPC) pm2.find(LockGroupPC.class, oid);
        pc2.setLockGroup0IntField(2);

        OpenJPAEntityManager pm3 = getPM(false, false);
        startTx(pm3);
        LockGroupPC pc3 = (LockGroupPC) pm3.find(LockGroupPC.class, oid);
View Full Code Here

        LockGroupPC pc2 = (LockGroupPC) pm2.find(LockGroupPC.class, oid);
        pc2.setLockGroup0IntField(2);

        OpenJPAEntityManager pm3 = getPM(false, false);
        startTx(pm3);
        LockGroupPC pc3 = (LockGroupPC) pm3.find(LockGroupPC.class, oid);
        pc3.setLockGroup1RelationField(new RuntimeTest1());

        endTx(pm1);
        endEm(pm1);
View Full Code Here

    }

    public void testMultipleLockGroupSuccess2() {
        OpenJPAEntityManager pm1 = getPM(false, false);
        startTx(pm1);
        LockGroupPC pc1 = (LockGroupPC) pm1.find(LockGroupPC.class, oid);
        pc1.setDefaultLockGroupStringField("pm1 value");
        pc1.setLockGroup0IntField(1);

        OpenJPAEntityManager pm2 = getPM(false, false);
        startTx(pm2);
View Full Code Here

        pc1.setDefaultLockGroupStringField("pm1 value");
        pc1.setLockGroup0IntField(1);

        OpenJPAEntityManager pm2 = getPM(false, false);
        startTx(pm2);
        LockGroupPC pc2 = (LockGroupPC) pm2.find(LockGroupPC.class, oid);
        pc2.setLockGroup1RelationField(new RuntimeTest1());

        endTx(pm2);
        endEm(pm2);
View Full Code Here

//    }

    public void testAttachDetachSuccess()
        throws Exception {
        OpenJPAEntityManager pm1 = getPM(false, false);
        LockGroupPC pc1 = (LockGroupPC) pm1.find(LockGroupPC.class, oid);
        Object detached = pm1.detach(pc1);
        startTx(pm1);
        pc1.setLockGroup0IntField(1);
        pc1.setUnlockedStringField("pm1 changed value");
        endTx(pm1);
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.