类 DozerUtil

java.lang.Object
vip.mate.core.dozer.util.DozerUtil

public class DozerUtil
extends Object
Dozer工具类
作者:
pangu
  • 字段概要

    字段
    修饰符和类型 字段 说明
    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)  

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 字段详细资料

    • mapper

      private com.github.dozermapper.core.Mapper mapper
  • 构造器详细资料

    • DozerUtil

      public DozerUtil​(com.github.dozermapper.core.Mapper mapper)
  • 方法详细资料

    • 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 -
      参数:
      source -
      destinationClass -
      返回:
    • map2

      public <T> T map2​(Object source, Class<T> destinationClass)
    • map

      public void map​(Object source, Object destination)
      Performs mapping between source and destination objects
      参数:
      source -
      destination -
    • map

      public <T> T map​(Object source, Class<T> destinationClass, String mapId)
      Constructs new instance of destinationClass and performs mapping between from source
      类型参数:
      T -
      参数:
      source -
      destinationClass -
      mapId -
      返回:
    • map

      public void map​(Object source, Object destination, String mapId)
      Performs mapping between source and destination objects
      参数:
      source -
      destination -
      mapId -
    • mapList

      public <T,​ E> List<T> mapList​(Collection<E> sourceList, Class<T> destinationClass)
      将集合转成集合 List --> List
      类型参数:
      T -
      参数:
      sourceList - 源集合
      destinationClass - 待转类型
      返回:
    • 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)