Ajout d'une méthode pour avoir la conférence à laquelle appartient un article
This commit is contained in:
@@ -166,6 +166,25 @@ public class ArticleManagerBean implements IArticleManager, Serializable {
|
|||||||
return query.getResultList();
|
return query.getResultList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Conference getConferenceForArticle(Integer articleId) {
|
||||||
|
//try {
|
||||||
|
//ut.begin();
|
||||||
|
Article article = em.find(Article.class, articleId);
|
||||||
|
Conference conf = article.getConference();
|
||||||
|
//ut.commit();
|
||||||
|
return conf;
|
||||||
|
/*} catch (Exception e) {
|
||||||
|
try {
|
||||||
|
ut.rollback();
|
||||||
|
} catch (Exception e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return null;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void assignArticleToPCMember(Integer articleId,String memberId){
|
public void assignArticleToPCMember(Integer articleId,String memberId){
|
||||||
try{
|
try{
|
||||||
ut.begin();
|
ut.begin();
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import javax.ejb.Remote;
|
|||||||
|
|
||||||
import org.yacos.core.article.Article.State;
|
import org.yacos.core.article.Article.State;
|
||||||
import org.yacos.core.article.Preference.PreferenceType;
|
import org.yacos.core.article.Preference.PreferenceType;
|
||||||
|
import org.yacos.core.conferences.Conference;
|
||||||
import org.yacos.core.exceptions.ConferenceDoesntExistException;
|
import org.yacos.core.exceptions.ConferenceDoesntExistException;
|
||||||
|
|
||||||
|
|
||||||
@@ -35,6 +36,11 @@ public interface IArticleManager {
|
|||||||
public List<Article> getArticlesOfMember(Integer confId, String memberId);
|
public List<Article> getArticlesOfMember(Integer confId, String memberId);
|
||||||
//public List<Article> getAllArticles();
|
//public List<Article> getAllArticles();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* return the conference which own the article
|
||||||
|
*/
|
||||||
|
public Conference getConferenceForArticle(Integer articleId);
|
||||||
|
|
||||||
|
|
||||||
//gestion des preferences
|
//gestion des preferences
|
||||||
public Preference addPreference(Integer articleId, String userLogin, PreferenceType preferenceType);
|
public Preference addPreference(Integer articleId, String userLogin, PreferenceType preferenceType);
|
||||||
|
|||||||
Reference in New Issue
Block a user