Examples of commitChangesToParent()


Examples of org.apache.cayenne.ObjectContext.commitChangesToParent()

        Artist a = Cayenne.objectForPK(childContext, Artist.class, 33001);
        Painting p = childContext.newObject(Painting.class);
        p.setPaintingTitle("X");
        a.addToPaintingArray(p);

        childContext.commitChangesToParent();

        childContext.deleteObject(p);
        a.removeFromPaintingArray(p);

        childContext.commitChangesToParent();
View Full Code Here

Examples of org.apache.cayenne.ObjectContext.commitChangesToParent()

        childContext.commitChangesToParent();

        childContext.deleteObject(p);
        a.removeFromPaintingArray(p);

        childContext.commitChangesToParent();
    }

    /**
     * A test case for CAY-698 bug.
     */
 
View Full Code Here

Examples of org.apache.cayenne.ObjectContext.commitChangesToParent()

        childContext.invalidateObjects(Collections.singleton(childHollow));

        blockQueries();

        try {
            childContext.commitChangesToParent();

            // * all modified child objects must be in committed state now
            // * all modifications should be propagated to the parent
            // * no actual commit should occur.

View Full Code Here

Examples of org.apache.cayenne.ObjectContext.commitChangesToParent()

        childContext.deleteObject(childDeleted);
        childDeleted.setArtistName("DDD");

        // don't block queries - on delete Cayenne may need to resolve delete rules via
        // fetch
        childContext.commitChangesToParent();

        // * all modified child objects must be in committed state now
        // * all modifications should be propagated to the parent
        // * no actual commit should occur.

View Full Code Here

Examples of org.apache.cayenne.ObjectContext.commitChangesToParent()

        ObjectContext child = context.createChildContext();
        Artist a1 = (Artist) child.localObject(a.getObjectId(), a);

        a1.setArtistName("Y");
        child.commitChangesToParent();

        assertFalse(listener.graphCommitted);
        assertTrue(listener.graphChanged);
        assertFalse(listener.graphRolledBack);
    }
View Full Code Here

Examples of org.apache.cayenne.ObjectContext.commitChangesToParent()

        ObjectContext childPeer2 = context.createChildContext();

        Artist a1 = (Artist) childPeer2.localObject(a.getObjectId(), a);

        a1.setArtistName("Y");
        childPeer2.commitChangesToParent();

        new ThreadedTestHelper() {

            @Override
            protected void assertResult() throws Exception {
View Full Code Here

Examples of org.apache.cayenne.ObjectContext.commitChangesToParent()

        DataContext context = createDataContext();
        ObjectContext child1 = context.createChildContext();

        Artist ac = child1.newObject(Artist.class);
        ac.setArtistName("X");
        child1.commitChangesToParent();

        Artist ap = (Artist) context.getGraphManager().getNode(ac.getObjectId());
        assertNotNull(ap);

        assertTrue(ap.getObjectId().isTemporary());
View Full Code Here

Examples of org.apache.cayenne.ObjectContext.commitChangesToParent()

       
        ObjectContext child = context.createChildContext();

        ClientMtTable1 ac = child.newObject(ClientMtTable1.class);
        ac.setGlobalAttribute1("X");
        child.commitChangesToParent();

        ClientMtTable1 ap = (ClientMtTable1) context.getGraphManager().getNode(ac.getObjectId());
        assertNotNull(ap);

        assertTrue(ap.getObjectId().isTemporary());
View Full Code Here

Examples of org.apache.cayenne.ObjectContext.commitChangesToParent()

        ObjectContext child = context.createChildContext();
        Artist a1 = (Artist) child.localObject(a.getObjectId(), a);

        a1.setArtistName("Y");
        child.commitChangesToParent();

        assertFalse(listener.graphCommitted);
        assertTrue(listener.graphChanged);
        assertFalse(listener.graphRolledBack);
    }
View Full Code Here

Examples of org.apache.cayenne.ObjectContext.commitChangesToParent()

        ObjectContext childPeer2 = context.createChildContext();

        Artist a1 = (Artist) childPeer2.localObject(a.getObjectId(), a);

        a1.setArtistName("Y");
        childPeer2.commitChangesToParent();

        new ThreadedTestHelper() {

            @Override
            protected void assertResult() throws Exception {
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.