Examples of FetchGroup


Examples of javax.jdo.FetchGroup

        }
    }

    public void testPMFGetFetchGroupClassNotPersistenceCapable() {
        try {
            FetchGroup fg = pmf.getFetchGroup(Integer.class, "testtestPMFGetFetchGroupClassNotPersistenceCapableGetFetchGroupClassNotPersistenceCapable");
            fail("getFetchGroup should throw on nonPersistenceCapable class.");
        } catch(JDOException ex) {
            // good catch!
        }
    }

Examples of javax.jdo.FetchGroup

        }
    }

    public void testPMFGetFetchGroupInterfaceNotPersistenceCapable() {
        try {
            FetchGroup fg = pmf.getFetchGroup(IEmployee.class, "testPMFGetFetchGroupInterfaceNotPersistenceCapable");
            fail("getFetchGroup should throw on nonPersistenceCapable interface.");
        } catch(JDOException ex) {
            // good catch!
        }
    }

Examples of javax.jdo.FetchGroup

            // good catch!
        }
    }

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

Examples of javax.jdo.FetchGroup

            // good catch!
        }
    }

    public void testAddMembersNotAMember() {
        FetchGroup fg = pm.getFetchGroup(Employee.class, "testAddMembersNotAMember");
        try {
            fg.addMembers(new String[]{"NotAMember"});
            fail("FetchGroup should throw on addMembers(NotAMember).");
        } catch(JDOException ex) {
            // good catch!
        }
    }

Examples of javax.jdo.FetchGroup

            // good catch!
        }
    }

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

Examples of javax.jdo.FetchGroup

            // good catch!
        }
    }

    public void testRemoveMembersNotAMember() {
        FetchGroup fg = pm.getFetchGroup(Employee.class, "testRemoveMembersNotAMember");
        fg.addCategory(FetchGroup.ALL);
        try {
            fg.removeMembers(new String[]{"NotAMember"});
            fail("FetchGroup should throw on removeMembers(NotAMember).");
        } catch(JDOException ex) {
            // good catch!
        }
    }

Examples of javax.jdo.FetchGroup

            // good catch!
        }
    }

    public void testSetRecursionDepthNotAMember() {
        FetchGroup fg = pm.getFetchGroup(Employee.class, "testSetRecursionDepthNotAMember");
        try {
            fg.setRecursionDepth("NotAMember", 64);
            fail("FetchGroup should throw on setRecursionDepth(NotAMember).");
        } catch(JDOException ex) {
            // good catch!
        }
    }

Examples of javax.jdo.FetchGroup

            // good catch!
        }
    }

    private void checkAddCategory(Class cls, String category, String[] expected) {
        FetchGroup fg = pm.getFetchGroup(cls, "test" + count() + category);
        Set expectedSet = new HashSet();
        expectedSet.addAll(Arrays.asList(expected));
        Set members = fg.getMembers();
        assertTrue("New FetchGroup should have no members; "
                + printFetchGroup(fg),
                members.isEmpty());
        fg.addCategory(category);
        members = fg.getMembers();
        if (!members.equals(expectedSet)) {
            appendMessage("FetchGroup(" + cls.getName()
                    + ".addCategory(" + category + ") should contain\n"
                + expectedSet + " but contains\n" + members);
        }

Examples of javax.jdo.FetchGroup

                    + "Expected: " + expected + " actual: " + actual,
                    actual, expected);
    }

    public void testPMGetFetchGroupIdentical() {
        FetchGroup scoped = pm.getFetchGroup(Address.class, "default");
        FetchGroup identical = pm.getFetchGroup(Address.class, "default");
        assertSame("Modifiable FetchGroup is not identical to modifiable FetchGroup;"
                    + "FetchGroup: " + printFetchGroup(scoped)
                    + " identical: " + printFetchGroup(identical),
                    scoped, identical);
    }

Examples of javax.jdo.FetchGroup

                    + " identical: " + printFetchGroup(identical),
                    scoped, identical);
    }

    public void testPMGetFetchGroupUnmodifiableNotIdentical() {
        FetchGroup scoped = pm.getFetchGroup(Address.class, "default");
        scoped.setUnmodifiable();
        FetchGroup modifiable = pm.getFetchGroup(Address.class, "default");
        assertNotSame("Unmodifiable FetchGroup is identical to modifiable FetchGroup;"
                    + "\nunmodifiable: " + printFetchGroup(scoped)
                    + "\n  modifiable: " + printFetchGroup(modifiable),
                    scoped, modifiable);
    }
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.