BatchingStatementWrapper (groovy 2.4.9 API)
Date: 2017-02-24

Package: groovy.sql

## [Java] Class BatchingStatementWrapper

- groovy.sql.BatchingStatementWrapper

- 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

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected int` | `batchCount` |
    `protected int` | `batchSize` |
    `protected Logger` | `log` |
    `protected List<Integer>` | `results` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `BatchingStatementWrapper (Statement delegate, int batchSize, Logger log)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `void` | `addBatch(String sql)`
    `` | `void` | `clearBatch()`
    `` | `void` | `close()`
    `` | `int[]` | `executeBatch()`
    `` | `Object` | `invokeMethod(String name, Object args)`
    `` | `protected void` | `processResult(int[] lastResult)`
    `` | `protected void` | `reset()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class GroovyObjectSupport` | `getMetaClass, getProperty, invokeMethod, setMetaClass, setProperty`
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Field Detail

    - #### protected int batchCount

    - #### protected int batchSize

    - #### protected Logger log

    - #### protected List<Integer> 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()