public class Query extends Object
Modifier and Type | Method and Description |
---|---|
Query |
addCriteria(Criteria criteria) |
boolean |
equals(Object obj) |
Field |
fields() |
protected List<Criteria> |
getCriteria() |
DBObject |
getFieldsObject() |
String |
getHint() |
int |
getLimit() |
DBObject |
getQueryObject() |
int |
getSkip() |
DBObject |
getSortObject() |
int |
hashCode() |
Query |
limit(int limit) |
static Query |
query(Criteria critera)
Static factory method to create a Query using the provided criteria
|
Query |
skip(int skip) |
Sort |
sort()
Deprecated.
use
with(Sort) instead |
String |
toString() |
Query |
with(org.springframework.data.domain.Pageable pageable)
Sets the given pagination information on the
Query instance. |
Query |
with(org.springframework.data.domain.Sort sort)
|
Query |
withHint(String name)
Configures the query to use the given hint when being executed.
|
public Query()
public Query(Criteria criteria)
public static Query query(Criteria critera)
critera
- public Field fields()
public Query skip(int skip)
public Query limit(int limit)
public Query withHint(String name)
name
- must not be null or empty.@Deprecated public Sort sort()
with(Sort)
insteadSort
instance to define ordering properties.public Query with(org.springframework.data.domain.Pageable pageable)
Query
instance. Will transparently set skip
and
limit
as well as applying the Sort
instance defined with the Pageable
.pageable
- public Query with(org.springframework.data.domain.Sort sort)
sort
- public DBObject getQueryObject()
public DBObject getFieldsObject()
public DBObject getSortObject()
public int getSkip()
public int getLimit()
public String getHint()
Copyright © 2012. All Rights Reserved.