|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.ifremer.allegro.SearchParameter
fr.ifremer.allegro.CriteriaSearchParameter
public class CriteriaSearchParameter
A CriteriaSearchParameter
represents a parameter for a CriteriaSearch
.
The parameterValue
is the actual value to be searched for.
The 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()
).
Usually, if a parameter is 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
).
The 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.
Field Summary | |
---|---|
static java.util.regex.Pattern |
PATTERN
|
static int |
RELEVANCE_UNSET
Order relevance not set |
Constructor Summary | |
---|---|
CriteriaSearchParameter(java.lang.Object parameterValue,
java.lang.String parameterPattern)
Constructor for CriteriaSearchParameter. |
|
CriteriaSearchParameter(java.lang.Object parameterValue,
java.lang.String parameterPattern,
boolean searchIfNull)
Constructor for CriteriaSearchParameter. |
|
CriteriaSearchParameter(java.lang.Object parameterValue,
java.lang.String parameterPattern,
boolean searchIfNull,
int comparator)
Constructor for CriteriaSearchParameter. |
|
CriteriaSearchParameter(java.lang.Object parameterValue,
java.lang.String parameterPattern,
boolean searchIfNull,
org.hibernate.criterion.MatchMode matchMode)
Constructor for CriteriaSearchParameter. |
|
CriteriaSearchParameter(java.lang.Object parameterValue,
java.lang.String parameterPattern,
int comparator)
Constructor for CriteriaSearchParameter. |
|
CriteriaSearchParameter(java.lang.Object parameterValue,
java.lang.String parameterPattern,
int comparator,
org.hibernate.criterion.MatchMode matchMode)
Constructor for CriteriaSearchParameter. |
|
CriteriaSearchParameter(java.lang.Object parameterValue,
java.lang.String parameterPattern,
org.hibernate.criterion.MatchMode matchMode)
Constructor for CriteriaSearchParameter. |
|
CriteriaSearchParameter(java.lang.String[] parameterValue,
java.lang.String parameterPattern)
Constructor for CriteriaSearchParameter for a String[] parameter. |
|
CriteriaSearchParameter(java.lang.String[] parameterValue,
java.lang.String parameterPattern,
boolean searchIfNull)
Constructor for CriteriaSearchParameter. |
|
CriteriaSearchParameter(java.lang.String[] parameterValue,
java.lang.String parameterPattern,
boolean searchIfNull,
org.hibernate.criterion.MatchMode matchMode)
Constructor for CriteriaSearchParameter. |
|
CriteriaSearchParameter(java.lang.String[] parameterValue,
java.lang.String parameterPattern,
org.hibernate.criterion.MatchMode matchMode)
Constructor for CriteriaSearchParameter. |
|
CriteriaSearchParameter(java.lang.String parameterValue,
java.lang.String parameterPattern)
Constructor for CriteriaSearchParameter for a String parameter. |
|
CriteriaSearchParameter(java.lang.String parameterValue,
java.lang.String parameterPattern,
boolean searchIfNull)
Constructor for CriteriaSearchParameter. |
|
CriteriaSearchParameter(java.lang.String parameterValue,
java.lang.String parameterPattern,
boolean searchIfNull,
int comparator,
org.hibernate.criterion.MatchMode matchMode)
Constructor for CriteriaSearchParameter. |
|
CriteriaSearchParameter(java.lang.String parameterValue,
java.lang.String parameterPattern,
boolean searchIfNull,
org.hibernate.criterion.MatchMode matchMode)
Constructor for CriteriaSearchParameter. |
|
CriteriaSearchParameter(java.lang.String parameterValue,
java.lang.String parameterPattern,
org.hibernate.criterion.MatchMode matchMode)
Constructor for CriteriaSearchParameter. |
Method Summary | |
---|---|
org.hibernate.criterion.MatchMode |
getMatchMode()
|
int |
getOrderDirection()
|
int |
getOrderRelevance()
|
java.lang.String |
getParameterName()
|
java.lang.String |
getParameterPattern()
|
java.lang.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(java.lang.String parameterPattern)
Sets the pattern of this parameter. |
void |
setParameterValue(java.lang.Object parameterValue)
Sets the value of this parameter. |
Methods inherited from class fr.ifremer.allegro.SearchParameter |
---|
getComparator, getMatch, getName, getOrder, getValue, isSearchIfNull, setComparator, setMatch, setName, setOrder, setSearchIfNull, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.util.regex.Pattern PATTERN
public static final int RELEVANCE_UNSET
Constructor Detail |
---|
public CriteriaSearchParameter(java.lang.Object parameterValue, java.lang.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(java.lang.String parameterValue, java.lang.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(java.lang.String[] parameterValue, java.lang.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(java.lang.Object parameterValue, java.lang.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(java.lang.Object parameterValue, java.lang.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(java.lang.String parameterValue, java.lang.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(java.lang.String[] parameterValue, java.lang.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(java.lang.Object parameterValue, java.lang.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(java.lang.Object parameterValue, java.lang.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(java.lang.String parameterValue, java.lang.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(java.lang.String[] parameterValue, java.lang.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(java.lang.String parameterValue, java.lang.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(java.lang.Object parameterValue, java.lang.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(java.lang.Object parameterValue, java.lang.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(java.lang.String parameterValue, java.lang.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(java.lang.String[] parameterValue, java.lang.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.Method Detail |
---|
public java.lang.String getParameterPattern()
public void setParameterPattern(java.lang.String parameterPattern)
parameterPattern
- The pattern of this parameter (dot-seperated path e.g. person.address.street).public java.lang.String getParameterName()
public java.lang.Object getParameterValue()
public void setParameterValue(java.lang.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_UNSET
public void setOrderDirection(int orderDirection)
orderDirection
- The ordering for this parameter.public int getOrderRelevance()
RELEVANCE_UNSET
public void setOrderRelevance(int relevance)
order
- The ordering relevance for this parameter.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |