public class CriteriaSearchParameter extends SearchParameter
CriteriaSearchParameter represents a parameter for a CriteriaSearch.
parameterValue is the actual value to be searched for.
parameterPattern describes the actual parameter which shall be considered for
the search. It contains the dot-seperated path and the name of the parameter starting at the
rootEntity of the actual CriteriaSearch. The pattern of a the street of an address
of a person would look like address.street (assuming the entity structure to be
aPerson.getAddress().getStreet()).
null (or if the parameter is of type String
and empty), it is not considered for a search. If searchIfNull is true
it is explicitly searched for the parameter to be null (or empty if the parameter is of type
String).comparator defines the comparator for the parameter. For parameters of type
String the default comparator is the LIKE_COMPARATOR. The
EQUAL_COMPARATOR is default for other parameters.| Modifier and Type | Field and Description |
|---|---|
static Pattern |
PATTERN |
static int |
RELEVANCE_UNSET
Order relevance not set
|
EQUAL_COMPARATOR, GREATER_THAN_COMPARATOR, GREATER_THAN_OR_EQUAL_COMPARATOR, IN_COMPARATOR, INSENSITIVE_LIKE_COMPARATOR, LESS_THAN_COMPARATOR, LESS_THAN_OR_EQUAL_COMPARATOR, LIKE_COMPARATOR, MATCH_ANYWHERE, MATCH_END, MATCH_EXACT, MATCH_START, NOT_EQUAL_COMPARATOR, NOT_IN_COMPARATOR, NOT_INSENSITIVE_LIKE_COMPARATOR, NOT_LIKE_COMPARATOR, NOT_NULL_COMPARATOR, NULL_COMPARATOR, ORDER_ASC, ORDER_DESC, ORDER_UNSET| Constructor and Description |
|---|
CriteriaSearchParameter(Object parameterValue,
String parameterPattern)
Constructor for CriteriaSearchParameter.
|
CriteriaSearchParameter(Object parameterValue,
String parameterPattern,
boolean searchIfNull)
Constructor for CriteriaSearchParameter.
|
CriteriaSearchParameter(Object parameterValue,
String parameterPattern,
boolean searchIfNull,
int comparator)
Constructor for CriteriaSearchParameter.
|
CriteriaSearchParameter(Object parameterValue,
String parameterPattern,
boolean searchIfNull,
org.hibernate.criterion.MatchMode matchMode)
Constructor for CriteriaSearchParameter.
|
CriteriaSearchParameter(Object parameterValue,
String parameterPattern,
int comparator)
Constructor for CriteriaSearchParameter.
|
CriteriaSearchParameter(Object parameterValue,
String parameterPattern,
int comparator,
org.hibernate.criterion.MatchMode matchMode)
Constructor for CriteriaSearchParameter.
|
CriteriaSearchParameter(Object parameterValue,
String parameterPattern,
org.hibernate.criterion.MatchMode matchMode)
Constructor for CriteriaSearchParameter.
|
CriteriaSearchParameter(String[] parameterValue,
String parameterPattern)
Constructor for CriteriaSearchParameter for a
String[] parameter. |
CriteriaSearchParameter(String[] parameterValue,
String parameterPattern,
boolean searchIfNull)
Constructor for CriteriaSearchParameter.
|
CriteriaSearchParameter(String[] parameterValue,
String parameterPattern,
boolean searchIfNull,
org.hibernate.criterion.MatchMode matchMode)
Constructor for CriteriaSearchParameter.
|
CriteriaSearchParameter(String[] parameterValue,
String parameterPattern,
org.hibernate.criterion.MatchMode matchMode)
Constructor for CriteriaSearchParameter.
|
CriteriaSearchParameter(String parameterValue,
String parameterPattern)
Constructor for CriteriaSearchParameter for a
String parameter. |
CriteriaSearchParameter(String parameterValue,
String parameterPattern,
boolean searchIfNull)
Constructor for CriteriaSearchParameter.
|
CriteriaSearchParameter(String parameterValue,
String parameterPattern,
boolean searchIfNull,
int comparator,
org.hibernate.criterion.MatchMode matchMode)
Constructor for CriteriaSearchParameter.
|
CriteriaSearchParameter(String parameterValue,
String parameterPattern,
boolean searchIfNull,
org.hibernate.criterion.MatchMode matchMode)
Constructor for CriteriaSearchParameter.
|
CriteriaSearchParameter(String parameterValue,
String parameterPattern,
org.hibernate.criterion.MatchMode matchMode)
Constructor for CriteriaSearchParameter.
|
| Modifier and Type | Method and Description |
|---|---|
org.hibernate.criterion.MatchMode |
getMatchMode() |
int |
getOrderDirection() |
int |
getOrderRelevance() |
String |
getParameterName() |
String |
getParameterPattern() |
Object |
getParameterValue() |
void |
setMatchMode(org.hibernate.criterion.MatchMode matchMode)
Sets the hibernate matchmode of this parameter.
|
void |
setOrderDirection(int orderDirection)
Sets the ordering for this parameter.
|
void |
setOrderRelevance(int relevance)
Sets the ordering relevance for this parameter.
|
void |
setParameterPattern(String parameterPattern)
Sets the pattern of this parameter.
|
void |
setParameterValue(Object parameterValue)
Sets the value of this parameter.
|
getComparator, getMatch, getName, getOrder, getValue, isSearchIfNull, setComparator, setMatch, setName, setOrder, setSearchIfNull, setValuepublic static final Pattern PATTERN
public static final int RELEVANCE_UNSET
public CriteriaSearchParameter(Object parameterValue, String parameterPattern)
searchIfNull to
false and uses the EQUAL_COMPARATOR.parameterValue - The actual value of the parameter.parameterPattern - The pattern of this parameter (dot-seperated path e.g. person.address.street).public CriteriaSearchParameter(String parameterValue, String parameterPattern)
String parameter.
Sets searchIfNull to false and uses the
LIKE_COMPARATOR.parameterValue - The actual value of the parameter.parameterPattern - The pattern of this parameter (dot-seperated path e.g. person.address.street).public CriteriaSearchParameter(String[] parameterValue, String parameterPattern)
String[] parameter.
Sets searchIfNull to false and uses the
LIKE_COMPARATOR.parameterValue - The actual value of the parameter.parameterPattern - The pattern of this parameter (dot-seperated path e.g. person.address.street).public CriteriaSearchParameter(Object parameterValue, String parameterPattern, int comparator)
searchIfNull to false.parameterValue - The actual value of the parameter.parameterPattern - The pattern of this parameter (dot-seperated path e.g. person.address.street).public CriteriaSearchParameter(Object parameterValue, String parameterPattern, boolean searchIfNull)
parameterValue - The actual value of the parameter.parameterPattern - The pattern of this parameter (dot-seperated path e.g. person.address.street).searchIfNull - Indicates whether the query should contain an
IS NULL if the parameter is null.public CriteriaSearchParameter(String parameterValue, String parameterPattern, boolean searchIfNull)
parameterValue - The actual value of the parameter.parameterPattern - The pattern of this parameter (dot-seperated path e.g. person.address.street).searchIfNull - Indicates whether the query should contain an
IS NULL if the parameter is null.public CriteriaSearchParameter(String[] parameterValue, String parameterPattern, boolean searchIfNull)
parameterValue - The actual value of the parameter.parameterPattern - The pattern of this parameter (dot-seperated path e.g. person.address.street).searchIfNull - Indicates whether the query should contain an
IS NULL if the parameter is null.public CriteriaSearchParameter(Object parameterValue, String parameterPattern, boolean searchIfNull, int comparator)
parameterValue - The actual value of the parameter.parameterPattern - The pattern of this parameter (dot-seperated path e.g. person.address.street).searchIfNull - Indicates whether the query should contain an
IS NULL if the parameter is null.comparator - Indicates what comparator is to be used (e.g. like, =, <, ...).public CriteriaSearchParameter(Object parameterValue, String parameterPattern, boolean searchIfNull, org.hibernate.criterion.MatchMode matchMode)
parameterValue - The actual value of the parameter.parameterPattern - The pattern of this parameter (dot-seperated path e.g. person.address.street).searchIfNull - Indicates whether the query should contain an
IS NULL if the parameter is null.matchMode - The hibernate matchmode to be used in string comparisons.public CriteriaSearchParameter(String parameterValue, String parameterPattern, boolean searchIfNull, org.hibernate.criterion.MatchMode matchMode)
parameterValue - The actual value of the parameter.parameterPattern - The pattern of this parameter (dot-seperated path e.g. person.address.street).searchIfNull - Indicates whether the query should contain an
IS NULL if the parameter is null.matchMode - The hibernate matchmode to be used in string comparisons.public CriteriaSearchParameter(String[] parameterValue, String parameterPattern, boolean searchIfNull, org.hibernate.criterion.MatchMode matchMode)
parameterValue - The actual value of the parameter.parameterPattern - The pattern of this parameter (dot-seperated path e.g. person.address.street).searchIfNull - Indicates whether the query should contain an
IS NULL if the parameter is null.matchMode - The hibernate matchmode to be used in string comparisons.public CriteriaSearchParameter(String parameterValue, String parameterPattern, boolean searchIfNull, int comparator, org.hibernate.criterion.MatchMode matchMode)
parameterValue - The actual value of the parameter.parameterPattern - The pattern of this parameter (dot-seperated path e.g. person.address.street).searchIfNull - Indicates whether the query should contain an
IS NULL if the parameter is null.comparator - Indicates what comparator is to be used (e.g. like, =, <, ...).matchMode - The hibernate matchmode to be used in string comparisons.public CriteriaSearchParameter(Object parameterValue, String parameterPattern, int comparator, org.hibernate.criterion.MatchMode matchMode)
parameterValue - The actual value of the parameter.parameterPattern - The pattern of this parameter (dot-seperated path e.g. person.address.street).comparator - Indicates what comparator is to be used (e.g. like, =, <, ...).matchMode - The hibernate matchmode to be used in string comparisons.public CriteriaSearchParameter(Object parameterValue, String parameterPattern, org.hibernate.criterion.MatchMode matchMode)
parameterValue - The actual value of the parameter.parameterPattern - The pattern of this parameter (dot-seperated path e.g. person.address.street).matchMode - The hibernate matchmode to be used in string comparisons.public CriteriaSearchParameter(String parameterValue, String parameterPattern, org.hibernate.criterion.MatchMode matchMode)
parameterValue - The actual value of the parameter.parameterPattern - The pattern of this parameter (dot-seperated path e.g. person.address.street).matchMode - The hibernate matchmode to be used in string comparisons.public CriteriaSearchParameter(String[] parameterValue, String parameterPattern, org.hibernate.criterion.MatchMode matchMode)
parameterValue - The actual value of the parameter.parameterPattern - The pattern of this parameter (dot-seperated path e.g. person.address.street).matchMode - The hibernate matchmode to be used in string comparisons.public String getParameterPattern()
public void setParameterPattern(String parameterPattern)
parameterPattern - The pattern of this parameter (dot-seperated path e.g. person.address.street).public String getParameterName()
public Object getParameterValue()
public void setParameterValue(Object parameterValue)
parameterValue - The value of this parameter.public org.hibernate.criterion.MatchMode getMatchMode()
public void setMatchMode(org.hibernate.criterion.MatchMode matchMode)
matchMode - The hibernate matchmode.public int getOrderDirection()
ORDER_ASC,
ORDER_DESC,
ORDER_UNSETpublic void setOrderDirection(int orderDirection)
orderDirection - The ordering for this parameter.public int getOrderRelevance()
RELEVANCE_UNSETpublic void setOrderRelevance(int relevance)
order - The ordering relevance for this parameter.Copyright © 2013. All Rights Reserved.