EnumarableMapper<S,T,E>AbstractEnumarableDelegateMapper, StaticSetRowMapperpublic abstract class AbstractEnumarableMapper<S,T,E extends Exception> extends Object implements EnumarableMapper<S,T,E>
| Modifier and Type | Field | Description |
|---|---|---|
protected ConsumerErrorHandler |
errorHandler |
| Constructor | Description |
|---|---|
AbstractEnumarableMapper(ConsumerErrorHandler errorHandler) |
| Modifier and Type | Method | Description |
|---|---|---|
<H extends org.simpleflatmapper.util.CheckedConsumer<? super T>> |
forEach(S source,
H handler) |
Loop over the resultSet, map each row to a new newInstance of T and call back the handler
|
Iterator<T> |
iterator(S source) |
|
protected abstract org.simpleflatmapper.util.Enumarable<T> |
newEnumarableOfT(S source) |
|
Stream<T> |
stream(S source) |
protected final ConsumerErrorHandler errorHandler
public AbstractEnumarableMapper(ConsumerErrorHandler errorHandler)
public final <H extends org.simpleflatmapper.util.CheckedConsumer<? super T>> H forEach(S source, H handler) throws E extends Exception, MappingException
EnumarableMapper
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 EnumarableMapper<S,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(S source) throws MappingException, E extends Exception
iterator in interface EnumarableMapper<S,T,E extends Exception>source - the sourceMappingException - if an error occurs during the mappingE - if source error occursE extends Exceptionpublic final Stream<T> stream(S source) throws MappingException, E extends Exception
stream in interface EnumarableMapper<S,T,E extends Exception>source - the sourceMappingException - if an error occurs during the mappingE - if source error occursE extends ExceptionCopyright © 2018. All rights reserved.