Examples of andQualifier()


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

                        "INSERT INTO PAINTING (PAINTING_ID, ARTIST_ID, PAINTING_TITLE) VALUES (3, 1, 'ACC')"));

        createDataContext().performGenericQuery(data);

        SelectQuery query = new SelectQuery(Artist.class);
        query.andQualifier(ExpressionFactory
                .likeExp("paintingArray.paintingTitle", "AB%"));
        query.addPrefetch(Artist.PAINTING_ARRAY_PROPERTY).setSemantics(
                PrefetchTreeNode.DISJOINT_PREFETCH_SEMANTICS);

        List<Artist> result = createDataContext().performQuery(query);
View Full Code Here

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

                        "INSERT INTO PAINTING (PAINTING_ID, ARTIST_ID, PAINTING_TITLE) VALUES (3, 1, 'ACC')"));

        createDataContext().performGenericQuery(data);

        SelectQuery query = new SelectQuery(Artist.class);
        query.andQualifier(ExpressionFactory
                .likeExp("paintingArray.paintingTitle", "AB%"));
        query.addPrefetch(Artist.PAINTING_ARRAY_PROPERTY).setSemantics(
                PrefetchTreeNode.JOINT_PREFETCH_SEMANTICS);

        List<Artist> result = createDataContext().performQuery(query);
View Full Code Here

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

                        "INSERT INTO PAINTING (PAINTING_ID, ARTIST_ID, PAINTING_TITLE) VALUES (3, 1, 'ACC')"));

        createDataContext().performGenericQuery(data);

        SelectQuery query = new SelectQuery(Artist.class);
        query.andQualifier(ExpressionFactory.likeExp(
                "paintingArray+.paintingTitle",
                "AB%"));
        query.addPrefetch(Artist.PAINTING_ARRAY_PROPERTY).setSemantics(
                PrefetchTreeNode.JOINT_PREFETCH_SEMANTICS);
View Full Code Here

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

     */
    public void testMultiObjRelFetch() throws Exception {
        createTestData("testPaintings");

        SelectQuery q = new SelectQuery("Painting");
        q.andQualifier(ExpressionFactory.matchExp("toArtist.artistName", "artist2"));
        q.orQualifier(ExpressionFactory.matchExp("toArtist.artistName", "artist4"));
        List results = context.performQuery(q);

        assertEquals(2, results.size());
    }
View Full Code Here

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

     */
    public void testMultiDbRelFetch() throws Exception {
        createTestData("testPaintings");

        SelectQuery q = new SelectQuery("Painting");
        q.andQualifier(ExpressionFactory.matchDbExp("toArtist.ARTIST_NAME", "artist2"));
        q.orQualifier(ExpressionFactory.matchDbExp("toArtist.ARTIST_NAME", "artist4"));
        List results = context.performQuery(q);

        assertEquals(2, results.size());
    }
View Full Code Here

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

     */
    public void testCreateSqlString5() throws Exception {
        // query with qualifier and ordering
        SelectQuery q = new SelectQuery(ArtistExhibit.class);
        q.setQualifier(ExpressionFactory.likeExp("toArtist.artistName", "a%"));
        q.andQualifier(ExpressionFactory.likeExp(
                "toExhibit.toGallery.paintingArray.toArtist.artistName",
                "a%"));

        Template test = new Template() {

View Full Code Here

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

     */
    public void testCreateSqlString6() throws Exception {
        // query with qualifier and ordering
        SelectQuery q = new SelectQuery(ArtistExhibit.class);
        q.setQualifier(ExpressionFactory.likeExp("toArtist.artistName", "a%"));
        q.andQualifier(ExpressionFactory.likeExp(
                "toArtist.paintingArray.paintingTitle",
                "p%"));

        Template test = new Template() {

View Full Code Here

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

     * "Artist.dateOfBirth > ? AND Artist.dateOfBirth < ?".
     */
    public void testCreateSqlString7() throws Exception {
        SelectQuery q = new SelectQuery(Artist.class);
        q.setQualifier(ExpressionFactory.greaterExp("dateOfBirth", new Date()));
        q.andQualifier(ExpressionFactory.lessExp("dateOfBirth", new Date()));

        Template test = new Template() {

            @Override
            void test(SelectTranslator transl) throws Exception {
View Full Code Here

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

     */
    public void testCreateSqlString8() throws Exception {
        SelectQuery q = new SelectQuery();
        q.setRoot(Painting.class);
        q.setQualifier(ExpressionFactory.greaterExp("toArtist.dateOfBirth", new Date()));
        q.andQualifier(ExpressionFactory.lessExp("toArtist.dateOfBirth", new Date()));

        Template test = new Template() {

            @Override
            void test(SelectTranslator transl) throws Exception {
View Full Code Here

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

        try {
            SelectQuery q = new SelectQuery(Artist.class);
            DbEntity entity = getDbEntity("ARTIST");
            entity.getDataMap().setQuotingSQLIdentifiers(true);
            q.setQualifier(ExpressionFactory.greaterExp("dateOfBirth", new Date()));
            q.andQualifier(ExpressionFactory.lessExp("dateOfBirth", new Date()));

            Template test = new Template() {

                @Override
                void test(SelectTranslator transl) throws Exception {
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.