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

jio.jdbc.ResultSetMapper Maven / Gradle / Ivy

There is a newer version: 3.0.0-RC2
Show newest version
package jio.jdbc;

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

/**
 * A functional interface for mapping rows from a {@link java.sql.ResultSet} to objects of type {@code T}.
 *
 * @param  The type of objects produced by the result set mapper.
 */
@FunctionalInterface
public interface ResultSetMapper {

    /**
     * Applies the mapping function to the given {@code ResultSet} to produce an object of type {@code T}.
     *
     * @param rs The result set to map to an object.
     * @return An object of type {@code T} resulting from the mapping.
     * @throws SQLException If a database access error occurs or this method is called on a closed result set.
     */
    T apply(ResultSet rs) throws SQLException;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy