use of net.jforum.entities.ModeratorInfo in project jforum2 by rafaelsteil.
the class GenericForumDAO method getModeratorList.
/**
* @see net.jforum.dao.ForumDAO#getModeratorList(int)
*/
public List getModeratorList(int forumId) {
List l = new ArrayList();
PreparedStatement p = null;
ResultSet rs = null;
try {
p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("ForumModel.getModeratorList"));
p.setInt(1, forumId);
rs = p.executeQuery();
while (rs.next()) {
ModeratorInfo mi = new ModeratorInfo();
mi.setId(rs.getInt("id"));
mi.setName(rs.getString("name"));
l.add(mi);
}
return l;
} catch (SQLException e) {
throw new DatabaseException(e);
} finally {
DbUtils.close(rs, p);
}
}
Aggregations