//get All public List<Employee> getAllEmployees(){ List<EmployeeEntity> employeeEntities = employeeRepository.findAll(); List<Employee> employees = new ArrayList<>(); for(EmployeeEntity indexValue: employeeEntities){ employees.add(new Employee(indexValue.getId(),indexValue.getFirstName(),indexValue.getLastName())); } return employees; }