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 Summary

    Modifier and Type
    Method
    Description
    com.mongodb.client.result.DeleteResult
    all()
    Remove all documents matching.
    Remove and return all matching documents.
    com.mongodb.client.result.DeleteResult
    one()
    Remove the first matching document.
  • 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

      List<T> findAndRemove()
      Remove and return all matching documents.
      NOTE: The entire list of documents will be fetched before sending the actual delete commands. Also, ApplicationEvents will be published for each and every delete operation.
      Returns:
      empty List if no match found. Never null.