Search in sources :

Example 1 with GearProblemRecoveryEntity

use of eu.europa.ec.fisheries.ers.fa.entities.GearProblemRecoveryEntity 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()) {
        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;
}
Also used : GearProblemRecoveryEntity(eu.europa.ec.fisheries.ers.fa.entities.GearProblemRecoveryEntity) CodeType(un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType) HashSet(java.util.HashSet)

Aggregations

GearProblemRecoveryEntity (eu.europa.ec.fisheries.ers.fa.entities.GearProblemRecoveryEntity)1 HashSet (java.util.HashSet)1 CodeType (un.unece.uncefact.data.standard.unqualifieddatatype._20.CodeType)1