Package org.training.fundtransfer.mapper
Class BaseMapper<E,D>
java.lang.Object
org.training.fundtransfer.mapper.BaseMapper<E,D>
- Direct Known Subclasses:
FundTransferMapper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract DconvertToDto(E entity, Object... args) Converts the given entity to a DTO (Data Transfer Object) using the provided arguments.convertToDto(Collection<E> entities, Object... args) Converts a collection of entities to a collection of DTOs.convertToDtoList(Collection<E> entities, Object... args) Converts a collection of entities to a list of DTOs.abstract EconvertToEntity(D dto, Object... args) Converts the given DTO to an entity object.convertToEntity(Collection<D> dto, Object... args) Converts a collection of DTOs to a collection of entities.convertToEntitySet(Collection<D> dtos, Object... args) Converts a collection of DTOs to a set of entities.covertToEntityList(Collection<D> dtos, Object... args) Converts a collection of DTOs to a list of entities.
-
Constructor Details
-
BaseMapper
public BaseMapper()
-
-
Method Details
-
convertToEntity
Converts the given DTO to an entity object.- Parameters:
dto- the DTO to be convertedargs- additional arguments (optional)- Returns:
- the converted entity object
-
convertToDto
Converts the given entity to a DTO (Data Transfer Object) using the provided arguments.- Parameters:
entity- the entity to be convertedargs- additional arguments for the conversion process- Returns:
- the DTO representing the converted entity
-
convertToEntity
Converts a collection of DTOs to a collection of entities.- Parameters:
dto- the collection of DTOs to convertargs- additional arguments- Returns:
- the collection of entities
-
convertToDto
Converts a collection of entities to a collection of DTOs.- Parameters:
entities- the collection of entities to be convertedargs- additional arguments for the conversion- Returns:
- the collection of DTOs
-
covertToEntityList
Converts a collection of DTOs to a list of entities.- Parameters:
dtos- the collection of DTOs to convertargs- additional arguments for the conversion- Returns:
- the list of converted entities
-
convertToDtoList
Converts a collection of entities to a list of DTOs.- Parameters:
entities- the collection of entities to be convertedargs- additional arguments for the conversion- Returns:
- the list of DTOs obtained from the conversion
-
convertToEntitySet
Converts a collection of DTOs to a set of entities.- Parameters:
dtos- the collection of DTOs to convertargs- additional arguments (optional)- Returns:
- the set of entities converted from the DTOs
-