Package org.apache.openjpa.persistence

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


        OpenJPAEntityManager pm =(OpenJPAEntityManager) currentEntityManager();
        startTx(pm);
       
        pm.persist(partial);
        pm.persist(partial3);
        pm.persist(constant2);
        pm.persist(constant3);
        endTx(pm);
        _partial = pm.getObjectId(partial);
        _partial3 = pm.getObjectId(partial3);
View Full Code Here


        OpenJPAEntityManager pm =(OpenJPAEntityManager) currentEntityManager();
        startTx(pm);
       
        pm.persist(partial);
        pm.persist(partial3);
        pm.persist(constant2);
        pm.persist(constant3);
        endTx(pm);
        _partial = pm.getObjectId(partial);
        _partial3 = pm.getObjectId(partial3);
        _nonpk = pm.getObjectId(nonpk);
View Full Code Here

        startTx(pm);
       
        pm.persist(partial);
        pm.persist(partial3);
        pm.persist(constant2);
        pm.persist(constant3);
        endTx(pm);
        _partial = pm.getObjectId(partial);
        _partial3 = pm.getObjectId(partial3);
        _nonpk = pm.getObjectId(nonpk);
        _nonpk3 = pm.getObjectId(nonpk3);
View Full Code Here

        pc2.getHelperCollection().add(shared);
        pc2.getHelperCollection().add(new HelperPC());
       
        OpenJPAEntityManager pm =(OpenJPAEntityManager)currentEntityManager();
        startTx(pm);
        pm.persist(pc1);
        pm.persist(pc2);
        endTx(pm);
       
        // to make sure subclasses are selected, etc
        //FIXME jthomas
View Full Code Here

        pc2.getHelperCollection().add(new HelperPC());
       
        OpenJPAEntityManager pm =(OpenJPAEntityManager)currentEntityManager();
        startTx(pm);
        pm.persist(pc1);
        pm.persist(pc2);
        endTx(pm);
       
        // to make sure subclasses are selected, etc
        //FIXME jthomas
        //pm.createNativeQuery("",HelperPC.class).execute();
View Full Code Here

        pc3.getHelperCollection().add(new HelperPC());
        pc3.getHelperCollection().add(new HelperPC());
        eager2.getRecurseCollection().add(pc3);
       
        startTx(pm);;
        pm.persist(eager1);
        pm.persist(eager2);
        endTx(pm);;
        // make sure subclasses selected, etc
        //FIXME jthomas
        pm.createNativeQuery("",EagerPC.class).getResultList();
View Full Code Here

        pc3.getHelperCollection().add(new HelperPC());
        eager2.getRecurseCollection().add(pc3);
       
        startTx(pm);;
        pm.persist(eager1);
        pm.persist(eager2);
        endTx(pm);;
        // make sure subclasses selected, etc
        //FIXME jthomas
        pm.createNativeQuery("",EagerPC.class).getResultList();
        pm.close();
View Full Code Here

        deleteAll(LockGroupPC.class);

        OpenJPAEntityManager pm = getPM(false, false);
        startTx(pm);
        Object o = new LockGroupPC();
        pm.persist(o);
        endTx(pm);
        oid = pm.getObjectId(o);
        endEm(pm);
    }
View Full Code Here

//        pm.begin();
        deleteAll(LockGroupPC2.class, pm);
        startTx(pm);
        LockGroupPC2 pc = new LockGroupPC2();
        pc.setName("pc");
        pm.persist(pc);
        endTx(pm);
        Object oid = pm.getObjectId(pc);
        endEm(pm);

        pm = getPM(false, false);
View Full Code Here

        throws Exception {
        OpenJPAEntityManager pm = getPM(true, false);
        startTx(pm);

        AllFieldTypesTest test = new AllFieldTypesTest();
        pm.persist(test);
        Object testID = pm.getObjectId(test);

        test.setTestint(testint);
        test.setTestlong(testlong);
        test.setTestdouble(testdouble);
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.