public static class CsvMapperFactory.DynamicCsvSetRowMapper<T> extends org.simpleflatmapper.map.mapper.DynamicSetRowMapper<CsvRow,CsvRowSet,T,IOException,CsvColumnKey> implements CsvMapper<T>
Constructor and Description |
---|
DynamicCsvSetRowMapper(org.simpleflatmapper.util.UnaryFactory<org.simpleflatmapper.map.mapper.MapperKey<CsvColumnKey>,org.simpleflatmapper.map.SetRowMapper<CsvRow,CsvRowSet,T,IOException>> mapperFactory,
org.simpleflatmapper.util.UnaryFactoryWithException<CsvRow,org.simpleflatmapper.map.mapper.MapperKey<CsvColumnKey>,IOException> mapperKeyFromRow,
org.simpleflatmapper.util.UnaryFactoryWithException<CsvRowSet,org.simpleflatmapper.map.mapper.MapperKey<CsvColumnKey>,IOException> mapperKeyFromSet) |
Modifier and Type | Method and Description |
---|---|
<H extends org.simpleflatmapper.util.CheckedConsumer<? super T>> |
forEach(org.simpleflatmapper.lightningcsv.CsvReader reader,
H handle)
Will map each row of the content of reader to an object of type T and will pass that object to the handle via the
CheckedConsumer .handler(T t) call back. |
<H extends org.simpleflatmapper.util.CheckedConsumer<? super T>> |
forEach(org.simpleflatmapper.lightningcsv.CsvReader reader,
H handle,
int limit)
Will map each row of the content of reader, starting at rowStart and ending before rowEnd, to an object of type T and will pass that object to the handle via the
CheckedConsumer .handler(T t) call back. |
<H extends org.simpleflatmapper.util.CheckedConsumer<? super T>> |
forEach(Reader reader,
H handle)
Will map each row of the content of reader to an object of type T and will pass that object to the handle via the
CheckedConsumer .handler(T t) call back. |
<H extends org.simpleflatmapper.util.CheckedConsumer<? super T>> |
forEach(Reader reader,
H handle,
int skip)
Will map each row of the content of reader, starting at rowStart, to an object of type T and will pass that object to the handle via the
CheckedConsumer .handler(T t) call back. |
<H extends org.simpleflatmapper.util.CheckedConsumer<? super T>> |
forEach(Reader reader,
H handle,
int skip,
int limit)
Will map each row of the content of reader, starting at rowStart and ending before rowEnd, to an object of type T and will pass that object to the handle via the
CheckedConsumer .handler(T t) call back. |
Iterator<T> |
iterator(org.simpleflatmapper.lightningcsv.CsvReader reader)
Will return an iterator on the reader that will return a mapped object for each row.
|
Iterator<T> |
iterator(Reader reader)
Will return an iterator on the reader that will return a mapped object for each row.
|
Iterator<T> |
iterator(Reader reader,
int skip)
Will return an iterator on the reader that will return a mapped object for each row.
|
Stream<T> |
stream(org.simpleflatmapper.lightningcsv.CsvReader reader)
Will return a Stream of T
|
Stream<T> |
stream(Reader reader)
Will return a Stream of T
|
Stream<T> |
stream(Reader reader,
int skip)
Will return a Stream of T.
|
String |
toString() |
enumerate, forEach, getMapper, iterator, map, map, stream
public DynamicCsvSetRowMapper(org.simpleflatmapper.util.UnaryFactory<org.simpleflatmapper.map.mapper.MapperKey<CsvColumnKey>,org.simpleflatmapper.map.SetRowMapper<CsvRow,CsvRowSet,T,IOException>> mapperFactory, org.simpleflatmapper.util.UnaryFactoryWithException<CsvRow,org.simpleflatmapper.map.mapper.MapperKey<CsvColumnKey>,IOException> mapperKeyFromRow, org.simpleflatmapper.util.UnaryFactoryWithException<CsvRowSet,org.simpleflatmapper.map.mapper.MapperKey<CsvColumnKey>,IOException> mapperKeyFromSet)
public String toString()
toString
in class org.simpleflatmapper.map.mapper.DynamicSetRowMapper<CsvRow,CsvRowSet,T,IOException,CsvColumnKey>
public <H extends org.simpleflatmapper.util.CheckedConsumer<? super T>> H forEach(Reader reader, H handle) throws IOException, org.simpleflatmapper.map.MappingException
CsvMapper
CheckedConsumer
.handler(T t) call back.
The method will return the handler passed as an argument so you can easily chain the calls like
List<T> list = jdbcMapper.forEach(reader, new ListHandler<T>()).getList();
forEach
in interface CsvMapper<T>
H
- the row handler typereader
- the readerhandle
- the callback newInstanceIOException
- if an io error occursorg.simpleflatmapper.map.MappingException
- if an mapping error occurspublic <H extends org.simpleflatmapper.util.CheckedConsumer<? super T>> H forEach(org.simpleflatmapper.lightningcsv.CsvReader reader, H handle) throws IOException, org.simpleflatmapper.map.MappingException
CsvMapper
CheckedConsumer
.handler(T t) call back.forEach
in interface CsvMapper<T>
H
- the row handler typereader
- the readerhandle
- the callback newInstanceIOException
- if an io error occursorg.simpleflatmapper.map.MappingException
- if an mapping error occurspublic <H extends org.simpleflatmapper.util.CheckedConsumer<? super T>> H forEach(Reader reader, H handle, int skip) throws IOException, org.simpleflatmapper.map.MappingException
CsvMapper
CheckedConsumer
.handler(T t) call back.forEach
in interface CsvMapper<T>
H
- the row handler typereader
- the readerhandle
- the callback newInstanceskip
- the number of row to skipIOException
- if an io error occursorg.simpleflatmapper.map.MappingException
- if an mapping error occurspublic <H extends org.simpleflatmapper.util.CheckedConsumer<? super T>> H forEach(Reader reader, H handle, int skip, int limit) throws IOException, org.simpleflatmapper.map.MappingException
CsvMapper
CheckedConsumer
.handler(T t) call back.forEach
in interface CsvMapper<T>
H
- the row handler typereader
- the readerhandle
- the callback newInstanceskip
- the number of row to skiplimit
- the number of row to processIOException
- if an io error occursorg.simpleflatmapper.map.MappingException
- if an mapping error occurspublic <H extends org.simpleflatmapper.util.CheckedConsumer<? super T>> H forEach(org.simpleflatmapper.lightningcsv.CsvReader reader, H handle, int limit) throws IOException, org.simpleflatmapper.map.MappingException
CsvMapper
CheckedConsumer
.handler(T t) call back.forEach
in interface CsvMapper<T>
H
- the row handler typereader
- the readerhandle
- the callback newInstancelimit
- the number of row to processIOException
- if an io error occursorg.simpleflatmapper.map.MappingException
- if an mapping error occurspublic Iterator<T> iterator(Reader reader) throws IOException
CsvMapper
iterator
in interface CsvMapper<T>
reader
- the readerIOException
- if an io error occurspublic Iterator<T> iterator(org.simpleflatmapper.lightningcsv.CsvReader reader) throws IOException
CsvMapper
iterator
in interface CsvMapper<T>
reader
- the readerIOException
- if an io error occurspublic Iterator<T> iterator(Reader reader, int skip) throws IOException
CsvMapper
iterator
in interface CsvMapper<T>
reader
- the readerskip
- the number of row to skipIOException
- if an io error occurspublic Stream<T> stream(Reader reader) throws IOException
CsvMapper
stream
in interface CsvMapper<T>
reader
- the readerIOException
- if an io error occurspublic Stream<T> stream(org.simpleflatmapper.lightningcsv.CsvReader reader) throws IOException
CsvMapper
stream
in interface CsvMapper<T>
reader
- the readerIOException
- if an io error occurspublic Stream<T> stream(Reader reader, int skip) throws IOException
CsvMapper
stream
in interface CsvMapper<T>
reader
- the readerskip
- the number of row to skipIOException
- if an io error occursCopyright © 2019. All rights reserved.