01: /**
02: * Copyright 2006 Webmedia Group Ltd.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: **/package org.araneaframework.backend.list.helper.reader;
16:
17: import java.sql.ResultSet;
18:
19: /**
20: * ResultSet column reader.
21: * <p>
22: * Method {@link #readFromResultSet(String, ResultSet, Class)} reads the
23: * column <code>columnName</code> and converts it into the given <code>javaType</code>.
24: *
25: * @see ResultSet
26: * @see DefaultResultSetColumnReader
27: * @see ConverterBasedColumnReader
28: * @see BooleanColumnReader
29: *
30: * @author Jevgeni Kabanov (ekabanov <i>at</i> araneaframework <i>dot</i> org)
31: */
32: public interface ResultSetColumnReader {
33:
34: /**
35: * This method should read some custom Java Object from the given <code>ResultSet</code> column.
36: * @param columnName column in <code>ResultSet</code>.
37: * @param resultSet JDBC result set.
38: * @param javaType java type to read to.
39: * @return Custom Java Object from the given <code>ResultSet</code> column.
40: */
41: Object readFromResultSet(String columnName, ResultSet resultSet,
42: Class javaType);
43:
44: }
|