Package com.mongodb
Class InsertOptions
java.lang.Object
com.mongodb.InsertOptions
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
Options related to insertion of documents into MongoDB. The setter methods return
this
so that a chaining style can be used.- Since:
- 2.13
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbypassDocumentValidation
(Boolean bypassDocumentValidation) Deprecated.Sets whether to bypass document validation.continueOnError
(boolean continueOnError) Deprecated.Set whether documents will continue to be inserted after a failure to insert one.Deprecated.Set the encoder to use for the documents.Deprecated.Gets whether to bypass document validation, or null if unspecified.Deprecated.The encoder to use for the documents.Deprecated.The write concern to use for the insertion.boolean
Deprecated.Whether documents will continue to be inserted after a failure to insert one (most commonly due to a duplicate key error).writeConcern
(WriteConcern writeConcern) Deprecated.Set the write concern to use for the insert.
-
Constructor Details
-
InsertOptions
public InsertOptions()Deprecated.
-
-
Method Details
-
writeConcern
Deprecated.Set the write concern to use for the insert.- Parameters:
writeConcern
- the write concern- Returns:
- this
-
continueOnError
Deprecated.Set whether documents will continue to be inserted after a failure to insert one.- Parameters:
continueOnError
- whether to continue on error- Returns:
- this
-
dbEncoder
Deprecated.Set the encoder to use for the documents.- Parameters:
dbEncoder
- the encoder- Returns:
- this
-
getWriteConcern
Deprecated.The write concern to use for the insertion. By default the write concern configured for the DBCollection instance will be used.- Returns:
- the write concern, or null if the default will be used.
-
isContinueOnError
public boolean isContinueOnError()Deprecated.Whether documents will continue to be inserted after a failure to insert one (most commonly due to a duplicate key error). Note that this only is relevant for multi-document inserts. The default value is false.- Returns:
- whether insertion will continue on error.
-
getDbEncoder
Deprecated.The encoder to use for the documents. By default the codec configured for the DBCollection instance will be used.- Returns:
- the encoder, or null if the default will be used
-
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
-
bypassDocumentValidation
Deprecated.Sets whether to bypass document validation.- Parameters:
bypassDocumentValidation
- whether to bypass document validation, or null if unspecified- Returns:
- this
- Since:
- 2.14
-