Class AbstractMapper<T,DTO extends IHasPrimaryKey<T>,ENTITY extends IHasPrimaryKey<T>>
- java.lang.Object
-
- com.tarsolution.notifyman.core.base.AbstractMapper<T,DTO,ENTITY>
-
- Direct Known Subclasses:
AppAttributesModelMapper
public abstract class AbstractMapper<T,DTO extends IHasPrimaryKey<T>,ENTITY extends IHasPrimaryKey<T>> extends Object
- Author:
- FMARSLAN
-
-
Constructor Summary
Constructors Constructor Description AbstractMapper()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description List<DTO>
convertList2Dto(List<ENTITY> list)
convert list of ENTITY to list of DTO for specific objectList<ENTITY>
convertList2Entity(List<DTO> list)
convert list of DTO to list of ENTITY for specific objectprotected abstract DTO
convertToDto(ENTITY entity)
convert dto to entity for specific objectprotected abstract ENTITY
convertToEntity(DTO dto)
convert dto to entity for specific objectDTO
toDTO(ENTITY obj)
convert entity to dto for specific objectENTITY
toEntity(DTO obj)
convert dto to entity for specific object
-
-
-
Method Detail
-
convertToDto
protected abstract DTO convertToDto(ENTITY entity)
convert dto to entity for specific object- Parameters:
entity
- transform entity to dto- Returns:
- type of DTO
-
convertToEntity
protected abstract ENTITY convertToEntity(DTO dto)
convert dto to entity for specific object- Parameters:
dto
- transform dto to entity- Returns:
- type of ENTITY
-
toDTO
public DTO toDTO(ENTITY obj)
convert entity to dto for specific object- Parameters:
obj
- object for transform- Returns:
- type of DTO
-
toEntity
public ENTITY toEntity(DTO obj)
convert dto to entity for specific object- Parameters:
obj
- object for transform- Returns:
- type of ENTITY
-
convertList2Dto
public List<DTO> convertList2Dto(List<ENTITY> list)
convert list of ENTITY to list of DTO for specific object- Parameters:
list
- object for transform- Returns:
- type of DTO list
-
-