public class GaussBeanMapper extends Object
GaussBeanMapper copy all fields from one class to another, but does copy object same with
Cloneable| Constructor and Description |
|---|
GaussBeanMapper() |
| Modifier and Type | Method and Description |
|---|---|
void |
init() |
static <S,D> void |
mapperRegister(Class<S> source,
Class<D> target,
Map<String,String[]> fieldMaps)
register a 'temporary' mapping strategy for a readable only class you are not capable of configuring
|
static <S,D> D |
mapping(S source,
Class<D> destClazz)
get target with values copied from
source |
static <S,D> void |
mapping(S source,
D target)
copy
source value to target provided by client |
@PostConstruct public void init()
public static <S,D> void mapperRegister(Class<S> source, Class<D> target, @Nullable Map<String,String[]> fieldMaps)
S - source typeD - target typesource - source classtarget - target classfieldMaps - the field mapping topublic static <S,D> void mapping(S source,
D target)
source value to target provided by clientS - source typeD - target typesource - source instancetarget - target instancepublic static <S,D> D mapping(S source,
Class<D> destClazz)
sourceS - source typeD - target typesource - source instancedestClazz - target classCopyright © 2022. All rights reserved.