static class AnnotationBatcher.InsertBatcher extends Object
insert(Object[])
method.Modifier and Type | Field and Description |
---|---|
private int[] |
parameterTypes |
private String |
sql |
private PreparedStatement |
statement |
Constructor and Description |
---|
InsertBatcher(Connection c,
String sql,
int... parameterTypes)
Prepare a new batcher for the given SQL statement.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
close()
Close the batcher.
|
(package private) String |
getSql()
The SQL statement this batcher is executing.
|
(package private) int |
insert(Object... values)
Execute an insert SQL statement with the given parameter
values.
|
private final String sql
private final PreparedStatement statement
private final int[] parameterTypes
InsertBatcher(Connection c, String sql, int... parameterTypes) throws SQLException
sql
- A SQL statementparameterTypes
- Parameter type codes as defined in Types
.SQLException
String getSql()
int insert(Object... values) throws SQLException
SQLException
void close()