Interface ResultSetMapper<T>

  • Type Parameters:
    T - the type parameter
    All Superinterfaces:
    Serializable
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface ResultSetMapper<T>
    extends Serializable

    Defines an interface for mapping a ResultSet into an Object. The implementation should not call next on the ResultSet unless it requires multiple rows to generate the returned Object.

    • Method Detail

      • map

        T map​(@NonNull
              @NonNull ResultSet resultSet)
        throws Exception
        Map the given ResultSet into an Object
        Parameters:
        resultSet - the result set
        Returns:
        the new object constructed using the ResultSet
        Throws:
        Exception - Something went wrong when mapping