V
- the value type@FunctionalInterface public interface NumberedValueExtractor<V>
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.
ValueExtractor
,
RowMapper
Modifier and Type | Method | Description |
---|---|---|
V |
extractValue(ResultSet resultSet,
int rowNumber) |
Extract the value from the current row.
|
V extractValue(ResultSet resultSet, int rowNumber) throws SQLException
Implementations should not call ResultSet.next()
but
instead expect to be called for every method.
resultSet
- the ResultSet to the value of the current row fromrowNumber
- the 0-based index of the current row, mostly for Spring compatibilitySQLException
- propagated if a method on ResultSet
throws an exceptionRowMapper.mapRow(ResultSet, int)
Copyright © 2016–2018. All rights reserved.