Package de.alpharogroup.bean.mapper
Interface BeanMapper<ENTITY,DTO>
-
- Type Parameters:
ENTITY- the element type of the entity objectDTO- the generic type of the data transfer object
- All Known Subinterfaces:
GenericMapper<ENTITY,DTO>
public interface BeanMapper<ENTITY,DTO>The InterfaceBeanMapperprovides the methods for mapping entities to data transfer objects and back.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DTOtoDto(ENTITY entity)Maps the given entity object to a data transfer objectjava.util.List<DTO>toDtos(java.util.Collection<ENTITY> entities)Maps the given collection of entity objects to a list of data transfer objectsjava.util.List<ENTITY>toEntities(java.util.Collection<DTO> dtos)Maps the given list of data transfer objects to a list of entity objectsENTITYtoEntity(DTO dto)Maps the given data transfer object to a entity object.
-
-
-
Method Detail
-
toDto
DTO toDto(ENTITY entity)
Maps the given entity object to a data transfer object- Parameters:
entity- the entity object- Returns:
- the data transfer object
-
toDtos
java.util.List<DTO> toDtos(java.util.Collection<ENTITY> entities)
Maps the given collection of entity objects to a list of data transfer objects- Parameters:
entities- the collection of entities objects- Returns:
- the list of data transfer objects
-
toEntities
java.util.List<ENTITY> toEntities(java.util.Collection<DTO> dtos)
Maps the given list of data transfer objects to a list of entity objects- Parameters:
dtos- the list of data transfer objects- Returns:
- the list of entity objects.
-
-