SET - Enumerable Source typeT - Target typeE - Source exception typepublic interface EnumerableMapper<SET,T,E extends Exception>
| Modifier and Type | Method and Description |
|---|---|
org.simpleflatmapper.util.Enumerable<T> |
enumerate(SET source) |
<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) |
<H extends org.simpleflatmapper.util.CheckedConsumer<? super T>> H forEach(SET source, H handler) throws E extends Exception, MappingException
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();
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 ExceptionIterator<T> iterator(SET source) throws E extends Exception, MappingException
source - the sourceE - if source error occursMappingException - if an error occurs during the mappingE extends ExceptionStream<T> stream(SET source) throws E extends Exception, MappingException
source - the sourceE - if source error occursMappingException - if an error occurs during the mappingE extends Exceptionorg.simpleflatmapper.util.Enumerable<T> enumerate(SET source) throws E extends Exception, MappingException
E extends ExceptionMappingExceptionCopyright © 2018. All rights reserved.