org.apache.ibatis.executor
Class BaseExecutor

java.lang.Object
  extended by org.apache.ibatis.executor.BaseExecutor
All Implemented Interfaces:
Executor
Direct Known Subclasses:
BatchExecutor, ReuseExecutor, SimpleExecutor

public abstract class BaseExecutor
extends java.lang.Object
implements Executor


Field Summary
protected  java.util.List<BatchResult> batchResults
           
protected  Configuration configuration
           
protected  java.util.concurrent.ConcurrentLinkedQueue<org.apache.ibatis.executor.BaseExecutor.DeferredLoad> deferredLoads
           
protected  PerpetualCache localCache
           
protected  PerpetualCache localOutputParameterCache
           
protected  int queryStack
           
protected  Transaction transaction
           
 
Fields inherited from interface org.apache.ibatis.executor.Executor
NO_RESULT_HANDLER
 
Constructor Summary
protected BaseExecutor(Configuration configuration, Transaction transaction)
           
 
Method Summary
 void clearLocalCache()
           
 void close(boolean forceRollback)
           
protected  void closeStatement(java.sql.Statement statement)
           
 void commit(boolean required)
           
 CacheKey createCacheKey(MappedStatement ms, java.lang.Object parameterObject, RowBounds rowBounds)
           
 void deferLoad(MappedStatement ms, MetaObject resultObject, java.lang.String property, CacheKey key)
           
protected abstract  java.util.List<BatchResult> doFlushStatements()
           
protected abstract  java.util.List doQuery(MappedStatement ms, java.lang.Object parameter, RowBounds rowBounds, ResultHandler resultHandler)
           
protected abstract  int doUpdate(MappedStatement ms, java.lang.Object parameter)
           
 java.util.List flushStatements()
           
 Transaction getTransaction()
           
 boolean isCached(MappedStatement ms, CacheKey key)
           
 boolean isClosed()
           
 java.util.List query(MappedStatement ms, java.lang.Object parameter, RowBounds rowBounds, ResultHandler resultHandler)
           
 void rollback(boolean required)
           
 int update(MappedStatement ms, java.lang.Object parameter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

transaction

protected Transaction transaction

deferredLoads

protected java.util.concurrent.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 java.util.List<BatchResult> batchResults
Constructor Detail

BaseExecutor

protected BaseExecutor(Configuration configuration,
                       Transaction transaction)
Method Detail

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,
                  java.lang.Object parameter)
           throws java.sql.SQLException
Specified by:
update in interface Executor
Throws:
java.sql.SQLException

flushStatements

public java.util.List flushStatements()
                               throws java.sql.SQLException
Specified by:
flushStatements in interface Executor
Throws:
java.sql.SQLException

query

public java.util.List query(MappedStatement ms,
                            java.lang.Object parameter,
                            RowBounds rowBounds,
                            ResultHandler resultHandler)
                     throws java.sql.SQLException
Specified by:
query in interface Executor
Throws:
java.sql.SQLException

deferLoad

public void deferLoad(MappedStatement ms,
                      MetaObject resultObject,
                      java.lang.String property,
                      CacheKey key)
Specified by:
deferLoad in interface Executor

createCacheKey

public CacheKey createCacheKey(MappedStatement ms,
                               java.lang.Object parameterObject,
                               RowBounds rowBounds)
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 java.sql.SQLException
Specified by:
commit in interface Executor
Throws:
java.sql.SQLException

rollback

public void rollback(boolean required)
              throws java.sql.SQLException
Specified by:
rollback in interface Executor
Throws:
java.sql.SQLException

clearLocalCache

public void clearLocalCache()
Specified by:
clearLocalCache in interface Executor

doUpdate

protected abstract int doUpdate(MappedStatement ms,
                                java.lang.Object parameter)
                         throws java.sql.SQLException
Throws:
java.sql.SQLException

doFlushStatements

protected abstract java.util.List<BatchResult> doFlushStatements()
                                                          throws java.sql.SQLException
Throws:
java.sql.SQLException

doQuery

protected abstract java.util.List doQuery(MappedStatement ms,
                                          java.lang.Object parameter,
                                          RowBounds rowBounds,
                                          ResultHandler resultHandler)
                                   throws java.sql.SQLException
Throws:
java.sql.SQLException

closeStatement

protected void closeStatement(java.sql.Statement statement)


Copyright © 2010 MyBatis.org. All Rights Reserved.