Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
PreparedStatementSetter |
|
| 1.0;1 |
1 | package liquibase.executor.jvm; | |
2 | ||
3 | import java.sql.PreparedStatement; | |
4 | import java.sql.SQLException; | |
5 | ||
6 | /** | |
7 | * General callback interface used by the {@link liquibase.executor.Executor} class. | |
8 | * <p/> | |
9 | * <p> | |
10 | * This interface sets values on a {@link java.sql.PreparedStatement} provided by the JdbcTemplate class, for each of a | |
11 | * number of updates in a batch using the same SQL. Implementations are responsible for setting any necessary | |
12 | * parameters. SQL with placeholders will already have been supplied. | |
13 | * <p/> | |
14 | * <p> | |
15 | * Implementations <i>do not</i> need to concern themselves with SQLExceptions that may be thrown from operations they | |
16 | * attempt. The JdbcTemplate class will catch and handle SQLExceptions appropriately. | |
17 | * | |
18 | * @author Spring Framework | |
19 | */ | |
20 | interface PreparedStatementSetter { | |
21 | ||
22 | /** | |
23 | * Set parameter values on the given PreparedStatement. | |
24 | * | |
25 | * @param ps | |
26 | * the PreparedStatement to invoke setter methods on | |
27 | * @throws java.sql.SQLException | |
28 | * if a SQLException is encountered (i.e. there is no need to catch SQLException) | |
29 | */ | |
30 | void setValues(PreparedStatement ps) throws SQLException; | |
31 | ||
32 | } |