Package com.mongodb.client.model
Class ReplaceOptions
java.lang.Object
com.mongodb.client.model.ReplaceOptions
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
The options to apply when replacing documents.
- Since:
- 3.7
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbypassDocumentValidation
(Boolean bypassDocumentValidation) Deprecated.Sets the bypass document level validation flag.Deprecated.Sets the collation optionsstatic ReplaceOptions
createReplaceOptions
(UpdateOptions updateOptions) Deprecated.there is no replacement for this methodDeprecated.Gets the the bypass document level validation flagDeprecated.Returns the collation optionsboolean
isUpsert()
Deprecated.Returns true if a new document should be inserted if there are no matches to the query filter.toString()
Deprecated.upsert
(boolean upsert) Deprecated.Set to true if a new document should be inserted if there are no matches to the query filter.
-
Constructor Details
-
ReplaceOptions
public ReplaceOptions()Deprecated.
-
-
Method Details
-
createReplaceOptions
Deprecated.there is no replacement for this methodCreates replace options from updateOptions.- Parameters:
updateOptions
- the updateOptions- Returns:
- replace options
-
isUpsert
public boolean isUpsert()Deprecated.Returns true if a new document should be inserted if there are no matches to the query filter. The default is false.- Returns:
- true if a new document should be inserted if there are no matches to the query filter
-
upsert
Deprecated.Set to true if a new document should be inserted if there are no matches to the query filter.- Parameters:
upsert
- true if a new document should be inserted if there are no matches to the query filter- Returns:
- this
-
getBypassDocumentValidation
Deprecated.Gets the the bypass document level validation flag- Returns:
- the bypass document level validation flag
-
bypassDocumentValidation
Deprecated.Sets the bypass document level validation flag.- Parameters:
bypassDocumentValidation
- If true, allows the write to opt-out of document level validation.- Returns:
- this
-
getCollation
Deprecated.Returns the collation options- Returns:
- the collation options
-
collation
Deprecated.Sets the collation optionsA null value represents the server default.
- Parameters:
collation
- the collation options to use- Returns:
- this
-
toString
Deprecated.
-