Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
All
Description
Add the following conveniences to the ExpressionFactory class for db expressions where there already exist correspinding object expressions. Useful in building expressions against PKs where the PK is not mapped to an object attribute in Cayenne.
public static Expression lessDbExp(String pathSpec, Object value)
public static Expression lessOrEqualDbExp(String pathSpec, Object value)
public static Expression greaterDbExp(String pathSpec, Object value)
public static Expression greaterOrEqualDbExp(String pathSpec, Object value)
public static Expression notInDbExp(String pathSpec, Collection values)
public static Expression notInDbExp(String pathSpec, Object[] values)
public static Expression betweenDbExp(String pathSpec, Object value1, Object value2)
public static Expression notBetweenDbExp(String pathSpec, Object value1, Object value2)
public static Expression likeDbExp(String pathSpec, Object value)
public static Expression notLikeDbExp(String pathSpec, Object value)
public static Expression likeIgnoreCaseDbExp(String pathSpec, Object value)
public static Expression notLikeIgnoreCaseDbExp(String pathSpec, Object value)
EXAMPLE:
/**
- A convenience method to create a DB_PATH "greater than" expression.
*/
public static Expression greaterDbExp(String pathSpec, Object value) { return new ASTGreater(new ASTDbPath(pathSpec), value); }