/** * @param localArticle the article to find * @return a map contains the LocalPageIDs and the LocalCategories of all the categories this * article belongs to * @throws DaoException */ @Override public Map<Integer, LocalPage> getCategories(LocalPage localArticle) throws DaoException { Collection<Integer> categoryIds = getCategoryIds(localArticle); LocalPageLiveDao dao = new LocalPageLiveDao(); return dao.getByIds(localArticle.getLanguage(), categoryIds); }
/** * @param localCategory the category to find * @return a map contains the LocalArticleIDs and the LocalArticle of all members in the given * category * @throws DaoException */ public Map<Integer, LocalPage> getCategoryMembers(LocalPage localCategory) throws DaoException { Collection<Integer> articleIds = getCategoryMemberIds(localCategory); LocalPageLiveDao dao = new LocalPageLiveDao(); return dao.getByIds(localCategory.getLanguage(), articleIds); }
/** * @param localPage the page * @return a collection of categoryids of all the categories this article belongs to * @throws DaoException */ @Override public Collection<Integer> getCategoryIds(LocalPage localPage) throws DaoException { return getCategoryIds(localPage.getLanguage(), localPage.getLocalId()); }
/** * @param localCategory the category * @return a collection of the ids of all members in the given category * @throws DaoException */ public Collection<Integer> getCategoryMemberIds(LocalPage localCategory) throws DaoException { return getCategoryMemberIds(localCategory.getLanguage(), localCategory.getLocalId()); }