public class ReplaceOptions
extends java.lang.Object
Constructor and Description |
---|
ReplaceOptions() |
Modifier and Type | Method and Description |
---|---|
ReplaceOptions |
bypassDocumentValidation(java.lang.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.
|
java.lang.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.
|
java.lang.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 java.lang.Boolean getBypassDocumentValidation()
public ReplaceOptions bypassDocumentValidation(@Nullable java.lang.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 usepublic java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2010 - 2020 Adobe. All Rights Reserved