-
-
Save deffence1776/35d6d4bfed3fe9d1615f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Repository | |
public class EmpRepositoryImpl implements EmployeeRepository { | |
@Autowired | |
protected EmpDao empDao; | |
@Override | |
public List<Employee> findAll() { | |
List<Employee> employeeList = Lists.newArrayList(); | |
empDao.find().forEach(e -> | |
employeeList.add(new Employee(e.getEmpId(), e.getEmpName())) | |
); | |
return employeeList; | |
} | |
@Override | |
public int save(Employee emp) { | |
return empDao.save(new Emp(emp.getId(),emp.getName())).getCount(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment