public class DozerUtil extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
private com.github.dozermapper.core.Mapper |
mapper |
| 构造器和说明 |
|---|
DozerUtil(com.github.dozermapper.core.Mapper mapper) |
| 限定符和类型 | 方法和说明 |
|---|---|
com.github.dozermapper.core.Mapper |
getMapper() |
<T> T |
map(Object source,
Class<T> destinationClass)
Constructs new instance of destinationClass and performs mapping between from source
|
<T> T |
map(Object source,
Class<T> destinationClass,
String mapId)
Constructs new instance of destinationClass and performs mapping between from source
|
void |
map(Object source,
Object destination)
Performs mapping between source and destination objects
|
void |
map(Object source,
Object destination,
String mapId)
Performs mapping between source and destination objects
|
<T> T |
map2(Object source,
Class<T> destinationClass) |
<T,E> List<T> |
mapList(Collection<E> sourceList,
Class<T> destinationClass)
将集合转成集合
List --> List
|
<T,E> List<T> |
mapPage(Collection<E> sourceList,
Class<T> destinationClass) |
<T,E> Set<T> |
mapSet(Collection<E> sourceList,
Class<T> destinationClass) |
public com.github.dozermapper.core.Mapper getMapper()
public <T> T map(Object source, Class<T> destinationClass)
T - Tsource - sourcedestinationClass - destinationClasspublic void map(Object source, Object destination)
source - source objectdestination - destination objectpublic <T> T map(Object source, Class<T> destinationClass, String mapId)
T - Tsource - source objectdestinationClass - destination classmapId - mapIdpublic void map(Object source, Object destination, String mapId)
source - source objectdestination - destination objectmapId - mapIdpublic <T,E> List<T> mapList(Collection<E> sourceList, Class<T> destinationClass)
T - TsourceList - 源集合destinationClass - 待转类型public <T,E> List<T> mapPage(Collection<E> sourceList, Class<T> destinationClass)
public <T,E> Set<T> mapSet(Collection<E> sourceList, Class<T> destinationClass)
Copyright © 2021. All rights reserved.