Employee searchEmployee = new Employee();
searchEmployee.setUsername(searchName);
Iterator<Employee> usersIt = employeeService.findEntitiesByCriteria(searchEmployee, maxResults).iterator();
List<EmployeeDto> employeeDtoList = new ArrayList<EmployeeDto>();
while(usersIt.hasNext()) {
employeeDtoList.add(new EmployeeDto(usersIt.next()));
}
return employeeDtoList;
}