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