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>
,GenericModelMapper<E,DO>
public abstract class AbstractGenericMapper<E,DO> extends java.lang.Object implements GenericModelMapper<E,DO>
The abstract classAbstractGenericMapper
provides an base implementation for mapping entities to data transfer objects and back.
-
-
Constructor Summary
Constructors Constructor Description AbstractGenericMapper()
Instantiates a newAbstractGenericMapper
object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<DO>
getDtoClass()
The data transfer object class.java.lang.Class<E>
getEntityClass()
The entity class.org.modelmapper.ModelMapper
getMapper()
The mapper instance.protected org.modelmapper.ModelMapper
newModelMapper()
-
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.model.mapper.GenericModelMapper
map, map, toDto, toDtos, toDtos, toEntities, toEntities, toEntity
-
-
-
-
Constructor Detail
-
AbstractGenericMapper
public AbstractGenericMapper()
Instantiates a newAbstractGenericMapper
object
-
-
Method Detail
-
newModelMapper
protected org.modelmapper.ModelMapper newModelMapper()
-
getDtoClass
public java.lang.Class<DO> getDtoClass()
The data transfer object class.- Specified by:
getDtoClass
in interfaceGenericModelMapper<E,DO>
- Returns:
- the data transfer object class
-
getEntityClass
public java.lang.Class<E> getEntityClass()
The entity class.- Specified by:
getEntityClass
in interfaceGenericModelMapper<E,DO>
- Returns:
- the entity class
-
getMapper
public org.modelmapper.ModelMapper getMapper()
The mapper instance.- Specified by:
getMapper
in interfaceGenericModelMapper<E,DO>
- Returns:
- the mapper
-
-