Package javax.jdo

Examples of javax.jdo.FetchGroup.removeMember()


    public void testRemoveMemberNotAMember() {
        FetchGroup fg = pm.getFetchGroup(Employee.class, "testRemoveMemberNotAMember");
        fg.addCategory(FetchGroup.ALL);
        try {
            fg.removeMember("NotAMember");
            fail("FetchGroup should throw on removeMember(NotAMember).");
        } catch(JDOException ex) {
            // good catch!
        }
    }
View Full Code Here


    public void testRemoveMember() {
        FetchGroup fg = pm.getFetchGroup(Employee.class, "testRemoveMember");
        fg.addCategory(FetchGroup.ALL);
        for (int i = allMembers.length - 1; i >= 0; --i) {
            String member = allMembers[i];
            fg.removeMember(member);
            Set members = fg.getMembers();
            assertFalse("FetchGroup should not contain " + member + " but does.\n"
                    + printFetchGroup(fg),
                    members.contains(member));
            assertEquals("FetchGroup should contain " + i
View Full Code Here

    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!
        }
    }
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.