| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| CallableStatementCallback |
|
| 1.0;1 |
| 1 | package liquibase.executor.jvm; | |
| 2 | ||
| 3 | import java.sql.CallableStatement; | |
| 4 | import java.sql.SQLException; | |
| 5 | ||
| 6 | /** | |
| 7 | * Generic callback interface for code that operates on a CallableStatement. Allows to execute any number of operations | |
| 8 | * on a single CallableStatement, for example a single execute call or repeated execute calls with varying parameters. | |
| 9 | * | |
| 10 | * @author Spring Framework | |
| 11 | */ | |
| 12 | interface CallableStatementCallback { | |
| 13 | ||
| 14 | /** | |
| 15 | * Gets called by <code>JdbcTemplate.execute</code> with an active JDBC CallableStatement. Does not need to care | |
| 16 | * about closing the Statement or the Connection, or about handling transactions: this will all be handled by | |
| 17 | * Spring's JdbcTemplate. | |
| 18 | * | |
| 19 | * @param cs | |
| 20 | * active JDBC CallableStatement | |
| 21 | * @return a result object, or <code>null</code> if none | |
| 22 | * @throws SQLException | |
| 23 | * if thrown by a JDBC method, to be auto-converted into a DataAccessException by a | |
| 24 | * SQLExceptionTranslator | |
| 25 | * @throws liquibase.exception.DatabaseException | |
| 26 | * in case of custom exceptions | |
| 27 | */ | |
| 28 | Object doInCallableStatement(CallableStatement cs) throws SQLException; | |
| 29 | ||
| 30 | } |