Package org.apache.openjpa.persistence

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


        em.persist(notEmpty);
        em.persist(empty);
        em.getTransaction().commit();

        em.evictAll();
        assertTrue(empty.getItems().isEmpty());
    }

}
View Full Code Here


        pm.retrieveAll(l);
        for (Iterator iter = l.iterator(); iter.hasNext();) {
            PCState s = getStateManager(iter.next(), pm).getPCState();
            assertEquals(PCState.PNONTRANS, s);
        }
        pm.evictAll();
        for (Iterator iter = l.iterator(); iter.hasNext();) {
            PCState s = getStateManager(iter.next(), pm).getPCState();
            assertEquals(PCState.HOLLOW, s);
        }
    }
View Full Code Here

        pm.retrieveAll(l);
        for (Iterator iter = l.iterator(); iter.hasNext();) {
            PCState s = getStateManager(iter.next(), pm).getPCState();
            assertEquals(PCState.PNONTRANS, s);
        }
        pm.evictAll(l);
        for (Iterator iter = l.iterator(); iter.hasNext();) {
            PCState s = getStateManager(iter.next(), pm).getPCState();
            assertEquals(PCState.HOLLOW, s);
        }
    }
View Full Code Here

        pm.retrieveAll(l);
        for (Iterator iter = l.iterator(); iter.hasNext();) {
            PCState s = getStateManager(iter.next(), pm).getPCState();
            assertEquals(PCState.PNONTRANS, s);
        }
        pm.evictAll(RuntimeTest1.class);
        for (Iterator iter = l.iterator(); iter.hasNext();) {
            PCState s = getStateManager(iter.next(), pm).getPCState();
            assertEquals(PCState.HOLLOW, s);
        }
    }
View Full Code Here

        pm.retrieveAll(l);
        for (Iterator iter = l.iterator(); iter.hasNext();) {
            PCState s = getStateManager(iter.next(), pm).getPCState();
            assertEquals(PCState.PNONTRANS, s);
        }
        pm.evictAll(RuntimeTest2.class);
        boolean foundPNONTRANS = false;
        for (Iterator iter = l.iterator(); iter.hasNext();) {
            PCState s = getStateManager(iter.next(), pm).getPCState();
            if (s == PCState.PNONTRANS) {
                foundPNONTRANS = true;
View Full Code Here

        pm.retrieveAll(l);
        for (Iterator iter = l.iterator(); iter.hasNext();) {
            PCState s = getStateManager(iter.next(), pm).getPCState();
            assertEquals(PCState.PNONTRANS, s);
        }
        pm.evictAll(pm.createExtent(RuntimeTest1.class, true));
        for (Iterator iter = l.iterator(); iter.hasNext();) {
            PCState s = getStateManager(iter.next(), pm).getPCState();
            assertEquals(PCState.HOLLOW, s);
        }
View Full Code Here

        pm.retrieveAll(l);
        for (Iterator iter = l.iterator(); iter.hasNext();) {
            PCState s = getStateManager(iter.next(), pm).getPCState();
            assertEquals(PCState.PNONTRANS, s);
        }
        pm.evictAll(pm.createExtent(RuntimeTest1.class, false));
        for (Iterator iter = l.iterator(); iter.hasNext();) {
            Object o = iter.next();
            if (o.getClass() == RuntimeTest1.class) {
                PCState s = getStateManager(o, pm).getPCState();
                assertEquals(PCState.HOLLOW, s);
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.