T - the targeted type of the mapperpublic class MapperBuilder<ROW,SET,T,K extends FieldKey<K>,E extends Exception,IM extends SetRowMapper<ROW,SET,T,E>,OM extends SetRowMapper<ROW,SET,T,E>,B extends MapperBuilder<ROW,SET,T,K,E,IM,OM,B>> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected org.simpleflatmapper.util.Function<Object[],ColumnDefinition<K,?>> |
columnDefinitionFactory |
protected KeyFactory<K> |
keyFactory |
protected SetRowMapperBuilder<IM,ROW,SET,T,K,E> |
setRowMapperBuilder |
protected org.simpleflatmapper.util.BiFunction<IM,List<K>,OM> |
specialisedMapper |
| Constructor and Description |
|---|
MapperBuilder(KeyFactory<K> keyFactory,
SetRowMapperBuilder<IM,ROW,SET,T,K,E> setRowMapperBuilder,
org.simpleflatmapper.util.BiFunction<IM,List<K>,OM> specialisedMapper,
org.simpleflatmapper.util.Function<Object[],ColumnDefinition<K,?>> columnDefinitionFactory,
int calculatedIndex) |
| Modifier and Type | Method and Description |
|---|---|
B |
addKey(String column)
add a new mapping to the specified property with a key property definition and an undefined type.
|
B |
addMapper(FieldMapper<ROW,T> mapper)
append a FieldMapper to the mapping list.
|
B |
addMapping(K key,
ColumnDefinition<K,?> columnDefinition) |
B |
addMapping(K key,
Object... properties) |
B |
addMapping(String column)
add a new mapping to the specified property with an undefined type.
|
B |
addMapping(String column,
ColumnDefinition<K,?> columnDefinition)
add a new mapping to the specified property with the specified columnDefinition and an undefined type.
|
B |
addMapping(String column,
int index)
add a new mapping to the specified property with the specified index and an undefined type.
|
B |
addMapping(String column,
int index,
ColumnDefinition<K,?> columnDefinition)
add a new mapping to the specified property with the specified index, specified property definition and an undefined type.
|
B |
addMapping(String column,
int index,
Object... properties)
add a new mapping to the specified property with the specified index, specified property definition and an undefined type.
|
B |
addMapping(String column,
Object... properties)
add a new mapping to the specified property with the specified columnDefinition and an undefined type.
|
OM |
mapper() |
protected SourceFieldMapper<ROW,T> |
sourceFieldMapper() |
protected final KeyFactory<K extends FieldKey<K>> keyFactory
protected final SetRowMapperBuilder<IM extends SetRowMapper<ROW,SET,T,E>,ROW,SET,T,K extends FieldKey<K>,E extends Exception> setRowMapperBuilder
protected final org.simpleflatmapper.util.BiFunction<IM extends SetRowMapper<ROW,SET,T,E>,List<K extends FieldKey<K>>,OM extends SetRowMapper<ROW,SET,T,E>> specialisedMapper
protected final org.simpleflatmapper.util.Function<Object[],ColumnDefinition<K extends FieldKey<K>,?>> columnDefinitionFactory
public MapperBuilder(KeyFactory<K> keyFactory, SetRowMapperBuilder<IM,ROW,SET,T,K,E> setRowMapperBuilder, org.simpleflatmapper.util.BiFunction<IM,List<K>,OM> specialisedMapper, org.simpleflatmapper.util.Function<Object[],ColumnDefinition<K,?>> columnDefinitionFactory, int calculatedIndex)
public final OM mapper()
protected final SourceFieldMapper<ROW,T> sourceFieldMapper()
public final B addKey(String column)
column - the property namepublic final B addMapping(String column)
column - the property namepublic final B addMapping(String column, ColumnDefinition<K,?> columnDefinition)
column - the property namecolumnDefinition - the definitionpublic final B addMapping(String column, Object... properties)
column - the property nameproperties - the definitionpublic final B addMapping(String column, int index)
column - the property nameindex - the property indexpublic final B addMapping(String column, int index, ColumnDefinition<K,?> columnDefinition)
column - the property nameindex - the property indexcolumnDefinition - the property definitionpublic final B addMapping(String column, int index, Object... properties)
column - the property nameindex - the property indexproperties - the property propertiespublic final B addMapper(FieldMapper<ROW,T> mapper)
mapper - the field jdbcMapperpublic final B addMapping(K key, ColumnDefinition<K,?> columnDefinition)
Copyright © 2020. All rights reserved.