1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.dbutils;
18
19 import java.sql.ResultSet;
20 import java.sql.SQLException;
21
22 /**
23 * Implementations of this interface convert ResultSets into other objects.
24 */
25 public interface ResultSetHandler {
26
27 /**
28 * Turn the <code>ResultSet</code> into an Object.
29 *
30 * @param rs The <code>ResultSet</code> to handle. It has not been touched
31 * before being passed to this method.
32 *
33 * @return An Object initialized with <code>ResultSet</code> data. It is
34 * legal for implementations to return <code>null</code> if the
35 * <code>ResultSet</code> contained 0 rows.
36 *
37 * @throws SQLException if a database access error occurs
38 */
39 public Object handle(ResultSet rs) throws SQLException;
40
41 }