Package dev.morphia
Class InsertOptions
- java.lang.Object
-
- dev.morphia.InsertOptions
-
- All Implemented Interfaces:
dev.morphia.internal.CollectionConfiguration
,dev.morphia.internal.WriteConfigurable
@Deprecated(since="2.0", forRemoval=true) public class InsertOptions extends Object implements dev.morphia.internal.WriteConfigurable
Deprecated, for removal: This API element is subject to removal in a future version.useInsertOneOptions
orInsertManyOptions
insteadOptions related to insertion of documents into MongoDB. The setter methods returnthis
so that a chaining style can be used.- Since:
- 1.3
-
-
Constructor Summary
Constructors Constructor Description InsertOptions()
Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description InsertOptions
bypassDocumentValidation(Boolean bypassDocumentValidation)
Deprecated, for removal: This API element is subject to removal in a future version.Sets whether to bypass document validation.Boolean
getBypassDocumentValidation()
Deprecated, for removal: This API element is subject to removal in a future version.boolean
isOrdered()
Deprecated, for removal: This API element is subject to removal in a future version.InsertOptions
ordered(boolean ordered)
Deprecated, for removal: This API element is subject to removal in a future version.Sets whether the server should insert the documents in the order provided.WriteConcern
writeConcern()
Deprecated, for removal: This API element is subject to removal in a future version.The write concern to use for the insertion.InsertOptions
writeConcern(WriteConcern writeConcern)
Deprecated, for removal: This API element is subject to removal in a future version.Set the write concern to use for the insert.
-
-
-
Method Detail
-
getBypassDocumentValidation
@Deprecated(forRemoval=true, since="2.3") public Boolean getBypassDocumentValidation()
Deprecated, for removal: This API element is subject to removal in a future version.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 server release
- 3.2
-
isOrdered
@Deprecated(forRemoval=true, since="2.3") public boolean isOrdered()
Deprecated, for removal: This API element is subject to removal in a future version.Gets whether the documents should be inserted in the order provided, stopping on the first failed insertion. The default is true. If false, the server will attempt to insert all the documents regardless of an failures.- Returns:
- whether the documents should be inserted in order
-
writeConcern
public InsertOptions writeConcern(WriteConcern writeConcern)
Deprecated, for removal: This API element is subject to removal in a future version.Set the write concern to use for the insert.- Specified by:
writeConcern
in interfacedev.morphia.internal.WriteConfigurable
- Parameters:
writeConcern
- the write concern- Returns:
- this
-
bypassDocumentValidation
public InsertOptions bypassDocumentValidation(Boolean bypassDocumentValidation)
Deprecated, for removal: This API element is subject to removal in a future version.Sets whether to bypass document validation.- Parameters:
bypassDocumentValidation
- whether to bypass document validation, or null if unspecified- Returns:
- this
- Since server release
- 3.2
-
ordered
public InsertOptions ordered(boolean ordered)
Deprecated, for removal: This API element is subject to removal in a future version.Sets whether the server should insert the documents in the order provided.- Parameters:
ordered
- true if documents should be inserted in order- Returns:
- this
-
writeConcern
public WriteConcern writeConcern()
Deprecated, for removal: This API element is subject to removal in a future version.The write concern to use for the insertion. By default the write concern configured for the MongoCollection instance will be used.- Specified by:
writeConcern
in interfacedev.morphia.internal.WriteConfigurable
- Returns:
- the write concern, or null if the default will be used.
-
-