Search in sources :

Example 26 with UserDAO

use of net.jforum.dao.UserDAO in project jforum2 by rafaelsteil.

the class UserAction method groupSearch.

public void groupSearch() {
    final int groupId = this.request.getIntParameter("group_id");
    if (groupId == 0) {
        this.list();
        return;
    }
    UserDAO um = DataAccessDriver.getInstance().newUserDAO();
    int start = this.preparePagination(um.getTotalUsersByGroup(groupId));
    int usersPerPage = SystemGlobals.getIntValue(ConfigKeys.USERS_PER_PAGE);
    this.commonData();
    List l = new ArrayList();
    l.add(new Integer(groupId));
    this.context.put("selectedList", l);
    this.context.put("searchAction", "groupSearch");
    this.context.put("users", um.selectAllByGroup(groupId, start, usersPerPage));
    this.context.put("searchId", new Integer(groupId));
}
Also used : UserDAO(net.jforum.dao.UserDAO) ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List)

Aggregations

UserDAO (net.jforum.dao.UserDAO)26 User (net.jforum.entities.User)18 List (java.util.List)12 ArrayList (java.util.ArrayList)7 Iterator (java.util.Iterator)6 Topic (net.jforum.entities.Topic)6 Post (net.jforum.entities.Post)5 HashMap (java.util.HashMap)4 PostDAO (net.jforum.dao.PostDAO)4 AttachmentCommon (net.jforum.view.forum.common.AttachmentCommon)4 Map (java.util.Map)3 DataAccessDriver (net.jforum.dao.DataAccessDriver)3 Forum (net.jforum.entities.Forum)3 UserSession (net.jforum.entities.UserSession)3 Date (java.util.Date)2 TopicDAO (net.jforum.dao.TopicDAO)2 Group (net.jforum.entities.Group)2 PrivateMessage (net.jforum.entities.PrivateMessage)2 QuotaLimit (net.jforum.entities.QuotaLimit)2 APIException (net.jforum.exceptions.APIException)2