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, setName
public 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 BatchQuery
public void setUsingOptimisticLocking(boolean usingOptimisticLocking)
public Object getValue(int dbAttributeIndex)
BatchQuery
getValue
in class BatchQuery
public void add(Map qualifierSnapshot, Map<?,?> updateSnapshot)
public void add(Map qualifierSnapshot, Map<?,?> updateSnapshot, ObjectId id)
public int size()
BatchQuery
size
in class BatchQuery
public List<DbAttribute> getDbAttributes()
BatchQuery
getDbAttributes
in class BatchQuery
public List<DbAttribute> getUpdatedAttributes()
public List<DbAttribute> getQualifierAttributes()
public Map getCurrentQualifier()
public ObjectId getObjectId()
getObjectId
in class BatchQuery
Copyright © 2001–2018 Apache Cayenne. All rights reserved.