public final class CsvMapperFactory extends org.simpleflatmapper.map.mapper.AbstractMapperFactory<CsvColumnKey,CsvColumnDefinition,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 | Method and Description |
---|---|
CsvMapperFactory |
addCustomValueReader(String key,
CellValueReader<?> cellValueReader) |
CsvMapperFactory |
addCustomValueReader(String key,
StringReader<?> stringReader) |
CsvMapperFactory |
cellValueReaderFactory(CellValueReaderFactory cellValueReaderFactory) |
CsvMapperFactory |
defaultDateFormat(String defaultDateFormat) |
<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) |
static CsvMapperFactory |
newInstance()
instantiate a new JdbcMapperFactory
|
<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, columnDefinitions, consumerErrorHandler, consumerErrorHandler, failOnAsm, fieldMapperErrorHandler, getClassMeta, getClassMeta, getClassMeta, getClassMetaWithExtraInstantiator, getClassMetaWithExtraInstantiator, getClassMetaWithExtraInstantiator, getReflectionService, ignorePropertyNotFound, mapperBuilderErrorHandler, mapperConfig, maxMethodSize, propertyNameMatcherFactory, reflectionService, rowHandlerErrorHandler, useAsm
public static CsvMapperFactory newInstance()
public CsvMapperFactory defaultDateFormat(String defaultDateFormat)
public CsvMapperFactory cellValueReaderFactory(CellValueReaderFactory cellValueReaderFactory)
public CsvMapperFactory addCustomValueReader(String key, CellValueReader<?> cellValueReader)
public CsvMapperFactory addCustomValueReader(String key, 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.MapperBuildingException
public <T> CsvMapper<T> newMapper(Type target) throws org.simpleflatmapper.map.MapperBuildingException
org.simpleflatmapper.map.MapperBuildingException
public <T> CsvMapper<T> newMapper(org.simpleflatmapper.reflect.meta.ClassMeta<T> classMeta) throws org.simpleflatmapper.map.MapperBuildingException
org.simpleflatmapper.map.MapperBuildingException
public <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)
Copyright © 2018. All rights reserved.