public class InsertBatchQuery extends BatchQuery
| Modifier and Type | Field and Description |
|---|---|
protected List<DbAttribute> |
dbAttributes |
protected List<ObjectId> |
objectIds |
protected List<Map> |
objectSnapshots |
batchIndex, dataMap, dbEntity, name| Constructor and Description |
|---|
InsertBatchQuery(DbEntity entity,
int batchCapacity)
Creates new InsertBatchQuery for a given DbEntity and estimated capacity.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Map snapshot)
Adds a snapshot to batch.
|
void |
add(Map snapshot,
ObjectId id)
Adds a snapshot to batch.
|
List<DbAttribute> |
getDbAttributes()
Returns a list of DbAttributes describing batch parameters.
|
ObjectId |
getObjectId()
Returns an ObjectId associated with the current batch iteration.
|
Object |
getValue(int dbAttributeIndex)
Returns a value at a given index for the current batch iteration.
|
int |
size()
Returns the number of parameter rows in a batch.
|
acceptVisitor, createSQLAction, getDataMap, getDbEntity, getMetaData, getName, getValue, isEmpty, isUsingOptimisticLocking, next, reset, route, setDataMap, setNameprotected List<DbAttribute> dbAttributes
public InsertBatchQuery(DbEntity entity, int batchCapacity)
public Object getValue(int dbAttributeIndex)
BatchQuerygetValue in class BatchQuerypublic void add(Map snapshot)
public void add(Map snapshot, ObjectId id)
public int size()
BatchQuerysize in class BatchQuerypublic List<DbAttribute> getDbAttributes()
BatchQuerygetDbAttributes in class BatchQuerypublic ObjectId getObjectId()
getObjectId in class BatchQueryCopyright © 2001–2018 Apache Cayenne. All rights reserved.