/** * 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 exp string expression * @return LOCATE() call expression */ public static Expression locateExp(String substring, Expression exp) { return locateExp(new ASTScalar(substring), exp); }
/** * 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)); }
/** * @see FunctionExpressionFactory#locateExp(String, Expression) */ public Property<Integer> locate(String string) { return create(FunctionExpressionFactory.locateExp(ExpressionFactory.wrapScalarValue(string), getExpression()), Integer.class); }
/** * @see FunctionExpressionFactory#locateExp(Expression, Expression) */ public Property<Integer> locate(Property<? extends String> property) { return create(FunctionExpressionFactory.locateExp(property.getExpression(), getExpression()), Integer.class); }