Class BaseStatementHandler
- java.lang.Object
-
- org.apache.ibatis.executor.statement.BaseStatementHandler
-
- All Implemented Interfaces:
StatementHandler
- Direct Known Subclasses:
CallableStatementHandler
,PreparedStatementHandler
,SimpleStatementHandler
public abstract class BaseStatementHandler extends java.lang.Object implements StatementHandler
- Author:
- Clinton Begin
-
-
Field Summary
Fields Modifier and Type Field Description protected BoundSql
boundSql
protected Configuration
configuration
protected Executor
executor
protected MappedStatement
mappedStatement
protected ObjectFactory
objectFactory
protected ParameterHandler
parameterHandler
protected ResultSetHandler
resultSetHandler
protected RowBounds
rowBounds
protected TypeHandlerRegistry
typeHandlerRegistry
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseStatementHandler(Executor executor, MappedStatement mappedStatement, java.lang.Object parameterObject, RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql)
-
Method Summary
Modifier and Type Method Description protected void
closeStatement(java.sql.Statement statement)
protected void
generateKeys(java.lang.Object parameter)
BoundSql
getBoundSql()
ParameterHandler
getParameterHandler()
protected abstract java.sql.Statement
instantiateStatement(java.sql.Connection connection)
java.sql.Statement
prepare(java.sql.Connection connection, java.lang.Integer transactionTimeout)
protected void
setFetchSize(java.sql.Statement stmt)
protected void
setStatementTimeout(java.sql.Statement stmt, java.lang.Integer transactionTimeout)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.ibatis.executor.statement.StatementHandler
batch, parameterize, query, queryCursor, update
-
-
-
-
Field Detail
-
configuration
protected final Configuration configuration
-
objectFactory
protected final ObjectFactory objectFactory
-
typeHandlerRegistry
protected final TypeHandlerRegistry typeHandlerRegistry
-
resultSetHandler
protected final ResultSetHandler resultSetHandler
-
parameterHandler
protected final ParameterHandler parameterHandler
-
executor
protected final Executor executor
-
mappedStatement
protected final MappedStatement mappedStatement
-
rowBounds
protected final RowBounds rowBounds
-
boundSql
protected BoundSql boundSql
-
-
Constructor Detail
-
BaseStatementHandler
protected BaseStatementHandler(Executor executor, MappedStatement mappedStatement, java.lang.Object parameterObject, RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql)
-
-
Method Detail
-
getBoundSql
public BoundSql getBoundSql()
- Specified by:
getBoundSql
in interfaceStatementHandler
-
getParameterHandler
public ParameterHandler getParameterHandler()
- Specified by:
getParameterHandler
in interfaceStatementHandler
-
prepare
public java.sql.Statement prepare(java.sql.Connection connection, java.lang.Integer transactionTimeout) throws java.sql.SQLException
- Specified by:
prepare
in interfaceStatementHandler
- Throws:
java.sql.SQLException
-
instantiateStatement
protected abstract java.sql.Statement instantiateStatement(java.sql.Connection connection) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
setStatementTimeout
protected void setStatementTimeout(java.sql.Statement stmt, java.lang.Integer transactionTimeout) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
setFetchSize
protected void setFetchSize(java.sql.Statement stmt) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
closeStatement
protected void closeStatement(java.sql.Statement statement)
-
generateKeys
protected void generateKeys(java.lang.Object parameter)
-
-