Examples of ASTList


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            List<Object> in = new ArrayList<Object>(maxInSize);
            for (Object v : values) {
                in.add(v);
                if (in.size() == maxInSize) {
                    Expression inExp = new ASTIn(path, new ASTList(in));
                    res = res != null ? res.orExp(inExp) : inExp;
                    in = new ArrayList<Object>(maxInSize);
                }
            }
            if (in.size() > 0) {
                Expression inExp = new ASTIn(path, new ASTList(in));
                res = res != null ? res.orExp(inExp) : inExp;
            }
            return res;
        }
View Full Code Here

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

     * Applies a few default rules for adding operands to expressions. In particular wraps
     * all lists into LIST expressions. Applied only in path expressions.
     */
    protected static Object wrapPathOperand(Object op) {
        if (op instanceof Collection) {
            return new ASTList((Collection<?>) op);
        }
        else if (op instanceof Object[]) {
            return new ASTList((Object[]) op);
        }
        else {
            return op;
        }
    }
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.