org.apache.ibatis.executor
Class BaseExecutor
java.lang.Object
org.apache.ibatis.executor.BaseExecutor
- All Implemented Interfaces:
- Executor
- Direct Known Subclasses:
- BatchExecutor, ReuseExecutor, SimpleExecutor
public abstract class BaseExecutor
- extends Object
- implements Executor
Method Summary |
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)
|
protected abstract List<BatchResult> |
doFlushStatements(boolean isRollback)
|
protected abstract
|
doQuery(MappedStatement ms,
Object parameter,
RowBounds rowBounds,
ResultHandler resultHandler,
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()
|
|
query(MappedStatement ms,
Object parameter,
RowBounds rowBounds,
ResultHandler resultHandler)
|
|
query(MappedStatement ms,
Object parameter,
RowBounds rowBounds,
ResultHandler resultHandler,
CacheKey key,
BoundSql boundSql)
|
void |
rollback(boolean required)
|
int |
update(MappedStatement ms,
Object parameter)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
transaction
protected Transaction transaction
deferredLoads
protected ConcurrentLinkedQueue<org.apache.ibatis.executor.BaseExecutor.DeferredLoad> deferredLoads
localCache
protected PerpetualCache localCache
localOutputParameterCache
protected PerpetualCache localOutputParameterCache
configuration
protected Configuration configuration
queryStack
protected int queryStack
batchResults
protected List<BatchResult> batchResults
BaseExecutor
protected BaseExecutor(Configuration configuration,
Transaction transaction)
getTransaction
public Transaction getTransaction()
- Specified by:
getTransaction
in interface Executor
close
public void close(boolean forceRollback)
- Specified by:
close
in interface Executor
isClosed
public boolean isClosed()
- Specified by:
isClosed
in interface Executor
update
public int update(MappedStatement ms,
Object parameter)
throws SQLException
- Specified by:
update
in interface Executor
- Throws:
SQLException
flushStatements
public List<BatchResult> flushStatements()
throws SQLException
- Specified by:
flushStatements
in interface Executor
- Throws:
SQLException
flushStatements
public List<BatchResult> flushStatements(boolean isRollBack)
throws SQLException
- Throws:
SQLException
query
public <E> List<E> query(MappedStatement ms,
Object parameter,
RowBounds rowBounds,
ResultHandler resultHandler)
throws SQLException
- Specified by:
query
in interface Executor
- Throws:
SQLException
query
public <E> List<E> query(MappedStatement ms,
Object parameter,
RowBounds rowBounds,
ResultHandler resultHandler,
CacheKey key,
BoundSql boundSql)
throws SQLException
- Specified by:
query
in interface Executor
- Throws:
SQLException
deferLoad
public void deferLoad(MappedStatement ms,
MetaObject resultObject,
String property,
CacheKey key)
- Specified by:
deferLoad
in interface Executor
createCacheKey
public CacheKey createCacheKey(MappedStatement ms,
Object parameterObject,
RowBounds rowBounds,
BoundSql boundSql)
- Specified by:
createCacheKey
in interface Executor
isCached
public boolean isCached(MappedStatement ms,
CacheKey key)
- Specified by:
isCached
in interface Executor
commit
public void commit(boolean required)
throws SQLException
- Specified by:
commit
in interface Executor
- Throws:
SQLException
rollback
public void rollback(boolean required)
throws SQLException
- Specified by:
rollback
in interface Executor
- Throws:
SQLException
clearLocalCache
public void clearLocalCache()
- Specified by:
clearLocalCache
in interface Executor
doUpdate
protected abstract int doUpdate(MappedStatement ms,
Object parameter)
throws SQLException
- Throws:
SQLException
doFlushStatements
protected abstract List<BatchResult> doFlushStatements(boolean isRollback)
throws SQLException
- Throws:
SQLException
doQuery
protected abstract <E> List<E> doQuery(MappedStatement ms,
Object parameter,
RowBounds rowBounds,
ResultHandler resultHandler,
BoundSql boundSql)
throws SQLException
- Throws:
SQLException
closeStatement
protected void closeStatement(Statement statement)
getConnection
protected Connection getConnection(Log statementLog)
throws SQLException
- Throws:
SQLException
Copyright © 2010-2012 MyBatis.org. All Rights Reserved.