Example usage for org.apache.ibatis.executor BatchExecutor BatchExecutor

List of usage examples for org.apache.ibatis.executor BatchExecutor BatchExecutor

Introduction

In this page you can find the example usage for org.apache.ibatis.executor BatchExecutor BatchExecutor.

Prototype

public BatchExecutor(Configuration configuration, Transaction transaction) 

Source Link

Usage

From source file:com.dmm.framework.basedb.apache.ibatis.session.Configuration.java

License:Apache License

public Executor newExecutor(Transaction transaction, ExecutorType executorType) {
    executorType = executorType == null ? defaultExecutorType : executorType;
    executorType = executorType == null ? ExecutorType.SIMPLE : executorType;
    Executor executor;//from w w w  .  j  a v a  2  s.  c  o  m
    if (ExecutorType.BATCH == executorType) {
        executor = new BatchExecutor(this, transaction);
    } else if (ExecutorType.REUSE == executorType) {
        executor = new ReuseExecutor(this, transaction);
    } else {
        executor = new SimpleExecutor(this, transaction);
    }
    if (cacheEnabled) {
        executor = new CachingExecutor(executor);
    }
    executor = (Executor) interceptorChain.pluginAll(executor);
    return executor;
}