Class UpdateOptions
java.lang.Object
io.vertx.ext.mongo.UpdateOptions
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanThe default value of multi = falsestatic final booleanThe default value of returning new document = falsestatic final booleanThe default value of upsert = false -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorUpdateOptions(boolean upsert) Constructor specify upsertUpdateOptions(boolean upsert, boolean multi) Constructor specify upsert and multiUpdateOptions(JsonObject json) Constructor from JSONUpdateOptions(UpdateOptions other) Copy constructor -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet the arrayFilters option.getHint()Get the hint.Get the hint string.Get the write option.inthashCode()booleanisMulti()Get whether multi is enabled.booleanGet whether returning new document property is enabled.booleanisUpsert()Get whether upsert is enabledsetArrayFilters(JsonArray arrayFilters) Set the arrayFilters optionsetCollation(CollationOptions collation) Collation optionssetHint(JsonObject hint) Set the hint.setHintString(String hintString) Set the hint string.setMulti(boolean multi) Set whether multi is enabledsetReturningNewDocument(boolean returnNewDocument) Set whether new document property is enabled.setUpsert(boolean upsert) Set whether upsert is enabledsetWriteOption(WriteOption writeOption) Set the write optiontoJson()toString()
-
Field Details
-
DEFAULT_UPSERT
public static final boolean DEFAULT_UPSERTThe default value of upsert = false- See Also:
-
DEFAULT_MULTI
public static final boolean DEFAULT_MULTIThe default value of multi = false- See Also:
-
DEFAULT_RETURN_NEW_DOCUMENT
public static final boolean DEFAULT_RETURN_NEW_DOCUMENTThe default value of returning new document = false- See Also:
-
-
Constructor Details
-
UpdateOptions
public UpdateOptions()Default constructor -
UpdateOptions
public UpdateOptions(boolean upsert) Constructor specify upsert- Parameters:
upsert- the value of upsert
-
UpdateOptions
public UpdateOptions(boolean upsert, boolean multi) Constructor specify upsert and multi- Parameters:
upsert- the value of upsertmulti- the value of multi
-
UpdateOptions
-
UpdateOptions
-
-
Method Details
-
getCollation
-
setCollation
Collation options- Parameters:
collation-
-
getWriteOption
-
setWriteOption
Set the write option- Parameters:
writeOption- the write option- Returns:
- reference to this, for fluency
-
isUpsert
public boolean isUpsert()Get whether upsert is enabled- Returns:
- upsert is enabled?
-
setUpsert
Set whether upsert is enabled- Parameters:
upsert- true if enabled- Returns:
- reference to this, for fluency
-
isReturningNewDocument
public boolean isReturningNewDocument()Get whether returning new document property is enabled. Valid only on findOneAnd* methods.- Returns:
- new document property is enabled?
-
setReturningNewDocument
Set whether new document property is enabled. Valid only on findOneAnd* methods.- Parameters:
returnNewDocument- true if enabled- Returns:
- reference to this, for fluency
-
isMulti
public boolean isMulti()Get whether multi is enabled. Multi means more than one document can be updated.- Returns:
- multi is enabled?
-
setMulti
Set whether multi is enabled- Parameters:
multi- true if enabled- Returns:
- reference to this, for fluency
-
getArrayFilters
-
setArrayFilters
Set the arrayFilters option- Parameters:
arrayFilters- the arrayFilters option- Returns:
- reference to this, for fluency
-
getHint
-
setHint
Set the hint.- Parameters:
hint- the hint- Returns:
- reference to this, for fluency
-
getHintString
-
setHintString
Set the hint string.- Parameters:
hintString- the hint string- Returns:
- reference to this, for fluency
-
toJson
-
equals
-
hashCode
-
toString
-