Class Decision
java.lang.Object
overit.geocall.sql.code.criterion.Criterion
overit.geocall.sql.code.criterion.Decision
- All Implemented Interfaces:
Cloneable
The class extends
Criterion and it's used to apply a specific criterion if both field and value pass the validation.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Criterionprotected final Matchprotected final Matchprotected final StringStringabout the bug that, if provided, will enable or disable the evaluation of thisDecisionaccording to the relatedenablingvalue
So: if thisbugis provided andenablingistrue, thisDecisionwill be evaluated only in case thisbughas been activated if thisbugis provided andenablingisfalse, thisDecisionwill be evaluated only in case thisbughas not been activated if thisbugis not provided; thisDecisionwill always be evaluatedprotected final booleanAbooleanvalue useful in conjunction with thebugvalue.Fields inherited from class overit.geocall.sql.code.criterion.Criterion
ASSIGN_NULL, DIFFERENT, DISCARD, DISCARD_CONTROLS, DISCARD_NULLS, DISCARD_USELESS_COLLECTION, DISCARD_USELESS_LIKE, DISCARD_USELESS_SET, DISCARD_USELESS_STRING, EMPTY_SET, EQUAL, GREATER, GREATEREQUAL, IN, IS, ISNOT, ISNOTNULL, ISNULL, LESS, LESSEQUAL, LIKE, NOT_EQUAL, NOTIN, NULL_SET, REQUIRE_IS_DIFFERENT, REQUIRE_IS_EQUAL_TO, REQUIRE_IS_GREATER_THAN, REQUIRE_IS_GREATER_THAN_OR_EQUAL_TO, REQUIRE_IS_IN, REQUIRE_IS_LESS_THAN, REQUIRE_IS_LESS_THAN_OR_EQUAL_TO, REQUIRE_IS_LIKE, REQUIRE_IS_NOT_IN, REQUIRE_IS_NOT_NULL, REQUIRE_IS_NULL, RESET_EMPTY_SET, TAKE_EMPTY_COLLECTION, TAKE_EMPTY_SET, TAKE_IN, TAKE_IS_NULL, TAKE_LIKE, USELESS_COLLECTION, USELESS_LIKE, USELESS_SET, USELESS_STRING -
Constructor Summary
ConstructorsConstructorDescriptionThe class's constructor method.The class's constructor method.Creates a newDecisionusing the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptiondefines the Parts of the operation with all the information to become a fragment.booleanReturns a newDecisionwith the current_forMatch,_onMatch,_criterionand the provideddisabling bug.forEnablingBug(@NotNull String bug) Returns a newDecisionwith the current_forMatch,_onMatch,_criterion,bugand the providedenabling bug.Creates a decision which criterion is applied if the field's name (from the given key-value pairs) respect the string pattern.
If field's name doesn't respect the string pattern, processing continues to check if it's possible to match with another Decision.Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is not null.
If value passed is null, processing continues to check if it's possible to match with another Decision.forNull()Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is null.
If value passed is not null, processing continues to check if it's possible to match with another Decision.forPattern(Class<?> clz, String valuePattern) Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) respect the type Class and the string pattern, passed by parameters.
If value doesn't respect the string pattern and the type Class, processing continues to check if it's possible to match with another Decision.Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) respect the type Class passed by parameter.
If value doesn't respect the type Class, processing continues to check if it's possible to match with another Decision.Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is not empty and contains the % character (not only the %).
If value passed is empty or doesn't contains the % character, processing continues to check if it's possible to match with another Decision.Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is a not null or empty string.
If value passed is null or empty, processing continues to check if it's possible to match with another Decision.Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is null, empty or contains only the % character.
If value passed is not null,empty and not contains only the % character, processing continues to check if it's possible to match with another Decision.Deprecated, for removal: This API element is subject to removal in a future version.Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is a null or empty string.
If value passed is not null or empty, processing continues to check if it's possible to match with another Decision.forValue()Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is not null.
If value passed is null, processing continues to check if it's possible to match with another Decision.forValueIn(Collection<?> inValues) Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is within the collection "inValues" passed by parameter.
If value passed is not within the collection "inValues" passed by parameter, processing continues to check if it's possible to match with another Decision.forValueOut(Collection<?> outValues) Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is not within the collection "outValues" passed by parameter.
If value passed is within the collection "outValues" passed by parameter, processing continues to check if it's possible to match with another Decision.inthashCode()Create a Decision object with the onMatch value passed by parameter and the current forMatch and Criterion objects.Creates a decision which criterion is applied if the field's name (from the given key-value pairs) respect the string pattern.
If field's name doesn't respect the string pattern, processing will stop and will not continue.Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is not null.
If value passed is null, processing will stop and will not continue.onNull()Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is null.
If value passed is not null, processing will stop and will not continue.Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) respect the type Class and the string pattern, passed by parameters.
If value doesn't respect the string pattern and the type Class, processing will stop and will not continue.Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) respect the type Class passed by parameter.
If value doesn't respect the type Class, processing will stop and will not continue.Creates aDecisionwhich criterion is applied if the value passed (from the given key-value pairs) is not a useless collection, that isnullor an empty collection.
If value passed isnullor empty, processing will stop and will not continue.Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is not empty and contains the % character (not only the %).
If value passed is empty or doesn't contains the % character, processing will stop and will not continue.Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is a not null or empty string.
If value passed is null or empty, processing will stop and will not continue.Creates aDecisionwhich criterion is applied if the value passed (from the given key-value pairs) isnullorempty collection.
If value passed is not anullorempty collection, processing will stop and will not continue.Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is null, empty or contains only the % character.
If value passed is not null,empty and not contains only the % character, processing will stop and will not continue.Deprecated, for removal: This API element is subject to removal in a future version.useonUselessCollection()instead, an improved version that also includes subclasses ofCollection.Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is a null or empty string.
If value passed is not null or empty, processing will stop and will not continue.onValue()Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is not null.
If value passed is null, processing will stop and will not continue.onValueIn(Collection<?> inValues) Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is within the collection "inValues" passed by parameter.
If value passed is not within the collection "inValues" passed by parameter, processing will stop and will not continue.onValueOut(Collection<?> outValues) Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is not within the collection "outValues" passed by parameter.
If value passed is within the collection "outValues" passed by parameter, processing will stop and will not continue.Methods inherited from class overit.geocall.sql.code.criterion.Criterion
fieldDepiction
-
Field Details
-
_forMatch
-
_onMatch
-
_criterion
-
bug
Stringabout the bug that, if provided, will enable or disable the evaluation of thisDecisionaccording to the relatedenablingvalue
So:- if this
bugis provided andenablingistrue, thisDecisionwill be evaluated only in case thisbughas been activated - if this
bugis provided andenablingisfalse, thisDecisionwill be evaluated only in case thisbughas not been activated - if this
bugis not provided; thisDecisionwill always be evaluated
- if this
-
enabling
protected final boolean enabling
-
-
Constructor Details
-
Decision
The class's constructor method.- Parameters:
criterion- The specific criterion to be applied.
-
Decision
The class's constructor method.- Parameters:
forMatch- The field and/or the value that must match in "for" mode.onMatch- The field and/or the value that must match in "on" mode.criterion- The specific criterion to be applied.
-
Decision
Creates a newDecisionusing the provided parameters.- Parameters:
forMatch- the field and/or the value that must match in "for" mode.onMatch- the field and/or the value that must match in "on" mode.criterion- the specific criterion to be applied.bug-Stringabout the bug that will enable or disable the evaluation of thisDecisionaccording to the relatedenablingvalue.enabling- iftrue, thisDecisionwill be evaluated only in case the relatedbughas been activated; iffalse, thisDecisionwill be evaluated only in case the relatedbughas not been activated.
-
-
Method Details
-
forMatch
-
onMatch
Create a Decision object with the onMatch value passed by parameter and the current forMatch and Criterion objects.- Parameters:
m- The onMatch object to set in the new Decision.- Returns:
- A Decision with the onMatch value passed by parameter and the current forMatch and Criterion objects.
-
forName
Creates a decision which criterion is applied if the field's name (from the given key-value pairs) respect the string pattern.
If field's name doesn't respect the string pattern, processing continues to check if it's possible to match with another Decision.- Parameters:
pattern- The string with which the field passed as input must match.- Returns:
- A Decision which criterion is applied if the field's name (from the given key-value pairs) respect the string pattern.
-
forType
Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) respect the type Class passed by parameter.
If value doesn't respect the type Class, processing continues to check if it's possible to match with another Decision.- Parameters:
type- the type Class passed by parameter, with which the value passed as input must respect.- Returns:
- A Decision which criterion is applied if the value passed (from the given key-value pairs) respect the type Class passed by parameter.
-
forPattern
Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) respect the type Class and the string pattern, passed by parameters.
If value doesn't respect the string pattern and the type Class, processing continues to check if it's possible to match with another Decision.- Parameters:
clz- The type Class passed by parameter, with which the value passed as input must respect.valuePattern- The string with which the value passed as input must match.- Returns:
- A Decision which criterion is applied if the value passed (from the given key-value pairs) respect the type Class and the string pattern, passed by parameters.
-
forNotNull
Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is not null.
If value passed is null, processing continues to check if it's possible to match with another Decision.- Returns:
- A Decision which criterion is applied if the value passed (from the given key-value pairs) is not null.
-
forNull
Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is null.
If value passed is not null, processing continues to check if it's possible to match with another Decision.- Returns:
- A Decision which criterion is applied if the value passed (from the given key-value pairs) is null.
-
forUsefulString
Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is a not null or empty string.
If value passed is null or empty, processing continues to check if it's possible to match with another Decision.- Returns:
- A Decision which criterion is applied if the value passed (from the given key-value pairs) is a not null or empty string.
-
forUselessString
Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is a null or empty string.
If value passed is not null or empty, processing continues to check if it's possible to match with another Decision.- Returns:
- A Decision which criterion is applied if the value passed (from the given key-value pairs) is a null or empty string.
-
forUsefulLike
Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is not empty and contains the % character (not only the %).
If value passed is empty or doesn't contains the % character, processing continues to check if it's possible to match with another Decision.- Returns:
- A Decision which criterion is applied if the value passed (from the given key-value pairs) is not empty and contains the % character (not only the %).
-
forUselessLike
Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is null, empty or contains only the % character.
If value passed is not null,empty and not contains only the % character, processing continues to check if it's possible to match with another Decision.- Returns:
- A Decision which criterion is applied if the value passed (from the given key-value pairs) is null, empty or contains only the % character.
-
forUselessSet
Deprecated, for removal: This API element is subject to removal in a future version.useforUselessCollection()instead, an improved version that also includes subclasses ofCollection.Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is null or empty set.
If value passed is not a null or empty set, processing continues to check if it's possible to match with another Decision.- Returns:
- A Decision which criterion is applied if the value passed (from the given key-value pairs) is null or empty set.
-
forUsefulCollection
Creates aDecisionwhich criterion is applied if the value passed (from the given key-value pairs) is not a useless collection, that isnullor an empty collection.
If value passed isnullor empty, processing continues to check if it's possible to match with anotherDecision.- Returns:
- a
Decisionwhich criterion is applied if the value passed (from the given key-value pairs) is not a useless collection, that isnullor an empty collection.
-
forUselessCollection
Creates aDecisionwhich criterion is applied if the value passed (from the given key-value pairs) isnullorempty collection.
If value passed is not anullorempty collection, processing continues to check if it's possible to match with anotherDecision.- Returns:
- a
Decisionwhich criterion is applied if the value passed (from the given key-value pairs) isnullorempty collection.
-
forValueIn
Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is within the collection "inValues" passed by parameter.
If value passed is not within the collection "inValues" passed by parameter, processing continues to check if it's possible to match with another Decision.- Parameters:
inValues- The collection used to check if the passed values is included within it.- Returns:
- A Decision which criterion is applied if the value passed (from the given key-value pairs) is within the collection "inValues" passed by parameter.
-
forValue
Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is not null.
If value passed is null, processing continues to check if it's possible to match with another Decision.- Returns:
- A Decision which criterion is applied if the value passed (from the given key-value pairs) is not null.
-
forValueOut
Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is not within the collection "outValues" passed by parameter.
If value passed is within the collection "outValues" passed by parameter, processing continues to check if it's possible to match with another Decision.- Parameters:
outValues- The collection used to check if the passed values is not included within it.- Returns:
- A Decision which criterion is applied if the value passed (from the given key-value pairs) is not within the collection "outValues" passed by parameter.
-
forDisablingBug
Returns a newDecisionwith the current_forMatch,_onMatch,_criterionand the provideddisabling bug. -
forEnablingBug
Returns a newDecisionwith the current_forMatch,_onMatch,_criterion,bugand the providedenabling bug. -
onName
Creates a decision which criterion is applied if the field's name (from the given key-value pairs) respect the string pattern.
If field's name doesn't respect the string pattern, processing will stop and will not continue.- Parameters:
pattern- The string with which the field passed as input must match.- Returns:
- A Decision which criterion is applied if the field's name (from the given key-value pairs) respect the string pattern.
-
onType
Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) respect the type Class passed by parameter.
If value doesn't respect the type Class, processing will stop and will not continue.- Parameters:
type- the type Class passed by parameter, with which the value passed as input must respect.- Returns:
- A Decision which criterion is applied if the value passed (from the given key-value pairs) respect the type Class passed by parameter.
-
onPattern
Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) respect the type Class and the string pattern, passed by parameters.
If value doesn't respect the string pattern and the type Class, processing will stop and will not continue.- Parameters:
clz- The type Class passed by parameter, with which the value passed as input must respect.valuePattern- The string with which the value passed as input must match.- Returns:
- A Decision which criterion is applied if the value passed (from the given key-value pairs) respect the type Class and the string pattern, passed by parameters.
-
onNotNull
Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is not null.
If value passed is null, processing will stop and will not continue.- Returns:
- A Decision which criterion is applied if the value passed (from the given key-value pairs) is not null.
-
onNull
Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is null.
If value passed is not null, processing will stop and will not continue.- Returns:
- A Decision which criterion is applied if the value passed (from the given key-value pairs) is null.
-
onUsefulString
Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is a not null or empty string.
If value passed is null or empty, processing will stop and will not continue.- Returns:
- A Decision which criterion is applied if the value passed (from the given key-value pairs) is a not null or empty string.
-
onUselessString
Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is a null or empty string.
If value passed is not null or empty, processing will stop and will not continue.- Returns:
- A Decision which criterion is applied if the value passed (from the given key-value pairs) is a null or empty string.
-
onUsefulLike
Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is not empty and contains the % character (not only the %).
If value passed is empty or doesn't contains the % character, processing will stop and will not continue.- Returns:
- A Decision which criterion is applied if the value passed (from the given key-value pairs) is not empty and contains the % character (not only the %).
-
onUselessLike
Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is null, empty or contains only the % character.
If value passed is not null,empty and not contains only the % character, processing will stop and will not continue.- Returns:
- A Decision which criterion is applied if the value passed (from the given key-value pairs) is null, empty or contains only the % character.
-
onUselessSet
Deprecated, for removal: This API element is subject to removal in a future version.useonUselessCollection()instead, an improved version that also includes subclasses ofCollection.Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is null or empty set.
If value passed is not a null or empty set, processing will stop and will not continue.- Returns:
- A Decision which criterion is applied if the value passed (from the given key-value pairs) is null or empty set.
-
onUsefulCollection
Creates aDecisionwhich criterion is applied if the value passed (from the given key-value pairs) is not a useless collection, that isnullor an empty collection.
If value passed isnullor empty, processing will stop and will not continue.- Returns:
- a
Decisionwhich criterion is applied if the value passed (from the given key-value pairs) is not a useless collection, that isnullor an empty collection.
-
onUselessCollection
Creates aDecisionwhich criterion is applied if the value passed (from the given key-value pairs) isnullorempty collection.
If value passed is not anullorempty collection, processing will stop and will not continue.- Returns:
- a
Decisionwhich criterion is applied if the value passed (from the given key-value pairs) isnullorempty collection.
-
onValueIn
Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is within the collection "inValues" passed by parameter.
If value passed is not within the collection "inValues" passed by parameter, processing will stop and will not continue.- Parameters:
inValues- The collection used to check if the passed values is included within it.- Returns:
- A Decision which criterion is applied if the value passed (from the given key-value pairs) is within the collection "inValues" passed by parameter.
-
onValue
Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is not null.
If value passed is null, processing will stop and will not continue.- Returns:
- A Decision which criterion is applied if the value passed (from the given key-value pairs) is not null.
-
onValueOut
Creates a Decision which criterion is applied if the value passed (from the given key-value pairs) is not within the collection "outValues" passed by parameter.
If value passed is within the collection "outValues" passed by parameter, processing will stop and will not continue.- Parameters:
outValues- The collection used to check if the passed values is not included within it.- Returns:
- A Decision which criterion is applied if the value passed (from the given key-value pairs) is not within the collection "outValues" passed by parameter.
-
define
Description copied from class:Criteriondefines the Parts of the operation with all the information to become a fragment.- Specified by:
definein classCriterion- 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
-
equals
-
hashCode
public int hashCode()
-
forUselessCollection()instead, an improved version that also includes subclasses ofCollection.