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, setName
protected List<DbAttribute> dbAttributes
public InsertBatchQuery(DbEntity entity, int batchCapacity)
public Object getValue(int dbAttributeIndex)
BatchQuery
getValue
in class BatchQuery
public void add(Map snapshot)
public void add(Map snapshot, ObjectId id)
public int size()
BatchQuery
size
in class BatchQuery
public List<DbAttribute> getDbAttributes()
BatchQuery
getDbAttributes
in class BatchQuery
public ObjectId getObjectId()
getObjectId
in class BatchQuery
Copyright © 2001–2018 Apache Cayenne. All rights reserved.