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 Update
Update.AddToSetBuilder, Update.BitwiseOperatorBuilder, Update.Modifier, Update.Modifiers, Update.Position, Update.PushOperatorBuilderNested classes/interfaces inherited from interface UpdateDefinition
UpdateDefinition.ArrayFilter -
Constructor Summary
ConstructorsConstructorDescriptionBasicUpdate(String updateString) BasicUpdate(org.bson.Document updateObject) -
Method Summary
Modifier and TypeMethodDescriptionUpdate using the $addToSet update modifier.org.bson.DocumentUpdate using the $inc update modifier.booleanDetermine if a givenkeywill be touched on execution.pop(String key, Update.Position pos) Update using the $pop update modifier.Update using the $pull update modifier.Update using the $pullAll update modifier.Update using the $push update modifier.Update using the $rename update modifier.Update using the $set update modifier.Update using the $unset update modifier.Methods inherited from class Update
addMultiFieldOperation, addToSet, bitwise, currentDate, currentTimestamp, equals, filterArray, filterArray, fromDocument, getArrayFilters, hasArrayFilters, hashCode, inc, isIsolated, isolated, max, min, multiply, push, setOnInsert, toString, update
-
Constructor Details
-
BasicUpdate
-
BasicUpdate
public BasicUpdate(org.bson.Document updateObject)
-
-
Method Details
-
set
Description copied from class:UpdateUpdate using the $set update modifier.- Overrides:
setin 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
-
inc
-
push
-
addToSet
-
pop
-
pull
-
pullAll
-
rename
-
modifies
-
getUpdateObject
public org.bson.Document getUpdateObject()- Specified by:
getUpdateObjectin interfaceUpdateDefinition- Overrides:
getUpdateObjectin classUpdate- Returns:
- the actual update in its native
Documentformat. Never null.
-