Package com.mongodb.operation
Class UpdateOperation
- java.lang.Object
-
- com.mongodb.operation.BaseWriteOperation
-
- com.mongodb.operation.UpdateOperation
-
- All Implemented Interfaces:
AsyncWriteOperation<WriteConcernResult>,WriteOperation<WriteConcernResult>
Deprecated.
@Deprecated public class UpdateOperation extends BaseWriteOperation
An operation that updates a document in a collection.- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor Description UpdateOperation(MongoNamespace namespace, boolean ordered, WriteConcern writeConcern, boolean retryWrites, List<UpdateRequest> updates)Deprecated.Construct an instance.UpdateOperation(MongoNamespace namespace, boolean ordered, WriteConcern writeConcern, List<UpdateRequest> updates)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected WriteRequest.TypegetType()Deprecated.List<UpdateRequest>getUpdateRequests()Deprecated.Gets the list of update requests.protected List<? extends WriteRequest>getWriteRequests()Deprecated.-
Methods inherited from class com.mongodb.operation.BaseWriteOperation
bypassDocumentValidation, execute, executeAsync, getBypassDocumentValidation, getNamespace, getWriteConcern, isOrdered
-
-
-
-
Constructor Detail
-
UpdateOperation
@Deprecated public UpdateOperation(MongoNamespace namespace, boolean ordered, WriteConcern writeConcern, List<UpdateRequest> updates)
Deprecated. useUpdateOperation(MongoNamespace, boolean, WriteConcern, boolean, List)insteadConstruct 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 Detail
-
getUpdateRequests
public List<UpdateRequest> getUpdateRequests()
Deprecated.Gets the list of update requests.- Returns:
- the update requests
-
getWriteRequests
protected List<? extends WriteRequest> getWriteRequests()
Deprecated.- Specified by:
getWriteRequestsin classBaseWriteOperation
-
getType
protected WriteRequest.Type getType()
Deprecated.- Specified by:
getTypein classBaseWriteOperation
-
-