Class CriterionUpper

java.lang.Object
overit.geocall.sql.code.criterion.Criterion
overit.geocallapp.utilities.core.data.criteria.CriterionUpper
All Implemented Interfaces:
Cloneable

public class CriterionUpper extends Criterion
Custom Criterion for case-insensitive string comparison using UPPER() SQL function. This criterion wraps both the field and the parameter value with UPPER() to enable case-insensitive searches. The use of this operator on a specific field of a table probably requires the creation of a function-based index on UPPER(field).

Only works with String values and Collection<String> values.

For collections, extends OperationIn to wrap values with UPPER().

Example SQL output for String: UPPER(FIELD_NAME) = UPPER(?paramName)

Example SQL output for Collection<String>: UPPER(FIELD_NAME) IN (UPPER(?paramName%0), UPPER(?paramName%1), ...)

  • Constructor Details

    • CriterionUpper

      public CriterionUpper()
  • Method Details

    • define

      public Parts define(String name, Object value)
      Description copied from class: Criterion
      defines the Parts of the operation with all the information to become a fragment.
      Specified by:
      define in class Criterion
      Parameters:
      name - the nome of the context field
      value - the current value of the context field
      Returns:
      return null if the Criterion don't find an information, a Parts otherwise. Then Parts con also contain empty strings if the decision is to discard the name and the value