Package io.github.astrapi69.model.mapper
Class AbstractGenericMapper<E,DO>
java.lang.Object
io.github.astrapi69.model.mapper.AbstractGenericMapper<E,DO>
- Type Parameters:
E
- the element typeDO
- the generic type
- All Implemented Interfaces:
io.github.astrapi69.bean.mapper.BeanMapper<E,
,DO> io.github.astrapi69.bean.mapper.GenericMapper<E,
,DO, org.modelmapper.ModelMapper> GenericModelMapper<E,
DO>
public abstract class AbstractGenericMapper<E,DO>
extends Object
implements GenericModelMapper<E,DO>
The abstract class
AbstractGenericMapper
provides an base implementation for mapping
entities to data transfer objects and back.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.modelmapper.ModelMapper
org.modelmapper.ModelMapper
protected org.modelmapper.ModelMapper
Factory method for creating the newModelMapper
for the mapping process.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.github.astrapi69.bean.mapper.BeanMapper
toDtos, toDtos, toEntities, toEntities
Methods inherited from interface io.github.astrapi69.model.mapper.GenericModelMapper
map, map, toDto, toEntity
-
Constructor Details
-
AbstractGenericMapper
public AbstractGenericMapper()Instantiates a newAbstractGenericMapper
object
-
-
Method Details
-
newMapper
public org.modelmapper.ModelMapper newMapper() -
newModelMapper
protected org.modelmapper.ModelMapper newModelMapper()Factory method for creating the newModelMapper
for the mapping process. This method is invoked in the constructor and can be overridden so users can provide their own mapping process- Returns:
- the new
ModelMapper
for the mapping process
-
getDtoClass
-
getEntityClass
-
getMapper
public org.modelmapper.ModelMapper getMapper()
-