public final class CsvMapperFactory extends org.simpleflatmapper.map.mapper.AbstractColumnNameDiscriminatorMapperFactory<CsvColumnKey,CsvMapperFactory,CsvRow>
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> |
org.simpleflatmapper.map.mapper.AbstractColumnNameDiscriminatorMapperFactory.DiscriminatorNamedGetter<S,T>, org.simpleflatmapper.map.mapper.AbstractColumnNameDiscriminatorMapperFactory.DiscriminatorNamedGetterFactory<S>
org.simpleflatmapper.map.mapper.AbstractMapperFactory.DiscriminatorBuilder<S,K extends org.simpleflatmapper.map.FieldKey<K>,T>, org.simpleflatmapper.map.mapper.AbstractMapperFactory.DiscriminatorConditionBuilder<S,K extends org.simpleflatmapper.map.FieldKey<K>,KT,T>, org.simpleflatmapper.map.mapper.AbstractMapperFactory.DiscriminatorDSL<K extends org.simpleflatmapper.map.FieldKey<K>,MF extends org.simpleflatmapper.map.mapper.AbstractMapperFactory<K,MF,S>,S,T>, org.simpleflatmapper.map.mapper.AbstractMapperFactory.DiscriminatorOnColumnDSL<K extends org.simpleflatmapper.map.FieldKey<K>,MF extends org.simpleflatmapper.map.mapper.AbstractMapperFactory<K,MF,S>,S,T,KT>
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) |
static CsvMapperFactory |
newInstance(CsvMapperFactory cfg) |
<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) |
discriminator, discriminator, discriminator, discriminator
addAlias, addAliases, addAliasForType, addColumnDefinition, addColumnDefinition, addColumnProperty, addColumnProperty, addColumnProperty, addColumnPropertyForType, addColumnPropertyForType, addColumnPropertyForType, addColumnPropertyForType, addGetterFactory, addGetterForType, addGetterForType, addGetterForType, addGetterForType, addGetterForType, addKeys, asmMapperNbFieldsLimit, assumeInjectionModifiesValues, columnDefinitions, columnDefinitions, consumerErrorHandler, consumerErrorHandler, discriminator, discriminator, discriminator, discriminator, discriminator, discriminator, discriminator, discriminator, enableSpeculativeArrayIndexResolution, failOnAsm, fieldMapperErrorHandler, getClassMeta, getClassMeta, getClassMeta, getClassMetaWithExtraInstantiator, getClassMetaWithExtraInstantiator, getClassMetaWithExtraInstantiator, getReflectionService, ignoreColumns, ignoreColumns, ignoreColumns, ignorePropertyNotFound, mapperBuilderErrorHandler, mapperConfig, mapperConfig, maxMethodSize, propertyNameMatcherFactory, reflectionService, rowFilter, rowHandlerErrorHandler, unorderedJoin, useAsm
public static CsvMapperFactory newInstance()
public static CsvMapperFactory newInstance(org.simpleflatmapper.map.mapper.AbstractColumnDefinitionProvider<CsvColumnKey> columnDefinitionProvider)
public static CsvMapperFactory newInstance(CsvMapperFactory cfg)
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,CsvRow>
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.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> CsvMapper<org.simpleflatmapper.map.Result<T,CsvColumnKey>> newErrorCollectingMapper(Class<T> target) throws org.simpleflatmapper.map.MapperBuildingException
org.simpleflatmapper.map.MapperBuildingException
public <T> CsvMapper<org.simpleflatmapper.map.Result<T,CsvColumnKey>> newErrorCollectingMapper(org.simpleflatmapper.util.TypeReference<T> target) throws org.simpleflatmapper.map.MapperBuildingException
org.simpleflatmapper.map.MapperBuildingException
public <T> CsvMapper<org.simpleflatmapper.map.Result<T,CsvColumnKey>> newErrorCollectingMapper(Type target) 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)
public CsvMapperFactory cellValueReaderFactory(CellValueReaderFactory cellValueReaderFactory)
Copyright © 2019. All rights reserved.