202122232425262728
public class EmployeeService implements RepositoryService<Employee> { @Override public Employee store(Employee employee) { EmployeeDAO repository = new EmployeeDAO(); return repository.save(employee); }
282930313233343536
} @Override public void remove(Employee employee) { EmployeeDAO repository = new EmployeeDAO(); repository.delete(employee); }
363738394041424344
} @Override public Collection<Employee> getAll() { EmployeeDAO repository = new EmployeeDAO(); return repository.getAll(); }
4445464748495051
} @Override public Employee getById(Serializable id) { EmployeeDAO repository = new EmployeeDAO(); return repository.get(id); }