Examples of readPropertyDirectly()


Examples of org.apache.cayenne.testdo.testmap.Artist.readPropertyDirectly()

            public void execute() {

                assertEquals(2, artists.size());

                Artist a1 = artists.get(0);
                List<?> toMany = (List<?>) a1
                        .readPropertyDirectly(Artist.PAINTING_ARRAY_PROPERTY);
                assertNotNull(toMany);
                assertFalse(((ValueHolder) toMany).isFault());
                assertEquals(1, toMany.size());
View Full Code Here

Examples of org.apache.cayenne.testdo.testmap.Artist.readPropertyDirectly()

                Painting p1 = (Painting) toMany.get(0);
                assertEquals("p_" + a1.getArtistName(), p1.getPaintingTitle());

                Artist a2 = artists.get(1);
                List<?> toMany2 = (List<?>) a2
                        .readPropertyDirectly(Artist.PAINTING_ARRAY_PROPERTY);
                assertNotNull(toMany2);
                assertFalse(((ValueHolder) toMany2).isFault());
                assertEquals(1, toMany2.size());
View Full Code Here

Examples of org.apache.cayenne.testdo.testmap.Artist.readPropertyDirectly()

                assertEquals(2, artists.size());

                for (int i = 0; i < 2; i++) {
                    Artist a = artists.get(i);
                    List<?> toMany = (List<?>) a.readPropertyDirectly("paintingArray");
                    assertNotNull(toMany);
                    assertFalse(((ValueHolder) toMany).isFault());
                    assertEquals(1, toMany.size());

                    Painting p = (Painting) toMany.get(0);
View Full Code Here

Examples of org.apache.cayenne.testdo.testmap.Artist.readPropertyDirectly()

            public void execute() {
                assertEquals(2, artists.size());

                Artist a1 = artists.get(0);
                assertEquals("artist2", a1.getArtistName());
                List<?> toMany = (List<?>) a1
                        .readPropertyDirectly(Artist.ARTIST_EXHIBIT_ARRAY_PROPERTY);
                assertNotNull(toMany);
                assertFalse(((ValueHolder) toMany).isFault());
                assertEquals(2, toMany.size());
View Full Code Here

Examples of org.apache.cayenne.testdo.testmap.Artist.readPropertyDirectly()

                        .getPersistenceState());
                assertSame(a1, artistExhibit.getToArtist());

                Artist a2 = artists.get(1);
                assertEquals("artist3", a2.getArtistName());
                List<?> toMany2 = (List<?>) a2
                        .readPropertyDirectly(Artist.ARTIST_EXHIBIT_ARRAY_PROPERTY);
                assertNotNull(toMany2);
                assertFalse(((ValueHolder) toMany2).isFault());
                assertEquals(3, toMany2.size());
View Full Code Here

Examples of org.apache.cayenne.testdo.testmap.Artist.readPropertyDirectly()

                assertEquals(2, artists.size());

                Artist a1 = artists.get(0);
                assertEquals("artist2", a1.getArtistName());
                List<?> toMany = (List<?>) a1.readPropertyDirectly("artistExhibitArray");
                assertNotNull(toMany);
                assertFalse(((ValueHolder) toMany).isFault());
                assertEquals(2, toMany.size());

                ArtistExhibit artistExhibit = (ArtistExhibit) toMany.get(0);
View Full Code Here

Examples of org.apache.cayenne.testdo.testmap.Artist.readPropertyDirectly()

                        .getPersistenceState());
                assertSame(a1, artistExhibit.getToArtist());

                Artist a2 = artists.get(1);
                assertEquals("artist3", a2.getArtistName());
                List<?> toMany2 = (List<?>) a2
                        .readPropertyDirectly(Artist.ARTIST_EXHIBIT_ARRAY_PROPERTY);
                assertNotNull(toMany2);
                assertFalse(((ValueHolder) toMany2).isFault());
                assertEquals(3, toMany2.size());
View Full Code Here

Examples of org.apache.cayenne.testdo.testmap.Artist.readPropertyDirectly()

            queryInterceptor.runWithQueriesBlocked(new UnitTestClosure() {

                public void execute() {
                    assertFalse(result.isEmpty());
                    Artist a1 = result.get(0);
                    List<?> toMany = (List<?>) a1.readPropertyDirectly("paintingArray");
                    assertNotNull(toMany);
                    assertFalse(((ValueHolder) toMany).isFault());
                }
            });
        }
View Full Code Here

Examples of org.apache.cayenne.testdo.testmap.Artist.readPropertyDirectly()

            queryInterceptor.runWithQueriesBlocked(new UnitTestClosure() {

                public void execute() {
                    assertFalse(result.isEmpty());
                    Artist a1 = result.get(0);
                    List<?> toMany = (List<?>) a1.readPropertyDirectly("paintingArray");
                    assertNotNull(toMany);
                    assertFalse(((ValueHolder) toMany).isFault());
                }
            });
View Full Code Here

Examples of org.apache.cayenne.testdo.testmap.Artist.readPropertyDirectly()

    }

    public void testNewToMany() throws Exception {
        Artist artist = context.newObject(Artist.class);
        artist.setArtistName("test");
        assertTrue(artist.readPropertyDirectly("paintingArray") instanceof ToManyList);

        ToManyList list = (ToManyList) artist.readPropertyDirectly("paintingArray");
        assertFalse(list.isFault());

        context.commitChanges();
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.