Examples of addFetchGroup()


Examples of org.apache.openjpa.persistence.FetchPlan.addFetchGroup()

        OpenJPAEntityManager pm = getPM();
        FetchPlan fetch = pm.getFetchPlan();

        checkGroups(pm, new String[0]);

        fetch.addFetchGroup("foo");
        checkGroups(pm, new String[]{ "foo" });

        fetch.addFetchGroup("bar");
        fetch.addFetchGroup("baz");
        checkGroups(pm, new String[]{ "foo", "bar", "baz" });
View Full Code Here

Examples of org.apache.openjpa.persistence.FetchPlan.addFetchGroup()

        checkGroups(pm, new String[0]);

        fetch.addFetchGroup("foo");
        checkGroups(pm, new String[]{ "foo" });

        fetch.addFetchGroup("bar");
        fetch.addFetchGroup("baz");
        checkGroups(pm, new String[]{ "foo", "bar", "baz" });

        fetch.addFetchGroup("a");
        fetch.addFetchGroup("b");
View Full Code Here

Examples of org.apache.openjpa.persistence.FetchPlan.addFetchGroup()

        fetch.addFetchGroup("foo");
        checkGroups(pm, new String[]{ "foo" });

        fetch.addFetchGroup("bar");
        fetch.addFetchGroup("baz");
        checkGroups(pm, new String[]{ "foo", "bar", "baz" });

        fetch.addFetchGroup("a");
        fetch.addFetchGroup("b");
        fetch.addFetchGroup("c");
View Full Code Here

Examples of org.apache.openjpa.persistence.FetchPlan.addFetchGroup()

        fetch.addFetchGroup("bar");
        fetch.addFetchGroup("baz");
        checkGroups(pm, new String[]{ "foo", "bar", "baz" });

        fetch.addFetchGroup("a");
        fetch.addFetchGroup("b");
        fetch.addFetchGroup("c");
        fetch.addFetchGroup("d");
        checkGroups(pm, new String[]
            { "foo", "bar", "baz", "a", "b", "c", "d" });
View Full Code Here

Examples of org.apache.openjpa.persistence.FetchPlan.addFetchGroup()

        fetch.addFetchGroup("bar");
        fetch.addFetchGroup("baz");
        checkGroups(pm, new String[]{ "foo", "bar", "baz" });

        fetch.addFetchGroup("a");
        fetch.addFetchGroup("b");
        fetch.addFetchGroup("c");
        fetch.addFetchGroup("d");
        checkGroups(pm, new String[]
            { "foo", "bar", "baz", "a", "b", "c", "d" });
View Full Code Here

Examples of org.apache.openjpa.persistence.FetchPlan.addFetchGroup()

        fetch.addFetchGroup("baz");
        checkGroups(pm, new String[]{ "foo", "bar", "baz" });

        fetch.addFetchGroup("a");
        fetch.addFetchGroup("b");
        fetch.addFetchGroup("c");
        fetch.addFetchGroup("d");
        checkGroups(pm, new String[]
            { "foo", "bar", "baz", "a", "b", "c", "d" });

        fetch.removeFetchGroup("bar");
View Full Code Here

Examples of org.apache.openjpa.persistence.FetchPlan.addFetchGroup()

        checkGroups(pm, new String[]{ "foo", "bar", "baz" });

        fetch.addFetchGroup("a");
        fetch.addFetchGroup("b");
        fetch.addFetchGroup("c");
        fetch.addFetchGroup("d");
        checkGroups(pm, new String[]
            { "foo", "bar", "baz", "a", "b", "c", "d" });

        fetch.removeFetchGroup("bar");
        checkGroups(pm, new String[]{ "foo", "baz", "a", "b", "c", "d" });
View Full Code Here

Examples of org.apache.openjpa.persistence.FetchPlan.addFetchGroup()

    public void testDefaultFetchPlan002() {
        OpenJPAEntityManager em = emf.createEntityManager();
        FetchPlan fp = em.getFetchPlan();
        assertNotNull(fp);
       
        fp.addFetchGroup("DescFetchGroup");
        assertNotNull(fp.getFetchGroups());
        assertEquals(2, fp.getFetchGroups().size());
        assertTrue(fp.getFetchGroups().contains("default"));
        assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
       
View Full Code Here

Examples of org.apache.openjpa.persistence.FetchPlan.addFetchGroup()

            assertEquals(mgr.getLastName(), findMgr.getLastName());
            assertNull(findMgr.getDescription()); // Should be lazy-loaded
        }
       
        // Restore the "DescFetchGroup" fetch group, and verify expected behavior
        fp.addFetchGroup("DescFetchGroup");
        assertNotNull(fp.getFetchGroups());
        assertEquals(2, fp.getFetchGroups().size());
        assertTrue(fp.getFetchGroups().contains("default"));
        assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
        assertTrue(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
View Full Code Here

Examples of org.apache.openjpa.persistence.FetchPlan.addFetchGroup()

            assertEquals(mgr.getLastName(), findMgr.getLastName());
            assertNull(findMgr.getDescription()); // Should be lazy-loaded
        }
       
        // Add a fetch group to the fetch plan and verify expected behavior
        fp.addFetchGroup("DescFetchGroup");
        assertNotNull(fp.getFetchGroups());
        assertEquals(2, fp.getFetchGroups().size());
        assertTrue(fp.getFetchGroups().contains("default"));
        assertTrue(fp.getFetchGroups().contains("DescFetchGroup"));
        assertFalse(fetchCfg.isDefaultPUFetchGroupConfigurationOnly());
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.