-
- All Implemented Interfaces:
public final class MappingConfig.MappingConfigBuilder<F extends Object, T extends Object>
-
-
Constructor Summary
Constructors Constructor Description MappingConfig.MappingConfigBuilder(MappingConfig config, KClass<F> from, KClass<T> to)
-
Method Summary
Modifier and Type Method Description final MappingConfiggetConfig()final KClass<F>getFrom()final KClass<T>getTo()final <V extends Any> MappingConfig.PropertyAsClass<F, V>prop(KProperty1<T, V> prop)Add a mapper function for the given property of target class final MappingConfig.MappingConfigBuilder<F, T>addPropertyMappings(Function1<F, Map<String, Object>> mapper)final UnitmapAs(KProperty<?> $self, KProperty<?> another)Add alias for property, i.e. final MappingConfig.MappingConfigBuilder<F, T>addPropertyAlias(String sourceName, String targetNames)sourceName source property will be mapped to targetNames on target object, possibly with type conversion if needed -
-
Constructor Detail
-
MappingConfig.MappingConfigBuilder
MappingConfig.MappingConfigBuilder(MappingConfig config, KClass<F> from, KClass<T> to)
-
-
Method Detail
-
getConfig
final MappingConfig getConfig()
-
prop
final <V extends Any> MappingConfig.PropertyAsClass<F, V> prop(KProperty1<T, V> prop)
Add a mapper function for the given property of target class
-
addPropertyMappings
final MappingConfig.MappingConfigBuilder<F, T> addPropertyMappings(Function1<F, Map<String, Object>> mapper)
-
mapAs
final Unit mapAs(KProperty<?> $self, KProperty<?> another)
Add alias for property, i.e. this source property will be mapped to another property on target object, possibly with type conversion if needed
-
addPropertyAlias
final MappingConfig.MappingConfigBuilder<F, T> addPropertyAlias(String sourceName, String targetNames)
sourceName source property will be mapped to targetNames on target object, possibly with type conversion if needed
-
-
-
-