Package org.apache.cayenne.exp.parser

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


    /**
     * A convenience shortcut for building LIKE expression.
     */
    public static Expression likeExp(String pathSpec, Object value) {
        return new ASTLike(new ASTObjPath(pathSpec), value);
    }
View Full Code Here


     * escape character.</p>
     *
     * @since 3.0.1
     */
    public static Expression likeExp(String pathSpec, Object value, char escapeChar) {
        return new ASTLike(new ASTObjPath(pathSpec), value, escapeChar);
    }
View Full Code Here

   
    /**
     * A convenience shortcut for building NOT_LIKE expression.
     */
    public static Expression notLikeExp(String pathSpec, Object value) {
        return new ASTNotLike(new ASTObjPath(pathSpec), value);
    }
View Full Code Here

     * escape character.</p>
     *
     * @since 3.0.1
     */
    public static Expression notLikeExp(String pathSpec, Object value, char escapeChar) {
        return new ASTNotLike(new ASTObjPath(pathSpec), value, escapeChar);
    }
View Full Code Here

    /**
     * A convenience shortcut for building LIKE_IGNORE_CASE expression.
     */
    public static Expression likeIgnoreCaseExp(String pathSpec, Object value) {
        return new ASTLikeIgnoreCase(new ASTObjPath(pathSpec), value);
    }
View Full Code Here

     * escape character.</p>
     *
     * @since 3.0.1
     */
    public static Expression likeIgnoreCaseExp(String pathSpec, Object value, char escapeChar) {
        return new ASTLikeIgnoreCase(new ASTObjPath(pathSpec), value, escapeChar);
    }
View Full Code Here

    /**
     * A convenience shortcut for building NOT_LIKE_IGNORE_CASE expression.
     */
    public static Expression notLikeIgnoreCaseExp(String pathSpec, Object value) {
        return new ASTNotLikeIgnoreCase(new ASTObjPath(pathSpec), value);
    }
View Full Code Here

     * escape character.</p>
     *
     * @since 3.0.1
     */
    public static Expression notLikeIgnoreCaseExp(String pathSpec, Object value, char escapeChar) {
        return new ASTNotLikeIgnoreCase(new ASTObjPath(pathSpec), value, escapeChar);
    }
View Full Code Here

        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.OR, pairs);
View Full Code Here

                String alias = aliasBase + i;
                String aliasedPath = beforeSplit + alias + afterSplit;
                i++;

                ASTPath pathExp = new ASTObjPath(aliasedPath);
                pathExp.setPathAliases(Collections.singletonMap(alias, splitChunk));
                matches.add(new ASTEqual(pathExp, value));
            }
        }
        else {
            for (Object value : values) {
                matches.add(new ASTEqual(new ASTObjPath(path), value));
            }
        }

        return joinExp(Expression.AND, matches);
    }
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.