Interface ExecutableRemoveOperation.TerminatingRemove<T>
- All Known Subinterfaces:
ExecutableRemoveOperation.ExecutableRemove<T>
,ExecutableRemoveOperation.RemoveWithCollection<T>
,ExecutableRemoveOperation.RemoveWithQuery<T>
- Enclosing interface:
- ExecutableRemoveOperation
public static interface ExecutableRemoveOperation.TerminatingRemove<T>
- Since:
- 2.0
- Author:
- Christoph Strobl
-
Method Details
-
all
com.mongodb.client.result.DeleteResult all()Remove all documents matching.- Returns:
- the
DeleteResult
. Never null.
-
one
com.mongodb.client.result.DeleteResult one()Remove the first matching document.- Returns:
- the
DeleteResult
. Never null.
-
findAndRemove
Remove and return all matching documents.
NOTE: The entire list of documents will be fetched before sending the actual delete commands. Also,ApplicationEvent
s will be published for each and every delete operation.- Returns:
- empty
List
if no match found. Never null.
-