| 
Groovy 1.8.5 | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectgroovy.lang.GroovyObjectSupport
groovy.sql.BatchingStatementWrapper
public class BatchingStatementWrapper extends GroovyObjectSupport
Class which delegates to a Statement but keeps track of a batch count size. If the batch count reaches the predefined number, this Statement does an executeBatch() automatically. If batchSize is zero, then no batching is performed.
| Field Summary | |
|---|---|
        protected int | 
        
            batchCount
             | 
        
        protected int | 
        
            batchSize
             | 
        
        protected Logger | 
        
            log
             | 
        
        protected List | 
        
            results
             | 
        
| Constructor Summary | |
            BatchingStatementWrapper(Statement delegate, int batchSize, Logger log)
             | 
        |
| Method Summary | |
|---|---|
            void
         | 
        
            addBatch(String sql)
             | 
        
            void
         | 
        
            clearBatch()
             | 
        
            void
         | 
        
            close()
             | 
        
            int[]
         | 
        
            executeBatch()
             | 
        
            Object
         | 
        
            invokeMethod(String name, Object args)
             | 
        
            protected void
         | 
        
            processResult(int[] lastResult)
             | 
        
            protected void
         | 
        
            reset()
             | 
        
| Methods inherited from class GroovyObjectSupport | |
|---|---|
| getMetaClass, getProperty, invokeMethod, setMetaClass, setProperty | 
| Methods inherited from class Object | |
|---|---|
| wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll | 
| Field Detail | 
|---|
protected int batchCount
protected int batchSize
protected Logger log
protected List results
| Constructor Detail | 
|---|
public BatchingStatementWrapper(Statement delegate, int batchSize, Logger log)
| Method Detail | 
|---|
public void addBatch(String sql)
public void clearBatch()
public void close()
public int[] executeBatch()
@Override public Object invokeMethod(String name, Object args)
protected void processResult(int[] lastResult)
protected void reset()
Copyright © 2003-2011 The Codehaus. All rights reserved.