public abstract class AbstractEnumerableMapper<SET,T,E extends Exception> extends Object implements EnumerableMapper<SET,T,E>
| Modifier and Type | Field and Description |
|---|---|
protected ConsumerErrorHandler |
errorHandler |
| Constructor and Description |
|---|
AbstractEnumerableMapper(ConsumerErrorHandler errorHandler) |
| Modifier and Type | Method and Description |
|---|---|
<H extends org.simpleflatmapper.util.CheckedConsumer<? super T>> |
forEach(SET source,
H handler)
Loop over the resultSet, map each row to a new newInstance of T and call back the handler
|
Iterator<T> |
iterator(SET source) |
Stream<T> |
stream(SET source) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitenumerateprotected final ConsumerErrorHandler errorHandler
public AbstractEnumerableMapper(ConsumerErrorHandler errorHandler)
public final <H extends org.simpleflatmapper.util.CheckedConsumer<? super T>> H forEach(SET source, H handler) throws E extends Exception, MappingException
EnumerableMapper
The method will return the handler passed as an argument so you can easily chain the calls like
List<T> list = jdbcMapper.forEach(rs, new ListHandler<T>()).getList();
forEach in interface EnumerableMapper<SET,T,E extends Exception>H - the row handler typesource - the sourcehandler - the handler that will get the callbackE - if source error occursMappingException - if an error occurs during the mappingE extends Exceptionpublic final Iterator<T> iterator(SET source) throws MappingException, E extends Exception
iterator in interface EnumerableMapper<SET,T,E extends Exception>source - the sourceMappingException - if an error occurs during the mappingE - if source error occursE extends Exceptionpublic final Stream<T> stream(SET source) throws MappingException, E extends Exception
stream in interface EnumerableMapper<SET,T,E extends Exception>source - the sourceMappingException - if an error occurs during the mappingE - if source error occursE extends ExceptionCopyright © 2020. All rights reserved.