Package org.apache.openjpa.persistence.kernel.common.apps

Examples of org.apache.openjpa.persistence.kernel.common.apps.FetchGroupTestObjectChild


        o2.setE("e-bar");
        o2.setF("f-bar");
        o2.setG(o1);
        o2.setH(o1);

        FetchGroupTestObjectChild c1 = new FetchGroupTestObjectChild();
        // the value that 'a' is set to is important -- TestFetchGroupsExtent
        // and TestFetchGroupsQuery rely on this
        c1.setA(4);
        c1.setB("child");
        c1.setD(new Date());
        c1.setE("e-baz");
        c1.setF("f-baz");
        c1.setG(o1);
        c1.setH(o1);
        c1.setChildA(1);
        c1.setChildB(2);
        c1.setChildC(3);
        c1.setChildD(4);

        OpenJPAEntityManager pm = getPM();
        startTx(pm);

        pm.persist(o1);
        pm.persist(o2);
        pm.persist(c1);
        endTx(pm);

        oid1 = o1.getId();
        oid2 = o2.getId();
        oidc1 = c1.getId();

        endEm(pm);
    }
View Full Code Here


        pm.getFetchPlan().addFetchGroup("g3");

        // get this so that h's value is loaded into cache.
        FetchGroupTestObject o1 = getO1(pm);

        FetchGroupTestObjectChild c1 = getC1(pm);

        // DFG fields and fields in groups 1 and 3 should be loaded
        checkChildObject(pm, c1, true, true, true, true, false, false,
            true, true, false, true);

        // upon accessing field b, nothing should change.
        c1.getB();
        checkChildObject(pm, c1, true, true, true, true, false, false,
            true, true, false, true);

        c1.getH();
    }
View Full Code Here

        o2.setE("e-bar");
        o2.setF("f-bar");
        o2.setG(o1);
        o2.setH(o1);

        FetchGroupTestObjectChild c1 = new FetchGroupTestObjectChild();
        // the value that 'a' is set to is important -- TestFetchGroupsExtent
        // and TestFetchGroupsQuery rely on this
        c1.setA(4);
        c1.setB("child");
        c1.setD(new Date());
        c1.setE("e-baz");
        c1.setF("f-baz");
        c1.setG(o1);
        c1.setH(o1);
        c1.setChildA(1);
        c1.setChildB(2);
        c1.setChildC(3);
        c1.setChildD(4);

        OpenJPAEntityManager pm = getPM();
        startTx(pm);

        pm.persist(o1);
        pm.persist(o2);
        pm.persist(c1);
        endTx(pm);

        oid1 = o1.getId();
        oid2 = o2.getId();
        oidc1 = c1.getId();

        endEm(pm);
    }
View Full Code Here

        pm.getFetchPlan().addFetchGroup("g3");

        // get this so that h's value is loaded into cache.
        FetchGroupTestObject o1 = getO1(pm);

        FetchGroupTestObjectChild c1 = getC1(pm);

        // DFG fields and fields in groups 1 and 3 should be loaded
        checkChildObject(pm, c1, true, true, true, true, false, false,
            true, true, false, true);

        // upon accessing field b, nothing should change.
        c1.getB();
        checkChildObject(pm, c1, true, true, true, true, false, false,
            true, true, false, true);

        c1.getH();
    }
View Full Code Here

TOP

Related Classes of org.apache.openjpa.persistence.kernel.common.apps.FetchGroupTestObjectChild

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.