Examples of deleteObjects()


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

    final DataMap dataMap = runtime.getDataDomain().getDataMap("qualified");
   
    // clear out the table
    ObjectContext context = runtime.newContext();
    List<Qualified1> qualified1s = context.select(SelectQuery.query(Qualified1.class, null));
    context.deleteObjects(qualified1s);
    context.commitChanges();
   
    // perform concurrent inserts
    int numThreads = 2;
    ExecutorService executor = Executors.newFixedThreadPool(numThreads);
View Full Code Here

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

        p.setPaintingTitle("X");
        a.addToPaintingArray(p);

        childContext.commitChangesToParent();

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

        childContext.commitChangesToParent();
    }
View Full Code Here

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

        assertEquals(4, objects.size());

        // delete AND modify
        Artist childDeleted = (Artist) objects.get(2);
        childContext.deleteObjects(childDeleted);
        childDeleted.setArtistName("DDD");

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

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

        Artist childCommitted = (Artist) objects.get(1);

        // delete AND modify
        Artist childDeleted = (Artist) objects.get(2);
        childContext.deleteObjects(childDeleted);
        childDeleted.setArtistName("DDD");

        Artist childHollow = (Artist) objects.get(3);
        childContext.invalidateObjects(childHollow);
View Full Code Here

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

        a.addToPaintingArray(p2);

        a.removeFromPaintingArray(p2);

        // this causes an error on commit
        child.deleteObjects(p2);

        child.commitChangesToParent();

    }
View Full Code Here

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

        p.setPaintingTitle("X");
        a.addToPaintingArray(p);

        childContext.commitChangesToParent();

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

        childContext.commitChangesToParent();
    }
View Full Code Here

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

        assertEquals(4, objects.size());

        // delete AND modify
        Artist childDeleted = (Artist) objects.get(2);
        childContext.deleteObjects(childDeleted);
        childDeleted.setArtistName("DDD");

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

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

        Artist childCommitted = (Artist) objects.get(1);

        // delete AND modify
        Artist childDeleted = (Artist) objects.get(2);
        childContext.deleteObjects(childDeleted);
        childDeleted.setArtistName("DDD");

        Artist childHollow = (Artist) objects.get(3);
        childContext.invalidateObjects(childHollow);
View Full Code Here

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

        a.addToPaintingArray(p2);

        a.removeFromPaintingArray(p2);

        // this causes an error on commit
        child.deleteObjects(p2);

        child.commitChangesToParent();

    }
View Full Code Here

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

       
        context.commitChanges();
        Thread.sleep(5); //until commit
        assertAll(1, 0, 1, 1, 1, 1, 0, 0);
       
        context.deleteObjects(l1);
        assertAll(1, 0, 1, 1, 1, 1, 1, 0);
       
        context.commitChanges();
        Thread.sleep(5); //until commit
        assertAll(1, 0, 1, 1, 1, 1, 1, 1);
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.