Package org.apache.cayenne.exp.parser

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


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


     */
    public static Expression notInDbExp(String pathSpec, Object... values) {
        if (values.length == 0) {
            return new ASTTrue();
        }
        return new ASTNotIn(new ASTDbPath(pathSpec), new ASTList(values));
    }
View Full Code Here

     * A convenience shortcut for building BETWEEN expressions.
     *
     * @since 3.0
     */
    public static Expression betweenDbExp(String pathSpec, Object value1, Object value2) {
        return new ASTBetween(new ASTDbPath(pathSpec), value1, value2);
    }
View Full Code Here

     * A convenience shortcut for building NOT_BETWEEN expressions.
     *
     * @since 3.0
     */
    public static Expression notBetweenDbExp(String pathSpec, Object value1, Object value2) {
        return new ASTNotBetween(new ASTDbPath(pathSpec), value1, value2);
    }
View Full Code Here

     * A convenience shortcut for building LIKE DB_PATH expression.
     *
     * @since 3.0
     */
    public static Expression likeDbExp(String pathSpec, Object value) {
        return new ASTLike(new ASTDbPath(pathSpec), value);
    }
View Full Code Here

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

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

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

     */
    class DbEntityQualifierTransformer implements Transformer {

        public Object transform(Object input) {
            if (input instanceof ASTObjPath) {
                return new ASTDbPath(((SimpleNode) input).getOperand(0));
            }
            return input;
        }
View Full Code Here

        StringBuilder validPath = new StringBuilder();

        try {
            for (PathComponent<DbAttribute, DbRelationship> pathComponent : dbEntity
                    .resolvePath(new ASTDbPath(path), Collections.emptyMap())) {

                if (validPath.length() > 0) {
                    validPath.append(Entity.PATH_SEPARATOR);
                }
                validPath.append(pathComponent.getName());
View Full Code Here

TOP

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

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.