All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.itsallcode.jdbc.resultset.RowMapper Maven / Gradle / Ivy

There is a newer version: 0.7.1
Show newest version
package org.itsallcode.jdbc.resultset;

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

/**
 * Converts a single row from a {@link ResultSet} to a generic row type.
 * 
 * @param  generic row type
 */
@FunctionalInterface
public interface RowMapper {
    /**
     * Converts a single row from a {@link ResultSet} to a generic row type.
     * 
     * @param resultSet result set
     * @param rowNum    the current row number (zero based)
     * @return the converted row
     * @throws SQLException if accessing the result set fails
     */
    T mapRow(ResultSet resultSet, int rowNum) throws SQLException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy