- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
@Transactional(readOnly = true)
public Employee getByUsername(String username) throws SecurityException {
Employee employee = employeeDaoDb.getByUsername(username);
if (employee != null) {
return employee;
}
employee = employeeDaoLdap.getByUsername(username);
if (employee != null) {
if (employee.getFirstName() == null && employee.getFamilyName() == null) {
employee.setFirstName(employee.getUsername());
}
return employeeDaoDb.save(employee);
}
return null;
}