Class UpdateManyModel<T>


  • public class UpdateManyModel<T>
    extends WriteModel<T>
    • Constructor Detail

      • UpdateManyModel

        public UpdateManyModel​(JsonObject filter,
                               JsonObject update)
        Construct a new instance.
        Parameters:
        filter - a document describing the query filter, which may not be null.
        update - a document describing the update, which may not be null. The update to apply must include only update operators.
      • UpdateManyModel

        public UpdateManyModel​(JsonObject filter,
                               JsonObject update,
                               UpdateOptions options)
        Construct a new instance.
        Parameters:
        filter - a document describing the query filter, which may not be null.
        update - a document describing the update, which may not be null. The update to apply must include only update operators.
        options - the options to apply
      • UpdateManyModel

        public UpdateManyModel​(JsonObject filter,
                               JsonArray update)
        Construct a new instance.
        Parameters:
        filter - a document describing the query filter, which may not be null.
        update - a pipeline describing the update, which may not be null.
        Since:
        3.11
        Since server release
        4.2
      • UpdateManyModel

        public UpdateManyModel​(JsonObject filter,
                               JsonArray update,
                               UpdateOptions options)
        Construct a new instance.
        Parameters:
        filter - a document describing the query filter, which may not be null.
        update - a pipeline describing the update, which may not be null.
        options - the options to apply
        Since:
        3.11
        Since server release
        4.2
    • Method Detail

      • getFilter

        public JsonObject getFilter()
        Gets the query filter.
        Returns:
        the query filter
      • getUpdate

        public JsonObject getUpdate()
        Gets the document specifying the updates to apply to the matching document. The update to apply must include only update operators.
        Returns:
        the document specifying the updates to apply
      • getUpdatePipeline

        public JsonArray getUpdatePipeline()
        Gets the pipeline specifying the updates to apply to the matching document. The update to apply must include only update operators.
        Returns:
        the pipeline specifying the updates to apply
        Since:
        3.11
        Since server release
        4.2
      • getOptions

        public UpdateOptions getOptions()
        Gets the options to apply.
        Returns:
        the options