Package | Description |
---|---|
org.mongodb.morphia | |
org.mongodb.morphia.dao | |
org.mongodb.morphia.query | |
org.mongodb.morphia.utils |
Modifier and Type | Method and Description |
---|---|
<T> UpdateOperations<T> |
Datastore.createUpdateOperations(Class<T> kind)
The builder for all update operations
|
<T> UpdateOperations<T> |
DatastoreImpl.createUpdateOperations(Class<T> clazz) |
<T> UpdateOperations<T> |
DatastoreImpl.createUpdateOperations(Class<T> kind,
com.mongodb.DBObject ops) |
<T> UpdateOperations<T> |
AdvancedDatastore.createUpdateOperations(Class<T> kind,
com.mongodb.DBObject ops) |
Modifier and Type | Method and Description |
---|---|
<T> T |
Datastore.findAndModify(Query<T> q,
UpdateOperations<T> ops)
Find the first Entity from the Query, and modify it.
|
<T> T |
DatastoreImpl.findAndModify(Query<T> q,
UpdateOperations<T> ops) |
<T> T |
Datastore.findAndModify(Query<T> q,
UpdateOperations<T> ops,
boolean oldVersion)
Find the first Entity from the Query, and modify it.
|
<T> T |
DatastoreImpl.findAndModify(Query<T> query,
UpdateOperations<T> ops,
boolean oldVersion) |
<T> T |
Datastore.findAndModify(Query<T> q,
UpdateOperations<T> ops,
boolean oldVersion,
boolean createIfMissing)
Find the first Entity from the Query, and modify it.
|
<T> T |
DatastoreImpl.findAndModify(Query<T> qi,
UpdateOperations<T> ops,
boolean oldVersion,
boolean createIfMissing) |
<T> UpdateResults |
Datastore.update(Key<T> key,
UpdateOperations<T> ops)
updates the entity with the operations; this is an atomic operation
|
<T> UpdateResults |
DatastoreImpl.update(Key<T> key,
UpdateOperations<T> ops) |
<T> UpdateResults |
Datastore.update(Query<T> query,
UpdateOperations<T> ops)
updates all entities found with the operations; this is an atomic operation per entity
|
<T> UpdateResults |
DatastoreImpl.update(Query<T> query,
UpdateOperations<T> ops) |
<T> UpdateResults |
Datastore.update(Query<T> query,
UpdateOperations<T> ops,
boolean createIfMissing)
updates all entities found with the operations, if nothing is found insert the update as an entity if "createIfMissing" is true; this
is an atomic operation per entity
|
<T> UpdateResults |
DatastoreImpl.update(Query<T> query,
UpdateOperations<T> ops,
boolean createIfMissing) |
<T> UpdateResults |
Datastore.update(Query<T> query,
UpdateOperations<T> ops,
boolean createIfMissing,
com.mongodb.WriteConcern wc) |
<T> UpdateResults |
DatastoreImpl.update(Query<T> query,
UpdateOperations<T> ops,
boolean createIfMissing,
com.mongodb.WriteConcern wc) |
<T> UpdateResults |
Datastore.update(T ent,
UpdateOperations<T> ops)
updates the entity with the operations; this is an atomic operation
|
<T> UpdateResults |
DatastoreImpl.update(T ent,
UpdateOperations<T> ops) |
<T> UpdateResults |
Datastore.updateFirst(Query<T> query,
UpdateOperations<T> ops)
updates the first entity found with the operations; this is an atomic operation
|
<T> UpdateResults |
DatastoreImpl.updateFirst(Query<T> query,
UpdateOperations<T> ops) |
<T> UpdateResults |
Datastore.updateFirst(Query<T> query,
UpdateOperations<T> ops,
boolean createIfMissing)
updates the first entity found with the operations, if nothing is found insert the update as an entity if "createIfMissing" is true;
this is an atomic operation per entity
|
<T> UpdateResults |
DatastoreImpl.updateFirst(Query<T> query,
UpdateOperations<T> ops,
boolean createIfMissing) |
<T> UpdateResults |
Datastore.updateFirst(Query<T> query,
UpdateOperations<T> ops,
boolean createIfMissing,
com.mongodb.WriteConcern wc) |
<T> UpdateResults |
DatastoreImpl.updateFirst(Query<T> query,
UpdateOperations<T> ops,
boolean createIfMissing,
com.mongodb.WriteConcern wc) |
Modifier and Type | Method and Description |
---|---|
UpdateOperations<T> |
BasicDAO.createUpdateOperations() |
UpdateOperations<T> |
DAO.createUpdateOperations()
Starts a update-operations def for this DAO entities type
|
Modifier and Type | Method and Description |
---|---|
UpdateResults |
BasicDAO.update(Query<T> q,
UpdateOperations<T> ops) |
UpdateResults |
DAO.update(Query<T> q,
UpdateOperations<T> ops)
Updates all entities matched by the constraints with the modifiers supplied.
|
UpdateResults |
BasicDAO.updateFirst(Query<T> q,
UpdateOperations<T> ops) |
UpdateResults |
DAO.updateFirst(Query<T> q,
UpdateOperations<T> ops)
Updates the first entity matched by the constraints with the modifiers supplied.
|
Modifier and Type | Class and Description |
---|---|
class |
UpdateOpsImpl<T> |
Modifier and Type | Method and Description |
---|---|
UpdateOperations<T> |
UpdateOperations.add(String fieldExpr,
Object value)
adds the value to an array field
|
UpdateOperations<T> |
UpdateOpsImpl.add(String fieldExpr,
Object value) |
UpdateOperations<T> |
UpdateOperations.add(String fieldExpr,
Object value,
boolean addDups) |
UpdateOperations<T> |
UpdateOpsImpl.add(String fieldExpr,
Object value,
boolean addDups) |
UpdateOperations<T> |
UpdateOperations.addAll(String fieldExpr,
List<?> values,
boolean addDups)
adds the values to an array field
|
UpdateOperations<T> |
UpdateOpsImpl.addAll(String fieldExpr,
List<?> values,
boolean addDups) |
UpdateOperations<T> |
UpdateOperations.dec(String fieldExpr)
decrements the numeric field by 1
|
UpdateOperations<T> |
UpdateOpsImpl.dec(String fieldExpr) |
UpdateOperations<T> |
UpdateOperations.disableValidation()
Turns off validation (for all calls made after)
|
UpdateOperations<T> |
UpdateOpsImpl.disableValidation() |
UpdateOperations<T> |
UpdateOperations.enableValidation()
Turns on validation (for all calls made after); by default validation is on
|
UpdateOperations<T> |
UpdateOpsImpl.enableValidation() |
UpdateOperations<T> |
UpdateOperations.inc(String fieldExpr)
increments the numeric field by 1
|
UpdateOperations<T> |
UpdateOpsImpl.inc(String fieldExpr) |
UpdateOperations<T> |
UpdateOperations.inc(String fieldExpr,
Number value)
increments the numeric field by value (negatives are allowed)
|
UpdateOperations<T> |
UpdateOpsImpl.inc(String fieldExpr,
Number value) |
UpdateOperations<T> |
UpdateOperations.isolated()
Enables isolation (so this update happens in one shot, without yielding)
|
UpdateOperations<T> |
UpdateOpsImpl.isolated() |
UpdateOperations<T> |
UpdateOperations.max(String fieldExpr,
Number value)
sets the numeric field to value if it is greater than the current value.
|
UpdateOperations<T> |
UpdateOpsImpl.max(String fieldExpr,
Number value) |
UpdateOperations<T> |
UpdateOperations.min(String fieldExpr,
Number value)
sets the numeric field to value if it is less than the current value.
|
UpdateOperations<T> |
UpdateOpsImpl.min(String fieldExpr,
Number value) |
UpdateOperations<T> |
UpdateOperations.removeAll(String fieldExpr,
List<?> values)
removes the values from the array field
|
UpdateOperations<T> |
UpdateOpsImpl.removeAll(String fieldExpr,
List<?> values) |
UpdateOperations<T> |
UpdateOperations.removeAll(String fieldExpr,
Object value)
removes the value from the array field
|
UpdateOperations<T> |
UpdateOpsImpl.removeAll(String fieldExpr,
Object value) |
UpdateOperations<T> |
UpdateOperations.removeFirst(String fieldExpr)
removes the first value from the array
|
UpdateOperations<T> |
UpdateOpsImpl.removeFirst(String fieldExpr) |
UpdateOperations<T> |
UpdateOperations.removeLast(String fieldExpr)
removes the last value from the array
|
UpdateOperations<T> |
UpdateOpsImpl.removeLast(String fieldExpr) |
UpdateOperations<T> |
UpdateOperations.set(String fieldExpr,
Object value)
sets the field value
|
UpdateOperations<T> |
UpdateOpsImpl.set(String fieldExpr,
Object value) |
UpdateOperations<T> |
UpdateOperations.setOnInsert(String fieldExpr,
Object value)
sets the field on insert.
|
UpdateOperations<T> |
UpdateOpsImpl.setOnInsert(String fieldExpr,
Object value) |
UpdateOperations<T> |
UpdateOperations.unset(String fieldExpr)
removes the field
|
UpdateOperations<T> |
UpdateOpsImpl.unset(String fieldExpr) |
Modifier and Type | Method and Description |
---|---|
static com.mongodb.DBObject |
Helper.getUpdateOperations(UpdateOperations ops) |
Copyright © 2016. All rights reserved.