Package org.apache.openjpa.persistence

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


        p.setId(1);
        em.persist(p);
        em.flush();
        em.getTransaction().commit();
       
        Person p1 = em.find(Person.class, 1);

        assertFalse(jstore.isQuerySQLCacheOn());
       
        em.getTransaction().begin();
        em.remove(p);
View Full Code Here


        p.setId(1);
        em.persist(p);
        em.flush();
        em.getTransaction().commit();
       
        Person p1 = em.find(Person.class, 1);

        assertTrue(jstore.isQuerySQLCacheOn());

        Map sqlCache = jstore.getQuerySQLCache();
        Set keys = sqlCache.keySet();
View Full Code Here

        em.flush();
        em.getTransaction().commit();
        em.clear();
       
        for (int i = 0; i < 2; i++) {
          TblParent p = em.find(TblParent.class, i);
          int pid = p.getParentId();
          assertEquals(pid, i);
          Collection<TblChild> children = p.getTblChildren();
          boolean hasChild = false;
          for (TblChild c : children) {
View Full Code Here

        p.setId(1);
        em.persist(p);
        em.flush();
        em.getTransaction().commit();
       
        Person p1 = em.find(Person.class, 1);
        Map sqlCache = jstore.getQuerySQLCache();
        Set keys = sqlCache.keySet();
        for (Iterator iter = keys.iterator(); iter.hasNext();) {
            Map cacheMap = (Map) iter.next();
            //make sure there is an entry in the cache
View Full Code Here

        p.setId(1);
        em.persist(p);
        em.flush();
        em.getTransaction().commit();
       
        Person p1 = em.find(Person.class, 1);
        Map sqlCache = jstore.getQuerySQLCache();
        Set keys = sqlCache.keySet();
        for (Iterator iter = keys.iterator(); iter.hasNext();) {
            Map cacheMap = (Map) iter.next();
            //make sure there is an entry in the cache
View Full Code Here

        p.setId(1);
        em.persist(p);
        em.flush();
        em.getTransaction().commit();
       
        Person p1 = em.find(Person.class, 1);

        assertFalse(jstore.isQuerySQLCacheOn());
       
        em.getTransaction().begin();
        em.remove(p);
View Full Code Here

        p.setId(1);
        em.persist(p);
        em.flush();
        em.getTransaction().commit();
       
        Person p1 = em.find(Person.class, 1);

        assertTrue(jstore.isQuerySQLCacheOn());

        Map sqlCache = jstore.getQuerySQLCache();
        Set keys = sqlCache.keySet();
View Full Code Here

        em.flush();
        em.getTransaction().commit();
        em.clear();
       
        for (int i = 0; i < 2; i++) {
          TblParent p = em.find(TblParent.class, i);
          int pid = p.getParentId();
          assertEquals(pid, i);
          Collection<TblChild> children = p.getTblChildren();
          boolean hasChild = false;
          for (TblChild c : children) {
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.