Package org.apache.beam.sdk.io.mongodb
Class FindQuery
java.lang.Object
org.apache.beam.sdk.io.mongodb.FindQuery
- All Implemented Interfaces:
Serializable
,ProcessFunction<MongoCollection<Document>,
,MongoCursor<Document>> SerializableFunction<MongoCollection<Document>,
MongoCursor<Document>>
public abstract class FindQuery
extends Object
implements SerializableFunction<MongoCollection<Document>,MongoCursor<Document>>
Builds a MongoDB FindQuery object.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply
(MongoCollection<Document> collection) Returns the result of invoking this function on the given input.static FindQuery
create()
withFilters
(Bson filters) Sets the filters to find.withLimit
(int limit) Sets the limit of documents to find.withProjection
(List<String> projection) Sets the projection.
-
Constructor Details
-
FindQuery
public FindQuery()
-
-
Method Details
-
create
-
withFilters
Sets the filters to find. -
withLimit
Sets the limit of documents to find. -
withProjection
Sets the projection. -
apply
Description copied from interface:SerializableFunction
Returns the result of invoking this function on the given input.- Specified by:
apply
in interfaceProcessFunction<MongoCollection<Document>,
MongoCursor<Document>> - Specified by:
apply
in interfaceSerializableFunction<MongoCollection<Document>,
MongoCursor<Document>>
-