Package org.apache.cayenne.exp

Examples of org.apache.cayenne.exp.Expression.toEJBQL()


    public void testRelationshipWhereClause2() throws Exception {
        ObjectContext context = createDataContext();

        Expression exp = ExpressionFactory.matchExp(Painting.TO_GALLERY_PROPERTY, null);
        EJBQLQuery query = new EJBQLQuery("select p.toArtist from Painting p where " + exp.toEJBQL("p"));

        context.performQuery(query);
    }

    public void testOrBrackets() throws Exception {
View Full Code Here


    //test for CAY-1313
    public void testRelationshipWhereClauseAndToEJBQL() throws Exception {
        ObjectContext context = createDataContext();
       
        Expression exp = ExpressionFactory.matchExp(Painting.TO_GALLERY_PROPERTY, null);
        EJBQLQuery query = new EJBQLQuery("select p.toArtist from Painting p where " + exp.toEJBQL("p"));
   
        context.performQuery(query);
    }
   
    public void testOrBrackets() throws Exception {
View Full Code Here

    }

    public void testRelationshipWhereClause2() throws Exception {
        Expression exp = ExpressionFactory.matchExp(Painting.TO_GALLERY_PROPERTY, null);
        EJBQLQuery query = new EJBQLQuery("select p.toArtist from Painting p where "
                + exp.toEJBQL("p"));

        context.performQuery(query);
    }

    public void testOrBrackets() throws Exception {
View Full Code Here

import org.apache.cayenne.exp.ExpressionFactory;

public class ASTLikeIgnoreCaseTest extends TestCase {
    public void testToEJBQL() {
        Expression like = ExpressionFactory.likeIgnoreCaseExp("a", "%b%");
        assertEquals(like.toEJBQL("p"), "upper(p.a) like '%B%'");
    }
}
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.