Package io.vertx.mongo.client.model
Class ReplaceOneModel<T>
- java.lang.Object
-
- io.vertx.mongo.client.model.WriteModel<T>
-
- io.vertx.mongo.client.model.ReplaceOneModel<T>
-
public class ReplaceOneModel<T> extends WriteModel<T>
-
-
Constructor Summary
Constructors Constructor Description ReplaceOneModel(JsonObject filter, T replacement)
Construct a new instance.ReplaceOneModel(JsonObject filter, T replacement, ReplaceOptions options)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonObject
getFilter()
Gets the query filter.T
getReplacement()
Gets the document which will replace the document matching the query filter.ReplaceOptions
getReplaceOptions()
Gets the ReplaceOptions to apply.
-
-
-
Constructor Detail
-
ReplaceOneModel
public ReplaceOneModel(JsonObject filter, T replacement)
Construct a new instance.- Parameters:
filter
- a document describing the query filter, which may not be null.replacement
- the replacement document
-
ReplaceOneModel
public ReplaceOneModel(JsonObject filter, T replacement, ReplaceOptions options)
Construct a new instance.- Parameters:
filter
- a document describing the query filter, which may not be null.replacement
- the replacement documentoptions
- the options to apply- Since:
- 3.7
-
-
Method Detail
-
getFilter
public JsonObject getFilter()
Gets the query filter.- Returns:
- the query filter
-
getReplacement
public T getReplacement()
Gets the document which will replace the document matching the query filter.- Returns:
- the replacement document
-
getReplaceOptions
public ReplaceOptions getReplaceOptions()
Gets the ReplaceOptions to apply.- Returns:
- the replace options
- Since:
- 3.7
-
-