Package javax.jdo

Examples of javax.jdo.FetchGroup.addMember()


    }

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


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

        }
    }

    public void testRecursionDepth() {
        FetchGroup fg = pm.getFetchGroup(Employee.class, "testRecursionDepth");
        fg.addMember("manager");
        int depth = fg.getRecursionDepth("manager");
        assertEquals("Initial recursion depth for manager should be 1." +
                printFetchGroup(fg),
                1, depth);
        fg.setRecursionDepth("manager", 64);
View Full Code Here

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