类 DozerUtil
- java.lang.Object
-
- me.youm.frame.dozer.util.DozerUtil
-
public class DozerUtil extends Object
Dozer工具类- 作者:
- youta
-
-
字段概要
字段 修饰符和类型 字段 说明 private com.github.dozermapper.core.Mappermapper
-
构造器概要
构造器 构造器 说明 DozerUtil(com.github.dozermapper.core.Mapper mapper)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 com.github.dozermapper.core.MappergetMapper()<T> Tmap(Object source, Class<T> destinationClass)Constructs new instance of destinationClass and performs mapping between from source<T> Tmap(Object source, Class<T> destinationClass, String mapId)Constructs new instance of destinationClass and performs mapping between from sourcevoidmap(Object source, Object destination)Performs mapping between source and destination objectsvoidmap(Object source, Object destination, String mapId)Performs mapping between source and destination objects<T> Tmap2(Object source, Class<T> destinationClass)<T,E>
List<T>mapList(Collection<E> sourceList, Class<T> destinationClass)将集合转成集合<T,E>
List<T>mapPage(Collection<E> sourceList, Class<T> destinationClass)<T,E>
Set<T>mapSet(Collection<E> sourceList, Class<T> destinationClass)
-
-
-
方法详细资料
-
getMapper
public com.github.dozermapper.core.Mapper getMapper()
-
map
public <T> T map(Object source, Class<T> destinationClass)
Constructs new instance of destinationClass and performs mapping between from source- 类型参数:
T- T- 参数:
source- sourcedestinationClass- destinationClass- 返回:
- T
-
map
public void map(Object source, Object destination)
Performs mapping between source and destination objects- 参数:
source- source objectdestination- destination object
-
map
public <T> T map(Object source, Class<T> destinationClass, String mapId)
Constructs new instance of destinationClass and performs mapping between from source- 类型参数:
T- T- 参数:
source- source objectdestinationClass- destination classmapId- mapId- 返回:
- T
-
map
public void map(Object source, Object destination, String mapId)
Performs mapping between source and destination objects- 参数:
source- source objectdestination- destination objectmapId- mapId
-
mapList
public <T,E> List<T> mapList(Collection<E> sourceList, Class<T> destinationClass)
将集合转成集合- 类型参数:
T- T- 参数:
sourceList- 源集合destinationClass- 待转类型- 返回:
- T
-
mapPage
public <T,E> List<T> mapPage(Collection<E> sourceList, Class<T> destinationClass)
-
mapSet
public <T,E> Set<T> mapSet(Collection<E> sourceList, Class<T> destinationClass)
-
-