01: package liquibase.database.template;
02:
03: import java.sql.PreparedStatement;
04: import java.sql.SQLException;
05:
06: /**
07: * General callback interface used by the {@link JdbcTemplate} class.
08: * <p/>
09: * <p>This interface sets values on a {@link java.sql.PreparedStatement} provided
10: * by the JdbcTemplate class, for each of a number of updates in a batch using the
11: * same SQL. Implementations are responsible for setting any necessary parameters.
12: * SQL with placeholders will already have been supplied.
13: * <p/>
14: * <p>Implementations <i>do not</i> need to concern themselves with
15: * SQLExceptions that may be thrown from operations they attempt.
16: * 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 the PreparedStatement to invoke setter methods on
26: * @throws java.sql.SQLException if a SQLException is encountered
27: * (i.e. there is no need to catch SQLException)
28: */
29: void setValues(PreparedStatement ps) throws SQLException;
30:
31: }
|