ENTITY - the element type of the entity objectDTO - the generic type of the data transfer objectpublic interface DozerGenericMapper<ENTITY,DTO> extends GenericMapper<ENTITY,DTO>
DozerGenericMapper provides the methods for mapping entities to data
transfer objects and back.| Modifier and Type | Method and Description |
|---|---|
Class<DTO> |
getDtoClass()
Gets the data transfer object class.
|
Class<ENTITY> |
getEntityClass()
Gets the entity class.
|
org.dozer.Mapper |
getMapper()
Gets the mapper.
|
default <T,S> List<T> |
map(@NonNull Collection<S> sources,
@NonNull Class<T> destinationClass)
Constructs new instances of destinationClass and performs mapping between from source.
|
default <T,S> T |
map(S source,
@NonNull Class<T> destinationClass)
Constructs new instance of destinationClass and performs mapping between from source.
|
default DTO |
toDto(ENTITY entity)
Maps the given entity object to a data transfer object
|
default List<DTO> |
toDtos(@NonNull Collection<ENTITY> entities)
Maps the given collection of entity objects to a list of data transfer objects
|
default List<ENTITY> |
toEntities(@NonNull Collection<DTO> dtos)
Maps the given list of data transfer objects to a list of entity objects
|
default ENTITY |
toEntity(DTO dto)
Maps the given data transfer object to a entity object.
|
Class<DTO> getDtoClass()
org.dozer.Mapper getMapper()
default <T,S> List<T> map(@NonNull @NonNull Collection<S> sources, @NonNull @NonNull Class<T> destinationClass) throws org.dozer.MappingException
T - the generic type of the destinationClassS - the generic type of the sourcesources - the collection of source objectsdestinationClass - the destination classorg.dozer.MappingException - is thrown if something goes wrong with the mapping process.default <T,S> T map(@NonNull
S source,
@NonNull
@NonNull Class<T> destinationClass)
throws org.dozer.MappingException
T - the generic type of the destinationClassS - the generic type of the sourcesource - the sourcedestinationClass - the destination classorg.dozer.MappingException - is thrown if something goes wrong with the mapping process.default DTO toDto(@NonNull ENTITY entity)
toDto in interface GenericMapper<ENTITY,DTO>entity - the entity objectdefault List<DTO> toDtos(@NonNull @NonNull Collection<ENTITY> entities)
toDtos in interface GenericMapper<ENTITY,DTO>entities - the collection of entities objectsdefault List<ENTITY> toEntities(@NonNull @NonNull Collection<DTO> dtos)
toEntities in interface GenericMapper<ENTITY,DTO>dtos - the list of data transfer objectsCopyright © 2015–2019 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.