|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cayenne.query.BatchQuery
org.apache.cayenne.query.UpdateBatchQuery
public class UpdateBatchQuery
Batched UPDATE query.
| Field Summary | |
|---|---|
protected java.util.List<ObjectId> |
objectIds
|
protected java.util.List<java.util.Map> |
qualifierSnapshots
|
protected java.util.List<java.util.Map> |
updateSnapshots
|
protected boolean |
usingOptimisticLocking
|
| Fields inherited from class org.apache.cayenne.query.BatchQuery |
|---|
batchIndex, dataMap, dbEntity, name |
| Constructor Summary | |
|---|---|
UpdateBatchQuery(DbEntity dbEntity,
java.util.List<DbAttribute> qualifierAttributes,
java.util.List<DbAttribute> updatedAttribute,
java.util.Collection<java.lang.String> nullQualifierNames,
int batchCapacity)
Creates new UpdateBatchQuery. |
|
| Method Summary | |
|---|---|
void |
add(java.util.Map qualifierSnapshot,
java.util.Map<?,?> updateSnapshot)
Adds a parameter row to the batch. |
void |
add(java.util.Map qualifierSnapshot,
java.util.Map<?,?> updateSnapshot,
ObjectId id)
Adds a parameter row to the batch. |
java.util.Map |
getCurrentQualifier()
Returns a snapshot of the current qualifier values. |
java.util.List<DbAttribute> |
getDbAttributes()
Returns a list of DbAttributes describing batch parameters. |
ObjectId |
getObjectId()
Returns an ObjectId associated with the current batch iteration. |
java.util.List<DbAttribute> |
getQualifierAttributes()
|
java.util.List<DbAttribute> |
getUpdatedAttributes()
|
java.lang.Object |
getValue(int dbAttributeIndex)
Returns a value at a given index for the current batch iteration. |
boolean |
isNull(DbAttribute attribute)
Returns true if a given attribute always has a null value in the batch. |
boolean |
isUsingOptimisticLocking()
Returns true if the batch query uses optimistic locking. |
void |
setUsingOptimisticLocking(boolean usingOptimisticLocking)
|
int |
size()
Returns the number of parameter rows in a batch. |
| Methods inherited from class org.apache.cayenne.query.BatchQuery |
|---|
acceptVisitor, createSQLAction, getDataMap, getDbEntity, getMetaData, getName, getValue, isEmpty, next, reset, route, setDataMap, setName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.List<ObjectId> objectIds
protected java.util.List<java.util.Map> qualifierSnapshots
protected java.util.List<java.util.Map> updateSnapshots
protected boolean usingOptimisticLocking
| Constructor Detail |
|---|
public UpdateBatchQuery(DbEntity dbEntity,
java.util.List<DbAttribute> qualifierAttributes,
java.util.List<DbAttribute> updatedAttribute,
java.util.Collection<java.lang.String> nullQualifierNames,
int batchCapacity)
dbEntity - Table or view to update.qualifierAttributes - DbAttributes used in the WHERE clause.nullQualifierNames - DbAttribute names in the WHERE clause that have null
values.updatedAttribute - DbAttributes describing updated columns.batchCapacity - Estimated size of the batch.| Method Detail |
|---|
public boolean isNull(DbAttribute attribute)
public boolean isUsingOptimisticLocking()
isUsingOptimisticLocking in class BatchQuerypublic void setUsingOptimisticLocking(boolean usingOptimisticLocking)
public java.lang.Object getValue(int dbAttributeIndex)
BatchQuery
getValue in class BatchQuery
public void add(java.util.Map qualifierSnapshot,
java.util.Map<?,?> updateSnapshot)
public void add(java.util.Map qualifierSnapshot,
java.util.Map<?,?> updateSnapshot,
ObjectId id)
public int size()
BatchQuery
size in class BatchQuerypublic java.util.List<DbAttribute> getDbAttributes()
BatchQuery
getDbAttributes in class BatchQuerypublic java.util.List<DbAttribute> getUpdatedAttributes()
public java.util.List<DbAttribute> getQualifierAttributes()
public java.util.Map getCurrentQualifier()
public ObjectId getObjectId()
getObjectId in class BatchQuery
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||