1. Have a long[] array containing Tag Ids for which you want to serach Journal Articles
long[] tagIds = {tagId1,tagId2,…..};
2. Create an AssetEntryQuery and set the tagIds as the criteria
AssetEntryQuery assetEntryQuery = new AssetEntryQuery();
assetEntryQuery.setAllTagIds(tagIds);
3. Call the getEntries(AssetEntryQuery ob) method on AssetEntryLocalServiceUtil class to get the list of assetEntries
ListentryList = new ArrayList();
try {
entryList = AssetEntryLocalServiceUtil.getEntries(assetEntryQuery);
} catch (SystemException e) {
e.printStackTrace();
}
4. Now iterate the list and pick classPK attribute for each entry and from that query JournalArticle Table for corresponding articleId.
When will you post again ? Been looking forward to this !
ReplyDeleteReally interesting blog, keep up the good work!
ReplyDelete