Package com.impetus.kundera.entity.photographer

Examples of com.impetus.kundera.entity.photographer.PhotographerBi_1_M_1_M


    @Test
    public void testPhotographer()
    {
        // Construct photographer object
        PhotographerBi_1_M_1_M a1 = new PhotographerBi_1_M_1_M();
        a1.setPhotographerId(1);
        a1.setPhotographerName("Amresh");

        a1.setPersonalDetail(new PersonalDetail("xamry", "password1", "Single"));

        a1.addTweet(new Tweet("My First Tweet", "Web"));
        a1.addTweet(new Tweet("My Second Tweet", "Android"));
        a1.addTweet(new Tweet("My Third Tweet", "iPad"));

        AlbumBi_1_M_1_M b11 = new AlbumBi_1_M_1_M("b1", "Album 1", "This is album 1");
        AlbumBi_1_M_1_M b12 = new AlbumBi_1_M_1_M("b2", "Album 2", "This is album 2");

        PhotoBi_1_M_1_M c11 = new PhotoBi_1_M_1_M("c1", "Photo 1", "This is Photo 1");
        PhotoBi_1_M_1_M c12 = new PhotoBi_1_M_1_M("c2", "Photo 2", "This is Photo 2");
        PhotoBi_1_M_1_M c13 = new PhotoBi_1_M_1_M("c3", "Photo 3", "This is Photo 3");
        PhotoBi_1_M_1_M c14 = new PhotoBi_1_M_1_M("c4", "Photo 4", "This is Photo 4");

        b11.addPhoto(c11);
        b11.addPhoto(c12);
        b12.addPhoto(c13);
        b12.addPhoto(c14);
        a1.addAlbum(b11);
        a1.addAlbum(b12);

        b11.setPhotographer(a1);
        b12.setPhotographer(a1);
        c11.setAlbum(b11);
        c12.setAlbum(b11);
        c13.setAlbum(b12);
        c14.setAlbum(b12);

        // Create a deep copy using Kundera
        long t1 = System.currentTimeMillis();
        PhotographerBi_1_M_1_M a2 = (PhotographerBi_1_M_1_M) ObjectUtils.deepCopy(a1, emf.getKunderaMetadataInstance());
        long t2 = System.currentTimeMillis();
        log.info("Time taken by Kundera:" + (t2 - t1));

        // Check for reference inequality
        assertObjectReferenceInequality(a1, a2);
View Full Code Here

TOP

Related Classes of com.impetus.kundera.entity.photographer.PhotographerBi_1_M_1_M

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.