Package org.apache.art

Examples of org.apache.art.Painting1


        DataContext context = createDataContext();

        Artist a1 = (Artist) context.newObject("Artist");
        a1.setArtistName("a");
        Painting1 p1 = (Painting1) context.newObject("Painting1");
        p1.setPaintingTitle("p");

        // *** TESTING THIS ***
        p1.setToArtist(a1);

        assertSame(a1, p1.getToArtist());

        context.commitChanges();
        ObjectId aid = a1.getObjectId();
        ObjectId pid = p1.getObjectId();
        context.invalidateObjects(Arrays.asList(a1, p1));

        Painting1 p2 = (Painting1) DataObjectUtils.objectForPK(context, pid);
        Artist a2 = p2.getToArtist();
        assertNotNull(a2);
        assertEquals(aid, a2.getObjectId());
    }
View Full Code Here

TOP

Related Classes of org.apache.art.Painting1

Copyright © 2018 www.massapicom. 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.