/** * @param language the language of the article * @param articleId the article's ID * @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(Language language, int articleId) throws DaoException { Collection<Integer> categoryIds = getCategoryIds(language, articleId); LocalPageLiveDao dao = new LocalPageLiveDao(); return dao.getByIds(language, categoryIds); }
/** * @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); }