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
The class implements
Cloneable and aims to represent a decision criterion to be used on one or more values.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CriterionThis static constant defines a decision criterion for which a particular key is evaluated with the "key = NULL" clause.static final CriterionThis static constant defines a decision criterion for which a key-value pair is evaluated with the "key !static final CriterionThis static constant defines a decision criterion for which a particular key is not evaluated and so discarded.static final CriterionThis 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 optionalF:orV:, the key is NOT about anEDM extended attribute, is NOT about aSQL clausewhose operator is specified via a prefix or is one of the following values:__i,__u,__d).static final CriterionThis static constant defines a decision criterion for which a particular key is discarded if it's associates value is null.static final Criterionstatic final CriterionThis 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 CriterionDeprecated, for removal: This API element is subject to removal in a future version.static final CriterionThis 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 CollectionThis static constant defines the empty set of aCollection.static final CriterionThis static constant defines a decision criterion for which a key-value pair is evaluated with the "key=value" clause.static final CriterionThis static constant defines a decision criterion for which a key-value pair is evaluated with the "key>value" clause.static final CriterionThis static constant defines a decision criterion for which a key-value pair is evaluated with the "key>=value" clause.static final CriterionThis 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 CriterionThis static constant defines a decision criterion for which a key-value pair is evaluated with the "key IS value" clause.static final CriterionThis static constant defines a decision criterion for which a key-value pair is evaluated with the "key IS NOT value" clause.static final CriterionThis static constant defines a decision criterion for which a particular key is evaluated with the "key IS NOT NULL" clause.static final CriterionThis static constant defines a decision criterion for which a particular key is evaluated with the "key IS NULL" clause.static final CriterionThis static constant defines a decision criterion for which a key-value pair is evaluated with the "key<value" clause.static final CriterionThis static constant defines a decision criterion for which a key-value pair is evaluated with the "key<=value" clause.static final CriterionThis static constant defines a decision criterion for which a key-value pair is evaluated with the "key LIKE value" clause.static final CriterionThis static constant defines a decision criterion for which a key-value pair is evaluated with the "key<>value" clause.static final CriterionThis 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 CollectionThis static constant defines the null set of aCollection.static final CriterionCriterionuseful to build a SQL clause like<field> != <value>.static final CriterionCriterionuseful to build a SQL clause like<field> = <value>.static final CriterionCriterionuseful to build a SQL clause like<field> > <value>.static final CriterionCriterionuseful to build a SQL clause like<field> >= <value>.static final CriterionCriterionuseful to build a SQL clause like<field> IN (<values>).static final CriterionCriterionuseful to build a SQL clause like<field> < <value>.static final CriterionCriterionuseful to build a SQL clause like<field> <= <value>.static final CriterionCriterionuseful to build a SQL clause like<field> LIKE '<value>'.static final CriterionCriterionuseful to build a SQL clause like<field> NOT IN (<values>).static final CriterionCriterionuseful to build a SQL clause like<field> IS NOT NULL.static final CriterionCriterionuseful to build a SQL clause like<field> IS NULL.static final CriterionThis 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 CriterionThis static constant defines a decision criterion for which a particular key is evaluated with thekey IS NULLclause if the value associated with the key is a uselessCollection.static final CriterionDeprecated, for removal: This API element is subject to removal in a future version.useTAKE_EMPTY_COLLECTIONinstead, an improved version that also includes subclasses ofCollection.static final CriterionThis 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 CriterionThis 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 CriterionThis 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 theCollectionto be considered not useful for a decision criterion, of aCollection.static final CollectionThis static constant defines the String set, to be considered not useful for the LIKE decision criterion, of aCollection.static final CollectionDeprecated, for removal: This API element is subject to removal in a future version.useUSELESS_COLLECTIONinstead, an improved version that also includes subclasses ofCollection.static final CollectionThis static constant defines the String set, to be considered not useful for a decision criterion, of aCollection. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
EMPTY_SET
This static constant defines the empty set of aCollection. -
NULL_SET
This static constant defines the null set of aCollection. -
USELESS_STRING
This static constant defines the String set, to be considered not useful for a decision criterion, of aCollection. -
USELESS_LIKE
This static constant defines the String set, to be considered not useful for the LIKE decision criterion, of aCollection. -
USELESS_SET
Deprecated, for removal: This API element is subject to removal in a future version.useUSELESS_COLLECTIONinstead, an improved version that also includes subclasses ofCollection.This static constant defines the set to be considered not useful for a decision criterion, of aCollection. -
USELESS_COLLECTION
This static constant defines theCollectionto be considered not useful for a decision criterion, of aCollection. -
EQUAL
This static constant defines a decision criterion for which a key-value pair is evaluated with the "key=value" clause. -
NOT_EQUAL
This static constant defines a decision criterion for which a key-value pair is evaluated with the "key<>value" clause. -
LESSEQUAL
This static constant defines a decision criterion for which a key-value pair is evaluated with the "key<=value" clause. -
LESS
This static constant defines a decision criterion for which a key-value pair is evaluated with the "key<value" clause. -
GREATEREQUAL
This static constant defines a decision criterion for which a key-value pair is evaluated with the "key>=value" clause. -
GREATER
This static constant defines a decision criterion for which a key-value pair is evaluated with the "key>value" clause. -
DIFFERENT
This static constant defines a decision criterion for which a key-value pair is evaluated with the "key != value" clause. -
IS
This static constant defines a decision criterion for which a key-value pair is evaluated with the "key IS value" clause. -
ISNOT
This static constant defines a decision criterion for which a key-value pair is evaluated with the "key IS NOT value" clause. -
LIKE
This static constant defines a decision criterion for which a key-value pair is evaluated with the "key LIKE value" clause. -
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
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
This static constant defines a decision criterion for which a particular key is evaluated with the "key IS NULL" clause. -
ISNOTNULL
This static constant defines a decision criterion for which a particular key is evaluated with the "key IS NOT NULL" clause. -
ASSIGN_NULL
This static constant defines a decision criterion for which a particular key is evaluated with the "key = NULL" clause. -
DISCARD
This static constant defines a decision criterion for which a particular key is not evaluated and so discarded. -
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 optionalF:orV:, the key is NOT about anEDM extended attribute, is NOT about aSQL clausewhose operator is specified via a prefix or is one of the following values:__i,__u,__d). -
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
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
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, for removal: This API element is subject to removal in a future version.useDISCARD_USELESS_COLLECTIONinstead, an improved version that also includes subclasses ofCollection.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
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
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
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, for removal: This API element is subject to removal in a future version.useTAKE_EMPTY_COLLECTIONinstead, an improved version that also includes subclasses ofCollection.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
This static constant defines a decision criterion for which a particular key is evaluated with thekey IS NULLclause if the value associated with the key is a uselessCollection. -
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
Criterionuseful to build a SQL clause like<field> > <value>. -
REQUIRE_IS_GREATER_THAN_OR_EQUAL_TO
Criterionuseful to build a SQL clause like<field> >= <value>. -
REQUIRE_IS_LESS_THAN
Criterionuseful to build a SQL clause like<field> < <value>. -
REQUIRE_IS_LESS_THAN_OR_EQUAL_TO
Criterionuseful to build a SQL clause like<field> <= <value>. -
REQUIRE_IS_NULL
Criterionuseful to build a SQL clause like<field> IS NULL. -
REQUIRE_IS_NOT_NULL
Criterionuseful to build a SQL clause like<field> IS NOT NULL. -
REQUIRE_IS_DIFFERENT
Criterionuseful to build a SQL clause like<field> != <value>. -
DISCARD_USELESS_COLLECTION
-
REQUIRE_IS_LIKE
Criterionuseful to build a SQL clause like<field> LIKE '<value>'. -
REQUIRE_IS_IN
Criterionuseful to build a SQL clause like<field> IN (<values>). -
REQUIRE_IS_NOT_IN
Criterionuseful to build a SQL clause like<field> NOT IN (<values>). -
REQUIRE_IS_EQUAL_TO
Criterionuseful to build a SQL clause like<field> = <value>.
-
-
Constructor Details
-
Criterion
public Criterion()
-
-
Method Details
-
fieldDepiction
-
define
defines the Parts of the operation with all the information to become a fragment.- Parameters:
name- the nome of the context fieldvalue- 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
-
DISCARD_USELESS_COLLECTIONinstead, an improved version that also includes subclasses ofCollection.