Class RowViewImpl


  • public class RowViewImpl
    extends RowView
    • Field Detail

      • rs

        private final java.sql.ResultSet rs
      • rowMappers

        private final java.util.Map<java.lang.reflect.Type,​RowMapper<?>> rowMappers
    • Constructor Detail

      • RowViewImpl

        public RowViewImpl​(java.sql.ResultSet rs,
                           StatementContext ctx)
    • Method Detail

      • getRow

        public java.lang.Object getRow​(java.lang.reflect.Type type)
        Use a row mapper to extract a type from the current ResultSet row.
        Specified by:
        getRow in class RowView
        Parameters:
        type - the type to map
        Returns:
        the materialized object
      • rowMapperFor

        private RowMapper<?> rowMapperFor​(java.lang.reflect.Type type)
                                   throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getColumn

        public <T> T getColumn​(int column,
                               QualifiedType<T> type)
        Use a qualified column mapper to extract a type from the current ResultSet row.
        Specified by:
        getColumn in class RowView
        Type Parameters:
        T - the type to map
        Parameters:
        column - the column index
        type - the QualifiedType of the type
        Returns:
        the materialized T
      • getColumn

        public <T> T getColumn​(java.lang.String column,
                               QualifiedType<T> type)
        Use a qualified column mapper to extract a type from the current ResultSet row.
        Specified by:
        getColumn in class RowView
        Type Parameters:
        T - the type to map
        Parameters:
        column - the column name
        type - the QualifiedType of the type
        Returns:
        the materialized T