Examples of ArtGroup


Examples of org.apache.cayenne.testdo.testmap.ArtGroup

                "g1"));
        List<?> results = context.performQuery(q);
        assertEquals(1, results.size());

        assertFalse(context.hasChanges());
        ArtGroup group = (ArtGroup) results.get(0);
        a1.addToGroupArray(group);
        assertTrue(context.hasChanges());

        List<?> groupList = a1.getGroupArray();
        assertEquals(1, groupList.size());
View Full Code Here

Examples of org.apache.cayenne.testdo.testmap.ArtGroup

                "name",
                "g1"));
        List<?> results = context.performQuery(q);
        assertEquals(1, results.size());

        ArtGroup group = (ArtGroup) results.get(0);
        a1.addToGroupArray(group);

        List<?> groupList = a1.getGroupArray();
        assertEquals(1, groupList.size());
        assertEquals("g1", ((ArtGroup) groupList.get(0)).getName());
View Full Code Here

Examples of org.apache.cayenne.testdo.testmap.ArtGroup

    public void testRemoveFromFlattenedRelationship() throws Exception {
        create1Artist1ArtGroup1ArtistGroupDataSet();

        Artist a1 = Cayenne.objectForPK(context, Artist.class, 33001);

        ArtGroup group = a1.getGroupArray().get(0);
        a1.removeFromGroupArray(group);

        List<ArtGroup> groupList = a1.getGroupArray();
        assertEquals(0, groupList.size());
View Full Code Here

Examples of org.apache.cayenne.testdo.testmap.ArtGroup

    // which it links.
    public void testRemoveFlattenedRelationshipAndRootRecord() throws Exception {
        create1Artist1ArtGroup1ArtistGroupDataSet();
        Artist a1 = Cayenne.objectForPK(context, Artist.class, 33001);

        ArtGroup group = a1.getGroupArray().get(0);
        a1.removeFromGroupArray(group); // Cause the delete of the link record

        context.deleteObjects(a1); // Cause the deletion of the artist

        try {
View Full Code Here

Examples of org.apache.cayenne.testdo.testmap.ArtGroup

                "name",
                "g1"));
        List<?> results = context.performQuery(q);
        assertEquals(1, results.size());

        ArtGroup group = (ArtGroup) results.get(0);
        a1.addToGroupArray(group);
        group.removeFromArtistArray(a1);

        queryInterceptor.runWithQueriesBlocked(new UnitTestClosure() {

            public void execute() {
                context.commitChanges();
View Full Code Here

Examples of org.apache.cayenne.testdo.testmap.ArtGroup

        SelectQuery q = new SelectQuery(ArtGroup.class);
        List<?> results = context.performQuery(q);
        assertEquals(2, results.size());

        ArtGroup g1 = (ArtGroup) results.get(0);
        ArtGroup g2 = (ArtGroup) results.get(1);
        a1.addToGroupArray(g1);
        a1.addToGroupArray(g2);

        // test that there is no delete query issued when a flattened join is first
        // added and then deleted AND there are some other changes (CAY-548)
View Full Code Here

Examples of org.apache.cayenne.testdo.testmap.ArtGroup

        assertEquals(0, plist.size());
    }

    public void testReflexiveRelationshipInsertOrder1() {

        ArtGroup parentGroup = context.newObject(ArtGroup.class);
        parentGroup.setName("parent");

        ArtGroup childGroup1 = context.newObject(ArtGroup.class);
        childGroup1.setName("child1");
        childGroup1.setToParentGroup(parentGroup);
        context.commitChanges();
    }
View Full Code Here

Examples of org.apache.cayenne.testdo.testmap.ArtGroup

        context.commitChanges();
    }

    public void testReflexiveRelationshipInsertOrder2() {

        ArtGroup childGroup1 = context.newObject(ArtGroup.class);
        childGroup1.setName("child1");

        ArtGroup parentGroup = context.newObject(ArtGroup.class);
        parentGroup.setName("parent");

        childGroup1.setToParentGroup(parentGroup);

        context.commitChanges();
    }
View Full Code Here

Examples of org.apache.cayenne.testdo.testmap.ArtGroup

    }

    public void testReflexiveRelationshipInsertOrder3() {
        // multiple children, one created before parent, one after

        ArtGroup childGroup1 = context.newObject(ArtGroup.class);
        childGroup1.setName("child1");

        ArtGroup parentGroup = context.newObject(ArtGroup.class);
        parentGroup.setName("parent");

        childGroup1.setToParentGroup(parentGroup);

        ArtGroup childGroup2 = context.newObject(ArtGroup.class);
        childGroup2.setName("child2");
        childGroup2.setToParentGroup(parentGroup);

        context.commitChanges();
    }
View Full Code Here

Examples of org.apache.cayenne.testdo.testmap.ArtGroup

    }

    public void testReflexiveRelationshipInsertOrder4() {
        // multiple children, one created before parent, one after

        ArtGroup childGroup1 = context.newObject(ArtGroup.class);
        childGroup1.setName("child1");

        ArtGroup parentGroup = context.newObject(ArtGroup.class);
        parentGroup.setName("parent");

        childGroup1.setToParentGroup(parentGroup);

        ArtGroup childGroup2 = context.newObject(ArtGroup.class);
        childGroup2.setName("subchild");
        childGroup2.setToParentGroup(childGroup1);

        context.commitChanges();
    }
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.