Groovy Documentation

## groovy.sql
[Java] Class BatchingPreparedStatementWrapper

    java.lang.Object
      groovy.lang.GroovyObjectSupport
          groovy.sql.BatchingStatementWrapper
              groovy.sql.BatchingPreparedStatementWrapper

    public class BatchingPreparedStatementWrapper
    extends BatchingStatementWrapper

Class which delegates to a PreparedStatement 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.

Authors:
  Daniel Henrique Alves Lima
  Paul King

Field Summary

Fields inherited from class BatchingStatementWrapper
batchCount, batchSize, log, results

Constructor Summary
`BatchingPreparedStatementWrapper(java.sql.PreparedStatement delegate, java.util.List indexPropList, int batchSize, Logger log, Sql sql)`

Method Summary
`void` | `addBatch(java.lang.Object[] parameters)`
`void` | `addBatch(java.util.List parameters)`

Methods inherited from class BatchingStatementWrapper
addBatch, clearBatch, close, executeBatch, invokeMethod, processResult, reset

Methods inherited from class GroovyObjectSupport
getMetaClass, getProperty, invokeMethod, setMetaClass, setProperty

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Constructor Detail

### BatchingPreparedStatementWrapper

    public BatchingPreparedStatementWrapper(java.sql.PreparedStatement delegate, java.util.List indexPropList, int batchSize, Logger log, Sql sql)

Method Detail

### addBatch

    public void addBatch(java.lang.Object[] parameters)

### addBatch

    public void addBatch(java.util.List parameters)

Groovy Documentation