use of un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapSpeciesTargetCode.
private void mapSpeciesTargetCode(FishingActivity target, FishingActivityEntity source) {
if (ObjectUtils.allNotNull(target, source) && (StringUtils.isNotEmpty(source.getSpeciesTargetCode()) || StringUtils.isNotEmpty(source.getSpeciesTargetCodeListId()))) {
CodeType codeType = new CodeType();
if (StringUtils.isNotEmpty(source.getSpeciesTargetCode())) {
codeType.setValue(source.getSpeciesTargetCode());
}
if (StringUtils.isNotEmpty(source.getSpeciesTargetCodeListId())) {
codeType.setListID(source.getSpeciesTargetCodeListId());
}
target.setSpeciesTargetCode(codeType);
}
}
use of un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapRoles.
private void mapRoles(ContactParty target, Set<ContactPartyRoleEntity> contactPartyRoleEntities) {
List<CodeType> codeTypeList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(contactPartyRoleEntities)) {
for (ContactPartyRoleEntity source : contactPartyRoleEntities) {
CodeType codeType = new CodeType();
codeType.setValue(source.getRoleCode());
codeType.setListID(source.getRoleCodeListId());
codeTypeList.add(codeType);
}
}
target.setRoleCodes(codeTypeList);
}
use of un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapPurposeCode.
private void mapPurposeCode(FishingActivity target, FishingActivityEntity source) {
if (ObjectUtils.allNotNull(target, source)) {
CodeType codeType = new CodeType();
codeType.setValue(source.getTypeCode());
codeType.setListID(source.getTypeCodeListid());
target.setTypeCode(codeType);
}
}
use of un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapFMCMarkerCode.
private void mapFMCMarkerCode(FAReportDocument target, String fmcMarkerValue, String fmcMarkerListId) {
if (ObjectUtils.allNotNull(target) && (StringUtils.isNotEmpty(fmcMarkerValue) || StringUtils.isNotEmpty(fmcMarkerListId))) {
CodeType codeType = new CodeType();
if (StringUtils.isNotEmpty(fmcMarkerValue)) {
codeType.setValue(fmcMarkerValue);
}
if (StringUtils.isNotEmpty(fmcMarkerListId)) {
codeType.setListID(fmcMarkerListId);
}
target.setFMCMarkerCode(codeType);
}
}
use of un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapValueCode.
private void mapValueCode(FLUXCharacteristic target, FluxCharacteristicEntity source) {
if (ObjectUtils.allNotNull(target, source)) {
if (source.getValueCode() != null) {
CodeType codeType = new CodeType();
codeType.setValue(source.getValueCode());
target.setTypeCode(codeType);
}
}
}
Aggregations