T
- the type of document to update. In practice this doesn't actually apply to updates but is here for consistency with the other
write modelspublic final class UpdateOneModel<T> extends WriteModel<T>
Constructor | Description |
---|---|
UpdateOneModelβ(Bson filter,
Bson update) |
Construct a new instance.
|
UpdateOneModelβ(Bson filter,
Bson update,
UpdateOptions options) |
Construct a new instance.
|
Modifier and Type | Method | Description |
---|---|---|
Bson |
getFilterβ() |
Gets the query filter.
|
UpdateOptions |
getOptionsβ() |
Gets the options to apply.
|
Bson |
getUpdateβ() |
Gets the document specifying the updates to apply to the matching document.
|
String |
toStringβ() |
public UpdateOneModelβ(Bson filter, Bson update)
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.public UpdateOneModelβ(Bson filter, Bson update, UpdateOptions options)
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 applypublic Bson getFilterβ()
public Bson getUpdateβ()
public UpdateOptions getOptionsβ()