Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-651

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 3.0M1, 3.0
    • Core Library
    • 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); }

      Attachments

        Activity

          People

            Unassigned Unassigned
            npierson Neil Pierson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: