Package de.alpharogroup.bean.mapper
Interface GenericMapper<ENTITY,DTO>
-
- Type Parameters:
ENTITY- the element type of the entity objectDTO- the generic type of the data transfer object
- All Superinterfaces:
BeanMapper<ENTITY,DTO>
public interface GenericMapper<ENTITY,DTO> extends BeanMapper<ENTITY,DTO>
The InterfaceGenericMapperprovides the methods for mapping entities to data transfer objects and back.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <D,S>
java.util.Collection<D>map(java.util.Collection<S> sources, java.lang.Class<D> destinationClass)Constructs new instances of destinationClass and performs mapping between from source.<D,S>
Dmap(S source, java.lang.Class<D> destinationClass)Constructs new instance of destinationClass and performs mapping between from source.-
Methods inherited from interface de.alpharogroup.bean.mapper.BeanMapper
toDto, toDtos, toEntities, toEntity
-
-
-
-
Method Detail
-
map
<D,S> java.util.Collection<D> map(java.util.Collection<S> sources, java.lang.Class<D> destinationClass)Constructs new instances of destinationClass and performs mapping between from source.- Type Parameters:
S- the generic type of the sourceD- the generic type of the destinationClass- Parameters:
sources- the collection of source objectsdestinationClass- the destination class- Returns:
- the new instance of destinationClass mapped to source object.
-
map
<D,S> D map(S source, java.lang.Class<D> destinationClass)Constructs new instance of destinationClass and performs mapping between from source.- Type Parameters:
S- the generic type of the sourceD- the generic type of the destinationClass- Parameters:
source- the sourcedestinationClass- the destination class- Returns:
- the new instance of destinationClass mapped to source object.
-
-