You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
369 B
21 lines
369 B
package com.cm.skills.service.mapper;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* Contract for a generic dto to entity mapper.
|
|
*
|
|
* @param <D> - DTO type parameter.
|
|
* @param <E> - Entity type parameter.
|
|
*/
|
|
|
|
public interface EntityMapper <D, E> {
|
|
|
|
E toEntity(D dto);
|
|
|
|
D toDto(E entity);
|
|
|
|
List <E> toEntity(List<D> dtoList);
|
|
|
|
List <D> toDto(List<E> entityList);
|
|
}
|