use of eu.europa.ec.fisheries.ers.service.dto.facatch.FaCatchGroupDto in project UVMS-ActivityModule-APP by UnionVMS.
the class FaCatchesProcessorMapper method mapFaCatchListToCatchGroupDto.
/**
* Maps a list of CatchEntities (rappresenting a froup) to a FaCatchGroupDto;
*
* @param groupCatchList
* @return
*/
private static FaCatchGroupDto mapFaCatchListToCatchGroupDto(List<FaCatchEntity> groupCatchList) {
FaCatchGroupDto groupDto = new FaCatchGroupDto();
FaCatchEntity catchEntity = groupCatchList.get(0);
// Set primary properties on groupDto
groupDto.setType(catchEntity.getTypeCode());
groupDto.setSpecies(catchEntity.getSpeciesCode());
// Fill the denomination location part of the GroupDto.
groupDto.setLocations(FaCatchGroupMapper.INSTANCE.mapFaCatchEntityToDenominationLocation(catchEntity));
// calculate Totals And Fill Soecified Locations and Gears Per each Subgroup (subgrupped on BMS/LSC)
calculateTotalsAndFillSubgroups(groupCatchList, groupDto);
return groupDto;
}
Aggregations