Class BasicUpdate
java.lang.Object
org.springframework.data.mongodb.core.query.Update
org.springframework.data.mongodb.core.query.BasicUpdate
- All Implemented Interfaces:
UpdateDefinition
- Author:
- Thomas Risberg, John Brisbin, Oliver Gierke, Christoph Strobl, Mark Paluch
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.data.mongodb.core.query.Update
Update.AddToSetBuilder, Update.BitwiseOperatorBuilder, Update.Modifier, Update.Modifiers, Update.Position, Update.PushOperatorBuilder
Nested classes/interfaces inherited from interface org.springframework.data.mongodb.core.query.UpdateDefinition
UpdateDefinition.ArrayFilter
-
Constructor Summary
ConstructorDescriptionBasicUpdate
(String updateString) BasicUpdate
(org.bson.Document updateObject) -
Method Summary
Modifier and TypeMethodDescriptionUpdate using the $addToSet update modifierorg.bson.Document
Update using the $inc update modifierpop
(String key, Update.Position pos) Update using the $pop update modifierUpdate using the $pull update modifierUpdate using the $pullAll update modifierUpdate using the $push update modifierUpdate using the $rename update modifierUpdate using the $set update modifierUpdate using the $unset update modifierMethods inherited from class org.springframework.data.mongodb.core.query.Update
addMultiFieldOperation, addToSet, bitwise, currentDate, currentTimestamp, equals, filterArray, filterArray, fromDocument, getArrayFilters, hasArrayFilters, hashCode, inc, isIsolated, isolated, max, min, modifies, multiply, push, setOnInsert, toString, update
-
Constructor Details
-
BasicUpdate
-
BasicUpdate
public BasicUpdate(org.bson.Document updateObject)
-
-
Method Details
-
set
Description copied from class:Update
Update using the $set update modifier- Overrides:
set
in classUpdate
- Parameters:
key
- the field name.value
- can be null. In this case the property remains in the db with a null value. To remove it useUpdate.unset(String)
.- Returns:
- this.
- See Also:
-
unset
Description copied from class:Update
Update using the $unset update modifier -
inc
Description copied from class:Update
Update using the $inc update modifier -
push
Description copied from class:Update
Update using the $push update modifier -
addToSet
Description copied from class:Update
Update using the $addToSet update modifier -
pop
Description copied from class:Update
Update using the $pop update modifier -
pull
Description copied from class:Update
Update using the $pull update modifier -
pullAll
Description copied from class:Update
Update using the $pullAll update modifier -
rename
Description copied from class:Update
Update using the $rename update modifier -
getUpdateObject
public org.bson.Document getUpdateObject()- Specified by:
getUpdateObject
in interfaceUpdateDefinition
- Overrides:
getUpdateObject
in classUpdate
- Returns:
- the actual update in its native
Document
format. Never null.
-