Package javax.jdo

Examples of javax.jdo.FetchGroup.removeCategory()


        FetchGroup fg = pm.getFetchGroup(Employee.class, "testRemoveCategory");
        Set expectedSet = new HashSet();
        expectedSet.addAll(Arrays.asList(allButMultivaluedMembers));
        Set members = fg.getMembers();
        fg.addCategory(FetchGroup.ALL);
        fg.removeCategory(FetchGroup.MULTIVALUED);
        members = fg.getMembers();
        assertEquals("FetchGroup.addCategory(all).removeCategory(multivalued)"
                + " should contain all but multivalued members.\n",
                expectedSet, members);       
    }
View Full Code Here


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