public class BatchingStatementWrapper extends GroovyObjectSupport
Modifier and Type | Field and Description |
---|---|
protected int |
batchCount |
protected int |
batchSize |
protected Logger |
log |
protected List<Integer> |
results |
Constructor and Description |
---|
BatchingStatementWrapper(Statement delegate,
int batchSize,
Logger log) |
Modifier and Type | Method and Description |
---|---|
void |
addBatch(String sql) |
void |
clearBatch() |
void |
close() |
int[] |
executeBatch() |
Object |
invokeMethod(String name,
Object args)
Invokes the given method.
|
protected void |
processResult(int[] lastResult) |
protected void |
reset() |
getMetaClass, getProperty, setMetaClass, setProperty
protected int batchSize
protected int batchCount
protected Logger log
protected void reset()
public Object invokeMethod(String name, Object args)
GroovyObject
invokeMethod
in interface GroovyObject
invokeMethod
in class GroovyObjectSupport
name
- the name of the method to callargs
- the arguments to use for the method callpublic void addBatch(String sql) throws SQLException
SQLException
public void clearBatch() throws SQLException
SQLException
public int[] executeBatch() throws SQLException
SQLException
protected void processResult(int[] lastResult)
public void close() throws SQLException
SQLException