Package org.apache.openjpa.persistence

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


        pm.getFetchPlan().setMaxFetchDepth(2);
        plan.addFetchGroup("company.departments");
        plan.addFetchGroup("company.address");
        plan.addFetchGroup("department.employees");
        plan.addFetchGroup("person.address");
        plan.addFetchGroup("address.country");

        PCCompany company1 =
            (PCCompany) pm.find(PCCompany.class, _rootCompanyId);

        PCCompany company = (PCCompany) pm.detachCopy(company1);
View Full Code Here


        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

        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

        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

        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

        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

        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

        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

        for (String p : plans) {
            p = p.trim();
            if (p.charAt(0) == '-') {
                plan.removeFetchGroup(p.substring(1));
            } else {
                plan.addFetchGroup(p);
            }
        }
    }
   
    protected void popFetchPlan(boolean finder) {
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.