|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.vz.mongodb.jackson.DBUpdate.Builder
public static class DBUpdate.Builder
The builder
| Constructor Summary | |
|---|---|
DBUpdate.Builder()
|
|
| Method Summary | |
|---|---|
DBUpdate.Builder |
addOperation(String modifier,
String field,
Object value)
Add an operation to the update |
DBUpdate.Builder |
addToSet(String field,
List<?> values)
Add the given values to the array value if they don't already exist in the specified field atomically |
DBUpdate.Builder |
addToSet(String field,
Object... values)
Add the given values to the array value if they don't already exist in the specified field atomically |
DBUpdate.Builder |
addToSet(String field,
Object value)
Add the given value to the array value if it doesn't already exist in the specified field atomically |
DBUpdate.Builder |
bit(String field,
String operation,
int value)
Perform a bit operation on the given field |
DBUpdate.Builder |
bit(String field,
String operation1,
int value1,
String operation2,
int value2)
Perform two bit operations on the given field |
DBUpdate.Builder |
bitwiseAnd(String field,
int value)
Perform a bitwise and on the given field |
DBUpdate.Builder |
bitwiseOr(String field,
int value)
Perform a bitwise or on the given field |
DBUpdate.Builder |
inc(String field)
Increment the given field atomically by one |
DBUpdate.Builder |
inc(String field,
int by)
Increment the given field atomically by the given value |
DBUpdate.Builder |
popFirst(String field)
Remove the first value from the array specified by field atomically |
DBUpdate.Builder |
popLast(String field)
Remove the last value from the array specified by field atomically |
DBUpdate.Builder |
pull(String field,
Object value)
Remove all occurances of value from the array at field |
DBUpdate.Builder |
pullAll(String field,
List<?> values)
Remove all occurances of the values from the array at field |
DBUpdate.Builder |
pullAll(String field,
Object... values)
Remove all occurances of the values from the array at field |
DBUpdate.Builder |
push(String field,
Object value)
Add the given value to the array value at the specified field atomically |
DBUpdate.Builder |
pushAll(String field,
List<?> values)
Add all of the given values to the array value at the specified field atomically |
DBUpdate.Builder |
pushAll(String field,
Object... values)
Add all of the given values to the array value at the specified field atomically |
DBUpdate.Builder |
rename(String oldFieldName,
String newFieldName)
Rename the given field to the new field name |
com.mongodb.DBObject |
serialiseAndGet(org.codehaus.jackson.map.ObjectMapper objectMapper)
Serialise the values of the query and get them |
DBUpdate.Builder |
set(String field,
Object value)
Set the given field (can be multiple levels deep) to the given value atomically |
DBUpdate.Builder |
setRaw(String field,
Object value)
Set a raw value, without a special modifier |
DBUpdate.Builder |
unset(String field)
Unset the given field atomically |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DBUpdate.Builder()
| Method Detail |
|---|
public DBUpdate.Builder inc(String field)
field - The field to increment
public DBUpdate.Builder inc(String field,
int by)
field - The field to incrementby - The value to increment by
public DBUpdate.Builder set(String field,
Object value)
field - The field to setvalue - The value to set it to
public DBUpdate.Builder unset(String field)
field - The field to unset
public DBUpdate.Builder push(String field,
Object value)
field - The field to add the value tovalue - The value to add
public DBUpdate.Builder pushAll(String field,
Object... values)
field - The field to add the values tovalues - The values to add
public DBUpdate.Builder pushAll(String field,
List<?> values)
field - The field to add the values tovalues - The values to add
public DBUpdate.Builder addToSet(String field,
Object value)
field - The field to add the value tovalue - The value to add
public DBUpdate.Builder addToSet(String field,
Object... values)
field - The field to add the values tovalues - The values to add
public DBUpdate.Builder addToSet(String field,
List<?> values)
field - The field to add the values tovalues - The values to add
public DBUpdate.Builder popFirst(String field)
field - The field to remove the value from
public DBUpdate.Builder popLast(String field)
field - The field to remove the value from
public DBUpdate.Builder pull(String field,
Object value)
field - The field to remove the value fromvalue - The value to remove. This may be another query.
public DBUpdate.Builder pullAll(String field,
Object... values)
field - The field to remove the values fromvalues - The values to remove
public DBUpdate.Builder pullAll(String field,
List<?> values)
field - The field to remove the values fromvalues - The values to remove
public DBUpdate.Builder rename(String oldFieldName,
String newFieldName)
oldFieldName - The old field namenewFieldName - The new field name
public DBUpdate.Builder bit(String field,
String operation,
int value)
field - The field to perform the operation onoperation - The operation to performvalue - The value
public DBUpdate.Builder bit(String field,
String operation1,
int value1,
String operation2,
int value2)
field - The field to perform the operations onoperation1 - The first operation to performvalue1 - The first valueoperation2 - The second operation to performvalue2 - The second value
public DBUpdate.Builder bitwiseAnd(String field,
int value)
field - The field to perform the and onvalue - The value
public DBUpdate.Builder bitwiseOr(String field,
int value)
field - The field to perform the or onvalue - The value
public DBUpdate.Builder setRaw(String field,
Object value)
field - The field to set the value onvalue - The value to set
public DBUpdate.Builder addOperation(String modifier,
String field,
Object value)
modifier - The modifier of the operationfield - The field to setvalue - The value to modify it with.
public com.mongodb.DBObject serialiseAndGet(org.codehaus.jackson.map.ObjectMapper objectMapper)
objectMapper - The object mapper to use to serialise values
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||