Package io.vertx.mongo.client.model
Class UpdateOneModel<T>
- java.lang.Object
-
- io.vertx.mongo.client.model.WriteModel<T>
-
- io.vertx.mongo.client.model.UpdateOneModel<T>
-
public class UpdateOneModel<T> extends WriteModel<T>
-
-
Constructor Summary
Constructors Constructor Description UpdateOneModel(JsonObject filter, JsonArray update)
Construct a new instance.UpdateOneModel(JsonObject filter, JsonArray update, UpdateOptions options)
Construct a new instance.UpdateOneModel(JsonObject filter, JsonObject update)
Construct a new instance.UpdateOneModel(JsonObject filter, JsonObject update, UpdateOptions options)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonObject
getFilter()
Gets the query filter.UpdateOptions
getOptions()
Gets the options to apply.JsonObject
getUpdate()
Gets the document specifying the updates to apply to the matching document.JsonArray
getUpdatePipeline()
Gets the pipeline specifying the updates to apply to the matching document.
-
-
-
Constructor Detail
-
UpdateOneModel
public UpdateOneModel(JsonObject filter, JsonObject update)
Construct a new instance.- Parameters:
filter
- a document describing the query filter, which may not be null.update
- a document describing the update, which may not be null. The update to apply must include only update operators.
-
UpdateOneModel
public UpdateOneModel(JsonObject filter, JsonObject update, UpdateOptions options)
Construct a new instance.- Parameters:
filter
- a document describing the query filter, which may not be null.update
- a document describing the update, which may not be null. The update to apply must include only update operators.options
- the options to apply
-
UpdateOneModel
public UpdateOneModel(JsonObject filter, JsonArray update)
Construct a new instance.- Parameters:
filter
- a document describing the query filter, which may not be null.update
- a pipeline describing the update, which may not be null.- Since:
- 3.11
- Since server release
- 4.2
-
UpdateOneModel
public UpdateOneModel(JsonObject filter, JsonArray update, UpdateOptions options)
Construct a new instance.- Parameters:
filter
- a document describing the query filter, which may not be null.update
- a pipeline describing the update, which may not be null.options
- the options to apply- Since:
- 3.11
- Since server release
- 4.2
-
-
Method Detail
-
getFilter
public JsonObject getFilter()
Gets the query filter.- Returns:
- the query filter
-
getUpdate
public JsonObject getUpdate()
Gets the document specifying the updates to apply to the matching document. The update to apply must include only update operators.- Returns:
- the document specifying the updates to apply
-
getUpdatePipeline
public JsonArray getUpdatePipeline()
Gets the pipeline specifying the updates to apply to the matching document. The update to apply must include only update operators.- Returns:
- the pipeline specifying the updates to apply
- Since:
- 3.11
- Since server release
- 4.2
-
getOptions
public UpdateOptions getOptions()
Gets the options to apply.- Returns:
- the options
-
-