Examples of createExtent()


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

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

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

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

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

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

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

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

    }
   
    public void testMidWithSubs()
    throws Exception {
        OpenJPAEntityManager pm =(OpenJPAEntityManager)currentEntityManager();
        Extent extent = pm.createExtent(BaseSub1.class, true);
        Collection pcs = new TreeSet(((Extent) extent).list());
        assertEquals(2, pcs.size());
        Iterator itr = pcs.iterator();
        BaseSub1 pc = (BaseSub1) itr.next();
        assertEquals(2, pc.getBaseField());
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.