use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FishingActivity in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapReasonCode.
private void mapReasonCode(FishingActivity target, FishingActivityEntity source) {
if (ObjectUtils.allNotNull(target, target)) {
CodeType codeType = new CodeType();
codeType.setValue(source.getReasonCode());
codeType.setListID(source.getReasonCodeListId());
target.setReasonCode(codeType);
}
}
use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FishingActivity in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapOperationsQuantity.
private void mapOperationsQuantity(FishingActivity target, FishingActivityEntity source) {
if (ObjectUtils.allNotNull(target, target)) {
QuantityType quantityType = new QuantityType();
if (source.getOperationsQuantity() != null) {
Double operationQuantity = source.getOperationsQuantity().getValue();
if (operationQuantity != null) {
quantityType.setValue(new BigDecimal(operationQuantity));
}
String unitCode = source.getOperationsQuantity().getUnitCode();
if (StringUtils.isNotEmpty(unitCode)) {
quantityType.setUnitCode(unitCode);
}
String unitCodeListID = source.getOperationsQuantity().getUnitCodeListID();
if (StringUtils.isNotEmpty(unitCodeListID)) {
quantityType.setUnitCodeListID(unitCodeListID);
}
target.setOperationsQuantity(quantityType);
}
}
}
use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FishingActivity 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.reusableaggregatebusinessinformationentity._20.FishingActivity in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapFishingDurationMeasure.
private void mapFishingDurationMeasure(FishingActivity target, FishingActivityEntity source) {
if (ObjectUtils.allNotNull(target, source)) {
MeasureType measureType = new MeasureType();
Double fishingDurationMeasure = source.getFishingDurationMeasure();
if (fishingDurationMeasure != null) {
measureType.setValue(new BigDecimal(fishingDurationMeasure));
}
if (StringUtils.isNotEmpty(source.getFishingDurationMeasureCode())) {
measureType.setUnitCode(source.getFishingDurationMeasureCode());
}
if (StringUtils.isNotEmpty(source.getFishingDurationMeasureUnitCodeListVersionID())) {
measureType.setUnitCodeListVersionID(source.getFishingDurationMeasureUnitCodeListVersionID());
}
target.setFishingDurationMeasure(measureType);
}
}
use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FishingActivity 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);
}
}
Aggregations