Examples of FetchGroup


Examples of javax.jdo.FetchGroup

                printFetchGroup(fg),
                64, fg.getRecursionDepth("manager"));
    }

    public void testPostLoad() {
        FetchGroup fg = pm.getFetchGroup(Employee.class, "testPostLoad");
        assertFalse("New FetchGroup should have post-load false; "
                + printFetchGroup(fg),
                fg.getPostLoad());
        fg.setPostLoad(true);
        assertTrue("After setPostLoad(true) FetchGroup should have post-load true; "
                + printFetchGroup(fg),
                fg.getPostLoad());
        fg.setPostLoad(false);
        assertFalse("After setPostLoad, FetchGroup should have post-load false; "
                + printFetchGroup(fg),
                fg.getPostLoad());
    }

Examples of javax.jdo.FetchGroup

                + printFetchGroup(fg),
                fg.getPostLoad());
    }

    public void testUnmodifiableSetPostLoad() {
        FetchGroup fg = pm.getFetchGroup(Employee.class, "testUnmodifiableSetPostLoad");
        fg.setUnmodifiable();
        try {
            fg.setPostLoad(true);
            fail("Unmodifiable FetchGroup should throw on setPostLoad.");
        } catch(JDOException ex) {
            // good catch!
        }
    }

Examples of javax.jdo.FetchGroup

            // good catch!
        }
    }

    public void testUnmodifiableAddMember() {
        FetchGroup fg = pm.getFetchGroup(Employee.class, "testUnmodifiableAddMember");
        fg.setUnmodifiable();
        try {
            fg.addMember("hiredate");
            fail("Unmodifiable FetchGroup should throw on addMember.");
        } catch(JDOException ex) {
            // good catch!
        }
    }

Examples of javax.jdo.FetchGroup

            // good catch!
        }
    }

    public void testUnmodifiableAddMembers() {
        FetchGroup fg = pm.getFetchGroup(Employee.class, "testUnmodifiableAddMembers");
        fg.setUnmodifiable();
        try {
            fg.addMembers(allMembers);
            fail("Unmodifiable FetchGroup should throw on addMembers.");
        } catch(JDOException ex) {
            // good catch!
        }
    }

Examples of javax.jdo.FetchGroup

            // good catch!
        }
    }

    public void testUnmodifiableRemoveMember() {
        FetchGroup fg = pm.getFetchGroup(Employee.class, "testUnmodifiableRemoveMember");
        fg.addMembers(allMembers);
        fg.setUnmodifiable();
        try {
            fg.removeMember("hiredate");
            fail("Unmodifiable FetchGroup should throw on removeMember.");
        } catch(JDOException ex) {
            // good catch!
        }
    }

Examples of javax.jdo.FetchGroup

            // good catch!
        }
    }

    public void testUnmodifiableRemoveMembers() {
        FetchGroup fg = pm.getFetchGroup(Employee.class, "testUnmodifiableRemoveMembers");
        fg.addMembers(allMembers);
        fg.setUnmodifiable();
        try {
            fg.removeMembers(allMembers);
            fail("Unmodifiable FetchGroup should throw on removeMembers.");
        } catch(JDOException ex) {
            // good catch!
        }
    }

Examples of javax.jdo.FetchGroup

            // good catch!
        }
    }

    public void testUnmodifiableAddCategory() {
        FetchGroup fg = pm.getFetchGroup(Employee.class, "testUnmodifiableAddCategory");
        fg.setUnmodifiable();
        try {
            fg.addCategory(FetchGroup.ALL);
            fail("Unmodifiable FetchGroup should throw on addCategory.");
        } catch(JDOException ex) {
            // good catch!
        }
    }

Examples of javax.jdo.FetchGroup

            // good catch!
        }
    }

    public void testUnmodifiableRemoveCategory() {
        FetchGroup fg = pm.getFetchGroup(Employee.class, "testUnmodifiableRemoveCategory");
        fg.addCategory(FetchGroup.ALL);
        fg.setUnmodifiable();
        try {
            fg.removeCategory(FetchGroup.ALL);
            fail("Unmodifiable FetchGroup should throw on removeCategory.");
        } catch(JDOException ex) {
            // good catch!
        }
    }

Examples of oracle.toplink.essentials.queryframework.FetchGroup

     * Return true if the object is partially fetched and cached.
     * It applies to the query with fetch group.
     */
    public boolean isPartialObject(Object domainObject) {
        if (domainObject != null) {
            FetchGroup fetchGroupInCache = ((FetchGroupTracker)domainObject).getFetchGroup();

            //if the fetch group reference is not null, it means the object is partial.
            return (fetchGroupInCache != null);
        }
        return false;

Examples of oracle.toplink.essentials.queryframework.FetchGroup

    /**
     * INTERNAL:
     * Return if the cached object data is sufficiently valid against a fetch group
     */
    public boolean isObjectValidForFetchGroup(Object object, FetchGroup fetchGroup) {
        FetchGroup groupInObject = ((FetchGroupTracker)object).getFetchGroup();
        return (groupInObject == null) || groupInObject.isSupersetOf(fetchGroup);
    }
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.