T
- the result type@FunctionalInterface public interface ResultSetRowMapper<T>
ResultSet
.
Implementations don't need to worry about handling exceptions:
they will be handled internally by DataOperations
implementations
If the handling is done in async context then implementations should make the details available in some way.
AsyncDataOperations
may place these details inside a never null CompletableFuture object.
This interface can be used for query methods or for other custom implementations.
Modifier and Type | Method and Description |
---|---|
T |
map(@NotNull ResultSet resultSet,
int rowNumber)
Implementations will tell how to map EACH row of the ResultSet.
|
@Nullable T map(@NotNull @NotNull ResultSet resultSet, int rowNumber) throws SQLException
ResultSet.next()
call is not needed: this method should only map values of the current row.resultSet
- the ResultSet, already initializedrowNumber
- the number of the current rowSQLException
- if the implementation's trying to get column values in the wrong wayCopyright © 2021. All rights reserved.