public class SimpleQuery extends Object implements Query, FilterQuery
Query
that allows multiple options like pagination, grouping,...Query.Operator
Modifier and Type | Field and Description |
---|---|
static Pageable |
DEFAULT_PAGE |
DEFAULT_PAGE_SIZE
Constructor and Description |
---|
SimpleQuery() |
SimpleQuery(Criteria criteria) |
SimpleQuery(Criteria criteria,
Pageable pageable) |
Modifier and Type | Method and Description |
---|---|
<T extends SolrDataQuery> |
addCriteria(Criteria criteria)
Add an criteria to the query.
|
<T extends Query> |
addFilterQuery(FilterQuery filterQuery)
add query to filter results Corresponds to 'fq' in solr
|
<T extends Query> |
addGroupByField(Field field)
add the given field to those used for grouping result Corresponds to '' in solr
|
<T extends Query> |
addGroupByField(String fieldname) |
<T extends Query> |
addProjectionOnField(Field field)
add given Field to those included in result.
|
<T extends Query> |
addProjectionOnField(String fieldname) |
<T extends Query> |
addProjectionOnFields(Field... fields) |
<T extends Query> |
addProjectionOnFields(String... fieldnames) |
<T extends Query> |
addSort(Sort sort)
Add
Sort to query |
static Query |
fromQuery(Query source) |
static <T extends SimpleQuery> |
fromQuery(Query source,
T destination) |
Criteria |
getCriteria() |
Query.Operator |
getDefaultOperator()
Get the specified default operator for query expressions, overriding the default operator specified in the
schema.xml file.
|
List<FilterQuery> |
getFilterQueries()
Get filter queries if defined
|
List<Field> |
getGroupByFields()
Get group by fields if defined
|
Pageable |
getPageRequest()
Get page settings if defined
|
List<Field> |
getProjectionOnFields()
Get projection fields if defined
|
Sort |
getSort() |
boolean |
hasDefaultOperatorDefined() |
void |
setDefaultOperator(Query.Operator operator)
Set the default operator
q.op for query expressions |
<T extends Query> |
setPageRequest(Pageable pageable)
restrict result to entries on given page.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addCriteria, getCriteria
public static final Pageable DEFAULT_PAGE
public SimpleQuery()
public SimpleQuery(Criteria criteria)
public static <T extends SimpleQuery> T fromQuery(Query source, T destination)
public final <T extends Query> T addProjectionOnField(Field field)
Query
addProjectionOnField
in interface Query
public final <T extends Query> T setPageRequest(Pageable pageable)
Query
setPageRequest
in interface Query
public final <T extends Query> T addGroupByField(Field field)
Query
addGroupByField
in interface Query
public final <T extends Query> T addSort(Sort sort)
Query
Sort
to querypublic Pageable getPageRequest()
Query
getPageRequest
in interface Query
public List<Field> getGroupByFields()
Query
getGroupByFields
in interface Query
public List<Field> getProjectionOnFields()
Query
getProjectionOnFields
in interface Query
public <T extends Query> T addFilterQuery(FilterQuery filterQuery)
Query
addFilterQuery
in interface Query
public List<FilterQuery> getFilterQueries()
Query
getFilterQueries
in interface Query
public Query.Operator getDefaultOperator()
Query
getDefaultOperator
in interface Query
public boolean hasDefaultOperatorDefined()
public void setDefaultOperator(Query.Operator operator)
Query
q.op
for query expressionssetDefaultOperator
in interface Query
public final <T extends SolrDataQuery> T addCriteria(Criteria criteria)
criteria
- public Criteria getCriteria()
Copyright © 2011-2013-2013 SpringSource. All Rights Reserved.