static class AnnotationBatcher.UpdateBatcher extends Object
Modifier and Type | Field and Description |
---|---|
private int |
count |
private int[] |
parameterTypes |
private String |
sql |
private PreparedStatement |
statement |
Constructor and Description |
---|
UpdateBatcher(Connection c,
String sql,
int... parameterTypes)
Prepare a new batcher for the given SQL statement.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
addToBatch(Object... values)
Add a new entry to the batch.
|
(package private) void |
close()
Close the batcher.
|
(package private) void |
flush()
Flush and execute the statements added to the batch.
|
(package private) String |
getSql()
The SQL statement this batcher is executing.
|
private final String sql
private final PreparedStatement statement
private final int[] parameterTypes
private int count
UpdateBatcher(Connection c, String sql, int... parameterTypes) throws SQLException
sql
- A SQL statementparameterTypes
- Parameter type codes as defined in Types
.SQLException
String getSql()
void addToBatch(Object... values) throws SQLException
SQLException
void flush() throws SQLException
SQLException
void close()