public class NullSafeUpdate extends Object
Update| Constructor and Description |
|---|
NullSafeUpdate()
Instantiates a new Null safe update.
|
NullSafeUpdate(org.springframework.data.mongodb.core.query.Update update)
Instantiates a new Null safe update.
|
| Modifier and Type | Method and Description |
|---|---|
org.springframework.data.mongodb.core.query.Update.AddToSetBuilder |
addToSet(String key)
Add to set add to set builder.
|
NullSafeUpdate |
addToSet(String key,
Object value)
Add to set null safe update.
|
org.springframework.data.mongodb.core.query.Update.BitwiseOperatorBuilder |
bitwise(String key)
Bitwise bitwise operator builder.
|
NullSafeUpdate |
currentDate(String key)
Current date null safe update.
|
NullSafeUpdate |
currentTimestamp(String key)
Current timestamp null safe update.
|
boolean |
equals(Object obj) |
org.springframework.data.mongodb.core.query.Update |
getUpdate()
Gets update.
|
org.bson.Document |
getUpdateObject()
Gets update object.
|
int |
hashCode() |
NullSafeUpdate |
inc(String key,
Number inc)
Inc null safe update.
|
protected boolean |
isValid(Object value)
Is valid boolean.
|
NullSafeUpdate |
max(String key,
Object value)
Max null safe update.
|
NullSafeUpdate |
min(String key,
Object value)
Min null safe update.
|
boolean |
modifies(String key)
Modifies boolean.
|
NullSafeUpdate |
multiply(String key,
Number multiplier)
Multiply null safe update.
|
org.springframework.data.mongodb.core.query.Update |
pop(String key,
org.springframework.data.mongodb.core.query.Update.Position pos)
Pop update.
|
NullSafeUpdate |
pull(String key,
Object value)
Pull null safe update.
|
NullSafeUpdate |
pullAll(String key,
Object[] values)
Pull all null safe update.
|
org.springframework.data.mongodb.core.query.Update.PushOperatorBuilder |
push(String key)
Push push operator builder.
|
NullSafeUpdate |
push(String key,
Object value)
Push null safe update.
|
NullSafeUpdate |
pushAll(String key,
Object[] values)
Push all null safe update.
|
NullSafeUpdate |
rename(String oldName,
String newName)
Rename null safe update.
|
NullSafeUpdate |
set(String key,
Object value)
Set null safe update.
|
NullSafeUpdate |
setOnInsert(String key,
Object value)
Sets on insert.
|
String |
toString() |
NullSafeUpdate |
unset(String key)
Unset null safe update.
|
public NullSafeUpdate()
public NullSafeUpdate(org.springframework.data.mongodb.core.query.Update update)
update - the updatepublic org.springframework.data.mongodb.core.query.Update getUpdate()
public NullSafeUpdate set(String key, Object value)
key - the keyvalue - the valuepublic NullSafeUpdate setOnInsert(String key, Object value)
key - the keyvalue - the valuepublic NullSafeUpdate unset(String key)
key - the keypublic NullSafeUpdate inc(String key, Number inc)
key - the keyinc - the incpublic NullSafeUpdate push(String key, Object value)
key - the keyvalue - the valuepublic NullSafeUpdate pushAll(String key, Object[] values)
key - the keyvalues - the valuespublic org.springframework.data.mongodb.core.query.Update.AddToSetBuilder addToSet(String key)
key - the keypublic NullSafeUpdate addToSet(String key, Object value)
key - the keyvalue - the valuepublic NullSafeUpdate pull(String key, Object value)
key - the keyvalue - the valuepublic NullSafeUpdate pullAll(String key, Object[] values)
key - the keyvalues - the valuespublic NullSafeUpdate rename(String oldName, String newName)
oldName - the old namenewName - the new namepublic NullSafeUpdate currentDate(String key)
key - the keypublic NullSafeUpdate currentTimestamp(String key)
key - the keypublic NullSafeUpdate multiply(String key, Number multiplier)
key - the keymultiplier - the multiplierpublic NullSafeUpdate max(String key, Object value)
key - the keyvalue - the valuepublic NullSafeUpdate min(String key, Object value)
key - the keyvalue - the valuepublic org.springframework.data.mongodb.core.query.Update.BitwiseOperatorBuilder bitwise(String key)
key - the keypublic org.bson.Document getUpdateObject()
public boolean modifies(String key)
key - the keypublic org.springframework.data.mongodb.core.query.Update.PushOperatorBuilder push(String key)
key - the keypublic org.springframework.data.mongodb.core.query.Update pop(String key, org.springframework.data.mongodb.core.query.Update.Position pos)
key - the keypos - the posprotected boolean isValid(Object value)
value - the valueCopyright © 2022. All rights reserved.