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