public class FindOptions extends Object
| Constructor and Description |
|---|
FindOptions()
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getLimit()
Gets the limit to apply.
|
Bson |
getProjection()
Gets a document describing the fields to return for all matching documents.
|
Bson |
getSort()
Gets the sort criteria to apply to the query.
|
FindOptions |
limit(int limit)
Sets the limit to apply.
|
FindOptions |
projection(Bson projection)
Sets a document describing the fields to return for all matching documents.
|
FindOptions |
sort(Bson sort)
Sets the sort criteria to apply to the query.
|
String |
toString() |
public int getLimit()
public FindOptions limit(int limit)
limit - the limit, which may be nullpublic Bson getProjection()
public FindOptions projection(Bson projection)
projection - the project document, which may be null.public Bson getSort()
public FindOptions sort(Bson sort)
sort - the sort criteria, which may be null.