类 SqlOperation
- java.lang.Object
- org.springframework.jdbc.object.RdbmsOperation
- org.springframework.jdbc.object.SqlOperation
- 所有已实现的接口:
InitializingBean
public abstract class SqlOperation extends RdbmsOperation
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.- 作者:
- Rod Johnson, Juergen Hoeller
字段概要
从类继承的字段 org.springframework.jdbc.object.RdbmsOperation
logger
构造器概要
构造器 构造器 说明 SqlOperation()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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(Object[] params)
Return a PreparedStatementCreator to perform an operation with the given parameters.protected PreparedStatementCreator
newPreparedStatementCreator(String sqlToUse, Object[] params)
Return a PreparedStatementCreator to perform an operation with the given parameters.protected PreparedStatementSetter
newPreparedStatementSetter(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.从类继承的方法 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
构造器详细资料
SqlOperation
public SqlOperation()
方法详细资料
compileInternal
protected final void compileInternal()
Overridden method to configure the PreparedStatementCreatorFactory based on our declared parameters.- 指定者:
compileInternal
在类中RdbmsOperation
onCompileInternal
protected void onCompileInternal()
Hook method that subclasses may override to post-process compilation. This implementation does nothing.- 另请参阅:
compileInternal()
getParsedSql
protected ParsedSql getParsedSql()
Obtain a parsed representation of this operation's SQL statement.Typically used for named parameter parsing.
newPreparedStatementSetter
protected final PreparedStatementSetter newPreparedStatementSetter(Object[] params)
Return a PreparedStatementSetter to perform an operation with the given parameters.- 参数:
params
- the parameter array (may benull
)
newPreparedStatementCreator
protected final PreparedStatementCreator newPreparedStatementCreator(Object[] params)
Return a PreparedStatementCreator to perform an operation with the given parameters.- 参数:
params
- the parameter array (may benull
)
newPreparedStatementCreator
protected final PreparedStatementCreator newPreparedStatementCreator(String sqlToUse, Object[] params)
Return a PreparedStatementCreator to perform an operation with the given parameters.- 参数:
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 benull
)