Class ModelMapperExtensions

java.lang.Object
io.github.astrapi69.model.mapper.ModelMapperExtensions

public final class ModelMapperExtensions extends Object
The class ModelMapperExtensions provides methods for map from source to a destination class
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T, S> List<T>
    map(org.modelmapper.ModelMapper mapper, Iterable<S> sources, Class<T> destinationClass)
    Constructs new instances of destinationClass and performs mapping between from source to destination class
    static <T, S> List<T>
    map(org.modelmapper.ModelMapper mapper, Collection<S> sources, 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, 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 Details

    • ModelMapperExtensions

      public ModelMapperExtensions()
  • Method Details

    • map

      public static <T, S> List<T> map(org.modelmapper.ModelMapper mapper, Collection<S> sources, 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> List<T> map(org.modelmapper.ModelMapper mapper, Iterable<S> sources, 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, 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.