Changement du tableau de bord pour l'user.
This commit is contained in:
@@ -138,6 +138,14 @@ public class ArticleManagerBean implements IArticleManager, Serializable {
|
||||
return query.getResultList();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<Article> getArticleOfAuthor(String authorId) {
|
||||
User author = em.find(User.class, authorId);
|
||||
Query query = em.createQuery("from Article a WHERE mainAuthor = ? ORDER BY a.title");
|
||||
query.setParameter(1, author);
|
||||
return query.getResultList();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<Article> getArticleOfAuthor(Integer confId, String authorId) {
|
||||
Conference conf = em.find(Conference.class, confId);
|
||||
|
||||
@@ -25,6 +25,11 @@ public interface IArticleManager {
|
||||
//liste d'articles
|
||||
|
||||
//public List<Article> getArticles();
|
||||
/*
|
||||
* Return all the articles of an author
|
||||
*/
|
||||
public List<Article> getArticleOfAuthor(String authorId);
|
||||
|
||||
public List<Article> getArticles(Integer confId) throws ConferenceDoesntExistException;
|
||||
public List<Article> getArticleOfAuthor(Integer confId, String authorId);
|
||||
public List<Article> getArticlesOfMember(Integer confId, String memberId);
|
||||
|
||||
Reference in New Issue
Block a user