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 and Description |
---|
UpdateOneModel(Object filter,
Object update)
Construct a new instance.
|
UpdateOneModel(Object filter,
Object update,
UpdateOptions options)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
Object |
getFilter()
Gets the query filter.
|
UpdateOptions |
getOptions()
Gets the options to apply.
|
Object |
getUpdate()
Gets the document specifying the updates to apply to the matching document.
|
public UpdateOneModel(Object filter, Object update)
filter
- a document describing the query filter, which may not be null. This can be of any type for which a Codec
is
registeredupdate
- a document describing the update, which may not be null. The update to apply must include only update operators. This
can be of any type for which a Codec
is registeredpublic UpdateOneModel(Object filter, Object update, UpdateOptions options)
filter
- a document describing the query filter, which may not be null. This can be of any type for which a Codec
is
registeredupdate
- a document describing the update, which may not be null. The update to apply must include only update operators. This
can be of any type for which a Codec
is registeredoptions
- the options to applypublic Object getFilter()
public Object getUpdate()
public UpdateOptions getOptions()