| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| RowCallbackHandler | 
 | 
 | 1.0;1 | 
| 1 |  package liquibase.executor.jvm; | |
| 2 | ||
| 3 |  import java.sql.ResultSet; | |
| 4 | ||
| 5 |  /** | |
| 6 |   * An interface used by {@link liquibase.executor.Executor} for processing rows of a {@link java.sql.ResultSet} on a | |
| 7 |   * per-row basis. Implementations of this interface perform the actual work of processing each row but don't need to | |
| 8 |   * worry about exception handling. {@link java.sql.SQLException SQLExceptions} will be caught and handled by the calling | |
| 9 |   * JdbcTemplate. | |
| 10 |   * <p/> | |
| 11 |   * <p> | |
| 12 |   * In contrast to a {@link ResultSetExtractor}, a RowCallbackHandler object is typically stateful: It keeps the result | |
| 13 |   * state within the object, to be available for later inspection. | |
| 14 |   * <p/> | |
| 15 |   * <p> | |
| 16 |   * Consider using a {@link RowMapper} instead if you need to map exactly one result object per row, assembling them into | |
| 17 |   * a List. | |
| 18 |   *  | |
| 19 |   * @author Spring Framework | |
| 20 |   * @see liquibase.executor.Executor | |
| 21 |   * @see RowMapper | |
| 22 |   * @see ResultSetExtractor | |
| 23 |   */ | |
| 24 |  interface RowCallbackHandler { | |
| 25 | ||
| 26 |      /** | |
| 27 |       * Implementations must implement this method to process each row of data in the ResultSet. This method should not | |
| 28 |       * call <code>next()</code> on the ResultSet; it is only supposed to extract values of the current row. | |
| 29 |       * <p> | |
| 30 |       * Exactly what the implementation chooses to do is up to it: A trivial implementation might simply count rows, | |
| 31 |       * while another implementation might build an XML document. | |
| 32 |       *  | |
| 33 |       * @param rs | |
| 34 |       *            the ResultSet to process (pre-initialized for the current row) | |
| 35 |       * @throws java.sql.SQLException | |
| 36 |       *             if a SQLException is encountered getting column values (that is, there's no need to catch | |
| 37 |       *             SQLException) | |
| 38 |       */ | |
| 39 |      void processRow(ResultSet rs); | |
| 40 | ||
| 41 | } |