Examples of PhotographerUni_M_M_1_1


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

    @Test
    public void test_M_M_1_1()
    {
        FlushManager flushManager = new FlushManager();
        PhotographerUni_M_M_1_1 a1 = new PhotographerUni_M_M_1_1();
        a1.setPhotographerId(1);
        PhotographerUni_M_M_1_1 a2 = new PhotographerUni_M_M_1_1();
        a2.setPhotographerId(2);

        AlbumUni_M_M_1_1 b1 = new AlbumUni_M_M_1_1();
        b1.setAlbumId("b1");
        AlbumUni_M_M_1_1 b2 = new AlbumUni_M_M_1_1();
        b2.setAlbumId("b2");
        AlbumUni_M_M_1_1 b3 = new AlbumUni_M_M_1_1();
        b3.setAlbumId("b3");

        PhotoUni_M_M_1_1 c1 = new PhotoUni_M_M_1_1();
        c1.setPhotoId("c1");
        PhotoUni_M_M_1_1 c2 = new PhotoUni_M_M_1_1();
        c2.setPhotoId("c2");
        PhotoUni_M_M_1_1 c3 = new PhotoUni_M_M_1_1();
        c3.setPhotoId("c3");

        b1.setPhoto(c1);
        b2.setPhoto(c2);
        b3.setPhoto(c3);
        a1.addAlbum(b1);
        a1.addAlbum(b2);

        ObjectGraph graph1 = graphBuilder.getObjectGraph(a1, null);

        pc.getMainCache().addGraphToCache(graph1, pc);

        markAllNodeAsDirty();

        flushManager.buildFlushStack(graph1.getHeadNode(), EventType.INSERT);
        Deque<Node> fs = flushManager.getFlushStack();
        Assert.assertEquals(1, fs.size());
        flushManager.clearFlushStack();

        a2.addAlbum(b2);
        a2.addAlbum(b3);
        ObjectGraph graph2 = graphBuilder.getObjectGraph(a2, null);
        pc.getMainCache().addGraphToCache(graph2, pc);
        markAllNodeAsDirty();
        flushManager = new FlushManager();
        flushManager.buildFlushStack(graph2.getHeadNode(), EventType.INSERT);
View Full Code Here

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

    }

    @Override
    protected void getPhotographer()
    {
        PhotographerUni_M_M_1_1 p1 = (PhotographerUni_M_M_1_1) pickr.getPhotographer(PhotographerUni_M_M_1_1.class, 1);
        assertPhotographer(p1, 1);

        PhotographerUni_M_M_1_1 p2 = (PhotographerUni_M_M_1_1) pickr.getPhotographer(PhotographerUni_M_M_1_1.class, 2);
        assertPhotographer(p2, 2);
    }
View Full Code Here

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

    }

    @Override
    protected void updatePhotographer()
    {
        PhotographerUni_M_M_1_1 p1 = (PhotographerUni_M_M_1_1) pickr.getPhotographer(PhotographerUni_M_M_1_1.class, 1);
        assertPhotographer(p1, 1);
        p1.setPhotographerName("Amresh2");

        pickr.mergePhotographer(p1);

        PhotographerUni_M_M_1_1 p1Modified = (PhotographerUni_M_M_1_1) pickr.getPhotographer(
                PhotographerUni_M_M_1_1.class, 1);
        assertModifiedPhotographer(p1Modified, 1);

        PhotographerUni_M_M_1_1 p2 = (PhotographerUni_M_M_1_1) pickr.getPhotographer(PhotographerUni_M_M_1_1.class, 2);
        assertPhotographer(p2, 2);
        p2.setPhotographerName("Vivek2");

        pickr.mergePhotographer(p2);

        PhotographerUni_M_M_1_1 p2Modified = (PhotographerUni_M_M_1_1) pickr.getPhotographer(
                PhotographerUni_M_M_1_1.class, 2);
        assertModifiedPhotographer(p2Modified, 2);
    }
View Full Code Here

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

    {
        List<Object> ps = pickr.getAllPhotographers(PhotographerUni_M_M_1_1.class.getSimpleName());

        for (Object p : ps)
        {
            PhotographerUni_M_M_1_1 pp = (PhotographerUni_M_M_1_1) p;
            assertModifiedPhotographer(pp, pp.getPhotographerId());
        }

    }
View Full Code Here

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

    }

    @Override
    protected void deletePhotographer()
    {
        PhotographerUni_M_M_1_1 p1 = (PhotographerUni_M_M_1_1) pickr.getPhotographer(PhotographerUni_M_M_1_1.class, 1);
        assertModifiedPhotographer(p1, 1);
        pickr.deletePhotographer(p1);

        PhotographerUni_M_M_1_1 p1AfterDeletion = (PhotographerUni_M_M_1_1) pickr.getPhotographer(
                PhotographerUni_M_M_1_1.class, 1);
        Assert.assertNull(p1AfterDeletion);

        PhotographerUni_M_M_1_1 p2 = (PhotographerUni_M_M_1_1) pickr.getPhotographer(PhotographerUni_M_M_1_1.class, 2);
        Assert.assertNotNull(p2);
        pickr.deletePhotographer(p2);

        PhotographerUni_M_M_1_1 p2AfterDeletion = (PhotographerUni_M_M_1_1) pickr.getPhotographer(
                PhotographerUni_M_M_1_1.class, 2);
        Assert.assertNull(p2AfterDeletion);

    }
View Full Code Here

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

    private List<PhotographerUni_M_M_1_1> populatePhotographers()
    {
        List<PhotographerUni_M_M_1_1> photographers = new ArrayList<PhotographerUni_M_M_1_1>();

        // Photographer 1
        PhotographerUni_M_M_1_1 p1 = new PhotographerUni_M_M_1_1();
        p1.setPhotographerId(1);
        p1.setPhotographerName("Amresh");

        // Photographer 2
        PhotographerUni_M_M_1_1 p2 = new PhotographerUni_M_M_1_1();
        p2.setPhotographerId(2);
        p2.setPhotographerName("Vivek");

        AlbumUni_M_M_1_1 album1 = new AlbumUni_M_M_1_1("album_1", "My Phuket Vacation", "Went Phuket with friends");
        AlbumUni_M_M_1_1 album2 = new AlbumUni_M_M_1_1("album_2", "My Shimla Vacation", "Went Shimla with friends");
        AlbumUni_M_M_1_1 album3 = new AlbumUni_M_M_1_1("album_3", "My Zurik Vacation", "Went Zurik with friends");

        album1.setPhoto(new PhotoUni_M_M_1_1("photo_1", "One beach", "On beach with friends"));
        album2.setPhoto(new PhotoUni_M_M_1_1("photo_2", "In Hotel", "Chilling out in room"));
        album3.setPhoto(new PhotoUni_M_M_1_1("photo_3", "At Airport", "So tired"));

        p1.addAlbum(album1);
        p1.addAlbum(album2);

        p2.addAlbum(album2);
        p2.addAlbum(album3);

        photographers.add(p1);
        photographers.add(p2);

        return photographers;
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.