Search in sources :

Example 1 with FaCatchGroupDto

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;
}
Also used : FaCatchGroupDto(eu.europa.ec.fisheries.ers.service.dto.facatch.FaCatchGroupDto) FaCatchEntity(eu.europa.ec.fisheries.ers.fa.entities.FaCatchEntity)

Aggregations

FaCatchEntity (eu.europa.ec.fisheries.ers.fa.entities.FaCatchEntity)1 FaCatchGroupDto (eu.europa.ec.fisheries.ers.service.dto.facatch.FaCatchGroupDto)1