use of gov.ca.cwds.cals.service.dto.AddressDTO in project cals-api by ca-cwds.
the class FacilityAddressMapper method afterMapping.
@AfterMapping
default void afterMapping(@TargetType FacilityAddressDTO facilityAddressDTO, BasePlacementHome placementHome, CwsDictionaryEntriesHolder dictionaryEntriesHolder) {
AddressMapper addressMapper = Mappers.getMapper(AddressMapper.class);
AddressDTO addressDTO = null;
if (RESIDENTIAL.equals(facilityAddressDTO.getType())) {
addressDTO = addressMapper.toResidentialAddressDTO(placementHome, dictionaryEntriesHolder);
}
if (MAIL.equals(facilityAddressDTO.getType())) {
addressDTO = addressMapper.toMailAddressDTO(placementHome, dictionaryEntriesHolder);
}
facilityAddressDTO.setAddress(addressDTO);
}
Aggregations