Overview | Package | Class | Deprecated | Index | Help
| Groovy 1.7.6
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## groovy.sql
[Java] Class BatchingStatementWrapper

    java.lang.Object
      groovy.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.

Constructor Summary
`BatchingStatementWrapper(Statement delegate, int batchSize, Logger log, Connection connection)`

Method Summary
`void` | `addBatch(String sql)`
`void` | `clearBatch()`
`void` | `close()`
`int[]` | `executeBatch()`
`Object` | `invokeMethod(String name, Object args)`

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

Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Constructor Detail

### BatchingStatementWrapper

    public BatchingStatementWrapper(Statement delegate, int batchSize, Logger log, Connection connection)

Method Detail

### addBatch

    public void addBatch(String sql)

### clearBatch

    public void clearBatch()

### close

    public void close()

### executeBatch

    public int[] executeBatch()

### invokeMethod

    @Override
    public Object invokeMethod(String name, Object args)

Copyright © 2003-2010 The Codehaus. All rights reserved.