Examples of aliasPathSplits()


Examples of org.apache.cayenne.query.SelectQuery.aliasPathSplits()

                        + " VALUES (2, 2, 'Y')"));

        SelectQuery query = new SelectQuery(Artist.class);
        query.andQualifier(ExpressionFactory.matchExp("p.paintingTitle", "X"));

        query.aliasPathSplits("paintingArray", "p");

        List<Artist> artists = context.performQuery(query);
        assertEquals(1, artists.size());
        assertEquals("AA", artists.get(0).getArtistName());
    }

Examples of org.apache.cayenne.query.SelectQuery.aliasPathSplits()

        SelectQuery query = new SelectQuery(Artist.class);
        query.andQualifier(ExpressionFactory.matchExp("p1.paintingTitle", "X"));
        query.andQualifier(ExpressionFactory.matchExp("p2.paintingTitle", "Y"));

        query.aliasPathSplits("paintingArray", "p1", "p2");

        List<Artist> artists = context.performQuery(query);
        assertEquals(1, artists.size());
        assertEquals("BB", artists.get(0).getArtistName());
    }

Examples of org.apache.cayenne.query.SelectQuery.aliasPathSplits()

                        + " VALUES (2, 2, 'Y')"));

        SelectQuery query = new SelectQuery(Artist.class);
        query.andQualifier(ExpressionFactory.matchExp("p.paintingTitle", "X"));

        query.aliasPathSplits("paintingArray", "p");

        List<Artist> artists = context.performQuery(query);
        assertEquals(1, artists.size());
        assertEquals("AA", artists.get(0).getArtistName());
    }

Examples of org.apache.cayenne.query.SelectQuery.aliasPathSplits()

        SelectQuery query = new SelectQuery(Artist.class);
        query.andQualifier(ExpressionFactory.matchExp("p1.paintingTitle", "X"));
        query.andQualifier(ExpressionFactory.matchExp("p2.paintingTitle", "Y"));

        query.aliasPathSplits("paintingArray", "p1", "p2");

        List<Artist> artists = context.performQuery(query);
        assertEquals(1, artists.size());
        assertEquals("BB", artists.get(0).getArtistName());
    }

Examples of org.apache.cayenne.query.SelectQuery.aliasPathSplits()

        createTwoArtistsTwoPaintingsDataSet();

        SelectQuery query = new SelectQuery(Artist.class);
        query.andQualifier(ExpressionFactory.matchExp("p.paintingTitle", "X"));

        query.aliasPathSplits("paintingArray", "p");

        List<Artist> artists = context.performQuery(query);
        assertEquals(1, artists.size());
        assertEquals("AA", artists.get(0).getArtistName());
    }

Examples of org.apache.cayenne.query.SelectQuery.aliasPathSplits()

        SelectQuery query = new SelectQuery(Artist.class);
        query.andQualifier(ExpressionFactory.matchExp("p1.paintingTitle", "X"));
        query.andQualifier(ExpressionFactory.matchExp("p2.paintingTitle", "Y"));

        query.aliasPathSplits("paintingArray", "p1", "p2");

        List<Artist> artists = context.performQuery(query);
        assertEquals(1, artists.size());
        assertEquals("BB", artists.get(0).getArtistName());
    }
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.