public class UpdateBatchQuery extends BatchQuery
| Modifier and Type | Field and Description |
|---|---|
protected List<ObjectId> |
objectIds |
protected List<Map> |
qualifierSnapshots |
protected List<Map> |
updateSnapshots |
protected boolean |
usingOptimisticLocking |
batchIndex, dataMap, dbEntity, name| Constructor and Description |
|---|
UpdateBatchQuery(DbEntity dbEntity,
List<DbAttribute> qualifierAttributes,
List<DbAttribute> updatedAttribute,
Collection<String> nullQualifierNames,
int batchCapacity)
Creates new UpdateBatchQuery.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Map qualifierSnapshot,
Map<?,?> updateSnapshot)
Adds a parameter row to the batch.
|
void |
add(Map qualifierSnapshot,
Map<?,?> updateSnapshot,
ObjectId id)
Adds a parameter row to the batch.
|
Map |
getCurrentQualifier()
Returns a snapshot of the current qualifier values.
|
List<DbAttribute> |
getDbAttributes()
Returns a list of DbAttributes describing batch parameters.
|
ObjectId |
getObjectId()
Returns an ObjectId associated with the current batch iteration.
|
List<DbAttribute> |
getQualifierAttributes() |
List<DbAttribute> |
getUpdatedAttributes() |
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.
|
acceptVisitor, createSQLAction, getDataMap, getDbEntity, getMetaData, getName, getValue, isEmpty, next, reset, route, setDataMap, setNamepublic UpdateBatchQuery(DbEntity dbEntity, List<DbAttribute> qualifierAttributes, List<DbAttribute> updatedAttribute, Collection<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.public boolean isNull(DbAttribute attribute)
public boolean isUsingOptimisticLocking()
isUsingOptimisticLocking in class BatchQuerypublic void setUsingOptimisticLocking(boolean usingOptimisticLocking)
public Object getValue(int dbAttributeIndex)
BatchQuerygetValue in class BatchQuerypublic void add(Map qualifierSnapshot, Map<?,?> updateSnapshot)
public void add(Map qualifierSnapshot, Map<?,?> updateSnapshot, ObjectId id)
public int size()
BatchQuerysize in class BatchQuerypublic List<DbAttribute> getDbAttributes()
BatchQuerygetDbAttributes in class BatchQuerypublic List<DbAttribute> getUpdatedAttributes()
public List<DbAttribute> getQualifierAttributes()
public Map getCurrentQualifier()
public ObjectId getObjectId()
getObjectId in class BatchQueryCopyright © 2001–2018 Apache Cayenne. All rights reserved.