FAQ
Add convenience method to create missing DB_PATH expressions where there is a corresponding OBJ_PATH expression
-----------------------------------------------------------------------------------------------------------------

Key: CAY-651
URL: http://issues.apache.org/cayenne/browse/CAY-651
Project: Cayenne
Type: Improvement

Components: Cayenne Core Library
Environment: All
Reporter: Neil Pierson
Priority: Minor


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);
}



--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/cayenne/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriescayenne
postedSep 11, '06 at 2:40p
activeSep 11, '06 at 2:40p
posts1
users1
websitecayenne.apache.org

1 user in discussion

Neil Pierson (JIRA): 1 post

People

Translate

site design / logo © 2021 Grokbase