Class MatchMode
java.lang.Object
com.aquima.interactions.foundation.MatchMode
- All Implemented Interfaces:
Serializable
Represents the match mode used in LIKE conditions in queries.
- Since:
- 9.6
- Author:
- Petru Galanton
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MatchMode
Match mode for conditions of the formname like '%value%'
static final MatchMode
Match mode for conditions of the formname like '%value'
static final MatchMode
Match mode for conditions of the formname LIKE 'value'
static final MatchMode
Match mode for conditions of the formname like 'value%'
-
Method Summary
-
Field Details
-
EXACT
Match mode for conditions of the formname LIKE 'value'
-
START
Match mode for conditions of the formname like 'value%'
-
END
Match mode for conditions of the formname like '%value'
-
ANYWHERE
Match mode for conditions of the formname like '%value%'
-
-
Method Details
-
valueOf
Returns the match mode instance fir the given name.- Parameters:
mode
- the match mode- Returns:
- the corresponding MatchMode instance
- Throws:
IllegalArgumentException
- if no match mode exists with the given name
-
values
- Returns:
- all possible MatchMode values
-
getMode
- Returns:
- The string representation of this MatchMode.
-
apply
Applies this match mode to the given tested string. Depending on which MatchMode this is, this method returns true if the tested string starts with, ends with, contains or equals the filter string.A null test string doesn't match any filter, and no test string matches against a null filter. In particular, a null test string doesn't match against a null filter. If any of the parameters are null, this method returns false.
- Parameters:
tested
- the tested stringfilter
- the filter string- Returns:
- true if tested matches filter according to the rules of this match mode
-
toString
-
hashCode
public int hashCode() -
equals
-