Package org.apache.openjpa.persistence

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


                _nve = new NoVersionEntity(1);
                _integerVe = new IntegerVersionEntity(1);

                em.persist(_ive);
                em.persist(_nve);
                em.persist(_integerVe);

                em.getTransaction().commit();
            }
        } finally {
            em.close();
View Full Code Here


            l1.assertCounts(1, 1, 0, 0);
            l2.assertCounts(0, 0, 0, 0);

            em2.getTransaction().begin();
            SimpleEntity e2 = new SimpleEntity();
            em2.persist(e2);
            l1.assertCounts(1, 1, 0, 0);
            l2.assertCounts(1, 1, 0, 0);

            em2.getTransaction().commit();
            l1.assertCounts(1, 1, 0, 0);
View Full Code Here

        List l = q.getResultList();
        assertEquals(0, l.size());    

        // Create a new Entity that has the PartBase accesspath. Has a newer timestamp than our query
        em.getTransaction().begin();
        em.persist(new PartBase());
        em.getTransaction().commit();

        // Make sure that our sql listener is working
        assertTrue(_sql.size() > 0);
        _sql.clear();
View Full Code Here

        FieldAccess fa = new FieldAccess();
        // Set the persistent field through a misnamed setter        
        fa.setStringField("FieldAccess");
       
        em.getTransaction().begin();
        em.persist(fa);
        em.getTransaction().commit();
        em.clear();
       
        // This value of a persistent field was set using the setter
        // above, but this query will use the field name to verify that
View Full Code Here

        PropAccess pa = new PropAccess();
        // Set the persistent field through a misnamed setter        
        pa.setStrProp("PropertyAccess");
       
        em.getTransaction().begin();
        em.persist(pa);
        em.getTransaction().commit();
        em.clear();
       
        // This value of a persistent field was set using the setter
        // above, but this query will use the field name to verify that
View Full Code Here

        dfmpa.setStrField("NonPCSetter");
        // Call setter with property access
        dfmpa.setStringField("DFMPA");
       
        em.getTransaction().begin();
        em.persist(dfmpa);
        em.getTransaction().commit();
        em.clear();
       
        // This value of a persistent property was set using the setter
        // above, but this query will use the property name to verify that
View Full Code Here

        DefPropMixedFieldAccess dpmfa = new DefPropMixedFieldAccess();
        // Call setter with underlying field access
        dpmfa.setStrProp("DPMFA");
       
        em.getTransaction().begin();
        em.persist(dpmfa);
        em.getTransaction().commit();
        em.clear();
       
        // This value of a persistent field was set using the setter
        // above, but this query will use the property name to verify that
View Full Code Here

        // Call base setter with property access
        Date now = new Date();
        ps.setCreateDate(now);
       
        em.getTransaction().begin();
        em.persist(ps);
        em.getTransaction().commit();
        em.clear();
       
        // This value of a persistent field was set using the setter
        // above, but this query will use the property name to verify that
View Full Code Here

        // Call base setter with property access
        Date now = new Date();
        fs.setCreateDate(now);
       
        em.getTransaction().begin();
        em.persist(fs);
        em.getTransaction().commit();
        em.clear();
       
        // This value of a persistent field was set using the setter
        // above, but this query will use the property name to verify that
View Full Code Here

        // Call base setter with property access
        Date now = new Date();
        ps.setCreateDate(now);
       
        em.getTransaction().begin();
        em.persist(ps);
        em.getTransaction().commit();
        em.clear();
       
        // This value of a persistent field was set using the setter
        // above, but this query will use the property name to verify that
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.