use of un.unece.uncefact.data.standard.unqualifieddatatype._20.IDType in project UVMS-ActivityModule-APP by UnionVMS.
the class FaReportDocumentMapper method mapToFAReportIdentifierEntities.
protected Set<FaReportIdentifierEntity> mapToFAReportIdentifierEntities(List<IDType> idTypes, FaReportDocumentEntity faReportDocumentEntity) {
if (CollectionUtils.isEmpty(idTypes)) {
return Collections.emptySet();
}
Set<FaReportIdentifierEntity> faReportIdentifierEntities = new HashSet<>();
for (IDType idType : idTypes) {
FaReportIdentifierEntity faReportIdentifierEntity = FaReportDocumentMapper.INSTANCE.mapToFAReportIdentifierEntity(idType);
faReportIdentifierEntity.setFaReportDocument(faReportDocumentEntity);
faReportIdentifierEntities.add(faReportIdentifierEntity);
}
return faReportIdentifierEntities;
}
use of un.unece.uncefact.data.standard.unqualifieddatatype._20.IDType in project UVMS-ActivityModule-APP by UnionVMS.
the class FishingActivityMapper method mapToFishingActivityIdentifierEntities.
protected Set<FishingActivityIdentifierEntity> mapToFishingActivityIdentifierEntities(List<IDType> idTypes, FishingActivityEntity fishingActivityEntity) {
if (idTypes == null || idTypes.isEmpty()) {
return Collections.emptySet();
}
Set<FishingActivityIdentifierEntity> identifierEntities = new HashSet<>();
for (IDType idType : idTypes) {
FishingActivityIdentifierEntity identifier = FishingActivityMapper.INSTANCE.mapToFishingActivityIdentifierEntity(idType);
identifier.setFishingActivity(fishingActivityEntity);
identifierEntities.add(identifier);
}
return identifierEntities;
}
use of un.unece.uncefact.data.standard.unqualifieddatatype._20.IDType in project UVMS-ActivityModule-APP by UnionVMS.
the class FluxPartyMapper method mapFluxPartyIdentifiers.
private void mapFluxPartyIdentifiers(FLUXParty target, Set<FluxPartyIdentifierEntity> fluxPartyIdentifierEntities) {
if (CollectionUtils.isNotEmpty(fluxPartyIdentifierEntities)) {
List<IDType> idTypeList = new ArrayList<>();
for (FluxPartyIdentifierEntity source : fluxPartyIdentifierEntities) {
IDType idType = new IDType();
String fluxPartyIdentifierId = source.getFluxPartyIdentifierId();
String fluxPartyIdentifierSchemeId = source.getFluxPartyIdentifierSchemeId();
idType.setSchemeID(fluxPartyIdentifierSchemeId);
idType.setValue(fluxPartyIdentifierId);
idTypeList.add(idType);
}
target.setIDS(idTypeList);
}
}
use of un.unece.uncefact.data.standard.unqualifieddatatype._20.IDType in project UVMS-ActivityModule-APP by UnionVMS.
the class FluxPartyMapper method mapToFluxPartyIdentifierEntities.
protected Set<FluxPartyIdentifierEntity> mapToFluxPartyIdentifierEntities(List<IDType> idTypes, FluxPartyEntity fluxPartyEntity) {
if (idTypes == null || idTypes.isEmpty()) {
return Collections.emptySet();
}
Set<FluxPartyIdentifierEntity> fluxPartyIdentifierEntities = new HashSet<>();
for (IDType idType : idTypes) {
FluxPartyIdentifierEntity entity = FluxPartyMapper.INSTANCE.mapToFluxPartyIdentifierEntity(idType);
entity.setFluxParty(fluxPartyEntity);
fluxPartyIdentifierEntities.add(entity);
}
return fluxPartyIdentifierEntities;
}
use of un.unece.uncefact.data.standard.unqualifieddatatype._20.IDType in project UVMS-ActivityModule-APP by UnionVMS.
the class SubscriptionMapper method mapFluxPartyToSenderSubscriptionCriteria.
private static List<SubscriptionDataCriteria> mapFluxPartyToSenderSubscriptionCriteria(FLUXParty party) {
List<SubscriptionDataCriteria> dataCriteriaList = new ArrayList<>();
List<IDType> organisationIds = party.getIDS();
for (IDType organisationId : organisationIds) {
if ("FLUX_GP_PARTY".equals(organisationId.getSchemeID())) {
String value = organisationId.getValue();
dataCriteriaList.add(createCriteria(SENDER, ORGANISATION, SCHEME_ID, value));
}
}
return dataCriteriaList;
}
Aggregations