Search in sources :

Example 6 with ContactPartyEntity

use of eu.europa.ec.fisheries.ers.fa.entities.ContactPartyEntity in project UVMS-ActivityModule-APP by UnionVMS.

the class FishingTripIdSearchBuilder method getFishingActivitySummary.

private FishingActivitySummary getFishingActivitySummary(Set<Integer> uniqueFishingActivityIdList, FishingTripEntity entity) {
    FishingActivitySummary fishingActivitySummary = null;
    FishingActivityEntity fishingActivityEntity = entity.getFishingActivity();
    if (fishingActivityEntity != null && uniqueFishingActivityIdList.add(fishingActivityEntity.getId())) {
        fishingActivitySummary = FishingActivityMapper.INSTANCE.mapToFishingActivitySummary(entity.getFishingActivity());
        ContactPartyEntity contactParty = getContactParty(fishingActivityEntity);
        if (contactParty != null) {
            VesselContactPartyType vesselContactParty = FishingActivityMapper.INSTANCE.mapToVesselContactParty(contactParty);
            fishingActivitySummary.setVesselContactParty(vesselContactParty);
        }
    }
    return fishingActivitySummary;
}
Also used : FishingActivitySummary(eu.europa.ec.fisheries.uvms.activity.model.schemas.FishingActivitySummary) VesselContactPartyType(eu.europa.ec.fisheries.uvms.activity.model.schemas.VesselContactPartyType) ContactPartyEntity(eu.europa.ec.fisheries.ers.fa.entities.ContactPartyEntity) FishingActivityEntity(eu.europa.ec.fisheries.ers.fa.entities.FishingActivityEntity)

Aggregations

ContactPartyEntity (eu.europa.ec.fisheries.ers.fa.entities.ContactPartyEntity)6 FishingActivityEntity (eu.europa.ec.fisheries.ers.fa.entities.FishingActivityEntity)2 FishingActivitySummary (eu.europa.ec.fisheries.uvms.activity.model.schemas.FishingActivitySummary)2 VesselContactPartyType (eu.europa.ec.fisheries.uvms.activity.model.schemas.VesselContactPartyType)2 ArrayList (java.util.ArrayList)2 HashSet (java.util.HashSet)2 ContactParty (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.ContactParty)2 ContactPartyRoleEntity (eu.europa.ec.fisheries.ers.fa.entities.ContactPartyRoleEntity)1 ContactPersonEntity (eu.europa.ec.fisheries.ers.fa.entities.ContactPersonEntity)1 FishingTripEntity (eu.europa.ec.fisheries.ers.fa.entities.FishingTripEntity)1 VesselTransportMeansEntity (eu.europa.ec.fisheries.ers.fa.entities.VesselTransportMeansEntity)1 ContactPerson (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.ContactPerson)1