Forums de discussion

How to retrieve journalarticle

venka reddy, modifié il y a 10 années.

How to retrieve journalarticle

Regular Member Publications: 231 Date d'inscription: 23/03/11 Publications récentes
Hi,

I want to retrieve Journal article from articleid so i have written as follows as ,

JournalArticle journalArticle = JournalArticleLocalServiceUtil.getArticle(articleId);

but it throws exception as com.liferay.portlet.journal.NoSuchArticleException: No JournalArticle exists with the primary key 29935.

For your information i am writing this method in scheduler class in receive method.
thumbnail
Wilson Man, modifié il y a 10 années.

RE: How to retrieve journalarticle

Liferay Master Publications: 581 Date d'inscription: 21/06/06 Publications récentes
Hi Venka,

the getArticle(long id) method does not take in an articleId but rather the table specific id_ primary key instead. Note that articleId and id_ are different.
In your case, you should use this method instead: getArticle(long groupId, String articleId)
venka reddy, modifié il y a 10 années.

RE: How to retrieve journalarticle

Regular Member Publications: 231 Date d'inscription: 23/03/11 Publications récentes
Wilson,

I need to reterive the article in scheduler class which has doreceive method, So i cannot reterive groupId!
thumbnail
meera prince, modifié il y a 10 années.

RE: How to retrieve journalarticle

Liferay Legend Publications: 1111 Date d'inscription: 08/02/11 Publications récentes
HI

Go through following classes you can find many methods

JournalArticleLocalServiceUtil

JournalArticleServiceUtil


JournalArticleUtil

Thanks&Regards,

Meera Prince