Package org.apache.openjpa.persistence

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


        endEm(pm);

        pm = getPM(false, false);
        //FIXME jthomas
        b = (ModRuntimeTest2) pm.find(ModRuntimeTest2.class, oid);
        pm.retrieve(b);
        //FIXME jthomas
        endEm(pm);

        // note that at this point, parent is not transient, just retrieved.
        assertNotNull("b is null", b.getSelfOneOne());
View Full Code Here


        // only field a should be loaded.
        checkObject(pm, o1, true, false, false, false, false, false);
        checkObject(pm, o2, true, false, false, false, false, false);

        // only field a should be loaded.
        pm.retrieve(o1);
        checkObject(pm, o1, true, false, false, false, false, false);

        // Add groups 1 and 3 to the default fetch configuration.
        pm.getFetchPlan().addFetchGroup("g1");
        pm.getFetchPlan().addFetchGroup("g3");
View Full Code Here

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

        // Retrieve o1's "DFG" which will actually do all configured
        // fetch groups.
        // DFG fields and fields in groups 1 and 3 should be loaded
        pm.retrieve(o1);
        checkObject(pm, o1, true, true, true, true, false, false);
    }

    public void testFetchGroupConfiguration() {
        OpenJPAEntityManager pm = getPM();
View Full Code Here

        endEm(pm);

        pm = getPM(false, false);
        //FIXME jthomas
        b = pm.find(ModRuntimeTest2.class, oid);
        pm.retrieve(b);
        //FIXME jthomas
        endEm(pm);

        // note that at this point, parent is not transient, just retrieved.
        assertNotNull("b is null", b.getSelfOneOne());
View Full Code Here

        endEm(pm);

        pm = getPM(false, false);
        //FIXME jthomas
        b = pm.find(ModRuntimeTest2.class, oid);
        pm.retrieve(b);
        //FIXME jthomas
        endEm(pm);

        // note that at this point, parent is not transient, just retrieved.
        assertNotNull("b is null", b.getSelfOneOne());
View Full Code Here

        // only field a should be loaded.
        checkObject(pm, o1, true, false, false, false, false, false);
        checkObject(pm, o2, true, false, false, false, false, false);

        // only field a should be loaded.
        pm.retrieve(o1);
        checkObject(pm, o1, true, false, false, false, false, false);

        // Add groups 1 and 3 to the default fetch configuration.
        pm.getFetchPlan().addFetchGroup("g1");
        pm.getFetchPlan().addFetchGroup("g3");
View Full Code Here

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

        // Retrieve o1's "DFG" which will actually do all configured
        // fetch groups.
        // DFG fields and fields in groups 1 and 3 should be loaded
        pm.retrieve(o1);
        checkObject(pm, o1, true, true, true, true, false, false);
    }

    public void testFetchGroupConfiguration() {
        OpenJPAEntityManager pm = getPM();
View Full Code Here

        endEm(pm);

        pm = getPM(false, false);
        //FIXME jthomas
        b = (ModRuntimeTest2) pm.find(ModRuntimeTest2.class, oid);
        pm.retrieve(b);
        //FIXME jthomas
        endEm(pm);

        // note that at this point, parent is not transient, just retrieved.
        assertNotNull("b is null", b.getSelfOneOne());
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.