public abstract class BaseExecutor extends Object implements Executor
| Modifier and Type | Field and Description |
|---|---|
protected Configuration |
configuration |
protected ConcurrentLinkedQueue<org.apache.ibatis.executor.BaseExecutor.DeferredLoad> |
deferredLoads |
protected PerpetualCache |
localCache |
protected PerpetualCache |
localOutputParameterCache |
protected int |
queryStack |
protected Transaction |
transaction |
protected Executor |
wrapper |
NO_RESULT_HANDLER| Modifier | Constructor and Description |
|---|---|
protected |
BaseExecutor(Configuration configuration,
Transaction transaction) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyTransactionTimeout(Statement statement)
Apply a transaction timeout.
|
void |
clearLocalCache() |
void |
close(boolean forceRollback) |
protected void |
closeStatement(Statement statement) |
void |
commit(boolean required) |
CacheKey |
createCacheKey(MappedStatement ms,
Object parameterObject,
RowBounds rowBounds,
BoundSql boundSql) |
void |
deferLoad(MappedStatement ms,
MetaObject resultObject,
String property,
CacheKey key,
Class<?> targetType) |
protected abstract List<BatchResult> |
doFlushStatements(boolean isRollback) |
protected abstract <E> List<E> |
doQuery(MappedStatement ms,
Object parameter,
RowBounds rowBounds,
ResultHandler resultHandler,
BoundSql boundSql) |
protected abstract <E> Cursor<E> |
doQueryCursor(MappedStatement ms,
Object parameter,
RowBounds rowBounds,
BoundSql boundSql) |
protected abstract int |
doUpdate(MappedStatement ms,
Object parameter) |
List<BatchResult> |
flushStatements() |
List<BatchResult> |
flushStatements(boolean isRollBack) |
protected Connection |
getConnection(Log statementLog) |
Transaction |
getTransaction() |
boolean |
isCached(MappedStatement ms,
CacheKey key) |
boolean |
isClosed() |
<E> List<E> |
query(MappedStatement ms,
Object parameter,
RowBounds rowBounds,
ResultHandler resultHandler) |
<E> List<E> |
query(MappedStatement ms,
Object parameter,
RowBounds rowBounds,
ResultHandler resultHandler,
CacheKey key,
BoundSql boundSql) |
<E> Cursor<E> |
queryCursor(MappedStatement ms,
Object parameter,
RowBounds rowBounds) |
void |
rollback(boolean required) |
void |
setExecutorWrapper(Executor wrapper) |
int |
update(MappedStatement ms,
Object parameter) |
protected Transaction transaction
protected Executor wrapper
protected ConcurrentLinkedQueue<org.apache.ibatis.executor.BaseExecutor.DeferredLoad> deferredLoads
protected PerpetualCache localCache
protected PerpetualCache localOutputParameterCache
protected Configuration configuration
protected int queryStack
protected BaseExecutor(Configuration configuration, Transaction transaction)
public Transaction getTransaction()
getTransaction in interface Executorpublic int update(MappedStatement ms, Object parameter) throws SQLException
update in interface ExecutorSQLExceptionpublic List<BatchResult> flushStatements() throws SQLException
flushStatements in interface ExecutorSQLExceptionpublic List<BatchResult> flushStatements(boolean isRollBack) throws SQLException
SQLExceptionpublic <E> List<E> query(MappedStatement ms, Object parameter, RowBounds rowBounds, ResultHandler resultHandler) throws SQLException
query in interface ExecutorSQLExceptionpublic <E> List<E> query(MappedStatement ms, Object parameter, RowBounds rowBounds, ResultHandler resultHandler, CacheKey key, BoundSql boundSql) throws SQLException
query in interface ExecutorSQLExceptionpublic <E> Cursor<E> queryCursor(MappedStatement ms, Object parameter, RowBounds rowBounds) throws SQLException
queryCursor in interface ExecutorSQLExceptionpublic void deferLoad(MappedStatement ms, MetaObject resultObject, String property, CacheKey key, Class<?> targetType)
public CacheKey createCacheKey(MappedStatement ms, Object parameterObject, RowBounds rowBounds, BoundSql boundSql)
createCacheKey in interface Executorpublic boolean isCached(MappedStatement ms, CacheKey key)
public void commit(boolean required)
throws SQLException
commit in interface ExecutorSQLExceptionpublic void rollback(boolean required)
throws SQLException
rollback in interface ExecutorSQLExceptionpublic void clearLocalCache()
clearLocalCache in interface Executorprotected abstract int doUpdate(MappedStatement ms, Object parameter) throws SQLException
SQLExceptionprotected abstract List<BatchResult> doFlushStatements(boolean isRollback) throws SQLException
SQLExceptionprotected abstract <E> List<E> doQuery(MappedStatement ms, Object parameter, RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql) throws SQLException
SQLExceptionprotected abstract <E> Cursor<E> doQueryCursor(MappedStatement ms, Object parameter, RowBounds rowBounds, BoundSql boundSql) throws SQLException
SQLExceptionprotected void closeStatement(Statement statement)
protected void applyTransactionTimeout(Statement statement) throws SQLException
statement - a current statementSQLException - if a database access error occurs, this method is called on a closed StatementStatementUtil.applyTransactionTimeout(Statement, Integer, Integer)protected Connection getConnection(Log statementLog) throws SQLException
SQLExceptionpublic void setExecutorWrapper(Executor wrapper)
setExecutorWrapper in interface ExecutorCopyright © 2009–2021 MyBatis.org. All rights reserved.