T
- the targeted type of the jdbcMapperpublic final class JdbcMapperBuilder<T> extends org.simpleflatmapper.map.mapper.AbstractMapperBuilder<ResultSet,T,JdbcColumnKey,JdbcMapper<T>,JdbcMapperBuilder<T>>
Constructor and Description |
---|
JdbcMapperBuilder(org.simpleflatmapper.reflect.meta.ClassMeta<T> classMeta,
org.simpleflatmapper.map.MapperConfig<JdbcColumnKey,org.simpleflatmapper.map.property.FieldMapperColumnDefinition<JdbcColumnKey>> mapperConfig,
org.simpleflatmapper.reflect.getter.GetterFactory<ResultSet,JdbcColumnKey> getterFactory,
org.simpleflatmapper.map.context.MappingContextFactoryBuilder<ResultSet,JdbcColumnKey> parentBuilder) |
JdbcMapperBuilder(Type target)
Build a new JdbcMapperBuilder targeting the specified type.
|
JdbcMapperBuilder(org.simpleflatmapper.util.TypeReference<T> target)
Build a new JdbcMapperBuilder targeting the type specified by the TypeReference.
|
JdbcMapperBuilder(Type target,
org.simpleflatmapper.reflect.ReflectionService reflectService)
Build a new JdbcMapperBuilder targeting the specified type with the specified ReflectionService.
|
Modifier and Type | Method and Description |
---|---|
JdbcMapperBuilder<T> |
addMapping(ResultSetMetaData metaData)
add the all the property present in the metaData
|
JdbcMapperBuilder<T> |
addMapping(String column,
int index,
int sqlType)
add a new mapping to the specified property with the specified index and the specified type.
|
JdbcMapperBuilder<T> |
addMapping(String column,
int index,
int sqlType,
org.simpleflatmapper.map.property.FieldMapperColumnDefinition<JdbcColumnKey> columnDefinition)
add a new mapping to the specified property with the specified index, the specified type.
|
JdbcMapperBuilder<T> |
addMapping(String column,
int index,
int sqlType,
Object... properties)
add a new mapping to the specified property with the specified index, the specified type.
|
protected JdbcMapper<T> |
newJoinMapper(org.simpleflatmapper.map.Mapper<ResultSet,T> mapper) |
protected JdbcMapper<T> |
newStaticMapper(org.simpleflatmapper.map.Mapper<ResultSet,T> mapper) |
public JdbcMapperBuilder(org.simpleflatmapper.util.TypeReference<T> target)
new TypeReference<List<String>>() {}
target
- the TypeReference to the type T to map topublic JdbcMapperBuilder(Type target)
target
- the typepublic JdbcMapperBuilder(Type target, org.simpleflatmapper.reflect.ReflectionService reflectService)
target
- the typereflectService
- the ReflectionServicepublic JdbcMapperBuilder(org.simpleflatmapper.reflect.meta.ClassMeta<T> classMeta, org.simpleflatmapper.map.MapperConfig<JdbcColumnKey,org.simpleflatmapper.map.property.FieldMapperColumnDefinition<JdbcColumnKey>> mapperConfig, org.simpleflatmapper.reflect.getter.GetterFactory<ResultSet,JdbcColumnKey> getterFactory, org.simpleflatmapper.map.context.MappingContextFactoryBuilder<ResultSet,JdbcColumnKey> parentBuilder)
classMeta
- the meta for the target class.mapperConfig
- the mapperConfig.getterFactory
- the Getter factory.parentBuilder
- the parent builder, null if none.public JdbcMapperBuilder<T> addMapping(String column, int index, int sqlType)
column
- the property nameindex
- the property indexsqlType
- the property type, @see java.sql.Typespublic JdbcMapperBuilder<T> addMapping(String column, int index, int sqlType, org.simpleflatmapper.map.property.FieldMapperColumnDefinition<JdbcColumnKey> columnDefinition)
column
- the property nameindex
- the property indexsqlType
- the property type, @see java.sql.TypescolumnDefinition
- the property definitionpublic JdbcMapperBuilder<T> addMapping(String column, int index, int sqlType, Object... properties)
column
- the property nameindex
- the property indexsqlType
- the property type, @see java.sql.Typesproperties
- the property propertiespublic JdbcMapperBuilder<T> addMapping(ResultSetMetaData metaData) throws SQLException
metaData
- the metaDAtaSQLException
- when an error occurs getting the metaDataprotected JdbcMapper<T> newJoinMapper(org.simpleflatmapper.map.Mapper<ResultSet,T> mapper)
newJoinMapper
in class org.simpleflatmapper.map.mapper.AbstractMapperBuilder<ResultSet,T,JdbcColumnKey,JdbcMapper<T>,JdbcMapperBuilder<T>>
protected JdbcMapper<T> newStaticMapper(org.simpleflatmapper.map.Mapper<ResultSet,T> mapper)
newStaticMapper
in class org.simpleflatmapper.map.mapper.AbstractMapperBuilder<ResultSet,T,JdbcColumnKey,JdbcMapper<T>,JdbcMapperBuilder<T>>
Copyright © 2018. All rights reserved.