public abstract class AbstractForEachDynamicJdbcMapper<T> extends AbstractDynamicJdbcMapper<T>
| Modifier and Type | Field and Description |
|---|---|
protected RowHandlerErrorHandler |
errorHandler |
| Constructor and Description |
|---|
AbstractForEachDynamicJdbcMapper(RowHandlerErrorHandler errorHandler) |
| Modifier and Type | Method and Description |
|---|---|
<H extends RowHandler<? super T>> |
forEach(ResultSet rs,
H handler)
Loop over the resultSet, map each row to a new instance of T and call back the handler
|
Iterator<T> |
iterate(ResultSet rs)
Deprecated.
|
Iterator<T> |
iterator(ResultSet rs) |
protected abstract ForEachIterator<T> |
newForEachIterator(ResultSet rs) |
Stream<T> |
stream(ResultSet rs) |
getMapper, map, map, mapToclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnewMappingContextprotected final RowHandlerErrorHandler errorHandler
public AbstractForEachDynamicJdbcMapper(RowHandlerErrorHandler errorHandler)
public final <H extends RowHandler<? super T>> H forEach(ResultSet rs, H handler) throws SQLException, MappingException
JdbcMapper
The method will return the handler passed as an argument so you can easily chain the calls like
List<T> list = mapper.forEach(rs, new ListHandler<T>()).getList();
H - the row handler typers - the resultSethandler - the handler that will get the callbackSQLException - if sql error occursMappingException - if an error occurs during the mappingprotected abstract ForEachIterator<T> newForEachIterator(ResultSet rs) throws SQLException
SQLException@Deprecated public final Iterator<T> iterate(ResultSet rs) throws SQLException, MappingException
SQLExceptionMappingExceptionpublic final Iterator<T> iterator(ResultSet rs) throws SQLException, MappingException
rs - the result setSQLException - if sql error occursMappingException - if an error occurs during the mappingpublic final Stream<T> stream(ResultSet rs) throws SQLException, MappingException
rs - the result setSQLException - if sql error occursMappingException - if an error occurs during the mappingCopyright © 2015. All rights reserved.