use of eu.europa.ec.fisheries.ers.service.dto.FluxReportIdentifierDTO in project UVMS-ActivityModule-APP by UnionVMS.
the class FishingActivityMapper method getUniqueFaReportId.
protected String getUniqueFaReportId(FishingActivityEntity entity) {
List<FluxReportIdentifierDTO> fluxReportIdentifierDTOs = getUniqueId(entity);
if (CollectionUtils.isEmpty(fluxReportIdentifierDTOs)) {
return null;
}
// for EU implementation we are expecting only single value for the FLUXReportIdentifier per FLUXReportDocument as per implementation guide.
FluxReportIdentifierDTO fluxReportIdentifierDTO = fluxReportIdentifierDTOs.get(0);
return fluxReportIdentifierDTO.getFluxReportId();
}
use of eu.europa.ec.fisheries.ers.service.dto.FluxReportIdentifierDTO in project UVMS-ActivityModule-APP by UnionVMS.
the class FishingActivityMapper method getUniqueId.
protected List<FluxReportIdentifierDTO> getUniqueId(FishingActivityEntity entity) {
if (entity == null || entity.getFaReportDocument() == null || entity.getFaReportDocument().getFluxReportDocument() == null) {
return Collections.emptyList();
}
List<FluxReportIdentifierDTO> identifierDTOs = new ArrayList<>();
Set<FluxReportIdentifierEntity> identifiers = entity.getFaReportDocument().getFluxReportDocument().getFluxReportIdentifiers();
for (FluxReportIdentifierEntity fluxReportIdentifierEntity : identifiers) {
identifierDTOs.add(FluxReportIdentifierMapper.INSTANCE.mapToFluxReportIdentifierDTO(fluxReportIdentifierEntity));
}
return identifierDTOs;
}
use of eu.europa.ec.fisheries.ers.service.dto.FluxReportIdentifierDTO in project UVMS-ActivityModule-APP by UnionVMS.
the class FishingActivityMapper method getUniqueFaReportSchemeId.
protected String getUniqueFaReportSchemeId(FishingActivityEntity entity) {
List<FluxReportIdentifierDTO> fluxReportIdentifierDTOs = getUniqueId(entity);
if (CollectionUtils.isEmpty(fluxReportIdentifierDTOs)) {
return null;
}
// for EU implementation we are expecting only single value for the FLUXReportIdentifier per FLUXReportDocument as per implementation guide.
FluxReportIdentifierDTO fluxReportIdentifierDTO = fluxReportIdentifierDTOs.get(0);
return fluxReportIdentifierDTO.getFluxReportSchemeId();
}
Aggregations