use of eu.europa.ec.fisheries.ers.service.dto.view.RelocationDto in project UVMS-ActivityModule-APP by UnionVMS.
the class BaseActivityViewMapper method getRelocations.
public List<RelocationDto> getRelocations(FishingActivityEntity fishingActivityEntity) {
List<RelocationDto> relocationDtos = new ArrayList<>();
Set<FishingActivityEntity> relatedActivities = fishingActivityEntity.getAllRelatedFishingActivities();
for (FishingActivityEntity fishingActivity : relatedActivities) {
if (fishingActivity.getTypeCode().toUpperCase().equalsIgnoreCase(ActivityViewEnum.RELOCATION.name())) {
relocationDtos.addAll(FaCatchMapper.INSTANCE.mapToRelocationDtoList(fishingActivity.getFaCatchs()));
}
}
return relocationDtos;
}
Aggregations