Package org.apache.cayenne.query
Class UpdateBatchQuery
java.lang.Object
org.apache.cayenne.query.BatchQuery
org.apache.cayenne.query.UpdateBatchQuery
- All Implemented Interfaces:
- Serializable,- Query
Batched UPDATE query.
- See Also:
- 
Field SummaryFieldsFields inherited from class org.apache.cayenne.query.BatchQuerydbAttributes, dbEntity, rows
- 
Constructor SummaryConstructorsConstructorDescriptionUpdateBatchQuery(DbEntity dbEntity, List<DbAttribute> qualifierAttributes, List<DbAttribute> updatedAttributes, Collection<String> nullQualifierNames, int batchCapacity) Creates new UpdateBatchQuery.
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds a parameter row to the batch.voidAdds a parameter row to the batch.Returns a list of DbAttributes describing batch parameters.booleanisNull(DbAttribute attribute) Returns true if a given attribute always has a null value in the batch.booleanReturns true if the batch query uses optimistic locking.voidsetUsingOptimisticLocking(boolean usingOptimisticLocking) Methods inherited from class org.apache.cayenne.query.BatchQuerycreateSQLAction, getDbEntity, getMetaData, getRows, route
- 
Field Details- 
usingOptimisticLockingprotected boolean usingOptimisticLocking
 
- 
- 
Constructor Details- 
UpdateBatchQuerypublic UpdateBatchQuery(DbEntity dbEntity, List<DbAttribute> qualifierAttributes, List<DbAttribute> updatedAttributes, Collection<String> nullQualifierNames, int batchCapacity) Creates new UpdateBatchQuery.- Parameters:
- dbEntity- Table or view to update.
- qualifierAttributes- DbAttributes used in the WHERE clause.
- nullQualifierNames- DbAttribute names in the WHERE clause that have null values.
- updatedAttributes- DbAttributes describing updated columns.
- batchCapacity- Estimated size of the batch.
 
 
- 
- 
Method Details- 
isNullReturns true if a given attribute always has a null value in the batch.- Since:
- 1.1
 
- 
isUsingOptimisticLockingpublic boolean isUsingOptimisticLocking()Returns true if the batch query uses optimistic locking.- Overrides:
- isUsingOptimisticLockingin class- BatchQuery
- Since:
- 1.1
 
- 
setUsingOptimisticLockingpublic void setUsingOptimisticLocking(boolean usingOptimisticLocking) - Since:
- 1.1
 
- 
addAdds a parameter row to the batch.
- 
addpublic void add(Map<String, Object> qualifierSnapshot, Map<String, Object> updateSnapshot, ObjectId id) Adds a parameter row to the batch.- Since:
- 1.2
 
- 
getDbAttributesDescription copied from class:BatchQueryReturns a list of DbAttributes describing batch parameters.- Overrides:
- getDbAttributesin class- BatchQuery
 
- 
getUpdatedAttributes- Since:
- 1.1
 
- 
getQualifierAttributes- Since:
- 1.1
 
 
-