Class Criterion

java.lang.Object
overit.geocall.sql.code.criterion.Criterion
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
Clause, Criteria, CriterionUpper, Decision, Discard, Filter, Operation, OperationAssignNull, OperationIn, OperationIsNull

public abstract class Criterion extends Object implements Cloneable
The class implements Cloneable and aims to represent a decision criterion to be used on one or more values.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Criterion
    This static constant defines a decision criterion for which a particular key is evaluated with the "key = NULL" clause.
    static final Criterion
    This static constant defines a decision criterion for which a key-value pair is evaluated with the "key !
    static final Criterion
    This static constant defines a decision criterion for which a particular key is not evaluated and so discarded.
    static final Criterion
    This static constant defines a decision criterion for which a particular key is discarded if it matches with this ^(?:F:|V:)?(?:(?!gt:|gte:|lt:|lte:|isnull:|isnotnull:|ne:|like:|in:|ni:|eq:)[a-z].*|__i|__u|__d)$ regexp pattern (that is after optional F: or V:, the key is NOT about an EDM extended attribute, is NOT about a SQL clause whose operator is specified via a prefix or is one of the following values: __i, __u, __d).
    static final Criterion
    This static constant defines a decision criterion for which a particular key is discarded if it's associates value is null.
    static final Criterion
    Criterion useful to discard filters of Collection type that have null or empty values.
    static final Criterion
    This static constant defines a decision criterion for which a particular key is discarded if it's associates value matches with the useless-like set.
    static final Criterion
    Deprecated, for removal: This API element is subject to removal in a future version.
    use DISCARD_USELESS_COLLECTION instead, an improved version that also includes subclasses of Collection.
    static final Criterion
    This static constant defines a decision criterion for which a particular key is discarded if it's associates value matches with the useless-string set.
    static final Collection
    This static constant defines the empty set of a Collection.
    static final Criterion
    This static constant defines a decision criterion for which a key-value pair is evaluated with the "key=value" clause.
    static final Criterion
    This static constant defines a decision criterion for which a key-value pair is evaluated with the "key>value" clause.
    static final Criterion
    This static constant defines a decision criterion for which a key-value pair is evaluated with the "key>=value" clause.
    static final Criterion
    This static constant defines a decision criterion for which a key-value pair is evaluated with the IN operator like "key IN (value1,value2,value3)".
    static final Criterion
    This static constant defines a decision criterion for which a key-value pair is evaluated with the "key IS value" clause.
    static final Criterion
    This static constant defines a decision criterion for which a key-value pair is evaluated with the "key IS NOT value" clause.
    static final Criterion
    This static constant defines a decision criterion for which a particular key is evaluated with the "key IS NOT NULL" clause.
    static final Criterion
    This static constant defines a decision criterion for which a particular key is evaluated with the "key IS NULL" clause.
    static final Criterion
    This static constant defines a decision criterion for which a key-value pair is evaluated with the "key<value" clause.
    static final Criterion
    This static constant defines a decision criterion for which a key-value pair is evaluated with the "key<=value" clause.
    static final Criterion
    This static constant defines a decision criterion for which a key-value pair is evaluated with the "key LIKE value" clause.
    static final Criterion
    This static constant defines a decision criterion for which a key-value pair is evaluated with the "key<>value" clause.
    static final Criterion
    This static constant defines a decision criterion for which a key-value pair is evaluated with the NOT IN operator like "key NOT IN (value1,value2,value3)".
    static final Collection
    This static constant defines the null set of a Collection.
    static final Criterion
    Criterion useful to build a SQL clause like <field> != <value>.
    static final Criterion
    Criterion useful to build a SQL clause like <field> = <value>.
    static final Criterion
    Criterion useful to build a SQL clause like <field> > <value>.
    static final Criterion
    Criterion useful to build a SQL clause like <field> >= <value>.
    static final Criterion
    Criterion useful to build a SQL clause like <field> IN (<values>).
    static final Criterion
    Criterion useful to build a SQL clause like <field> < <value>.
    static final Criterion
    Criterion useful to build a SQL clause like <field> <= <value>.
    static final Criterion
    Criterion useful to build a SQL clause like <field> LIKE '<value>'.
    static final Criterion
    Criterion useful to build a SQL clause like <field> NOT IN (<values>).
    static final Criterion
    Criterion useful to build a SQL clause like <field> IS NOT NULL.
    static final Criterion
    Criterion useful to build a SQL clause like <field> IS NULL.
    static final Criterion
    This static constant defines a decision criterion for which a particular key is evaluated with the "key = NULL" clause (for INSERT and UPDATE) if the value associated to the key is a useless set.
    static final Criterion
    This static constant defines a decision criterion for which a particular key is evaluated with the key IS NULL clause if the value associated with the key is a useless Collection.
    static final Criterion
    Deprecated, for removal: This API element is subject to removal in a future version.
    use TAKE_EMPTY_COLLECTION instead, an improved version that also includes subclasses of Collection.
    static final Criterion
    This static constant defines a decision criterion for which a particular key is evaluated with the "key IN (VALUE1,VALUE2...)" clause if the value associated to the key is collection.
    static final Criterion
    This static constant defines a decision criterion for which a particular key is evaluated with the "key IS NULL" clause, if the value associated to the key is null.
    static final Criterion
    This static constant defines a decision criterion for which a particular key is evaluated with the "key LIKE value" clause if the value associated to the key matches with the usefully-like character set.
    static final Collection<?>
    This static constant defines the Collection to be considered not useful for a decision criterion, of a Collection.
    static final Collection
    This static constant defines the String set, to be considered not useful for the LIKE decision criterion, of a Collection.
    static final Collection
    Deprecated, for removal: This API element is subject to removal in a future version.
    use USELESS_COLLECTION instead, an improved version that also includes subclasses of Collection.
    static final Collection
    This static constant defines the String set, to be considered not useful for a decision criterion, of a Collection.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract Parts
    define(String name, Object value)
    defines the Parts of the operation with all the information to become a fragment.
    static String
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • EMPTY_SET

      public static final Collection EMPTY_SET
      This static constant defines the empty set of a Collection.
    • NULL_SET

      public static final Collection NULL_SET
      This static constant defines the null set of a Collection.
    • USELESS_STRING

      public static final Collection USELESS_STRING
      This static constant defines the String set, to be considered not useful for a decision criterion, of a Collection.
    • USELESS_LIKE

      public static final Collection USELESS_LIKE
      This static constant defines the String set, to be considered not useful for the LIKE decision criterion, of a Collection.
    • USELESS_SET

      @Deprecated(since="13.1", forRemoval=true) public static final Collection USELESS_SET
      Deprecated, for removal: This API element is subject to removal in a future version.
      use USELESS_COLLECTION instead, an improved version that also includes subclasses of Collection.
      This static constant defines the set to be considered not useful for a decision criterion, of a Collection.
    • USELESS_COLLECTION

      public static final Collection<?> USELESS_COLLECTION
      This static constant defines the Collection to be considered not useful for a decision criterion, of a Collection.
    • EQUAL

      public static final Criterion EQUAL
      This static constant defines a decision criterion for which a key-value pair is evaluated with the "key=value" clause.
    • NOT_EQUAL

      public static final Criterion NOT_EQUAL
      This static constant defines a decision criterion for which a key-value pair is evaluated with the "key<>value" clause.
    • LESSEQUAL

      public static final Criterion LESSEQUAL
      This static constant defines a decision criterion for which a key-value pair is evaluated with the "key<=value" clause.
    • LESS

      public static final Criterion LESS
      This static constant defines a decision criterion for which a key-value pair is evaluated with the "key<value" clause.
    • GREATEREQUAL

      public static final Criterion GREATEREQUAL
      This static constant defines a decision criterion for which a key-value pair is evaluated with the "key>=value" clause.
    • GREATER

      public static final Criterion GREATER
      This static constant defines a decision criterion for which a key-value pair is evaluated with the "key>value" clause.
    • DIFFERENT

      public static final Criterion DIFFERENT
      This static constant defines a decision criterion for which a key-value pair is evaluated with the "key != value" clause.
    • IS

      public static final Criterion IS
      This static constant defines a decision criterion for which a key-value pair is evaluated with the "key IS value" clause.
    • ISNOT

      public static final Criterion ISNOT
      This static constant defines a decision criterion for which a key-value pair is evaluated with the "key IS NOT value" clause.
    • LIKE

      public static final Criterion LIKE
      This static constant defines a decision criterion for which a key-value pair is evaluated with the "key LIKE value" clause.
    • IN

      public static final Criterion IN
      This static constant defines a decision criterion for which a key-value pair is evaluated with the IN operator like "key IN (value1,value2,value3)". The Values must be wrapped in a collection.
    • NOTIN

      public static final Criterion NOTIN
      This static constant defines a decision criterion for which a key-value pair is evaluated with the NOT IN operator like "key NOT IN (value1,value2,value3)". The Values must be wrapped in a collection.
    • ISNULL

      public static final Criterion ISNULL
      This static constant defines a decision criterion for which a particular key is evaluated with the "key IS NULL" clause.
    • ISNOTNULL

      public static final Criterion ISNOTNULL
      This static constant defines a decision criterion for which a particular key is evaluated with the "key IS NOT NULL" clause.
    • ASSIGN_NULL

      public static final Criterion ASSIGN_NULL
      This static constant defines a decision criterion for which a particular key is evaluated with the "key = NULL" clause.
    • DISCARD

      public static final Criterion DISCARD
      This static constant defines a decision criterion for which a particular key is not evaluated and so discarded.
    • DISCARD_CONTROLS

      public static final Criterion DISCARD_CONTROLS
      This static constant defines a decision criterion for which a particular key is discarded if it matches with this ^(?:F:|V:)?(?:(?!gt:|gte:|lt:|lte:|isnull:|isnotnull:|ne:|like:|in:|ni:|eq:)[a-z].*|__i|__u|__d)$ regexp pattern (that is after optional F: or V:, the key is NOT about an EDM extended attribute, is NOT about a SQL clause whose operator is specified via a prefix or is one of the following values: __i, __u, __d).
    • DISCARD_NULLS

      public static final Criterion DISCARD_NULLS
      This static constant defines a decision criterion for which a particular key is discarded if it's associates value is null.
    • DISCARD_USELESS_STRING

      public static final Criterion DISCARD_USELESS_STRING
      This static constant defines a decision criterion for which a particular key is discarded if it's associates value matches with the useless-string set.
    • DISCARD_USELESS_LIKE

      public static final Criterion DISCARD_USELESS_LIKE
      This static constant defines a decision criterion for which a particular key is discarded if it's associates value matches with the useless-like set.
    • DISCARD_USELESS_SET

      @Deprecated(since="13.1", forRemoval=true) public static final Criterion DISCARD_USELESS_SET
      Deprecated, for removal: This API element is subject to removal in a future version.
      use DISCARD_USELESS_COLLECTION instead, an improved version that also includes subclasses of Collection.
      This static constant defines a decision criterion for which a particular key is discarded if it's associates value matches with the useless set.
    • TAKE_LIKE

      public static final Criterion TAKE_LIKE
      This static constant defines a decision criterion for which a particular key is evaluated with the "key LIKE value" clause if the value associated to the key matches with the usefully-like character set.
    • TAKE_IS_NULL

      public static final Criterion TAKE_IS_NULL
      This static constant defines a decision criterion for which a particular key is evaluated with the "key IS NULL" clause, if the value associated to the key is null.
    • TAKE_IN

      public static final Criterion TAKE_IN
      This static constant defines a decision criterion for which a particular key is evaluated with the "key IN (VALUE1,VALUE2...)" clause if the value associated to the key is collection.
    • TAKE_EMPTY_SET

      @Deprecated(since="13.1", forRemoval=true) public static final Criterion TAKE_EMPTY_SET
      Deprecated, for removal: This API element is subject to removal in a future version.
      use TAKE_EMPTY_COLLECTION instead, an improved version that also includes subclasses of Collection.
      This static constant defines a decision criterion for which a particular key is evaluated with the "key IS NULL" clause if the value associated to the key is a useless set.
    • TAKE_EMPTY_COLLECTION

      public static final Criterion TAKE_EMPTY_COLLECTION
      This static constant defines a decision criterion for which a particular key is evaluated with the key IS NULL clause if the value associated with the key is a useless Collection.
    • RESET_EMPTY_SET

      public static final Criterion RESET_EMPTY_SET
      This static constant defines a decision criterion for which a particular key is evaluated with the "key = NULL" clause (for INSERT and UPDATE) if the value associated to the key is a useless set.
    • REQUIRE_IS_GREATER_THAN

      public static final Criterion REQUIRE_IS_GREATER_THAN
      Criterion useful to build a SQL clause like <field> > <value>.
    • REQUIRE_IS_GREATER_THAN_OR_EQUAL_TO

      public static final Criterion REQUIRE_IS_GREATER_THAN_OR_EQUAL_TO
      Criterion useful to build a SQL clause like <field> >= <value>.
    • REQUIRE_IS_LESS_THAN

      public static final Criterion REQUIRE_IS_LESS_THAN
      Criterion useful to build a SQL clause like <field> < <value>.
    • REQUIRE_IS_LESS_THAN_OR_EQUAL_TO

      public static final Criterion REQUIRE_IS_LESS_THAN_OR_EQUAL_TO
      Criterion useful to build a SQL clause like <field> <= <value>.
    • REQUIRE_IS_NULL

      public static final Criterion REQUIRE_IS_NULL
      Criterion useful to build a SQL clause like <field> IS NULL.
    • REQUIRE_IS_NOT_NULL

      public static final Criterion REQUIRE_IS_NOT_NULL
      Criterion useful to build a SQL clause like <field> IS NOT NULL.
    • REQUIRE_IS_DIFFERENT

      public static final Criterion REQUIRE_IS_DIFFERENT
      Criterion useful to build a SQL clause like <field> != <value>.
    • DISCARD_USELESS_COLLECTION

      public static final Criterion DISCARD_USELESS_COLLECTION
      Criterion useful to discard filters of Collection type that have null or empty values.
    • REQUIRE_IS_LIKE

      public static final Criterion REQUIRE_IS_LIKE
      Criterion useful to build a SQL clause like <field> LIKE '<value>'.
    • REQUIRE_IS_IN

      public static final Criterion REQUIRE_IS_IN
      Criterion useful to build a SQL clause like <field> IN (<values>).
    • REQUIRE_IS_NOT_IN

      public static final Criterion REQUIRE_IS_NOT_IN
      Criterion useful to build a SQL clause like <field> NOT IN (<values>).
    • REQUIRE_IS_EQUAL_TO

      public static final Criterion REQUIRE_IS_EQUAL_TO
      Criterion useful to build a SQL clause like <field> = <value>.
  • Constructor Details

    • Criterion

      public Criterion()
  • Method Details

    • fieldDepiction

      public static String fieldDepiction(String key)
    • define

      public abstract Parts define(String name, Object value)
      defines the Parts of the operation with all the information to become a fragment.
      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