Package org.apache.cayenne.exp.parser

Examples of org.apache.cayenne.exp.parser.ASTObjPath


        List<Expression> pairs = new ArrayList<Expression>(map.size());

        for (Map.Entry<String, ?> entry : map.entrySet()) {

            Expression exp = expressionOfType(pairType);
            exp.setOperand(0, new ASTObjPath(entry.getKey()));
            exp.setOperand(1, wrapPathOperand(entry.getValue()));
            pairs.add(exp);
        }

        return joinExp(Expression.AND, pairs);
View Full Code Here


    /**
     * A convenience method to create an OBJ_PATH "equal to" expression.
     */
    public static Expression matchExp(String pathSpec, Object value) {
        return new ASTEqual(new ASTObjPath(pathSpec), value);
    }
View Full Code Here

    /**
     * A convenience method to create an OBJ_PATH "not equal to" expression.
     */
    public static Expression noMatchExp(String pathSpec, Object value) {
        return new ASTNotEqual(new ASTObjPath(pathSpec), value);
    }
View Full Code Here

    /**
     * A convenience method to create an OBJ_PATH "less than" expression.
     */
    public static Expression lessExp(String pathSpec, Object value) {
        return new ASTLess(new ASTObjPath(pathSpec), value);
    }
View Full Code Here

    /**
     * A convenience method to create an OBJ_PATH "less than or equal to" expression.
     */
    public static Expression lessOrEqualExp(String pathSpec, Object value) {
        return new ASTLessOrEqual(new ASTObjPath(pathSpec), value);
    }
View Full Code Here

    /**
     * A convenience method to create an OBJ_PATH "greater than" expression.
     */
    public static Expression greaterExp(String pathSpec, Object value) {
        return new ASTGreater(new ASTObjPath(pathSpec), value);
    }
View Full Code Here

    /**
     * A convenience method to create an OBJ_PATH "greater than or equal to" expression.
     */
    public static Expression greaterOrEqualExp(String pathSpec, Object value) {
        return new ASTGreaterOrEqual(new ASTObjPath(pathSpec), value);
    }
View Full Code Here

     */
    public static Expression inExp(String pathSpec, Object... values) {
        if (values.length == 0) {
            return new ASTFalse();
        }
        return new ASTIn(new ASTObjPath(pathSpec), new ASTList(values));
    }
View Full Code Here

     */
    public static Expression inExp(String pathSpec, Collection<?> values) {
        if (values.isEmpty()) {
            return new ASTFalse();
        }
        return new ASTIn(new ASTObjPath(pathSpec), new ASTList(values));
    }
View Full Code Here

     */
    public static Expression notInExp(String pathSpec, Collection<?> values) {
        if (values.isEmpty()) {
            return new ASTTrue();
        }
        return new ASTNotIn(new ASTObjPath(pathSpec), new ASTList(values));
    }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.exp.parser.ASTObjPath

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.