@Experimental(value=SOURCE_SINK) public abstract class FindQuery extends java.lang.Object implements SerializableFunction<com.mongodb.client.MongoCollection<org.bson.Document>,com.mongodb.client.MongoCursor<org.bson.Document>>
Constructor and Description |
---|
FindQuery() |
Modifier and Type | Method and Description |
---|---|
com.mongodb.client.MongoCursor<org.bson.Document> |
apply(com.mongodb.client.MongoCollection<org.bson.Document> collection)
Returns the result of invoking this function on the given input.
|
static FindQuery |
create() |
FindQuery |
withFilters(org.bson.conversions.Bson filters)
Sets the filters to find.
|
FindQuery |
withLimit(int limit)
Sets the limit of documents to find.
|
FindQuery |
withProjection(java.util.List<java.lang.String> projection)
Sets the projection.
|
public static FindQuery create()
public FindQuery withFilters(org.bson.conversions.Bson filters)
public FindQuery withLimit(int limit)
public FindQuery withProjection(java.util.List<java.lang.String> projection)
public com.mongodb.client.MongoCursor<org.bson.Document> apply(com.mongodb.client.MongoCollection<org.bson.Document> collection)
SerializableFunction
apply
in interface ProcessFunction<com.mongodb.client.MongoCollection<org.bson.Document>,com.mongodb.client.MongoCursor<org.bson.Document>>
apply
in interface SerializableFunction<com.mongodb.client.MongoCollection<org.bson.Document>,com.mongodb.client.MongoCursor<org.bson.Document>>