|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.jdbc.object.RdbmsOperation
org.springframework.jdbc.object.SqlOperation
public abstract class SqlOperation
Operation object representing a SQL-based operation such as a query or update, as opposed to a stored procedure.
Configures a PreparedStatementCreatorFactory
based on the declared parameters.
Field Summary | |
---|---|
private ParsedSql |
cachedSql
Parsed representation of the SQL statement |
private java.lang.Object |
parsedSqlMonitor
Monitor for locking the cached representation of the parsed SQL statement |
private PreparedStatementCreatorFactory |
preparedStatementFactory
Object enabling us to create PreparedStatementCreators efficiently, based on this class's declared parameters. |
Fields inherited from class org.springframework.jdbc.object.RdbmsOperation |
---|
logger |
Constructor Summary | |
---|---|
SqlOperation()
|
Method Summary | |
---|---|
protected void |
compileInternal()
Overridden method to configure the PreparedStatementCreatorFactory based on our declared parameters. |
protected ParsedSql |
getParsedSql()
Obtain a parsed representation of this operation's SQL statement. |
protected PreparedStatementCreator |
newPreparedStatementCreator(java.lang.Object[] params)
Return a PreparedStatementCreator to perform an operation with the given parameters. |
protected PreparedStatementCreator |
newPreparedStatementCreator(java.lang.String sqlToUse,
java.lang.Object[] params)
Return a PreparedStatementCreator to perform an operation with the given parameters. |
protected PreparedStatementSetter |
newPreparedStatementSetter(java.lang.Object[] params)
Return a PreparedStatementSetter to perform an operation with the given parameters. |
protected void |
onCompileInternal()
Hook method that subclasses may override to post-process compilation. |
Methods inherited from class org.springframework.jdbc.object.RdbmsOperation |
---|
afterPropertiesSet, allowsUnusedParameters, checkCompiled, compile, declareParameter, getDeclaredParameters, getGeneratedKeysColumnNames, getJdbcTemplate, getResultSetType, getSql, isCompiled, isReturnGeneratedKeys, isUpdatableResults, setDataSource, setFetchSize, setGeneratedKeysColumnNames, setJdbcTemplate, setMaxRows, setParameters, setQueryTimeout, setResultSetType, setReturnGeneratedKeys, setSql, setTypes, setUpdatableResults, supportsLobParameters, validateNamedParameters, validateParameters |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private PreparedStatementCreatorFactory preparedStatementFactory
private ParsedSql cachedSql
private final java.lang.Object parsedSqlMonitor
Constructor Detail |
---|
public SqlOperation()
Method Detail |
---|
protected final void compileInternal()
compileInternal
in class RdbmsOperation
protected void onCompileInternal()
compileInternal()
protected ParsedSql getParsedSql()
Typically used for named parameter parsing.
protected final PreparedStatementSetter newPreparedStatementSetter(java.lang.Object[] params)
params
- the parameter array (may be null
)protected final PreparedStatementCreator newPreparedStatementCreator(java.lang.Object[] params)
params
- the parameter array (may be null
)protected final PreparedStatementCreator newPreparedStatementCreator(java.lang.String sqlToUse, java.lang.Object[] params)
sqlToUse
- the actual SQL statement to use (if different from
the factory's, for example because of named parameter expanding)params
- the parameter array (may be null
)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |