Examples of ArtGroup


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

                assertFalse("artist's groups not resolved: " + a, ((ValueHolder) list).isFault());
                assertTrue(list.size() > 0);

                Iterator children = list.iterator();
                while (children.hasNext()) {
                    ArtGroup g = (ArtGroup) children.next();
                    assertEquals(PersistenceState.COMMITTED, g.getPersistenceState());
                }

                // assert no duplicates
                Set s = new HashSet(list);
                assertEquals(s.size(), list.size());
View Full Code Here

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

                assertFalse("artist's groups not resolved: " + a, ((ValueHolder)list).isFault());
                assertTrue(list.size() > 0);

                Iterator children = list.iterator();
                while (children.hasNext()) {
                    ArtGroup g = (ArtGroup) children.next();
                    assertEquals(PersistenceState.COMMITTED, g.getPersistenceState());
                }

                // assert no duplicates
                Set s = new HashSet(list);
                assertEquals(s.size(), list.size());
View Full Code Here

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

                assertFalse("artist's groups not resolved: " + a, ((ValueHolder) list).isFault());
                assertTrue(list.size() > 0);

                Iterator children = list.iterator();
                while (children.hasNext()) {
                    ArtGroup g = (ArtGroup) children.next();
                    assertEquals(PersistenceState.COMMITTED, g.getPersistenceState());
                }

                // assert no duplicates
                Set s = new HashSet(list);
                assertEquals(s.size(), list.size());
View Full Code Here

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

                assertFalse("artist's groups not resolved: " + a, ((ValueHolder) list).isFault());
                assertTrue(list.size() > 0);

                Iterator children = list.iterator();
                while (children.hasNext()) {
                    ArtGroup g = (ArtGroup) children.next();
                    assertEquals(PersistenceState.COMMITTED, g.getPersistenceState());
                }

                // assert no duplicates

                Set s = new HashSet(list);
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

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

      e.printStackTrace();
      fail("Should not have thrown an exception :"+e.getMessage());
  }

  public void testAddDeleteNoCommit() {
    ArtGroup parentGroup=(ArtGroup)ctxt.newObject("ArtGroup");
    parentGroup.setName("parent");

    ArtGroup childGroup1=(ArtGroup)ctxt.newObject("ArtGroup");
    childGroup1.setName("child1");
    childGroup1.setToParentGroup(parentGroup);

    try {
      ctxt.deleteObject(parentGroup);
    } catch (Exception e) {
      this.failWithException(e);
View Full Code Here

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

      this.failWithException(e);
    }
  }
 
  public void testAddDeleteWithCommit() {
    ArtGroup parentGroup=(ArtGroup)ctxt.newObject("ArtGroup");
    parentGroup.setName("parent");

    ArtGroup childGroup1=(ArtGroup)ctxt.newObject("ArtGroup");
    childGroup1.setName("child1");
    childGroup1.setToParentGroup(parentGroup);
    ctxt.commitChanges();

    try {
      ctxt.deleteObject(parentGroup);
      ctxt.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.