public class BasicUpdate extends Update
Update.AddToSetBuilder, Update.Modifier, Update.Modifiers, Update.Position, Update.PushOperatorBuilder| Constructor and Description |
|---|
BasicUpdate(com.mongodb.DBObject updateObject) |
BasicUpdate(String updateString) |
| Modifier and Type | Method and Description |
|---|---|
Update |
addToSet(String key,
Object value)
Update using the $addToSet update modifier
|
com.mongodb.DBObject |
getUpdateObject() |
Update |
inc(String key,
Number inc)
Update using the $inc update modifier
|
Update |
pop(String key,
Update.Position pos)
Update using the $pop update modifier
|
Update |
pull(String key,
Object value)
Update using the $pull update modifier
|
Update |
pullAll(String key,
Object[] values)
Update using the $pullAll update modifier
|
Update |
push(String key,
Object value)
Update using the $push update modifier
|
Update |
pushAll(String key,
Object[] values)
Update using the
$pushAll update modifier. |
Update |
rename(String oldName,
String newName)
Update using the $rename update modifier
|
Update |
set(String key,
Object value)
Update using the $set update modifier
|
Update |
unset(String key)
Update using the $unset update modifier
|
addFieldOperation, addMultiFieldOperation, addToSet, currentDate, currentTimestamp, equals, fromDBObject, hashCode, modifies, push, setOnInsert, toString, updatepublic BasicUpdate(String updateString)
public BasicUpdate(com.mongodb.DBObject updateObject)
public Update set(String key, Object value)
Updatepublic Update unset(String key)
Updatepublic Update inc(String key, Number inc)
Updatepublic Update push(String key, Object value)
Updatepublic Update pushAll(String key, Object[] values)
Update$pushAll update modifier. $pushAll has been deprecated in favor of $push $each.
Update.push(String)) returns a builder that can be used to populate the $each object.public Update addToSet(String key, Object value)
Updatepublic Update pop(String key, Update.Position pos)
Updatepublic Update pull(String key, Object value)
Updatepublic Update pullAll(String key, Object[] values)
Updatepublic Update rename(String oldName, String newName)
Updatepublic com.mongodb.DBObject getUpdateObject()
getUpdateObject in class UpdateCopyright © 2011-2014–2015 Pivotal Software, Inc.. All rights reserved.