/** * Creates a copy of this expression node, without copying children. */ @Override public Expression shallowCopy() { ASTObjPath copy = new ASTObjPath(id); copy.path = path; return copy; }
/** * @param pathSpec a String "obj:" path. * @since 4.0 * @return a new "obj:" path expression for the specified String path. */ public static Expression pathExp(String pathSpec) { return new ASTObjPath(pathSpec); }
/** * @param path object path value * @return UPPER() call expression */ public static Expression upperExp(String path) { return new ASTUpper(new ASTObjPath(path)); }
/** * A convenience method to create an OBJ_PATH "greater than or equal to" expression. */ public static Expression greaterOrEqualExp(String pathSpec, Object value) { return new ASTGreaterOrEqual(new ASTObjPath(pathSpec), value); }
/** * A convenience shortcut for building BETWEEN expressions. */ public static Expression betweenExp(String pathSpec, Object value1, Object value2) { return new ASTBetween(new ASTObjPath(pathSpec), value1, value2); }
/** * A convenience shortcut for building NOT_BETWEEN expressions. */ public static Expression notBetweenExp(String pathSpec, Object value1, Object value2) { return new ASTNotBetween(new ASTObjPath(pathSpec), value1, value2); }
/** * 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); }
/** * A convenience method to create an OBJ_PATH "greater than" expression. */ public static Expression greaterExp(String pathSpec, Object value) { return new ASTGreater(new ASTObjPath(pathSpec), value); }
/** * A convenience shortcut for building NOT_LIKE expression. */ public static Expression notLikeExp(String pathSpec, Object value) { return new ASTNotLike(new ASTObjPath(pathSpec), value); }
/** * A convenience shortcut for building LIKE_IGNORE_CASE expression. */ public static Expression likeIgnoreCaseExp(String pathSpec, Object value) { return new ASTLikeIgnoreCase(new ASTObjPath(pathSpec), value); }
/** * A convenience shortcut for building IN expression. Return ASTFalse for * empty collection. */ public static Expression inExp(String pathSpec, Object... values) { return inExp(new ASTObjPath(pathSpec), values); }
/** * A convenience shortcut for building NOT_IN expression. Return ASTTrue for * empty collection. * * @since 1.0.6 */ public static Expression notInExp(String pathSpec, Object... values) { return notInExp(new ASTObjPath(pathSpec), values); }
/** * A convenience method to create an OBJ_PATH "less than or equal to" * expression. */ public static Expression lessOrEqualExp(String pathSpec, Object value) { return lessOrEqualExp(new ASTObjPath(pathSpec), value); }
/** * A convenience method to create an OBJ_PATH "greater than or equal to" * expression. */ public static Expression greaterOrEqualExp(String pathSpec, Object value) { return greaterOrEqualExp(new ASTObjPath(pathSpec), value); }
/** * A convenience shortcut for building BETWEEN expressions. */ public static Expression betweenExp(String pathSpec, Object value1, Object value2) { return betweenExp(new ASTObjPath(pathSpec), value1, value2); }
/** * A convenience method to create an OBJ_PATH "greater than" expression. */ public static Expression greaterExp(String pathSpec, Object value) { return greaterExp(new ASTObjPath(pathSpec), value); }
/** * A convenience shortcut for building NOT_BETWEEN expressions. */ public static Expression notBetweenExp(String pathSpec, Object value1, Object value2) { return notBetweenExp(new ASTObjPath(pathSpec), value1, value2); }
/** * A convenience shortcut for building NOT_IN expression. */ public static Expression notInExp(String pathSpec, Collection values) { return new ASTNotIn(new ASTObjPath(pathSpec), new ASTList(values)); }
/** * Call LOCATE(substring, string) function that return position * of substring in string or 0 if it is not found. * * @param substring object path value * @param path object path * @return LOCATE() call expression */ public static Expression locateExp(String substring, String path) { return locateExp(new ASTScalar(substring), new ASTObjPath(path)); }
/** * Call SUBSTRING(string, offset, length) function * * @param path Object path value * @param offset start offset of substring * @param length length of substring * @return SUBSTRING() call expression */ public static Expression substringExp(String path, int offset, int length) { return substringExp(new ASTObjPath(path), new ASTScalar((Integer)offset), new ASTScalar((Integer)length)); }