/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.commons.dbutils;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Interface to define how implementations can interact with column handling when constructing a bean from a
 * {@link java.sql.ResultSet}.  ColumnHandlers do the work of retrieving data correctly from the <code>ResultSet</code>.
 */
public interface ColumnHandler {
    /**
     * Test whether this <code>ColumnHandler</code> wants to handle a column targetted for a value type matching
     * <code>propType</code>.
     *
     * @param propType The type of the target parameter.
     * @return true is this property handler can/wants to handle this value; false otherwise.
     */
    boolean match(Class<?> propType);

    /**
     * Do the work required to retrieve and store a column from <code>ResultSet</code> into something of type
     * <code>propType</code>. This method is called only if this handler responded <code>true</code> after a
     * call to {@link #match(Class)}.
     *
     * @param rs The result set to get data from.  This should be moved to the correct row already.
     * @param columnIndex The position of the column to retrieve.
     * @return The converted value or the original value if something doesn't work out.
     */
    Object apply(ResultSet rs, int columnIndex) throws SQLException;
}

@@ -1,10 +1,11 @@
 /*
+%0D
 %0A * Lice
@@ -66,16 +66,17 @@
  or more
+%0D
 %0A * cont
@@ -136,24 +136,25 @@
 ributed with
+%0D
 %0A * this wor
@@ -212,16 +212,17 @@
 nership.
+%0D
 %0A * The 
@@ -288,16 +288,17 @@
 sion 2.0
+%0D
 %0A * (the
@@ -361,16 +361,17 @@
 nce with
+%0D
 %0A * the 
@@ -419,19 +419,21 @@
 cense at
+%0D
 %0A *
+%0D
 %0A *     
@@ -475,19 +475,21 @@
 ENSE-2.0
+%0D
 %0A *
+%0D
 %0A * Unle
@@ -551,16 +551,17 @@
 software
+%0D
 %0A * dist
@@ -621,16 +621,17 @@
 %22 BASIS,
+%0D
 %0A * WITH
@@ -698,16 +698,17 @@
 implied.
+%0D
 %0A * See 
@@ -770,16 +770,17 @@
 ions and
+%0D
 %0A * limi
@@ -805,20 +805,22 @@
 License.
+%0D
 %0A */
+%0D
 %0Apackage
@@ -847,17 +847,19 @@
 dbutils;
-%0A
+%0D%0A%0D
 %0Aimport 
@@ -877,16 +877,17 @@
 sultSet;
+%0D
 %0Aimport 
@@ -912,13 +912,16 @@
 ion;
-%0A
+%0D%0A%0D
 %0A/**
+%0D
 %0A * 
@@ -1025,16 +1025,17 @@
 n from a
+%0D
 %0A * %7B@li
@@ -1147,20 +1147,22 @@
 %3C/code%3E.
+%0D
 %0A */
+%0D
 %0Apublic 
@@ -1186,24 +1186,25 @@
 andler %7B
+%0D
 %0A    /**
 %0A     * 
@@ -1187,32 +1187,33 @@
 ndler %7B%0D%0A    /**
+%0D
 %0A     * Test whe
@@ -1280,17 +1280,16 @@
 n target
-t
 ed for a
@@ -1308,16 +1308,17 @@
 matching
+%0D
 %0A     * 
@@ -1339,23 +1339,25 @@
 %3C/code%3E.
+%0D
 %0A     *
+%0D
 %0A     * 
@@ -1405,16 +1405,17 @@
 rameter.
+%0D
 %0A     * 
@@ -1500,24 +1500,25 @@
 herwise.
+%0D
 %0A     */
 %0A    boo
@@ -1505,24 +1505,25 @@
 se.%0D%0A     */
+%0D
 %0A    boolean
@@ -1552,17 +1552,19 @@
 pe);
-%0A
+%0D%0A%0D
 %0A    /**
 %0A   
@@ -1559,16 +1559,17 @@
 %0A    /**
+%0D
 %0A     * 
@@ -1670,16 +1670,17 @@
  of type
+%0D
 %0A     * 
@@ -1784,23 +1784,16 @@
 er a
-%0A     *
  call to
  %7B@l
@@ -1788,16 +1788,24 @@
  call to
+%0D%0A     *
  %7B@link 
@@ -1819,23 +1819,25 @@
 Class)%7D.
+%0D
 %0A     *
+%0D
 %0A     * 
@@ -1878,17 +1878,16 @@
 ta from.
- 
  This sh
@@ -1927,16 +1927,17 @@
 already.
+%0D
 %0A     * 
@@ -1994,16 +1994,17 @@
 etrieve.
+%0D
 %0A     * 
@@ -2083,24 +2083,192 @@
 ork out.
+%0D%0A     * @throws SQLException if the columnIndex is not valid; if a database access error occurs or this method is%0D%0A     *                called on a closed result set%0D
 %0A     */
 %0A    Obj
@@ -2259,16 +2259,17 @@
 %0A     */
+%0D
 %0A    Obj
@@ -2333,7 +2333,9 @@
 ion;
+%0D
 %0A%7D
+%0D
 %0A

Add missing @throws and fix typo.