public class UpdateOptions extends Object
| Modifier and Type | Field and Description | 
|---|---|
static boolean | 
DEFAULT_MULTI
The default value of multi = false 
 | 
static boolean | 
DEFAULT_RETURN_NEW_DOCUMENT
The default value of returning new document = false 
 | 
static boolean | 
DEFAULT_UPSERT
The default value of upsert = false 
 | 
| Constructor and Description | 
|---|
UpdateOptions()
Default constructor 
 | 
UpdateOptions(boolean upsert)
Constructor specify upsert 
 | 
UpdateOptions(boolean upsert,
             boolean multi)
Constructor specify upsert and multu 
 | 
UpdateOptions(JsonObject json)
Constructor from JSON 
 | 
UpdateOptions(UpdateOptions other)
Copy constructor 
 | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
equals(Object o)  | 
WriteOption | 
getWriteOption()
Get the write option. 
 | 
int | 
hashCode()  | 
boolean | 
isMulti()
Get whether multi is enabled. 
 | 
boolean | 
isReturningNewDocument()
Get whether returning new document property is enabled. 
 | 
boolean | 
isUpsert()
Get whether upsert is enabled 
 | 
UpdateOptions | 
setMulti(boolean multi)
Set whether multi is enabled 
 | 
UpdateOptions | 
setReturningNewDocument(boolean returnNewDocument)
Set whether new document property is enabled. 
 | 
UpdateOptions | 
setUpsert(boolean upsert)
Set whether upsert is enabled 
 | 
UpdateOptions | 
setWriteOption(WriteOption writeOption)
Set the write option 
 | 
JsonObject | 
toJson()  | 
public static final boolean DEFAULT_UPSERT
public static final boolean DEFAULT_MULTI
public static final boolean DEFAULT_RETURN_NEW_DOCUMENT
public UpdateOptions()
public UpdateOptions(boolean upsert)
upsert - the value of upsertpublic UpdateOptions(boolean upsert,
                     boolean multi)
upsert - the value of upsertmulti - the value of multipublic UpdateOptions(UpdateOptions other)
other - the one to copypublic UpdateOptions(JsonObject json)
json - the jsonpublic WriteOption getWriteOption()
public UpdateOptions setWriteOption(WriteOption writeOption)
writeOption - the write optionpublic boolean isUpsert()
public UpdateOptions setUpsert(boolean upsert)
upsert - true if enabledpublic boolean isReturningNewDocument()
public UpdateOptions setReturningNewDocument(boolean returnNewDocument)
returnNewDocument - true if enabledpublic boolean isMulti()
public UpdateOptions setMulti(boolean multi)
multi - true if enabledpublic JsonObject toJson()
Copyright © 2020 Eclipse. All rights reserved.