Modifier and Type | Field and Description |
---|---|
protected DataNode |
dataNode |
protected DbAdapter |
dbAdapter |
protected DbEntity |
dbEntity |
protected SQLTemplate |
query |
protected QueryMetadata |
queryMetadata |
Constructor and Description |
---|
SQLTemplateAction(SQLTemplate query,
DataNode dataNode) |
Modifier and Type | Method and Description |
---|---|
protected void |
bind(PreparedStatement preparedStatement,
ParameterBinding[] bindings)
Binds parameters to the PreparedStatement.
|
protected RowDescriptorBuilder |
configureRowDescriptorBuilder(SQLStatement compiled,
ResultSet resultSet) |
protected void |
execute(Connection connection,
OperationObserver callback,
SQLStatement compiled,
Collection<Number> updateCounts) |
protected String |
extractTemplateString()
Extracts a template string from a SQLTemplate query.
|
DbAdapter |
getAdapter()
Returns unwrapped DbAdapter used to find correct SQL for a given DB.
|
protected int |
getFetchOffset() |
SQLTemplate |
getQuery()
Returns a SQLTemplate for this action.
|
void |
performAction(Connection connection,
OperationObserver callback)
Runs a SQLTemplate query, collecting all results.
|
protected void |
processSelectResult(SQLStatement compiled,
Connection connection,
Statement statement,
ResultSet resultSet,
OperationObserver callback,
long startTime) |
protected SQLTemplate query
protected QueryMetadata queryMetadata
protected DbEntity dbEntity
protected DataNode dataNode
protected DbAdapter dbAdapter
public SQLTemplateAction(SQLTemplate query, DataNode dataNode)
public DbAdapter getAdapter()
public void performAction(Connection connection, OperationObserver callback) throws SQLException, Exception
performAction
in interface SQLAction
SQLException
Exception
protected void execute(Connection connection, OperationObserver callback, SQLStatement compiled, Collection<Number> updateCounts) throws SQLException, Exception
SQLException
Exception
protected void processSelectResult(SQLStatement compiled, Connection connection, Statement statement, ResultSet resultSet, OperationObserver callback, long startTime) throws Exception
Exception
protected RowDescriptorBuilder configureRowDescriptorBuilder(SQLStatement compiled, ResultSet resultSet) throws SQLException
SQLException
protected String extractTemplateString()
protected void bind(PreparedStatement preparedStatement, ParameterBinding[] bindings) throws SQLException, Exception
SQLException
Exception
public SQLTemplate getQuery()
protected int getFetchOffset()
Copyright © 2001–2015 Apache Cayenne. All rights reserved.