Class CoreRemoteFindIterableImpl<DocumentT,ResultT>
- java.lang.Object
-
- com.mongodb.stitch.core.services.mongodb.remote.internal.CoreRemoteMongoIterableImpl<DocumentT,ResultT>
-
- com.mongodb.stitch.core.services.mongodb.remote.internal.CoreRemoteFindIterableImpl<DocumentT,ResultT>
-
- All Implemented Interfaces:
CoreRemoteFindIterable<ResultT>
,CoreRemoteMongoIterable<ResultT>
,Iterable<ResultT>
public class CoreRemoteFindIterableImpl<DocumentT,ResultT> extends CoreRemoteMongoIterableImpl<DocumentT,ResultT> implements CoreRemoteFindIterable<ResultT>
-
-
Constructor Summary
Constructors Constructor Description CoreRemoteFindIterableImpl(Bson filter, Class<ResultT> resultClass, CoreStitchServiceClient service, Operations<DocumentT> operations)
-
Method Summary
Modifier and Type Method Description CoreRemoteFindIterableImpl<DocumentT,ResultT>
filter(Bson filter)
Sets the query filter to apply to the query.ResultT
first()
Helper to return the first item in the iterator or null.CoreRemoteFindIterableImpl<DocumentT,ResultT>
limit(int limit)
Sets the limit to apply.CoreRemoteFindIterableImpl<DocumentT,ResultT>
projection(Bson projection)
Sets a document describing the fields to return for all matching documents.CoreRemoteFindIterableImpl<DocumentT,ResultT>
sort(Bson sort)
Sets the sort criteria to apply to the query.-
Methods inherited from class com.mongodb.stitch.core.services.mongodb.remote.internal.CoreRemoteMongoIterableImpl
forEach, into, iterator, map
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.mongodb.stitch.core.services.mongodb.remote.internal.CoreRemoteMongoIterable
forEach, into, iterator, map
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
CoreRemoteFindIterableImpl
public CoreRemoteFindIterableImpl(Bson filter, Class<ResultT> resultClass, CoreStitchServiceClient service, Operations<DocumentT> operations)
-
-
Method Detail
-
filter
public CoreRemoteFindIterableImpl<DocumentT,ResultT> filter(@Nullable Bson filter)
Sets the query filter to apply to the query.- Specified by:
filter
in interfaceCoreRemoteFindIterable<DocumentT>
- Parameters:
filter
- the filter, which may be null.- Returns:
- this
-
limit
public CoreRemoteFindIterableImpl<DocumentT,ResultT> limit(int limit)
Sets the limit to apply.- Specified by:
limit
in interfaceCoreRemoteFindIterable<DocumentT>
- Parameters:
limit
- the limit, which may be 0- Returns:
- this
-
projection
public CoreRemoteFindIterableImpl<DocumentT,ResultT> projection(@Nullable Bson projection)
Sets a document describing the fields to return for all matching documents.- Specified by:
projection
in interfaceCoreRemoteFindIterable<DocumentT>
- Parameters:
projection
- the project document, which may be null.- Returns:
- this
-
sort
public CoreRemoteFindIterableImpl<DocumentT,ResultT> sort(@Nullable Bson sort)
Sets the sort criteria to apply to the query.- Specified by:
sort
in interfaceCoreRemoteFindIterable<DocumentT>
- Parameters:
sort
- the sort criteria, which may be null.- Returns:
- this
-
first
@Nullable public ResultT first()
Description copied from class:CoreRemoteMongoIterableImpl
Helper to return the first item in the iterator or null.- Specified by:
first
in interfaceCoreRemoteMongoIterable<DocumentT>
- Overrides:
first
in classCoreRemoteMongoIterableImpl<DocumentT,ResultT>
- Returns:
- T the first item or null.
-
-