Package com.mongodb.client.model
Class BulkWriteOptions
java.lang.Object
com.mongodb.client.model.BulkWriteOptions
The options to apply to a bulk write.
- Since:
- 3.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbypassDocumentValidation
(Boolean bypassDocumentValidation) Sets the bypass document level validation flag.Sets the comment for this operation.Sets the comment for this operation.Gets the bypass document level validation flagReturns the comment to send with the query.getLet()
Add top-level variables to the operationboolean
If true, then when a write fails, return without performing the remaining writes.Add top-level variables for the operationordered
(boolean ordered) If true, then when a write fails, return without performing the remaining writes.toString()
-
Constructor Details
-
BulkWriteOptions
public BulkWriteOptions()
-
-
Method Details
-
isOrdered
public boolean isOrdered()If true, then when a write fails, return without performing the remaining writes. If false, then when a write fails, continue with the remaining writes, if any. Defaults to true.- Returns:
- true if the writes are ordered
-
ordered
If true, then when a write fails, return without performing the remaining writes. If false, then when a write fails, continue with the remaining writes, if any. Defaults to true.- Parameters:
ordered
- true if the writes should be ordered- Returns:
- this
-
getBypassDocumentValidation
Gets the bypass document level validation flag- Returns:
- the bypass document level validation flag
- Since:
- 3.2
- Since server release
- 3.2
-
bypassDocumentValidation
Sets the bypass document level validation flag.- Parameters:
bypassDocumentValidation
- If true, allows the write to opt-out of document level validation.- Returns:
- this
- Since:
- 3.2
- Since server release
- 3.2
-
getComment
Returns the comment to send with the query. The default is not to include a comment with the query.- Returns:
- the comment
- Since:
- 4.6
- Since server release
- 4.4
-
comment
Sets the comment for this operation. A null value means no comment is set.- Parameters:
comment
- the comment- Returns:
- this
- Since:
- 4.6
- Since server release
- 4.4
-
comment
Sets the comment for this operation. A null value means no comment is set.- Parameters:
comment
- the comment- Returns:
- this
- Since:
- 4.6
- Since server release
- 4.4
-
getLet
Add top-level variables to the operation- Returns:
- the top level variables if set or null.
- Since:
- 4.6
- Since server release
- 5.0
-
let
Add top-level variables for the operationAllows for improved command readability by separating the variables from the query text. The value of let will be passed to all update and delete, but not insert, commands.
- Parameters:
variables
- for the operation or null- Returns:
- this
- Since:
- 4.6
- Since server release
- 5.0
-
toString
-