Examples of createExtent()


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

    }
    public void setUp() {
        OpenJPAEntityManager pm =(OpenJPAEntityManager)currentEntityManager();
        startTx(pm);
       
        Extent e = pm.createExtent(LocatorTestObject.class, true);
        for (Iterator i = e.iterator(); i.hasNext();) {
            pm.remove(i.next());
           
        }
        endTx(pm);
View Full Code Here

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

    }
   
    public void testBaseExtentNoSubs()
    throws Exception {
        OpenJPAEntityManager pm =(OpenJPAEntityManager)currentEntityManager();
        Extent extent = pm.createExtent(JoinSubclassBase.class, false);
        Iterator itr = extent.iterator();
        assertTrue(itr.hasNext());
        JoinSubclassBase pc = (JoinSubclassBase) itr.next();
        assertEquals(1, pc.getBaseField());
        assertEquals(JoinSubclassBase.class, pc.getClass());
View Full Code Here

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

    }
   
    public void testBaseExtentWithSubs()
    throws Exception {
        OpenJPAEntityManager pm =(OpenJPAEntityManager)currentEntityManager();
        Extent extent = pm.createExtent(JoinSubclassBase.class, true);
        Collection pcs = new TreeSet(((Extent) extent).list());
        assertEquals(3, pcs.size());
        Iterator itr = pcs.iterator();
        for (int i = 0; i < 2; i++) {
            JoinSubclassBase pc = (JoinSubclassBase) itr.next();
View Full Code Here

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

    }
   
    public void testLeafExtent()
    throws Exception {
        OpenJPAEntityManager pm =(OpenJPAEntityManager)currentEntityManager();
        Extent extent = pm.createExtent(JoinSubclassBaseSubFlat.class, false);
        Iterator itr = extent.iterator();
        assertTrue(itr.hasNext());
        JoinSubclassBaseSubFlat pc = (JoinSubclassBaseSubFlat) itr.next();
        assertEquals(3, pc.getBaseField());
        assertEquals(4, pc.getBaseSubVertField());
View Full Code Here

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

    }
   
    public void testBaseNoSubs()
    throws Exception {
        OpenJPAEntityManager pm =(OpenJPAEntityManager)currentEntityManager();
        Extent extent = pm.createExtent(Base.class, false);
        Iterator itr = extent.iterator();
        assertTrue(itr.hasNext());
        Base pc = (Base) itr.next();
        assertEquals(1, pc.getBaseField());
        assertEquals(Base.class, pc.getClass());
View Full Code Here

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

    }
   
    public void testBaseWithSubs()
    throws Exception {
        OpenJPAEntityManager pm =(OpenJPAEntityManager)currentEntityManager();
        Extent extent = pm.createExtent(Base.class, true);
        Collection pcs = new TreeSet(((Extent) extent).list());
        assertEquals(4, pcs.size());
        Iterator itr = pcs.iterator();
        for (int i = 0; i < 4; i++) {
            Base pc = (Base) itr.next();
View Full Code Here

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

    }
   
    public void testEmptyNoSubs()
    throws Exception {
        OpenJPAEntityManager pm =(OpenJPAEntityManager)currentEntityManager();
        Extent extent = pm.createExtent(BaseSub1Sub1.class, false);
        Iterator itr = extent.iterator();
        assertTrue(!itr.hasNext());
        extent.closeAll();
        pm.close();
        assertNotSQL(_outer);
View Full Code Here

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

    }
   
    public void testEmptyWithSubs()
    throws Exception {
        OpenJPAEntityManager pm =(OpenJPAEntityManager)currentEntityManager();
        Extent extent = pm.createExtent(BaseSub1Sub1.class, true);
        Iterator itr = extent.iterator();
        assertTrue(!itr.hasNext());
        extent.closeAll();
        pm.close();
        assertNotSQL(_outer);
View Full Code Here

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

    }
   
    public void testLeafNoSubs()
    throws Exception {
        OpenJPAEntityManager pm =(OpenJPAEntityManager)currentEntityManager();
        Extent extent = pm.createExtent(BaseSub1Sub2.class, false);
        Iterator itr = extent.iterator();
        assertTrue(itr.hasNext());
        BaseSub1Sub2 pc = (BaseSub1Sub2) itr.next();
        assertEquals(4, pc.getBaseField());
        assertEquals(5, pc.getBaseSub1Field());
View Full Code Here

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

    }
   
    public void testLeafWithSubs()
    throws Exception {
        OpenJPAEntityManager pm =(OpenJPAEntityManager)currentEntityManager();
        Extent extent = pm.createExtent(BaseSub1Sub2.class, true);
        Iterator itr = extent.iterator();
        assertTrue(itr.hasNext());
        BaseSub1Sub2 pc = (BaseSub1Sub2) itr.next();
        assertEquals(4, pc.getBaseField());
        assertEquals(5, pc.getBaseSub1Field());
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.