in service/src/main/java/org/apache/fineract/cn/office/internal/service/EmployeeService.java [112:126]
public List<ContactDetail> findContactDetailsByEmployee(final String identifier) {
final EmployeeEntity employeeEntity = this.employeeRepository.findByIdentifier(identifier);
if (employeeEntity == null) {
throw ServiceException.notFound("Employee {0} not found.", identifier);
}
final List<ContactDetailEntity> contactDetailEntities = this.contactDetailRepository.findByEmployeeOrderByPreferenceLevelAsc(employeeEntity);
if (contactDetailEntities != null && !contactDetailEntities.isEmpty()) {
return contactDetailEntities
.stream()
.map(ContactDetailMapper::map)
.collect(Collectors.toList());
}
return Collections.emptyList();
}