|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.access.jdbc.SQLTemplateAction
public class SQLTemplateAction
Implements a strategy for execution of SQLTemplates.
Field Summary | |
---|---|
protected DbAdapter |
adapter
|
protected SQLTemplate |
query
|
protected boolean |
removingLineBreaks
|
Constructor Summary | |
---|---|
SQLTemplateAction(SQLTemplate query,
DbAdapter adapter)
|
Method Summary | |
---|---|
protected void |
bind(java.sql.PreparedStatement preparedStatement,
ParameterBinding[] bindings)
Binds parameters to the PreparedStatement. |
protected void |
execute(java.sql.Connection connection,
OperationObserver callback,
SQLStatement compiled,
java.util.Collection updateCounts)
|
protected java.lang.String |
extractTemplateString()
Extracts a template string from a SQLTemplate query. |
DbAdapter |
getAdapter()
Returns DbAdapter associated with this execution plan object. |
SQLTemplate |
getQuery()
Returns a SQLTemplate for this action. |
boolean |
isRemovingLineBreaks()
Returns whether line breaks are removed when the query is executed. |
void |
performAction(java.sql.Connection connection,
OperationObserver callback)
Runs a SQLTemplate query, collecting all results. |
protected void |
processSelectResult(SQLStatement compiled,
java.sql.Connection connection,
java.sql.Statement statement,
java.sql.ResultSet resultSet,
OperationObserver callback,
long startTime)
|
void |
setRemovingLineBreaks(boolean removingLineBreaks)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected DbAdapter adapter
protected boolean removingLineBreaks
protected SQLTemplate query
Constructor Detail |
---|
public SQLTemplateAction(SQLTemplate query, DbAdapter adapter)
Method Detail |
---|
public DbAdapter getAdapter()
public void performAction(java.sql.Connection connection, OperationObserver callback) throws java.sql.SQLException, java.lang.Exception
performAction
in interface SQLAction
java.sql.SQLException
java.lang.Exception
protected void execute(java.sql.Connection connection, OperationObserver callback, SQLStatement compiled, java.util.Collection updateCounts) throws java.sql.SQLException, java.lang.Exception
java.sql.SQLException
java.lang.Exception
protected void processSelectResult(SQLStatement compiled, java.sql.Connection connection, java.sql.Statement statement, java.sql.ResultSet resultSet, OperationObserver callback, long startTime) throws java.lang.Exception
java.lang.Exception
protected java.lang.String extractTemplateString()
protected void bind(java.sql.PreparedStatement preparedStatement, ParameterBinding[] bindings) throws java.sql.SQLException, java.lang.Exception
java.sql.SQLException
java.lang.Exception
public boolean isRemovingLineBreaks()
public void setRemovingLineBreaks(boolean removingLineBreaks)
public SQLTemplate getQuery()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |