Package io.github.astrapi69.model.mapper
Class ModelMapperExtensions
- java.lang.Object
-
- io.github.astrapi69.model.mapper.ModelMapperExtensions
-
public final class ModelMapperExtensions extends java.lang.Object
The classModelMapperExtensions
provides methods for map from source to a destination class
-
-
Constructor Summary
Constructors Constructor Description ModelMapperExtensions()
-
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 classstatic <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 classstatic <T,S>
Tmap(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
-
-
-
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 destinationClassS
- the generic type of the source- Parameters:
mapper
- the dozer mapper objectsources
- the collection of source objectsdestinationClass
- 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 destinationClassS
- the generic type of the source- Parameters:
mapper
- the dozer mapper objectsources
- the iterable of source objectsdestinationClass
- 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 destinationClassS
- the generic type of the source- Parameters:
mapper
- the dozer mapper objectsource
- the sourcedestinationClass
- the destination class- Returns:
- the new instance of destinationClass mapped to source object.
-
-