1718192021222324
public class CategoryService implements RepositoryService<Category> { @Override public Category store(Category category) { CategoryDAO repository = new CategoryDAO(); return repository.save(category); }
242526272829303132
} @Override public void remove(Category category) { CategoryDAO repository = new CategoryDAO(); repository.delete(category); }
3233343536373839
} @Override public Collection<Category> getAll() { CategoryDAO repository = new CategoryDAO(); return repository.getAll(); }
3839404142434445
return repository.getAll(); } @Override public Category getById(Serializable id) { CategoryDAO repository = new CategoryDAO(); return repository.get(id); }