Interface ExecutableUpdateOperation.TerminatingUpdate<T>
- All Superinterfaces:
ExecutableUpdateOperation.FindAndModifyWithOptions<T>
,ExecutableUpdateOperation.TerminatingFindAndModify<T>
- Enclosing interface:
- ExecutableUpdateOperation
public static interface ExecutableUpdateOperation.TerminatingUpdate<T>
extends ExecutableUpdateOperation.TerminatingFindAndModify<T>, ExecutableUpdateOperation.FindAndModifyWithOptions<T>
Trigger update execution by calling one of the terminating methods.
- Since:
- 2.0
- Author:
- Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptioncom.mongodb.client.result.UpdateResult
all()
Update all matching documents in the collection.com.mongodb.client.result.UpdateResult
first()
Update the first document in the collection.com.mongodb.client.result.UpdateResult
upsert()
Creates a new document if no documents match the filter query or updates the matching ones.Methods inherited from interface org.springframework.data.mongodb.core.ExecutableUpdateOperation.FindAndModifyWithOptions
withOptions
Methods inherited from interface org.springframework.data.mongodb.core.ExecutableUpdateOperation.TerminatingFindAndModify
findAndModify, findAndModifyValue
-
Method Details
-
all
com.mongodb.client.result.UpdateResult all()Update all matching documents in the collection.- Returns:
- never null.
-
first
com.mongodb.client.result.UpdateResult first()Update the first document in the collection.- Returns:
- never null.
-
upsert
com.mongodb.client.result.UpdateResult upsert()Creates a new document if no documents match the filter query or updates the matching ones.- Returns:
- never null.
-