ResultT
- The type to which this iterable will decode documents.public class FindIterable<ResultT> extends MongoIterable<ResultT>
MongoCollection.find()
operations.Constructor and Description |
---|
FindIterable(ThreadPoolExecutor threadPoolExecutor,
<any> osMongoCollection,
CodecRegistry codecRegistry,
Class<ResultT> resultClass) |
Modifier and Type | Method and Description |
---|---|
FindIterable<ResultT> |
filter(Bson filter)
Sets the query filter to apply to the query.
|
FindIterable<ResultT> |
limit(int limit)
Sets the limit to apply.
|
FindIterable<ResultT> |
projection(Bson projection)
Sets a document describing the fields to return for all matching documents.
|
FindIterable<ResultT> |
sort(Bson sort)
Sets the sort criteria to apply to the query.
|
first, iterator
public FindIterable(ThreadPoolExecutor threadPoolExecutor, <any> osMongoCollection, CodecRegistry codecRegistry, Class<ResultT> resultClass)
public FindIterable<ResultT> filter(Bson filter)
filter
- the filter, which may be null.public FindIterable<ResultT> limit(int limit)
limit
- the limit, which may be 0public FindIterable<ResultT> projection(Bson projection)
projection
- the project document, which may be null.public FindIterable<ResultT> sort(Bson sort)
sort
- the sort criteria, which may be null.