java.lang.Object
org.itsallcode.jdbc.SimplePreparedStatement
- All Implemented Interfaces:
AutoCloseable
Simple wrapper for a JDBC
PreparedStatement
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
addBatch()
Add the current set of parameters to the batch.void
close()
int[]
Execute the batch statement.Get the underlyingPreparedStatement
.void
setValues
(PreparedStatementSetter preparedStatementSetter) Set the values for the prepared statement.
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
-
setValues
Set the values for the prepared statement.- Parameters:
preparedStatementSetter
- prepared statement setter
-
executeBatch
Execute the batch statement.- Returns:
- array of update counts
- See Also:
-
addBatch
Add the current set of parameters to the batch.- See Also:
-
getStatement
Get the underlyingPreparedStatement
.- Returns:
- the underlying
PreparedStatement
-