public class SearchQuery
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
SearchQuery.MATCHER
Rules to match two Strings.
|
Constructor and Description |
---|
SearchQuery() |
SearchQuery(java.util.List<SearchQuery> childQueries, boolean negation, boolean isORMatch)
Constructor for a complex query, which consists of some children queries.
|
SearchQuery(java.lang.String property, boolean negation, SearchComparatorType comparator, java.lang.Object objectValue, SearchQuery.MATCHER matcher)
Construct the query object
|
Modifier and Type | Method and Description |
---|---|
void |
addBaseQuery(SearchQuery query) |
SearchQuery[] |
getBaseSearchQueryInOrder() |
PageRequestInfo |
getPageInfo() |
java.util.UUID |
getPreparedQueryId() |
java.lang.String |
getSearchByPropertyString() |
java.lang.String |
getSearchByValue()
Get the Search by Value.
|
<T> T |
getSearchByValueObject(java.lang.Class<T> klass)
Get the search by value as
|
SearchComparatorType |
getSearchComparator()
Returns the search comparator
|
java.util.ArrayList<SearchQuery> |
getSearchQueries()
Get the Queries.
|
SearchQuery.MATCHER |
getSearchValueMatch() |
boolean |
hasPageInfo() |
boolean |
isANDMatch() |
boolean |
isComplexQuery()
Complex means this query contains some children queries, the query result will be intersection or union of children queries' results See
SearchQuery.isANDMatch() and SearchQuery.isORMatch() and SearchQuery.isNegativeMatch() A Complex query may be like: NOT (queryA OR (queryB AND queryC)) Simple query means this query has no children queries, but a simple property assertion. |
boolean |
isNegativeMatch() |
boolean |
isORMatch() |
void |
setPageInfo(PageRequestInfo pageInfo) |
void |
setPreparedQueryId(java.util.UUID preparedQueryId) |
java.lang.String |
toString() |
void |
unsetPageInfo() |
public SearchQuery()
public SearchQuery(java.util.List<SearchQuery> childQueries, boolean negation, boolean isORMatch)
childQueries
- children queries of this querynegation
- if true, then the NOT operator is applied.isORMatch
- if true the syntax among the child queries is 'OR', if false, the syntax among child queries is 'AND'public SearchQuery(java.lang.String property, boolean negation, SearchComparatorType comparator, java.lang.Object objectValue, SearchQuery.MATCHER matcher)
property
- name of the propertynegation
- negation valuecomparator
- comparatorobjectValue
- the valuematcher
- matcher valuepublic SearchComparatorType getSearchComparator()
public java.util.ArrayList<SearchQuery> getSearchQueries()
public void addBaseQuery(SearchQuery query)
public SearchQuery[] getBaseSearchQueryInOrder()
public java.lang.String getSearchByPropertyString()
public java.lang.String getSearchByValue()
public <T> T getSearchByValueObject(java.lang.Class<T> klass)
klass
- the object classpublic boolean isComplexQuery()
SearchQuery.isANDMatch()
and SearchQuery.isORMatch()
and SearchQuery.isNegativeMatch()
A Complex query may be like: NOT (queryA OR (queryB AND queryC)) Simple query means this query has no children queries, but a simple property assertion. A simple query may be like: NOT (description contains 'weather')public boolean isORMatch()
public boolean isANDMatch()
public boolean isNegativeMatch()
public SearchQuery.MATCHER getSearchValueMatch()
public PageRequestInfo getPageInfo()
public void setPageInfo(PageRequestInfo pageInfo)
public void unsetPageInfo()
public boolean hasPageInfo()
public java.util.UUID getPreparedQueryId()
public void setPreparedQueryId(java.util.UUID preparedQueryId)
public java.lang.String toString()
toString
in class java.lang.Object