Package no.digipost.jdbc
Class AttributeMapper<R>
- java.lang.Object
-
- no.digipost.jdbc.AttributeMapper<R>
-
- Type Parameters:
R- The type of theAttributeand the result yielded from theColumnMapper
- All Implemented Interfaces:
RowMapper<R>
public final class AttributeMapper<R> extends Object implements RowMapper<R>
An attribute mapper associates aColumnMapperwith anAttribute, and is used internally by anAttributesRowMapperto produce anAttributesMapwhere the values can be accessed in a type-safe manner.An
AttributeMapperis constructed from an existingColumnMapperby calling.forColumn(..).Instances may be directly given to a constructor of an
AttributesRowMapper, but can also be used as a standaloneRowMapper.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface no.digipost.jdbc.RowMapper
RowMapper.Decupled<T,U,V,W,X,Z,A,B,C,D>, RowMapper.Hextupled<T,U,V,W,X,Z>, RowMapper.Nonupled<T,U,V,W,X,Z,A,B,C>, RowMapper.Octupled<T,U,V,W,X,Z,A,B>, RowMapper.Pentupled<T,U,V,W,X>, RowMapper.Quadrupled<T,U,V,W>, RowMapper.Septupled<T,U,V,W,X,Z,A>, RowMapper.Tripled<T,U,V>, RowMapper.Tupled<T,U>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rmap(ResultSet resultSet)For the current row of the givenResultSet, map the specific column(s) thisAttributeMapperis set to handle.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface no.digipost.jdbc.RowMapper
andThen, combinedWith
-
-
-
-
Method Detail
-
map
public R map(ResultSet resultSet) throws SQLException
For the current row of the givenResultSet, map the specific column(s) thisAttributeMapperis set to handle. The mapper does not move the cursor of theResultSet.- Specified by:
mapin interfaceRowMapper<R>- Parameters:
resultSet- theResultSetto retrieve necessary data from in order to yield the result of typeR.- Returns:
- the result
- Throws:
SQLException- if any error happens when processing theResultSet. May be if the name/label is not valid, if a database access error occurs, or this method is called on a closed result set.
-
-