public class BasicStringSearchConstraint extends BasicFieldConstraint implements StringSearchConstraint, Serializable
modifiableMATCH_TYPE_DESCRIPTIONS, MATCH_TYPE_FUZZY, MATCH_TYPE_LITERAL, MATCH_TYPE_SYNONYM, PARAM_FUZZINESS, PARAM_PROXIMITY_LIMIT, SEARCH_TYPE_DESCRIPTIONS, SEARCH_TYPE_PHRASE_ORIENTED, SEARCH_TYPE_PROXIMITY_ORIENTED, SEARCH_TYPE_WORD_ORIENTED| Constructor and Description |
|---|
BasicStringSearchConstraint(StepField field,
int searchType,
int matchType,
List<String> searchTerms)
Creates a new instance of BasicStringSearchConstraint.
|
BasicStringSearchConstraint(StepField field,
int searchType,
int matchType,
String searchTerms)
Creates a new instance of BasicStringSearchConstraint.
|
| Modifier and Type | Method and Description |
|---|---|
BasicStringSearchConstraint |
addSearchTerm(String searchTerm)
Adds searchterm to list of searchterms.
|
boolean |
equals(Object obj)
Compares this constraint to the specified object.
|
int |
getBasicSupportLevel()
Tests if this constraint is supported by the basic queryhandler.
|
int |
getMatchType()
Gets the match type.
|
String |
getMatchTypeDescription()
Returns a description of the match type
|
Map<String,Object> |
getParameters()
Gets value of additional parameters.
|
List<String> |
getSearchTerms()
Gets the list of searchterms.
|
int |
getSearchType()
Gets the search type, this specifies how the search is performed.
|
String |
getSearchTypeDescription()
Returns a description of the search type
|
int |
hashCode() |
BasicStringSearchConstraint |
setMatchType(int matchType)
Sets the match type.
|
BasicStringSearchConstraint |
setParameter(String name,
Object value)
Sets parameter.
|
BasicStringSearchConstraint |
setSearchTerms(List<String> searchTerms)
Sets searchterms to elements in specified list.
|
BasicStringSearchConstraint |
setSearchTerms(String searchTerms)
Sets searchterms to searchterms in string.
|
BasicStringSearchConstraint |
setSearchType(int searchType)
Sets the search type.
|
String |
toString()
Returns a string representation of this StringSearchConstraint.
|
getField, getFieldName, isCaseSensitive, matches, setCaseSensitiveisInverse, setInverse, setUnmodifiableclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetField, isCaseSensitive, matchesisInverse, setUnmodifiablepublic BasicStringSearchConstraint(StepField field, int searchType, int matchType, List<String> searchTerms)
field - The associated field.searchType - The search type.matchType - The match type.searchTerms - the searchtermsIllegalArgumentValue - when an invalid argument is supplied.getSearchType(),
getMatchType()public BasicStringSearchConstraint(StepField field, int searchType, int matchType, String searchTerms)
field - The associated field.searchType - The search type.matchType - The match type.searchTerms - String containing searchterms as words separated
by white space.IllegalArgumentValue - when an invalid argument is supplied.getSearchType(),
getMatchType()public BasicStringSearchConstraint setMatchType(int matchType)
matchType - The matchtype.BasicStringSearchConstraint instance.IllegalArgumentValue - when an invalid argument is supplied.getMatchType()public BasicStringSearchConstraint setSearchType(int searchType)
searchType - The searchType.BasicStringSearchConstraint instance.IllegalArgumentValue - when an invalid argument is supplied.getSearchType()public BasicStringSearchConstraint addSearchTerm(String searchTerm)
searchTerm - the searchtermsBasicStringSearchConstraint instance.IllegalArgumentException - when an invalid argument is supplied.public BasicStringSearchConstraint setSearchTerms(List<String> searchTerms)
searchTerms - the searchtermsBasicStringSearchConstraint instance.public BasicStringSearchConstraint setSearchTerms(String searchTerms)
searchTerms - String containing searchterms as words separated
by white space.BasicStringSearchConstraint instance.IllegalArgumentException - when an invalid argument is supplied.public BasicStringSearchConstraint setParameter(String name, Object value)
name - The parameter name.value - The parameter value.BasicStringSearchConstraint instance.IllegalArgumentValue - when an invalid argument is supplied.getParameters()public Map<String,Object> getParameters()
StringSearchConstraintgetParameters in interface StringSearchConstraintpublic int getMatchType()
StringSearchConstraintgetMatchType in interface StringSearchConstraintpublic String getMatchTypeDescription()
public int getSearchType()
StringSearchConstraintgetSearchType in interface StringSearchConstraintpublic String getSearchTypeDescription()
public List<String> getSearchTerms()
StringSearchConstraintgetSearchTerms in interface StringSearchConstraintpublic int getBasicSupportLevel()
ConstraintgetBasicSupportLevel in interface ConstraintgetBasicSupportLevel in class BasicConstraintpublic boolean equals(Object obj)
Constrainttrue if and only if the argument is a non-null
Constraint object representing the same constraint(s).equals in interface Constraintequals in class BasicFieldConstraintobj - The object to compare with.true if the objects are equal,
false otherwise.public int hashCode()
hashCode in interface ConstrainthashCode in class BasicFieldConstraintpublic String toString()
StringSearchConstraintisInverse()
getField().getAlias()
isCaseSensitive()
getSearchType()
getMatchType()
getParameters()
getParameters()toString in interface StringSearchConstrainttoString in class BasicFieldConstraintMMBase 1.9-SNAPSHOT - ${javadoctimestamp}