@Override public List<Category> list() { List<Category> result = super.list(); for (Category category : result) { category.setResourceCount(category.getResources().size()); } return result; }
@Override public Category get(Object id) { Category result = super.get(id); result.setResourceCount(result.getResources().size()); return result; }