Package io.realm.mongodb.mongo.iterable
Class FindIterable<ResultT>
- java.lang.Object
-
- io.realm.mongodb.mongo.iterable.MongoIterable<ResultT>
-
- io.realm.mongodb.mongo.iterable.FindIterable<ResultT>
-
- Type Parameters:
ResultT- The type to which this iterable will decode documents.
public class FindIterable<ResultT> extends MongoIterable<ResultT>
Specific iterable forMongoCollection.find()operations.
-
-
Constructor Summary
Constructors Constructor Description FindIterable(ThreadPoolExecutor threadPoolExecutor, io.realm.internal.objectstore.OsMongoCollection<?> osMongoCollection, CodecRegistry codecRegistry, Class<ResultT> resultClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
Methods inherited from class io.realm.mongodb.mongo.iterable.MongoIterable
first, iterator
-
-
-
-
Constructor Detail
-
FindIterable
public FindIterable(ThreadPoolExecutor threadPoolExecutor, io.realm.internal.objectstore.OsMongoCollection<?> osMongoCollection, CodecRegistry codecRegistry, Class<ResultT> resultClass)
-
-
Method Detail
-
filter
public FindIterable<ResultT> filter(@Nullable Bson filter)
Sets the query filter to apply to the query.- Parameters:
filter- the filter, which may be null.- Returns:
- this
-
limit
public FindIterable<ResultT> limit(int limit)
Sets the limit to apply.- Parameters:
limit- the limit, which may be 0- Returns:
- this
-
projection
public FindIterable<ResultT> projection(@Nullable Bson projection)
Sets a document describing the fields to return for all matching documents.- Parameters:
projection- the project document, which may be null.- Returns:
- this
-
sort
public FindIterable<ResultT> sort(@Nullable Bson sort)
Sets the sort criteria to apply to the query.- Parameters:
sort- the sort criteria, which may be null.- Returns:
- this
-
-