171819202122232425
public class DepartmentService implements RepositoryService<Department> { @Override public Department store(Department department) { DepartmentDAO repository = new DepartmentDAO(); return repository.save(department); }
252627282930313233
} @Override public void remove(Department department) { DepartmentDAO repository = new DepartmentDAO(); repository.delete(department); }
333435363738394041
} @Override public Collection<Department> getAll() { DepartmentDAO repository = new DepartmentDAO(); return repository.getAll(); }
4041424344454647
} @Override public Department getById(Serializable id) { DepartmentDAO repository = new DepartmentDAO(); return repository.get(id); }