public abstract class BatchQuery extends Object implements Query
Modifier and Type | Field and Description |
---|---|
protected DataMap |
dataMap |
protected List<DbAttribute> |
dbAttributes |
protected DbEntity |
dbEntity |
protected String |
name |
protected List<BatchQueryRow> |
rows |
Constructor and Description |
---|
BatchQuery(DbEntity dbEntity,
List<DbAttribute> dbAttributes,
int batchCapacity) |
Modifier and Type | Method and Description |
---|---|
<T> T |
acceptVisitor(ConfigurationNodeVisitor<T> visitor) |
SQLAction |
createSQLAction(SQLActionVisitor visitor)
Calls "batchAction" on the visitor.
|
DataMap |
getDataMap() |
List<DbAttribute> |
getDbAttributes()
Returns a list of DbAttributes describing batch parameters.
|
DbEntity |
getDbEntity()
Returns a DbEntity associated with this batch.
|
QueryMetadata |
getMetaData(EntityResolver resolver)
Returns default select parameters.
|
String |
getName()
Returns a symbolic name of the query.
|
List<BatchQueryRow> |
getRows() |
boolean |
isUsingOptimisticLocking()
Returns true if the batch query uses optimistic locking.
|
void |
route(QueryRouter router,
EntityResolver resolver,
Query substitutedQuery)
A callback method invoked by Cayenne during the routing phase of the query
execution.
|
void |
setDataMap(DataMap dataMap) |
void |
setName(String name) |
int |
size()
Deprecated.
since 4.0 use getRows().size().
|
protected DbEntity dbEntity
protected String name
protected DataMap dataMap
protected List<BatchQueryRow> rows
protected List<DbAttribute> dbAttributes
public BatchQuery(DbEntity dbEntity, List<DbAttribute> dbAttributes, int batchCapacity)
public List<BatchQueryRow> getRows()
public <T> T acceptVisitor(ConfigurationNodeVisitor<T> visitor)
acceptVisitor
in interface ConfigurationNode
public String getName()
Query
public void setName(String name)
public DataMap getDataMap()
getDataMap
in interface Query
public void setDataMap(DataMap dataMap)
public QueryMetadata getMetaData(EntityResolver resolver)
getMetaData
in interface Query
public void route(QueryRouter router, EntityResolver resolver, Query substitutedQuery)
Query
QueryRouter.route(QueryEngine, Query, Query)
callback method to route
itself. Query can create one or more substitute queries or even provide its own
QueryEngine to execute itself.public SQLAction createSQLAction(SQLActionVisitor visitor)
createSQLAction
in interface Query
public boolean isUsingOptimisticLocking()
public DbEntity getDbEntity()
public List<DbAttribute> getDbAttributes()
@Deprecated public int size()
Copyright © 2001–2015 Apache Cayenne. All rights reserved.