public final class CsvMapperFactory extends org.simpleflatmapper.map.mapper.AbstractMapperFactory<CsvColumnKey,CsvMapperFactory>
You can instantiate dynamic jdbcMapper which will use the name line of the csv file to figure out the list of the columns or a static one using a builder.
// create a dynamic jdbcMapper targeting MyClass
CsvMapperFactory
.newInstance()
.newMapper(MyClass.class);
// create a static jdbcMapper targeting MyClass
CsvMapperFactory
.newInstance()
.newBuilder(MyClass.class)
.addMapping("id")
.addMapping("field1")
.addMapping("field2")
.mapper();
| Modifier and Type | Class and Description |
|---|---|
static class |
CsvMapperFactory.DynamicCsvSetRowMapper<T> |
| Modifier and Type | Method and Description |
|---|---|
CsvMapperFactory |
addCustomValueReader(String key,
CellValueReader<?> cellValueReader) |
CsvMapperFactory |
addCustomValueReader(String key,
org.simpleflatmapper.lightningcsv.StringReader<?> stringReader) |
CsvMapperFactory |
cellValueReaderFactory(CellValueReaderFactory cellValueReaderFactory) |
CsvMapperFactory |
defaultDateFormat(String defaultDateFormat) |
org.simpleflatmapper.map.mapper.AbstractColumnDefinitionProvider<CsvColumnKey> |
enrichColumnDefinitions(org.simpleflatmapper.map.mapper.AbstractColumnDefinitionProvider<CsvColumnKey> columnDefinitions) |
<T> CsvMapperBuilder<T> |
newBuilder(Class<T> target)
Will create a newInstance of ResultSetMapperBuilder
|
<T> CsvMapperBuilder<T> |
newBuilder(org.simpleflatmapper.reflect.meta.ClassMeta<T> classMeta) |
<T> CsvMapperBuilder<T> |
newBuilder(Type target) |
<T> CsvMapperBuilder<T> |
newBuilder(org.simpleflatmapper.util.TypeReference<T> target) |
<T> CsvMapper<org.simpleflatmapper.map.Result<T,CsvColumnKey>> |
newErrorCollectingMapper(Class<T> target) |
<T> CsvMapper<org.simpleflatmapper.map.Result<T,CsvColumnKey>> |
newErrorCollectingMapper(Type target) |
<T> CsvMapper<org.simpleflatmapper.map.Result<T,CsvColumnKey>> |
newErrorCollectingMapper(org.simpleflatmapper.util.TypeReference<T> target) |
static CsvMapperFactory |
newInstance()
instantiate a new JdbcMapperFactory
|
static CsvMapperFactory |
newInstance(org.simpleflatmapper.map.mapper.AbstractColumnDefinitionProvider<CsvColumnKey> columnDefinitionProvider) |
<T> CsvMapper<T> |
newMapper(Class<T> target) |
<T> CsvMapper<T> |
newMapper(org.simpleflatmapper.reflect.meta.ClassMeta<T> classMeta) |
<T> CsvMapper<T> |
newMapper(Type target) |
<T> CsvMapper<T> |
newMapper(org.simpleflatmapper.util.TypeReference<T> target) |
addAlias, addAliases, addColumnDefinition, addColumnDefinition, addColumnProperty, addColumnProperty, addColumnProperty, addKeys, asmMapperNbFieldsLimit, assumeInjectionModifiesValues, columnDefinitions, consumerErrorHandler, consumerErrorHandler, failOnAsm, fieldMapperErrorHandler, getClassMeta, getClassMeta, getClassMeta, getClassMetaWithExtraInstantiator, getClassMetaWithExtraInstantiator, getClassMetaWithExtraInstantiator, getReflectionService, ignorePropertyNotFound, mapperBuilderErrorHandler, mapperConfig, maxMethodSize, propertyNameMatcherFactory, reflectionService, rowHandlerErrorHandler, useAsmpublic static CsvMapperFactory newInstance()
public static CsvMapperFactory newInstance(org.simpleflatmapper.map.mapper.AbstractColumnDefinitionProvider<CsvColumnKey> columnDefinitionProvider)
public org.simpleflatmapper.map.mapper.AbstractColumnDefinitionProvider<CsvColumnKey> enrichColumnDefinitions(org.simpleflatmapper.map.mapper.AbstractColumnDefinitionProvider<CsvColumnKey> columnDefinitions)
enrichColumnDefinitions in class org.simpleflatmapper.map.mapper.AbstractMapperFactory<CsvColumnKey,CsvMapperFactory>public CsvMapperFactory defaultDateFormat(String defaultDateFormat)
public CsvMapperFactory addCustomValueReader(String key, CellValueReader<?> cellValueReader)
public CsvMapperFactory addCustomValueReader(String key, org.simpleflatmapper.lightningcsv.StringReader<?> stringReader)
public <T> CsvMapper<T> newMapper(Class<T> target) throws org.simpleflatmapper.map.MapperBuildingException
T - the targeted typetarget - the targeted class for the jdbcMapperorg.simpleflatmapper.map.MapperBuildingException - if an error occurs building the jdbcMapperpublic <T> CsvMapper<T> newMapper(org.simpleflatmapper.util.TypeReference<T> target) throws org.simpleflatmapper.map.MapperBuildingException
org.simpleflatmapper.map.MapperBuildingExceptionpublic <T> CsvMapper<T> newMapper(Type target) throws org.simpleflatmapper.map.MapperBuildingException
org.simpleflatmapper.map.MapperBuildingExceptionpublic <T> CsvMapper<T> newMapper(org.simpleflatmapper.reflect.meta.ClassMeta<T> classMeta) throws org.simpleflatmapper.map.MapperBuildingException
org.simpleflatmapper.map.MapperBuildingExceptionpublic <T> CsvMapper<org.simpleflatmapper.map.Result<T,CsvColumnKey>> newErrorCollectingMapper(Class<T> target) throws org.simpleflatmapper.map.MapperBuildingException
org.simpleflatmapper.map.MapperBuildingExceptionpublic <T> CsvMapper<org.simpleflatmapper.map.Result<T,CsvColumnKey>> newErrorCollectingMapper(org.simpleflatmapper.util.TypeReference<T> target) throws org.simpleflatmapper.map.MapperBuildingException
org.simpleflatmapper.map.MapperBuildingExceptionpublic <T> CsvMapper<org.simpleflatmapper.map.Result<T,CsvColumnKey>> newErrorCollectingMapper(Type target) throws org.simpleflatmapper.map.MapperBuildingException
org.simpleflatmapper.map.MapperBuildingExceptionpublic <T> CsvMapperBuilder<T> newBuilder(Class<T> target)
T - the targeted typetarget - the target class of the jdbcMapperorg.simpleflatmapper.map.MapperBuildingException - if an error occurs building the jdbcMapperpublic <T> CsvMapperBuilder<T> newBuilder(org.simpleflatmapper.util.TypeReference<T> target)
public <T> CsvMapperBuilder<T> newBuilder(Type target)
public <T> CsvMapperBuilder<T> newBuilder(org.simpleflatmapper.reflect.meta.ClassMeta<T> classMeta)
public CsvMapperFactory cellValueReaderFactory(CellValueReaderFactory cellValueReaderFactory)
Copyright © 2018. All rights reserved.