Vue combinée Vue Plate Arborescence
Sujets [ Précédent | Suivant ]
toggle
venka reddy
How to retrieve journalarticle
17 août 2013 10:54
Réponse

venka reddy

Rang: Regular Member

Publications: 231

Date d'inscription: 23 mars 2011

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.
Wilson Man
RE: How to retrieve journalarticle
18 août 2013 09:38
Réponse

Wilson Man

LIFERAY STAFF

Rang: Liferay Master

Publications: 580

Date d'inscription: 21 juin 2006

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)
Meera Prince
RE: How to retrieve journalarticle
18 août 2013 20:54
Réponse

Meera Prince

Rang: Liferay Master

Publications: 841

Date d'inscription: 8 février 2011

Publications Récentes

HI

Go through following classes you can find many methods

JournalArticleLocalServiceUtil

JournalArticleServiceUtil


JournalArticleUtil

Thanks&Regards,

Meera Prince
venka reddy
RE: How to retrieve journalarticle
18 août 2013 22:59
Réponse

venka reddy

Rang: Regular Member

Publications: 231

Date d'inscription: 23 mars 2011

Publications Récentes

Wilson,

I need to reterive the article in scheduler class which has doreceive method, So i cannot reterive groupId!