You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by "Neil Pierson (JIRA)" <ji...@apache.org> on 2006/09/11 16:36:49 UTC

[JIRA] Created: (CAY-651) Add convenience method to create missing DB_PATH expressions where there is a corresponding OBJ_PATH expression

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