|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
Field Summary | |
---|---|
protected int |
batchCount
|
protected int |
batchSize
|
protected java.util.logging.Logger |
log
|
protected java.util.List |
results
|
Constructor Summary | |
BatchingStatementWrapper(java.sql.Statement delegate, int batchSize, java.util.logging.Logger log)
|
Method Summary | |
---|---|
void
|
addBatch(java.lang.String sql)
|
void
|
clearBatch()
|
void
|
close()
|
int[]
|
executeBatch()
|
java.lang.Object
|
invokeMethod(java.lang.String name, java.lang.Object args)
|
protected void
|
processResult(int[] lastResult)
|
protected void
|
reset()
|
Methods inherited from class GroovyObjectSupport | |
---|---|
getMetaClass, getProperty, invokeMethod, setMetaClass, setProperty |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(long, int), java.lang.Object#wait(long), 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() |
Field Detail |
---|
protected int batchCount
protected int batchSize
protected java.util.logging.Logger log
protected java.util.List results
Constructor Detail |
---|
public BatchingStatementWrapper(java.sql.Statement delegate, int batchSize, java.util.logging.Logger log)
Method Detail |
---|
public void addBatch(java.lang.String sql)
public void clearBatch()
public void close()
public int[] executeBatch()
@Override public java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args)
protected void processResult(int[] lastResult)
protected void reset()
Groovy Documentation