public class BatchingStatementWrapper extends GroovyObjectSupport
| Modifier and Type | Field and Description | 
|---|---|
| protected int | batchCount | 
| protected int | batchSize | 
| protected java.util.logging.Logger | log | 
| protected java.util.List<java.lang.Integer> | results | 
| Constructor and Description | 
|---|
| BatchingStatementWrapper(java.sql.Statement delegate,
                        int batchSize,
                        java.util.logging.Logger log) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addBatch(java.lang.String sql) | 
| void | clearBatch() | 
| void | close() | 
| int[] | executeBatch() | 
| protected void | incrementBatchCount()Increments batch count (after addBatch(..) has been called)
 and execute  delegate.executeBatch()if batchSize has been reached. | 
| java.lang.Object | invokeMethod(java.lang.String name,
            java.lang.Object args)Invokes the given method. | 
| protected void | processResult(int[] lastResult) | 
| protected void | reset() | 
getMetaClass, getProperty, setMetaClass, setPropertyprotected int batchSize
protected int batchCount
protected java.util.logging.Logger log
protected java.util.List<java.lang.Integer> results
public BatchingStatementWrapper(java.sql.Statement delegate,
                                int batchSize,
                                java.util.logging.Logger log)
protected void reset()
public java.lang.Object invokeMethod(java.lang.String name,
                                     java.lang.Object args)
GroovyObjectinvokeMethod in interface GroovyObjectinvokeMethod in class GroovyObjectSupportname - the name of the method to callargs - the arguments to use for the method callpublic void addBatch(java.lang.String sql)
              throws java.sql.SQLException
java.sql.SQLExceptionprotected void incrementBatchCount()
                            throws java.sql.SQLException
delegate.executeBatch() if batchSize has been reached.java.sql.SQLExceptionpublic void clearBatch()
                throws java.sql.SQLException
java.sql.SQLExceptionpublic int[] executeBatch()
                   throws java.sql.SQLException
java.sql.SQLExceptionprotected void processResult(int[] lastResult)
public void close()
           throws java.sql.SQLException
java.sql.SQLException