java.lang.Object
org.itsallcode.jdbc.resultset.generic.GenericRowMapper<T>
- Type Parameters:
T
- generic row type
- All Implemented Interfaces:
RowMapper<T>
This
ContextRowMapper
converts a row to the generic Row
type.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
A simplified row mapper that gets a list of column values as input. -
Constructor Summary
ConstructorsConstructorDescriptionGenericRowMapper
(DbDialect dialect, GenericRowMapper.ColumnValuesConverter<T> converter) Create a new instance. -
Method Summary
-
Constructor Details
-
GenericRowMapper
Create a new instance.- Parameters:
dialect
- database dialectconverter
- optionally converts each genericRow
to a different type.
-
-
Method Details
-
mapRow
Description copied from interface:RowMapper
Converts a single row from aResultSet
to a generic row type.- Specified by:
mapRow
in interfaceRowMapper<T>
- Parameters:
resultSet
- result setrowNum
- the current row number (zero based)- Returns:
- the converted row
- Throws:
SQLException
- if accessing the result set fails
-