Package org.apache.openjpa.util

Examples of org.apache.openjpa.util.ProxyCollection


        d = findDepartment(em, d.getId());
        assertAnySQLAnyOrder("SELECT .* DC_DEP_PRD .*");
        resetSQL();
        products = d.getProducts();
        assertTrue(products instanceof DelayedProxy);
        ProxyCollection pxycoll = (ProxyCollection)products;
        assertFalse(pxycoll.getOwner().isDelayed(pxycoll.getOwnerField()));
        Product p3 = getProduct(products, 0);
        assertTrue(products.contains(p3));
        assertEquals(2, products.size());
        assertNoneSQLAnyOrder("SELECT .* DC_DEPARTMENT .*", "SELECT .* DC_DEP_PRD .*");
        em.close();
View Full Code Here


        resetSQL();
        Collection<Location> locations = d.getLocations();
        assertAnySQLAnyOrder("SELECT .* DC_DEP_LOC .*");
        resetSQL();
        assertTrue(locations instanceof DelayedProxy);
        ProxyCollection pxycoll = (ProxyCollection)locations;
        assertFalse(pxycoll.getOwner().isDelayed(pxycoll.getOwnerField()));
        assertEquals(1, locations.size());
        assertNoneSQLAnyOrder("SELECT .* DC_DEPARTMENT .*", "SELECT .* DC_DEP_LOC .*");
        em.close();
    }
View Full Code Here

       
        d = findDepartment(em, d.getId());
        assertAnySQLAnyOrder("SELECT .* DC_DEP_AWD .*");
        resetSQL();
        awards = d.getAwards();
        ProxyCollection pxycoll = (ProxyCollection)awards;
        assertFalse(pxycoll.getOwner().isDelayed(pxycoll.getOwnerField()));
        assertNoneSQLAnyOrder("SELECT .* DC_DEP_AWD .*");
        assertTrue(awards instanceof DelayedProxy);
        assertEquals(3,awards.size());
        assertNoneSQLAnyOrder("SELECT .* DC_DEP_AWD .*");
       
View Full Code Here

       
        m = ui.getMember();
        resetSQL();
        accounts = m.getAccounts();
       
        ProxyCollection pxycoll = (ProxyCollection)accounts;
        assertTrue(pxycoll.getOwner().isDelayed(pxycoll.getOwnerField()));
        assertNoneSQLAnyOrder("SELECT .* DC_ACCOUNT .*");
        assertTrue(accounts instanceof DelayedProxy);
        // Trigger a load via iterator
        int count = 0;
        for (IAccount a : accounts) {
View Full Code Here

        d = findDepartment(em, d.getId());
        assertAnySQLAnyOrder("SELECT .* DC_DEP_PRD .*");
        resetSQL();
        products = d.getProducts();
        assertTrue(products instanceof DelayedProxy);
        ProxyCollection pxycoll = (ProxyCollection)products;
        assertFalse(pxycoll.getOwner().isDelayed(pxycoll.getOwnerField()));
        Product p3 = getProduct(products, 0);
        assertTrue(products.contains(p3));
        assertEquals(2, products.size());
        assertNoneSQLAnyOrder("SELECT .* DC_DEPARTMENT .*", "SELECT .* DC_DEP_PRD .*");
        em.close();
View Full Code Here

        resetSQL();
        Collection<Location> locations = d.getLocations();
        assertAnySQLAnyOrder("SELECT .* DC_DEP_LOC .*");
        resetSQL();
        assertTrue(locations instanceof DelayedProxy);
        ProxyCollection pxycoll = (ProxyCollection)locations;
        assertFalse(pxycoll.getOwner().isDelayed(pxycoll.getOwnerField()));
        assertEquals(1, locations.size());
        assertNoneSQLAnyOrder("SELECT .* DC_DEPARTMENT .*", "SELECT .* DC_DEP_LOC .*");
        em.close();
    }
View Full Code Here

       
        d = findDepartment(em, d.getId());
        assertAnySQLAnyOrder("SELECT .* DC_DEP_AWD .*");
        resetSQL();
        awards = d.getAwards();
        ProxyCollection pxycoll = (ProxyCollection)awards;
        assertFalse(pxycoll.getOwner().isDelayed(pxycoll.getOwnerField()));
        assertNoneSQLAnyOrder("SELECT .* DC_DEP_AWD .*");
        assertTrue(awards instanceof DelayedProxy);
        assertEquals(3,awards.size());
        assertNoneSQLAnyOrder("SELECT .* DC_DEP_AWD .*");
       
View Full Code Here

       
        m = ui.getMember();
        resetSQL();
        accounts = m.getAccounts();
       
        ProxyCollection pxycoll = (ProxyCollection)accounts;
        assertTrue(pxycoll.getOwner().isDelayed(pxycoll.getOwnerField()));
        assertNoneSQLAnyOrder("SELECT .* DC_ACCOUNT .*");
        assertTrue(accounts instanceof DelayedProxy);
        // Trigger a load via iterator
        int count = 0;
        for (IAccount a : accounts) {
View Full Code Here

        d = findDepartment(em, d.getId());
        assertAnySQLAnyOrder("SELECT .* DC_DEP_PRD .*");
        resetSQL();
        products = d.getProducts();
        assertTrue(products instanceof DelayedProxy);
        ProxyCollection pxycoll = (ProxyCollection)products;
        assertFalse(pxycoll.getOwner().isDelayed(pxycoll.getOwnerField()));
        Product p3 = getProduct(products, 0);
        assertTrue(products.contains(p3));
        assertEquals(2, products.size());
        assertNoneSQLAnyOrder("SELECT .* DC_DEPARTMENT .*", "SELECT .* DC_DEP_PRD .*");
        em.close();
View Full Code Here

        resetSQL();
        Collection<Location> locations = d.getLocations();
        assertAnySQLAnyOrder("SELECT .* DC_DEP_LOC .*");
        resetSQL();
        assertTrue(locations instanceof DelayedProxy);
        ProxyCollection pxycoll = (ProxyCollection)locations;
        assertFalse(pxycoll.getOwner().isDelayed(pxycoll.getOwnerField()));
        assertEquals(1, locations.size());
        assertNoneSQLAnyOrder("SELECT .* DC_DEPARTMENT .*", "SELECT .* DC_DEP_LOC .*");
        em.close();
    }
View Full Code Here

TOP

Related Classes of org.apache.openjpa.util.ProxyCollection

Copyright © 2018 www.massapicom. 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.