Class FindOperation<T>
- java.lang.Object
-
- com.mongodb.stitch.core.services.mongodb.remote.internal.FindOperation<T>
-
- All Implemented Interfaces:
Operation<Collection<T>>
public class FindOperation<T> extends Object implements Operation<Collection<T>>
-
-
Method Summary
Modifier and Type Method Description Collection<T>
execute(CoreStitchServiceClient service)
FindOperation<T>
filter(BsonDocument filter)
Sets the query filter to apply to the query.FindOperation<T>
limit(int limit)
Sets the limit to apply.FindOperation<T>
projection(BsonDocument projection)
Sets a document describing the fields to return for all matching documents.FindOperation<T>
sort(BsonDocument sort)
Sets the sort criteria to apply to the query.
-
-
-
Method Detail
-
filter
public FindOperation<T> filter(BsonDocument filter)
Sets the query filter to apply to the query.- Parameters:
filter
- the filter, which may be null.- Returns:
- this
-
limit
public FindOperation<T> limit(int limit)
Sets the limit to apply.- Parameters:
limit
- the limit, which may be null- Returns:
- this
-
projection
public FindOperation<T> projection(BsonDocument 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 FindOperation<T> sort(BsonDocument sort)
Sets the sort criteria to apply to the query.- Parameters:
sort
- the sort criteria, which may be null.- Returns:
- this
-
execute
public Collection<T> execute(CoreStitchServiceClient service)
-
-