Package javax.jdo

Examples of javax.jdo.FetchPlan


    }

    /** */
    public void checkClearGroups() {
        Set expectedGroups = new HashSet();
        FetchPlan fp = getPM().getFetchPlan();
        fp.clearGroups();
        Collection groups = fp.getGroups();
        if (!setEquals(expectedGroups, groups)) {
            failCompare(
                "checkClearGroups(): wrong getGroups() " +
                    "after clearGroups.",
                    expectedGroups, groups);
View Full Code Here


    /** */
    public void checkSetGroup() {
        Set expectedGroups = new HashSet();
        expectedGroups.add("group1");
        FetchPlan fp = getPM().getFetchPlan();
        fp.setGroup("group1");
        Collection groups = fp.getGroups();
        if (!setEquals(expectedGroups, groups)) {
            failCompare(
                "checkSetGroup(): wrong getGroups() " +
                    "after setGroup.",
                    expectedGroups, groups);
View Full Code Here

    /** */
    public void checkAddGroup() {
        Set expectedGroups = new HashSet();
        expectedGroups.add("default");
        expectedGroups.add("group1");
        FetchPlan fp = getPM().getFetchPlan();
        fp.addGroup("group1");
        Collection groups = fp.getGroups();
        if (!setEquals(expectedGroups, groups)) {
            failCompare(
                "checkAddGroup(): wrong getGroups() " +
                    "after addGroup.",
                    expectedGroups, groups);
View Full Code Here

    }

    /** */
    public void checkRemoveGroup() {
        Set expectedGroups = new HashSet();
        FetchPlan fp = getPM().getFetchPlan();
        fp.removeGroup("default");
        Collection groups = fp.getGroups();
        if (!setEquals(expectedGroups, groups)) {
            failCompare(
                "checkRemoveGroup(): wrong getGroups() " +
                    "after removeGroup.",
                    expectedGroups, groups);
View Full Code Here

    public void checkSetGroupsCollection() {
        Set expectedGroups = new HashSet();
        expectedGroups.add("default");
        expectedGroups.add("group1");
        expectedGroups.add("group2");
        FetchPlan fp = getPM().getFetchPlan();
        fp.setGroups(expectedGroups);
        Collection groups = fp.getGroups();
        if (!setEquals(expectedGroups, groups)) {
            failCompare(
                "checkSetGroupsCollection(): wrong getGroups() " +
                    "after SetGroups(Collection).",
                    expectedGroups, groups);
View Full Code Here

    public void checkSetGroupsArray() {
        Set expectedGroups = new HashSet();
        expectedGroups.add("default");
        expectedGroups.add("group1");
        expectedGroups.add("group2");
        FetchPlan fp = getPM().getFetchPlan();
        fp.setGroups(new String[] {"default", "group1", "group2"});
        Collection groups = fp.getGroups();
        if (!setEquals(expectedGroups, groups)) {
            failCompare(
                "checkSetGroupsArray(): wrong getGroups() " +
                    "after setGroups(String[]).",
                    expectedGroups, groups);
View Full Code Here

    }

    /** */
    protected void checkGetDetachmentRoots() {
        Set expectedRoots = new HashSet();
        FetchPlan fp = getPM().getFetchPlan();
        Collection roots = fp.getDetachmentRoots();
        if (!setEquals(expectedRoots, roots)) {
            failCompare(
                "checkGetDetachmentRoots(): wrong getDetachmentRoots() " +
                    "after getPersistenceManager().",
                    expectedRoots, roots);
View Full Code Here

    /** */
    protected void checkSetDetachmentRoots() {
        PCPoint p = new PCPoint(10, 20);
        Set expectedRoots = new HashSet();
        expectedRoots.add(p);
        FetchPlan fp = getPM().getFetchPlan();
        fp.setDetachmentRoots(expectedRoots);
        Collection roots = fp.getDetachmentRoots();
        if (!setEquals(expectedRoots, roots)) {
            failCompare(
                "checkGetDetachmentRoots(): wrong getDetachmentRoots() " +
                    "after setDetachmentRoots().",
                    expectedRoots, roots);
View Full Code Here

    }

    /** */
    private void checkSetDetachmentRootClasses() {
        Class[] expectedRootClasses = new Class[] {PCPoint.class};
        FetchPlan fp = getPM().getFetchPlan();
        fp.setDetachmentRootClasses(
                expectedRootClasses);
        Class[] rootClasses = fp.getDetachmentRootClasses();
        if (!Arrays.equals(expectedRootClasses, rootClasses)) {
            failCompare(
                "checkGetDetachmentRootClasses(): " +
                    "wrong getDetachmentRootClasses() " +
                    "after setDetachmentRootClasses().",
View Full Code Here

        checkFetchGroup2(query);
        checkFetchGroup1(query);
    }

    private void checkSameFetchPlanInstances(Query query) {
        FetchPlan fetchPlan1 = query.getFetchPlan();
        FetchPlan fetchPlan2 = query.getFetchPlan();
        if (fetchPlan1 != fetchPlan2) {
            fail(ASSERTION_FAILED + "Calling getFetchPlan twice on the same " +
            "query instance results in two different fetch plan instances.");
        }
    }
View Full Code Here

TOP

Related Classes of javax.jdo.FetchPlan

Copyright © 2018 www.massapicom. 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.