|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- The Java type used in the updatespublic interface UpdateOperations<T>
A nicer interface to the update operations in monogodb. All these operations happen at the server and can cause the server and client version of the Entity to be different
Method Summary | |
---|---|
UpdateOperations<T> |
add(String fieldExpr,
Object value)
adds the value to an array field |
UpdateOperations<T> |
add(String fieldExpr,
Object value,
boolean addDups)
|
UpdateOperations<T> |
addAll(String fieldExpr,
List<?> values,
boolean addDups)
adds the values to an array field |
UpdateOperations<T> |
dec(String fieldExpr)
decrements the numeric field by 1 |
UpdateOperations<T> |
disableValidation()
Turns off validation (for all calls made after) |
UpdateOperations<T> |
enableValidation()
Turns on validation (for all calls made after); by default validation is on |
UpdateOperations<T> |
inc(String fieldExpr)
increments the numeric field by 1 |
UpdateOperations<T> |
inc(String fieldExpr,
Number value)
increments the numeric field by value (negatives are allowed) |
UpdateOperations<T> |
isolated()
Enables isolation (so this update happens in one shot, without yielding) |
UpdateOperations<T> |
max(String fieldExpr,
Number value)
sets the numeric field to value if it is greater than the current value. |
UpdateOperations<T> |
min(String fieldExpr,
Number value)
sets the numeric field to value if it is less than the current value. |
UpdateOperations<T> |
removeAll(String fieldExpr,
List<?> values)
removes the values from the array field |
UpdateOperations<T> |
removeAll(String fieldExpr,
Object value)
removes the value from the array field |
UpdateOperations<T> |
removeFirst(String fieldExpr)
removes the first value from the array |
UpdateOperations<T> |
removeLast(String fieldExpr)
removes the last value from the array |
UpdateOperations<T> |
set(String fieldExpr,
Object value)
sets the field value |
UpdateOperations<T> |
setOnInsert(String fieldExpr,
Object value)
sets the field on insert. |
UpdateOperations<T> |
unset(String fieldExpr)
removes the field |
Method Detail |
---|
UpdateOperations<T> set(String fieldExpr, Object value)
UpdateOperations<T> setOnInsert(String fieldExpr, Object value)
UpdateOperations<T> unset(String fieldExpr)
UpdateOperations<T> add(String fieldExpr, Object value)
UpdateOperations<T> add(String fieldExpr, Object value, boolean addDups)
UpdateOperations<T> addAll(String fieldExpr, List<?> values, boolean addDups)
UpdateOperations<T> removeFirst(String fieldExpr)
UpdateOperations<T> removeLast(String fieldExpr)
UpdateOperations<T> removeAll(String fieldExpr, Object value)
UpdateOperations<T> removeAll(String fieldExpr, List<?> values)
UpdateOperations<T> dec(String fieldExpr)
UpdateOperations<T> inc(String fieldExpr)
UpdateOperations<T> inc(String fieldExpr, Number value)
UpdateOperations<T> max(String fieldExpr, Number value)
UpdateOperations<T> min(String fieldExpr, Number value)
UpdateOperations<T> enableValidation()
UpdateOperations<T> disableValidation()
UpdateOperations<T> isolated()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |