public final class InsertOptions
extends java.lang.Object
this
so that a chaining style can be used.Constructor and Description |
---|
InsertOptions() |
Modifier and Type | Method and Description |
---|---|
InsertOptions |
bypassDocumentValidation(java.lang.Boolean bypassDocumentValidation)
Sets whether to bypass document validation.
|
InsertOptions |
continueOnError(boolean continueOnError)
Set whether documents will continue to be inserted after a failure to insert one.
|
InsertOptions |
dbEncoder(DBEncoder dbEncoder)
Set the encoder to use for the documents.
|
java.lang.Boolean |
getBypassDocumentValidation()
Gets whether to bypass document validation, or null if unspecified.
|
DBEncoder |
getDbEncoder()
The encoder to use for the documents.
|
WriteConcern |
getWriteConcern()
The write concern to use for the insertion.
|
boolean |
isContinueOnError()
Whether documents will continue to be inserted after a failure to insert one (most commonly due to a duplicate key error).
|
InsertOptions |
writeConcern(WriteConcern writeConcern)
Set the write concern to use for the insert.
|
public InsertOptions writeConcern(@Nullable WriteConcern writeConcern)
writeConcern
- the write concernpublic InsertOptions continueOnError(boolean continueOnError)
continueOnError
- whether to continue on errorpublic InsertOptions dbEncoder(@Nullable DBEncoder dbEncoder)
dbEncoder
- the encoder@Nullable public WriteConcern getWriteConcern()
public boolean isContinueOnError()
@Nullable public DBEncoder getDbEncoder()
@Nullable public java.lang.Boolean getBypassDocumentValidation()
public InsertOptions bypassDocumentValidation(@Nullable java.lang.Boolean bypassDocumentValidation)
bypassDocumentValidation
- whether to bypass document validation, or null if unspecifiedCopyright © 2010 - 2020 Adobe. All Rights Reserved