public final class InsertOptions extends Object
this so that a chaining style can be used.| Constructor and Description | 
|---|
| InsertOptions() | 
| Modifier and Type | Method and Description | 
|---|---|
| InsertOptions | bypassDocumentValidation(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. | 
| 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(WriteConcern writeConcern)
writeConcern - the write concernpublic InsertOptions continueOnError(boolean continueOnError)
continueOnError - whether to continue on errorpublic InsertOptions dbEncoder(DBEncoder dbEncoder)
dbEncoder - the encoderpublic WriteConcern getWriteConcern()
public boolean isContinueOnError()
public DBEncoder getDbEncoder()
public Boolean getBypassDocumentValidation()
public InsertOptions bypassDocumentValidation(Boolean bypassDocumentValidation)
bypassDocumentValidation - whether to bypass document validation, or null if unspecified