Interface NumberedValueExtractor<V>
-
- Type Parameters:
V
- the value type
- 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 NumberedValueExtractor<V>
Extracts a value from a single row.This class is used to extract a value object from every row in a ref cursor out parameter.
This class is modeled after Springs
RowMapper
. If you're using lambdas the the code should directly port over. If not the easiest way to bridge the code is using an method reference.Implementations should not catch
SQLException
this will be done by a higher layer.- See Also:
ValueExtractor
,RowMapper
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description V
extractValue(ResultSet resultSet, int rowNumber)
Extract the value from the current row.
-
-
-
Method Detail
-
extractValue
V extractValue(ResultSet resultSet, int rowNumber) throws SQLException
Extract the value from the current row.Implementations should not call
ResultSet.next()
but instead expect to be called for every method.- Parameters:
resultSet
- the ResultSet to the value of the current row fromrowNumber
- the 0-based index of the current row, mostly for Spring compatibility- Returns:
- the value for the current row
- Throws:
SQLException
- propagated if a method onResultSet
throws an exception- See Also:
RowMapper.mapRow(ResultSet, int)
-
-