}
@SuppressWarnings("deprecation")
@Override
public Employee convertFrom(EmployeeEntity source, Employee destination) {
Employee result = null;
EmployeeEntity tmp = null;
if (source != null) {
tmp = HibernateHelper.initializeAndUnproxy(source);
}
if (tmp instanceof EmployeeEntity) {
Employee employee = new Employee();
employee.setId(tmp.getId());
employee.setEmail(tmp.getEmail());
employee.setName(tmp.getName());
employee.setPassword(tmp.getPassword());
employee.setPatronymic(tmp.getPatronymic());
employee.setPhone(tmp.getPhone());
employee.setPosition(tmp.getPosition());
employee.setRole(tmp.getRole());
employee.setSalary(tmp.getSalary());
employee.setSurname(tmp.getSurname());
result = employee;
}
if (tmp instanceof MechanicEntity) {