40414243444546
* Gets categories count from database. * * @return categories count */ public int getCategoriesCount() { return new CategoryService().getListWithNamedQuery(Category.FIND_ALL).size(); }
22232425262728
*/ public class CategoryController extends AbstractDataPageController<Category> { @Override protected AbstractService<Category> createService() { return new CategoryService(); }
54555657585960
* Gets categories from database. * * @return categories list */ public List<Category> getCategoriesList() { return new CategoryService().getListWithNamedQuery(Category.FIND_ALL); }