Class ModelMapperExtensions


  • public final class ModelMapperExtensions
    extends java.lang.Object
    The class ModelMapperExtensions provides methods for map from source to a destination class
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T,​S>
      java.util.List<T>
      map​(org.modelmapper.ModelMapper mapper, java.lang.Iterable<S> sources, java.lang.Class<T> destinationClass)
      Constructs new instances of destinationClass and performs mapping between from source to destination class
      static <T,​S>
      java.util.List<T>
      map​(org.modelmapper.ModelMapper mapper, java.util.Collection<S> sources, java.lang.Class<T> destinationClass)
      Constructs new instances of destinationClass and performs mapping between from source to destination class
      static <T,​S>
      T
      map​(org.modelmapper.ModelMapper mapper, S source, java.lang.Class<T> destinationClass)
      Constructs new instance of destinationClass and performs mapping between from source to destination class
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ModelMapperExtensions

        public ModelMapperExtensions()
    • Method Detail

      • map

        public static <T,​S> java.util.List<T> map​(org.modelmapper.ModelMapper mapper,
                                                        java.util.Collection<S> sources,
                                                        java.lang.Class<T> destinationClass)
        Constructs new instances of destinationClass and performs mapping between from source to destination class
        Type Parameters:
        T - the generic type of the destinationClass
        S - the generic type of the source
        Parameters:
        mapper - the dozer mapper object
        sources - the collection of source objects
        destinationClass - the destination class
        Returns:
        the new instance of destinationClass mapped to source object.
      • map

        public static <T,​S> java.util.List<T> map​(org.modelmapper.ModelMapper mapper,
                                                        java.lang.Iterable<S> sources,
                                                        java.lang.Class<T> destinationClass)
        Constructs new instances of destinationClass and performs mapping between from source to destination class
        Type Parameters:
        T - the generic type of the destinationClass
        S - the generic type of the source
        Parameters:
        mapper - the dozer mapper object
        sources - the iterable of source objects
        destinationClass - the destination class
        Returns:
        the new instance of destinationClass mapped to source object.
      • map

        public static <T,​S> T map​(org.modelmapper.ModelMapper mapper,
                                        S source,
                                        java.lang.Class<T> destinationClass)
        Constructs new instance of destinationClass and performs mapping between from source to destination class
        Type Parameters:
        T - the generic type of the destinationClass
        S - the generic type of the source
        Parameters:
        mapper - the dozer mapper object
        source - the source
        destinationClass - the destination class
        Returns:
        the new instance of destinationClass mapped to source object.