Class Filter
java.lang.Object
overit.geocall.sql.code.criterion.Criterion
overit.geocall.sql.code.criterion.Filter
- All Implemented Interfaces:
Cloneable
The class extends
For example if you instantiate a filter object like this "newFilter ('AUSENAME'). OnValue ()", you want to discard the value associated with the given "AUSENAME" key.
Criterion and aims to define a specifc filter on a given string-pattern.For example if you instantiate a filter object like this "newFilter ('AUSENAME'). OnValue ()", you want to discard the value associated with the given "AUSENAME" key.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields 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
ConstructorsModifierConstructorDescriptionprotectedFilter(String fieldPattern, String valuePattern, Class type, Collection valuesIn, Collection valuesOut) protectedFilter(Filter.Match match, Criterion action) -
Method Summary
Modifier and TypeMethodDescriptiondefines the Parts of the operation with all the information to become a fragment.booleaninthashCode()protected booleanstatic Filteron()Instantiates a new filter that discards all clauses that match with a null set.static FilteronAny()Instantiates a new filter that discards all the records valued.static FilterInstantiates a new filter that discards the value associated with a specific key defined by the given string pattern.static FilteronNull()Instantiates a new filter that discards all clauses that doesn't match with a null set.static FilterInstantiates a new filter that discards all the value of a specific class type clz.
For example all Integer values, all String value ecc.static FilterInstantiates a new filter that discards all the LIKE clauses (given by input) relating to a string formed by the following reg-exp ".*%.*", which begins and ends with at least one character and inside it presents the '%' character.
For example if the following string "a%b" is passed to be evaluated with the like clause (for example "AUSENAME LIKE a%b"), the string will be discarded.static FilterInstantiates a new filter that discards all the clauses that contains a match with useless strings.static FilterInstantiates a new filter that discards all the clauses that match with usefull-like strings.static FilterInstantiates a new filter that discards all the clauses that match with usefull strings.static FilterInstantiates a new filter that discards all the value that match with the valuePattern and with the type class clz, passed by input.
For example all String values that start with the 'a' charcter.static FilterInstantiates a new filter that discards all the clauses that doesn't match with the inValues array and/or match with the outValues array.static FilteronValues(Collection inValues, Collection outValues) Instantiates a new filter that discards all the clauses that doesn't match with the inValues and/or match with the outValues.Creates a new filter with a custom criterion given by input.Methods inherited from class overit.geocall.sql.code.criterion.Criterion
fieldDepiction
-
Field Details
-
_match
-
_action
-
-
Constructor Details
-
Filter
-
Filter
protected Filter(String fieldPattern, String valuePattern, Class type, Collection valuesIn, Collection valuesOut) -
Filter
-
-
Method Details
-
onAny
Instantiates a new filter that discards all the records valued.- Returns:
- A new filter that discards all the records valued.
-
onName
Instantiates a new filter that discards the value associated with a specific key defined by the given string pattern.- Parameters:
pattern- The string pattern for which we want to discard the value.- Returns:
- A new filter that discards the value associated with a specific key defined by the given string pattern.
-
onType
Instantiates a new filter that discards all the value of a specific class type clz.
For example all Integer values, all String value ecc.- Parameters:
clz- The type of the class whose input values ??are to be discarded.- Returns:
- A new filter that discards all the value of a specific class type clz.
-
onValue
Instantiates a new filter that discards all the value that match with the valuePattern and with the type class clz, passed by input.
For example all String values that start with the 'a' charcter.- Parameters:
clz- The type of the class whose input values must match to be discarded.valuePattern- The patter on which the values must match to be discarded.- Returns:
- A new filter that discards all the value that match with the valuePattern and with the type class clz, passed by input.
-
on
Instantiates a new filter that discards all clauses that match with a null set.- Returns:
- A new filter that discards all clauses that match with a null set.
-
onUsefulString
Instantiates a new filter that discards all the clauses that contains a match with useless strings.- Returns:
- A new filter that discards all the clauses that contains a match with useless strings.
-
onUsefulLike
Instantiates a new filter that discards all the LIKE clauses (given by input) relating to a string formed by the following reg-exp ".*%.*", which begins and ends with at least one character and inside it presents the '%' character.
For example if the following string "a%b" is passed to be evaluated with the like clause (for example "AUSENAME LIKE a%b"), the string will be discarded.- Returns:
- A new filter that discards all the LIKE clauses (given by input) relating to a string formed by the following reg-exp ".*%.*" .
-
onNull
Instantiates a new filter that discards all clauses that doesn't match with a null set.- Returns:
- A new filter that discards all clauses that doesn't match with a null set.
-
onUselessString
Instantiates a new filter that discards all the clauses that match with usefull strings.- Returns:
- A new filter that discards all the clauses that match with usefull strings..
-
onUselessLike
Instantiates a new filter that discards all the clauses that match with usefull-like strings.- Returns:
- A new filter that discards all the clauses that match with usefull-like strings.
-
onValues
Instantiates a new filter that discards all the clauses that doesn't match with the inValues and/or match with the outValues.- Parameters:
inValues- A valuesCollectionthat represent the set that must match in order to not discard the clause.outValues- A valuesCollectionthat represent the set that must match in order to discard the clause.- Returns:
- A new filter that discards all the clauses that doesn't match with the inValues and/or match with the outValues.
-
onValues
Instantiates a new filter that discards all the clauses that doesn't match with the inValues array and/or match with the outValues array.- Parameters:
inValues- A values array that represent the set that must match in order to not discard the clause.outValues- A values array that represent the set that must match in order to discard the clause.- Returns:
- A new filter that discards all the clauses that doesn't match with the inValues array and/or match with the outValues array.
-
take
Creates a new filter with a custom criterion given by input.- Parameters:
a- The criterion to set.- Returns:
- A new filter with a custom criterion given by input.
-
matches
-
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()
-