public int getCategoryContentCount() { int count = getContentIdList().size(); for (Long id : getChildCategoryIdList()) { CPDecksContentCategory subcategory = CPDecksContentManager.getContentCategory(id); if (subcategory != null) { count += subcategory.getCategoryContentCount(); } } return count; }