Package org.apache.art

Examples of org.apache.art.Gallery.addToPaintingArray()


        ObjectDiff diff = context.getObjectStore().registerDiff(p1.getObjectId(), null);
        assertFalse(DataRowUtils.isToOneTargetModified(toGallery, p1, diff));

        Gallery g1 = (Gallery) context.newObject("Gallery");
        g1.addToPaintingArray(p1);
        assertTrue(DataRowUtils.isToOneTargetModified(toGallery, p1, diff));
    }
}
View Full Code Here


        // Gallery paintingArray
        Gallery gallery = (Gallery) context.newObject("Gallery");
        gallery.setGalleryName("A Name");
        Painting painting = (Painting) context.newObject("Painting");
        painting.setPaintingTitle("A Title");
        gallery.addToPaintingArray(painting);
        context.commitChanges();

        try {
            context.deleteObject(gallery);
            fail("Should have thrown an exception");
View Full Code Here

    }

    public void testRemove1() throws Exception {
        Painting p1 = newPainting();
        Gallery g1 = newGallery();
        g1.addToPaintingArray(p1);

        // do save
        ctxt.commitChanges();
        ctxt = createDataContext();
View Full Code Here

        assertEquals(0, g3.getPaintingArray().size());
    }

    public void testRemove2() throws Exception {
        Gallery g1 = newGallery();
        g1.addToPaintingArray(newPainting());
        g1.addToPaintingArray(newPainting());

        // do save
        ctxt.commitChanges();
        ctxt = createDataContext();
View Full Code Here

    }

    public void testRemove2() throws Exception {
        Gallery g1 = newGallery();
        g1.addToPaintingArray(newPainting());
        g1.addToPaintingArray(newPainting());

        // do save
        ctxt.commitChanges();
        ctxt = createDataContext();
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.