use of un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapFisheryTypeCode.
private void mapFisheryTypeCode(FishingActivity target, FishingActivityEntity source) {
if (ObjectUtils.allNotNull(target, source) && (StringUtils.isNotEmpty(source.getFisheryTypeCode()) || StringUtils.isNotEmpty(source.getFisheryTypeCodeListId()))) {
CodeType codeType = new CodeType();
if (StringUtils.isNotEmpty(source.getFisheryTypeCode())) {
codeType.setValue(source.getFisheryTypeCode());
}
if (StringUtils.isNotEmpty(source.getFisheryTypeCodeListId())) {
codeType.setListID(source.getFisheryTypeCodeListId());
}
target.setFisheryTypeCode(codeType);
}
}
use of un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class BaseMapper method mapToSizeDistributionClassCodes.
public static Set<SizeDistributionClassCodeEntity> mapToSizeDistributionClassCodes(List<CodeType> codeTypes, SizeDistributionEntity sizeDistributionEntity) {
if (codeTypes == null || codeTypes.isEmpty()) {
Collections.emptySet();
}
Set<SizeDistributionClassCodeEntity> classCodes = new HashSet<>();
for (CodeType codeType : codeTypes) {
SizeDistributionClassCodeEntity entity = SizeDistributionMapper.INSTANCE.mapToSizeDistributionClassCodeEntity(codeType);
entity.setSizeDistribution(sizeDistributionEntity);
classCodes.add(entity);
}
return classCodes;
}
use of un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class ContactPartyMapper method getContactPartyRoles.
protected Set<ContactPartyRoleEntity> getContactPartyRoles(List<CodeType> codeTypes, ContactPartyEntity contactPartyEntity) {
if (CollectionUtils.isEmpty(codeTypes)) {
return Collections.emptySet();
}
Set<ContactPartyRoleEntity> contactPartyRoles = new HashSet<>();
for (CodeType codeType : codeTypes) {
ContactPartyRoleEntity contactPartyRoleEntity = ContactPartyMapper.INSTANCE.mapToContactPartyRoleEntity(codeType);
contactPartyRoleEntity.setContactParty(contactPartyEntity);
contactPartyRoles.add(contactPartyRoleEntity);
}
return contactPartyRoles;
}
use of un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class GearProblemMapper method mapToGearProblemRecoveries.
protected Set<GearProblemRecoveryEntity> mapToGearProblemRecoveries(List<CodeType> codeTypes, GearProblemEntity gearProblemEntity) {
if (codeTypes == null || codeTypes.isEmpty()) {
return Collections.emptySet();
}
Set<GearProblemRecoveryEntity> gearProblemRecoveries = new HashSet<>();
for (CodeType codeType : codeTypes) {
GearProblemRecoveryEntity gearProblemRecovery = GearProblemMapper.INSTANCE.mapToGearProblemRecoveryEntity(codeType);
gearProblemRecovery.setGearProblem(gearProblemEntity);
gearProblemRecoveries.add(gearProblemRecovery);
}
return gearProblemRecoveries;
}
use of un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class VesselStorageCharacteristicsMapper method mapToVesselStorageCharCodes.
protected Set<VesselStorageCharCodeEntity> mapToVesselStorageCharCodes(List<CodeType> codeTypes, VesselStorageCharacteristicsEntity vesselStorageChar) {
if (codeTypes == null || codeTypes.isEmpty()) {
return Collections.emptySet();
}
Set<VesselStorageCharCodeEntity> vesselStorageCharCodes = new HashSet<>();
for (CodeType codeType : codeTypes) {
VesselStorageCharCodeEntity vesselStorageCharCode = VesselStorageCharacteristicsMapper.INSTANCE.mapToVesselStorageCharCodeEntity(codeType);
vesselStorageCharCode.setVesselStorageCharacteristics(vesselStorageChar);
vesselStorageCharCodes.add(vesselStorageCharCode);
}
return vesselStorageCharCodes;
}
Aggregations