Examples of ASTObjPath


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

    /**
     * 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

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

    /**
     * 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

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

    /**
     * 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

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

            // we don't know whether its obj path or db path, so the expression can blow
            // ... in fact we can't support DB Path as the key is different from external
            // name,
            // so we will use Object type for all DB path...
            try {
                Object lastObject = new ASTObjPath(key).evaluate(entity);

                if (lastObject instanceof ObjAttribute) {
                    className = ((ObjAttribute) lastObject).getType();
                }
                else if (lastObject instanceof ObjRelationship) {
View Full Code Here

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

            // we don't know whether its obj path or db path, so the expression can blow
            // ... in fact we can't support DB Path as the key is different from external
            // name,
            // so we will use Object type for all DB path...
            try {
                Object lastObject = new ASTObjPath(key).evaluate(entity);

                if (lastObject instanceof ObjAttribute) {
                    className = ((ObjAttribute) lastObject).getType();
                }
                else if (lastObject instanceof ObjRelationship) {
View Full Code Here

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

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

                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

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

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

    /**
     * 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

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

    /**
     * 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
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.