Package org.apache.cayenne.exp.parser

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


                }

                try {
                    // add new relationships from path
                    Iterator<CayenneMapEntry> it = entity
                            .resolvePathComponents(new ASTDbPath(dbRelationshipPath));

                    while (it.hasNext()) {
                        DbRelationship relationship = (DbRelationship) it.next();

                        dbRelationships.add(relationship);
View Full Code Here


    public static Expression matchAnyDbExp(Map<String, ?> map, int pairType) {
        List<Expression> pairs = new ArrayList<Expression>(map.size());

        for (Map.Entry<String, ?> entry : map.entrySet()) {
            Expression exp = expressionOfType(pairType);
            exp.setOperand(0, new ASTDbPath(entry.getKey()));
            exp.setOperand(1, wrapPathOperand(entry.getValue()));
            pairs.add(exp);
        }

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

    public static Expression matchAllDbExp(Map<String, ?> map, int pairType) {
        List<Expression> pairs = new ArrayList<Expression>(map.size());

        for (Map.Entry<String, ?> entry : map.entrySet()) {
            Expression exp = expressionOfType(pairType);
            exp.setOperand(0, new ASTDbPath(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 DB_PATH "equal to" expression.
     */
    public static Expression matchDbExp(String pathSpec, Object value) {
        return new ASTEqual(new ASTDbPath(pathSpec), value);
    }
View Full Code Here

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

     * A convenience method to create an DB_PATH "less than" expression.
     *
     * @since 3.0
     */
    public static Expression lessDbExp(String pathSpec, Object value) {
        return new ASTLess(new ASTDbPath(pathSpec), value);
    }
View Full Code Here

     * A convenience method to create an DB_PATH "less than or equal to" expression.
     *
     * @since 3.0
     */
    public static Expression lessOrEqualDbExp(String pathSpec, Object value) {
        return new ASTLessOrEqual(new ASTDbPath(pathSpec), value);
    }
View Full Code Here

     * A convenience method to create an DB_PATH "greater than" expression.
     *
     * @since 3.0
     */
    public static Expression greaterDbExp(String pathSpec, Object value) {
        return new ASTGreater(new ASTDbPath(pathSpec), value);
    }
View Full Code Here

     * A convenience method to create an DB_PATH "greater than or equal to" expression.
     *
     * @since 3.0
     */
    public static Expression greaterOrEqualDbExp(String pathSpec, Object value) {
        return new ASTGreaterOrEqual(new ASTDbPath(pathSpec), value);
    }
View Full Code Here

     */
    public static Expression inDbExp(String pathSpec, Object... values) {
        if (values.length == 0) {
            return new ASTFalse();
        }
        return new ASTIn(new ASTDbPath(pathSpec), new ASTList(values));
    }
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.