static class AnnotationBatcher.UpdateBatcher
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
count |
private int[] |
parameterTypes |
private java.lang.String |
sql |
private java.sql.PreparedStatement |
statement |
Constructor and Description |
---|
UpdateBatcher(java.sql.Connection c,
java.lang.String sql,
int... parameterTypes)
Prepare a new batcher for the given SQL statement.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
addToBatch(java.lang.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) java.lang.String |
getSql()
The SQL statement this batcher is executing.
|
private final java.lang.String sql
private final java.sql.PreparedStatement statement
private final int[] parameterTypes
private int count
UpdateBatcher(java.sql.Connection c, java.lang.String sql, int... parameterTypes) throws java.sql.SQLException
sql
- A SQL statementparameterTypes
- Parameter type codes as defined in Types
.java.sql.SQLException
java.lang.String getSql()
void addToBatch(java.lang.Object... values) throws java.sql.SQLException
java.sql.SQLException
void flush() throws java.sql.SQLException
java.sql.SQLException
void close()