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();
|
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")
|
@SuppressWarnings("unchecked")
|
||||||
public List<Article> getArticleOfAuthor(Integer confId, String authorId) {
|
public List<Article> getArticleOfAuthor(Integer confId, String authorId) {
|
||||||
Conference conf = em.find(Conference.class, confId);
|
Conference conf = em.find(Conference.class, confId);
|
||||||
|
|||||||
@@ -25,6 +25,11 @@ public interface IArticleManager {
|
|||||||
//liste d'articles
|
//liste d'articles
|
||||||
|
|
||||||
//public List<Article> getArticles();
|
//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> getArticles(Integer confId) throws ConferenceDoesntExistException;
|
||||||
public List<Article> getArticleOfAuthor(Integer confId, String authorId);
|
public List<Article> getArticleOfAuthor(Integer confId, String authorId);
|
||||||
public List<Article> getArticlesOfMember(Integer confId, String memberId);
|
public List<Article> getArticlesOfMember(Integer confId, String memberId);
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ public class UserManagerBean implements IUserManager{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public List<User> getUsers(int conf_id,RoleType type) {
|
public List<User> getUsers(int conf_id, RoleType type) {
|
||||||
Query query = em.createQuery("select user from User user, Role role where user.login = role.user and role.type = ? and role.conference = ?)");
|
Query query = em.createQuery("select user from User user, Role role where user.login = role.user and role.type = ? and role.conference = ?)");
|
||||||
query.setParameter(1, type);
|
query.setParameter(1, type);
|
||||||
Conference conference = em.find(Conference.class, conf_id);
|
Conference conference = em.find(Conference.class, conf_id);
|
||||||
|
|||||||
Reference in New Issue
Block a user