Package org.apache.art

Examples of org.apache.art.Artist


        ObjectContext context = createDataContext();

        Painting p = context.newObject(Painting.class);
        p.setPaintingTitle("P1");

        Artist a = context.newObject(Artist.class);
        a.setArtistName("A1");

        Gallery g = context.newObject(Gallery.class);
        g.setGalleryName("G1");

        p.setToArtist(a);
View Full Code Here


        List objects = context.performQuery(query);
        assertEquals(DataContextCase.artistCount, objects.size());
        assertTrue(objects.get(1) instanceof Artist);

        Artist artist2 = (Artist) objects.get(1);
        assertEquals("artist2", artist2.getArtistName());
    }
View Full Code Here

    public void testBindObjectEqualShort() throws Exception {
        createTestData("prepare");

        ObjectContext context = createDataContext();

        Artist a = DataObjectUtils.objectForPK(context, Artist.class, 33002);

        String template = "SELECT * FROM PAINTING "
                + "WHERE #bindObjectEqual($a) ORDER BY PAINTING_ID";
        SQLTemplate query = new SQLTemplate(Painting.class, template);
        query.setColumnNamesCapitalization(CapsStrategy.UPPER);
View Full Code Here

    public void testBindObjectNotEqualShort() throws Exception {
        createTestData("prepare");

        ObjectContext context = createDataContext();

        Artist a = DataObjectUtils.objectForPK(context, Artist.class, 33002);

        String template = "SELECT * FROM PAINTING "
                + "WHERE #bindObjectNotEqual($a) ORDER BY PAINTING_ID";
        SQLTemplate query = new SQLTemplate(Painting.class, template);
        query.setColumnNamesCapitalization(CapsStrategy.UPPER);
View Full Code Here

    public void testBindObjectEqualFull() throws Exception {
        createTestData("prepare");

        ObjectContext context = createDataContext();

        Artist a = DataObjectUtils.objectForPK(context, Artist.class, 33002);

        String template = "SELECT * FROM PAINTING t0"
                + " WHERE #bindObjectEqual($a [ 't0.ARTIST_ID' ] [ 'ARTIST_ID' ] ) ORDER BY PAINTING_ID";
        SQLTemplate query = new SQLTemplate(Painting.class, template);
        query.setColumnNamesCapitalization(CapsStrategy.UPPER);
View Full Code Here

    public void testBindObjectEqualFullNonArray() throws Exception {
        createTestData("prepare");

        ObjectContext context = createDataContext();

        Artist a = DataObjectUtils.objectForPK(context, Artist.class, 33002);

        String template = "SELECT * FROM PAINTING t0"
                + " WHERE #bindObjectEqual($a 't0.ARTIST_ID' 'ARTIST_ID' ) ORDER BY PAINTING_ID";
        SQLTemplate query = new SQLTemplate(Painting.class, template);
        query.setColumnNamesCapitalization(CapsStrategy.UPPER);
View Full Code Here

    public void testBindObjectNotEqualFull() throws Exception {
        createTestData("prepare");

        ObjectContext context = createDataContext();

        Artist a = DataObjectUtils.objectForPK(context, Artist.class, 33002);

        String template = "SELECT * FROM PAINTING t0"
                + " WHERE #bindObjectNotEqual($a [ 't0.ARTIST_ID' ] [ 'ARTIST_ID' ] ) ORDER BY PAINTING_ID";
        SQLTemplate query = new SQLTemplate(Painting.class, template);
        query.setColumnNamesCapitalization(CapsStrategy.UPPER);
View Full Code Here

        IncrementalFaultList pagedList = (IncrementalFaultList) objects;
        assertEquals(DataContextCase.artistCount - pageSize, pagedList
                .getUnfetchedObjects());

        // check if we can resolve subsequent pages
        Artist artist = (Artist) objects.get(pageSize);

        int expectUnresolved = DataContextCase.artistCount - pageSize - pageSize;
        if (expectUnresolved < 0) {
            expectUnresolved = 0;
        }
        assertEquals(expectUnresolved, pagedList.getUnfetchedObjects());
        assertEquals("artist" + (pageSize + 1), artist.getArtistName());
    }
View Full Code Here

                PrefetchTreeNode.DISJOINT_PREFETCH_SEMANTICS);

        List<Artist> result = createDataContext().performQuery(query);
        assertEquals(1, result.size());

        Artist a = result.get(0);
        assertEquals(3, a.getPaintingArray().size());
    }
View Full Code Here

                PrefetchTreeNode.JOINT_PREFETCH_SEMANTICS);

        List<Artist> result = createDataContext().performQuery(query);
        assertEquals(1, result.size());

        Artist a = result.get(0);
        assertEquals(3, a.getPaintingArray().size());
    }
View Full Code Here

TOP

Related Classes of org.apache.art.Artist

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.