001package org.itsallcode.jdbc.resultset;
002
003import java.sql.ResultSet;
004import java.sql.SQLException;
005
006/**
007 * Converts a single row from a {@link ResultSet} to a generic row type.
008 * 
009 * @param <T> generic row type
010 */
011@FunctionalInterface
012public interface SimpleRowMapper<T> {
013    /**
014     * Converts a single row from a {@link ResultSet} to a generic row type.
015     * 
016     * @param resultSet result set
017     * @return the converted row
018     * @throws SQLException if accessing the result set fails
019     */
020    T mapRow(ResultSet resultSet) throws SQLException;
021}