Groovy 2.2.0

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(PreparedStatement delegate, List indexPropList, int batchSize, Logger log, Sql sql)

 
Method Summary
void addBatch(Object[] parameters)

void addBatch(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 Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Constructor Detail

BatchingPreparedStatementWrapper

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


 
Method Detail

addBatch

public void addBatch(Object[] parameters)


addBatch

public void addBatch(List parameters)


 

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