public class ReplaceOptions extends Object
| Constructor | Description |
|---|---|
ReplaceOptions() |
| Modifier and Type | Method | Description |
|---|---|---|
ReplaceOptions |
bypassDocumentValidation(Boolean bypassDocumentValidation) |
Sets the bypass document level validation flag.
|
ReplaceOptions |
collation(Collation collation) |
Sets the collation options
|
static ReplaceOptions |
createReplaceOptions(UpdateOptions updateOptions) |
Creates replace options from updateOptions.
|
Boolean |
getBypassDocumentValidation() |
Gets the the bypass document level validation flag
|
Collation |
getCollation() |
Returns the collation options
|
boolean |
isUpsert() |
Returns true if a new document should be inserted if there are no matches to the query filter.
|
String |
toString() |
|
ReplaceOptions |
upsert(boolean upsert) |
Set to true if a new document should be inserted if there are no matches to the query filter.
|
public static ReplaceOptions createReplaceOptions(UpdateOptions updateOptions)
updateOptions - the updateOptionspublic boolean isUpsert()
public ReplaceOptions upsert(boolean upsert)
upsert - true if a new document should be inserted if there are no matches to the query filter@Nullable public Boolean getBypassDocumentValidation()
public ReplaceOptions bypassDocumentValidation(@Nullable Boolean bypassDocumentValidation)
bypassDocumentValidation - If true, allows the write to opt-out of document level validation.@Nullable public Collation getCollation()
public ReplaceOptions collation(@Nullable Collation collation)
A null value represents the server default.
collation - the collation options to use