in service/src/main/java/org/apache/fineract/cn/office/internal/service/EmployeeService.java [70:79]
public Optional<Employee> findByCode(final String code) {
final EmployeeEntity employeeEntity = this.employeeRepository.findByIdentifier(code);
if (employeeEntity != null) {
final Employee employee = EmployeeMapper.map(employeeEntity);
employee.setContactDetails(this.findContactDetailsByEmployee(employeeEntity.getIdentifier()));
return Optional.of(employee);
} else {
return Optional.empty();
}
}