Examples of persistAll()


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

        c4.getMultiAs().add(a3);
        c4.getMultiAs().add(a4);
        a3.getMultiCs().add(c4);
        a4.getMultiCs().add(c4);
       
        pm.persistAll(os);
        pm.getTransaction().commit();
       
        a1oid = pm.getObjectId(a1);
        a2oid = pm.getObjectId(a2);
        a3oid = pm.getObjectId(a3);
View Full Code Here

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

         assertNull (deep.getDependent ());
         ent.setDependent (new CascadesEntity ());
         ent.getAllCollection ().add (new CascadesEntity ());
         rel.setDependent (new CascadesEntity ());
         deep.setDependent (new CascadesEntity ());
         em.persistAll (ent.getAllCollection ());
         em.persist (ent.getDependent ());
         em.persist (rel.getDependent ());
         em.persist (deep.getDependent ());
         em.refresh (ent);
         assertNull (ent.getDependent ());
View Full Code Here

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

         ent.setNone (rel);
         ent.getNoneCollection ().add (rel);

         OpenJPAEntityManager em = (OpenJPAEntityManager)currentEntityManager();
         startTx(em);
         em.persistAll (ent, rel);
         endTx(em);
         long id = ent.getId ();
         long relId = rel.getId ();
         endEm(em);
View Full Code Here

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

         ent.setNone (rel);
         ent.getNoneCollection ().add (rel);

         OpenJPAEntityManager em = (OpenJPAEntityManager)currentEntityManager();
         startTx(em);
         em.persistAll (ent, rel);
         endTx(em);
         long id = ent.getId ();
         long relId = rel.getId ();
         endEm(em);
View Full Code Here

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

         ent.setNone (rel);
         ent.getNoneCollection ().add (rel);

         OpenJPAEntityManager em = (OpenJPAEntityManager)currentEntityManager();
         startTx(em);
         em.persistAll (ent, rel, other);
         endTx(em);
         long id = ent.getId ();
         long relId = rel.getId ();
         long otherId = other.getId ();
         endEm(em);
View Full Code Here

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

         other1.setName ("other1");
         other2.setName ("other2");

         OpenJPAEntityManager em = (OpenJPAEntityManager)currentEntityManager();
         startTx(em);
         em.persistAll (ent, other1, other2);
         endTx(em);
         long id = ent.getId ();
         long rel1Id = rel1.getId ();
         long rel2Id = rel2.getId ();
         long other1Id = other1.getId ();
View Full Code Here

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

         ent.setNone (rel);
         ent.getNoneCollection ().add (rel);

         OpenJPAEntityManager em = (OpenJPAEntityManager)currentEntityManager();
         startTx(em);
         em.persistAll (ent, rel, other);
         endTx(em);
         long otherId = other.getId ();
         endEm(em);

         ent.setNone (other);
View Full Code Here

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

        ent.setNone(rel);

        OpenJPAEntityManager em =
            (OpenJPAEntityManager) currentEntityManager();
        startTx(em);
        em.persistAll(ent, rel);
        endTx(em);
        endEm(em);

        CascadesEntity other = new CascadesEntity();
        ent.setNone(other);
View Full Code Here

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

        embed2.setBasic("basic");
        pc.getEmbedCollection().add(embed2);

        OpenJPAEntityManager em = emf.createEntityManager();
        em.getTransaction().begin();
        em.persistAll(new Object[]{ pc, pc2, pc3 });
        em.getTransaction().commit();
        Object pcId = em.getObjectId(pc);
        Object pc2Id = em.getObjectId(pc2);
        Object pc3Id = em.getObjectId(pc3);
        em.close();
View Full Code Here

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

        tpc2.setBasic(2);
        tpc2.setBasic2("2");
        ev = new EmbedValue();
        ev.setBasic("22");
        tpc2.setEmbed(ev);
        em.persistAll(tpc1, tpc2);
        endTx(em);
        int id1 = tpc1.getPk();
        int id2 = tpc2.getPk();
        endEm(em);
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.