Interface ResultSetMapper<T>

Type Parameters:
T - The type of object to be mapped from the ResultSet
All Superinterfaces:
ResultSetSupport

public interface ResultSetMapper<T> extends ResultSetSupport
The ResultSetMapper interface is used for mapping a ResultSet to an object or a list of objects.
  • Method Details

    • map

      T map(ResultSet rs) throws SQLException
      Maps a ResultSet to an object of type T.
      Parameters:
      rs - The ResultSet to be mapped
      Returns:
      An object of type T mapped from the ResultSet
      Throws:
      SQLException - In case of a SQLException
    • mapAll

      default List<T> mapAll(ResultSet rs) throws SQLException
      Maps each row of a ResultSet to a list of objects of type T.
      Parameters:
      rs - The ResultSet to be mapped
      Returns:
      A List<T> containing the mapped objects from the ResultSet
      Throws:
      SQLException - If an error occurs while accessing the ResultSet