package gw.api.rating.dtobased.data /** * Mapper to map fields of an entity to a data object and vice versa. */ abstract class FieldMapper { public function mapToDTO(dto: T, entity: S): T { if (dto == null or entity == null) { throw new IllegalStateException("Cannot map without a valid " + dto.Class.SimpleName + " and " + entity.Class.SimpleName + " entity") } return dto } }