Examples of PhotographerBi_1_M_1_M


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

Examples of com.impetus.kundera.tests.crossdatastore.pickr.entities.photographer.PhotographerBi_1_M_1_M

    }

    @Override
    public void addPhotographer()
    {
        PhotographerBi_1_M_1_M p = populatePhotographer();
        pickr.addPhotographer(p);
    }
View Full Code Here

Examples of com.impetus.kundera.tests.crossdatastore.pickr.entities.photographer.PhotographerBi_1_M_1_M

    }

    @Override
    protected void getPhotographer()
    {
        PhotographerBi_1_M_1_M p = (PhotographerBi_1_M_1_M) pickr.getPhotographer(PhotographerBi_1_M_1_M.class,
                photographerId);
        assertPhotographer(p);

    }
View Full Code Here

Examples of com.impetus.kundera.tests.crossdatastore.pickr.entities.photographer.PhotographerBi_1_M_1_M

    }

    @Override
    protected void updatePhotographer()
    {
        PhotographerBi_1_M_1_M p = (PhotographerBi_1_M_1_M) pickr.getPhotographer(PhotographerBi_1_M_1_M.class,
                photographerId);
        assertPhotographer(p);
        p.setPhotographerName("Vivek");

        pickr.mergePhotographer(p);

        PhotographerBi_1_M_1_M p2 = (PhotographerBi_1_M_1_M) pickr.getPhotographer(PhotographerBi_1_M_1_M.class,
                photographerId);
        assertModifiedPhotographer(p2);
    }
View Full Code Here

Examples of com.impetus.kundera.tests.crossdatastore.pickr.entities.photographer.PhotographerBi_1_M_1_M

    @Override
    protected void getAllPhotographers()
    {
        List<Object> ps = pickr.getAllPhotographers(PhotographerBi_1_M_1_M.class.getSimpleName());
        PhotographerBi_1_M_1_M p = (PhotographerBi_1_M_1_M) ps.get(0);

        assertModifiedPhotographer(p);

    }
View Full Code Here

Examples of com.impetus.kundera.tests.crossdatastore.pickr.entities.photographer.PhotographerBi_1_M_1_M

    }

    @Override
    protected void deletePhotographer()
    {
        PhotographerBi_1_M_1_M p = (PhotographerBi_1_M_1_M) pickr.getPhotographer(PhotographerBi_1_M_1_M.class,
                photographerId);
        assertModifiedPhotographer(p);
        pickr.deletePhotographer(p);
        PhotographerBi_1_M_1_M p2 = (PhotographerBi_1_M_1_M) pickr.getPhotographer(PhotographerBi_1_M_1_M.class,
                photographerId);
        Assert.assertNull(p2);

    }
View Full Code Here

Examples of com.impetus.kundera.tests.crossdatastore.pickr.entities.photographer.PhotographerBi_1_M_1_M

    }

    private PhotographerBi_1_M_1_M populatePhotographer()
    {
        PhotographerBi_1_M_1_M p = new PhotographerBi_1_M_1_M();
        p.setPhotographerId(photographerId);
        p.setPhotographerName("Amresh");

        AlbumBi_1_M_1_M album1 = new AlbumBi_1_M_1_M("album_1", "My Phuket Vacation", "Went Phuket with friends");
        album1.addPhoto(new PhotoBi_1_M_1_M("photo_1", "One beach", "On beach with friends"));
        album1.addPhoto(new PhotoBi_1_M_1_M("photo_2", "In Hotel", "Chilling out in room"));
        album1.addPhoto(new PhotoBi_1_M_1_M("photo_3", "At Airport", "So tired"));

        AlbumBi_1_M_1_M album2 = new AlbumBi_1_M_1_M("album_2", "Office Pics", "Annual office party photos");
        album2.addPhoto(new PhotoBi_1_M_1_M("photo_4", "Office Team event", "Shot at Fun park"));
        album2.addPhoto(new PhotoBi_1_M_1_M("photo_5", "My Team", "My team is the best"));

        p.addAlbum(album1);
        p.addAlbum(album2);
        return p;

    }
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.