Class DeleteManyModel<T>

  • Type Parameters:
    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 models


    public final class DeleteManyModel<T>
    extends WriteModel<T>
    A model describing the removal of all documents matching the query filter.
    Since:
    3.0
    MongoDB documentation
    Remove
    • Constructor Summary

      Constructors 
      Constructor Description
      DeleteManyModel​(org.bson.conversions.Bson filter)
      Construct a new instance.
      DeleteManyModel​(org.bson.conversions.Bson filter, DeleteOptions options)
      Construct a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.bson.conversions.Bson getFilter​()
      Gets the query filter.
      DeleteOptions getOptions​()
      Gets the options to apply.
      java.lang.String toString​()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DeleteManyModel

        public DeleteManyModel​(org.bson.conversions.Bson filter)
        Construct a new instance.
        Parameters:
        filter - a document describing the query filter, which may not be null.
      • DeleteManyModel

        public DeleteManyModel​(org.bson.conversions.Bson filter,
                               DeleteOptions options)
        Construct a new instance.
        Parameters:
        filter - a document describing the query filter, which may not be null.
        options - the options to apply
        Since:
        3.4
        Since server release
        3.4
    • Method Detail

      • getFilter

        public org.bson.conversions.Bson getFilter​()
        Gets the query filter.
        Returns:
        the query filter
      • getOptions

        public DeleteOptions getOptions​()
        Gets the options to apply.
        Returns:
        the options
        Since:
        3.4
      • toString

        public java.lang.String toString​()
        Overrides:
        toString in class java.lang.Object