Package com.impetus.kundera.entity.photographer

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


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

        AlbumBi_1_M_M_M album1 = new AlbumBi_1_M_M_M("album_1", "My Phuket Vacation", "Went Phuket with friends");
        AlbumBi_1_M_M_M album2 = new AlbumBi_1_M_M_M("album_2", "Office Pics", "Annual office party photos");

        PhotoBi_1_M_M_M photo1 = new PhotoBi_1_M_M_M("photo_1", "One beach", "On beach with friends");
        PhotoBi_1_M_M_M photo2 = new PhotoBi_1_M_M_M("photo_2", "In Hotel", "Chilling out in room");
        PhotoBi_1_M_M_M photo3 = new PhotoBi_1_M_M_M("photo_3", "At Airport", "So tired");
        PhotoBi_1_M_M_M photo4 = new PhotoBi_1_M_M_M("photo_4", "Office Team event", "Shot at Fun park");
        PhotoBi_1_M_M_M photo5 = new PhotoBi_1_M_M_M("photo_5", "My Team", "My team is the best");

        album1.addPhoto(photo1);
        album1.addPhoto(photo2);
        album1.addPhoto(photo3);
        album1.addPhoto(photo4);

        album2.addPhoto(photo2);
        album2.addPhoto(photo3);
        album2.addPhoto(photo4);
        album2.addPhoto(photo5);

        photo1.addAlbum(album1);
        photo2.addAlbum(album1);
        photo2.addAlbum(album2);
        photo3.addAlbum(album1);
        photo3.addAlbum(album2);
        photo4.addAlbum(album1);
        photo4.addAlbum(album2);
        photo5.addAlbum(album2);

        album1.setPhotographer(a1);
        album2.setPhotographer(a1);

        a1.addAlbum(album1);
        a1.addAlbum(album2);

        // Create a deep copy using Kundera
        long t3 = System.currentTimeMillis();
        // metadata =
        // KunderaMetadataManager.getEntityMetadata(kunderaMetadata,
        // PhotographerBi_1_M_1_M.class);
        PhotographerBi_1_M_M_M a2 = (PhotographerBi_1_M_M_M) ObjectUtils.deepCopy(a1, emf.getKunderaMetadataInstance());
        long t4 = System.currentTimeMillis();
        log.info("Time taken by Kundera to copy 1 entity:" + (t4 - t3));

        // Check for reference inequality
View Full Code Here

TOP

Related Classes of com.impetus.kundera.entity.photographer.PhotographerBi_1_M_M_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.