Package com.mongodb
Class BulkWriteOperation
- java.lang.Object
-
- com.mongodb.BulkWriteOperation
-
@Deprecated(since="2021-05-27") public class BulkWriteOperation extends java.lang.Object
Deprecated.Usage of this API is not supported in AEM as a Cloud Service.A bulk write operation. A bulk write operation consists of an ordered or unordered collection of write requests, which can be any combination of inserts, updates, replaces, or removes.- Since:
- 2.12
- See Also:
DBCollection.initializeOrderedBulkOperation()
,DBCollection.initializeUnorderedBulkOperation()
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description BulkWriteResult
execute()
Deprecated.Execute the bulk write operation with the default write concern of the collection from which this came.BulkWriteResult
execute(WriteConcern writeConcern)
Deprecated.Execute the bulk write operation with the given write concern.BulkWriteRequestBuilder
find(DBObject query)
Deprecated.Start building a write request to add to the bulk write operation.java.lang.Boolean
getBypassDocumentValidation()
Deprecated.Gets whether to bypass document validation, or null if unspecified.void
insert(DBObject document)
Deprecated.Add an insert request to the bulk operationboolean
isOrdered()
Deprecated.Returns true if this is building an ordered bulk write request.void
setBypassDocumentValidation(java.lang.Boolean bypassDocumentValidation)
Deprecated.Sets whether to bypass document validation.
-
-
-
Method Detail
-
isOrdered
public boolean isOrdered()
Deprecated.Returns true if this is building an ordered bulk write request.- Returns:
- whether this is building an ordered bulk write operation
- See Also:
DBCollection.initializeOrderedBulkOperation()
,DBCollection.initializeUnorderedBulkOperation()
-
getBypassDocumentValidation
public java.lang.Boolean getBypassDocumentValidation()
Deprecated.Gets whether to bypass document validation, or null if unspecified. The default is null.- Returns:
- whether to bypass document validation, or null if unspecified.
- Since:
- 2.14
-
setBypassDocumentValidation
public void setBypassDocumentValidation(java.lang.Boolean bypassDocumentValidation)
Deprecated.Sets whether to bypass document validation.- Parameters:
bypassDocumentValidation
- whether to bypass document validation, or null if unspecified- Since:
- 2.14
-
insert
public void insert(DBObject document)
Deprecated.Add an insert request to the bulk operation- Parameters:
document
- the document to insert
-
find
public BulkWriteRequestBuilder find(DBObject query)
Deprecated.Start building a write request to add to the bulk write operation. The returned builder can be used to create an update, replace, or remove request with the given query.- Parameters:
query
- the query for an update, replace or remove request- Returns:
- a builder for a single write request
-
execute
public BulkWriteResult execute()
Deprecated.Execute the bulk write operation with the default write concern of the collection from which this came. Note that the continueOnError property of the write concern is ignored.- Returns:
- the result of the bulk write operation.
- Throws:
BulkWriteException
- if the write failed due some other failure specific to the write commandMongoException
- if the operation failed for some other reason
-
execute
public BulkWriteResult execute(WriteConcern writeConcern)
Deprecated.Execute the bulk write operation with the given write concern. Note that the continueOnError property of the write concern is ignored.- Parameters:
writeConcern
- the write concern to apply to the bulk operation.- Returns:
- the result of the bulk write operation.
- Throws:
BulkWriteException
- if the write failed due some other failure specific to the write commandMongoException
- if the operation failed for some other reason
-
-