Class UpdateOperation

java.lang.Object
com.mongodb.operation.BaseWriteOperation
com.mongodb.operation.UpdateOperation
All Implemented Interfaces:
AsyncWriteOperation<WriteConcernResult>, WriteOperation<WriteConcernResult>

@Deprecated public class UpdateOperation extends BaseWriteOperation
Deprecated.
An operation that updates a document in a collection.
Since:
3.0
  • Constructor Details

    • UpdateOperation

      @Deprecated public UpdateOperation(MongoNamespace namespace, boolean ordered, WriteConcern writeConcern, List<UpdateRequest> updates)
      Construct an instance.
      Parameters:
      namespace - the database and collection namespace for the operation.
      ordered - whether the updates are ordered.
      writeConcern - the write concern for the operation.
      updates - the update requests.
    • UpdateOperation

      public UpdateOperation(MongoNamespace namespace, boolean ordered, WriteConcern writeConcern, boolean retryWrites, List<UpdateRequest> updates)
      Deprecated.
      Construct an instance.
      Parameters:
      namespace - the database and collection namespace for the operation.
      ordered - whether the updates are ordered.
      writeConcern - the write concern for the operation.
      retryWrites - if writes should be retried if they fail due to a network error.
      updates - the update requests.
      Since:
      3.6
  • Method Details

    • getUpdateRequests

      public List<UpdateRequest> getUpdateRequests()
      Deprecated.
      Gets the list of update requests.
      Returns:
      the update requests