query = String.format(queryTrackerMain, partUncommited, partIgnored, partFilter, partUncommited, partIgnored, partFilter, partWiki);
} else {
query = String.format(queryTrackerZeroMain, partIgnored);
}
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(query, parameter);
List<TrackerItem> res = new ArrayList<>(topics);
while (resultSet.next()) {
User author;
int author_id = resultSet.getInt("author");
if (author_id != 0) {
author = userDao.getUserCached(author_id);
} else {
author = null;
}
int msgid = resultSet.getInt("id");
Timestamp lastmod = resultSet.getTimestamp("lastmod");
int stat1 = resultSet.getInt("stat1");
int groupId = resultSet.getInt("gid");
String groupTitle = resultSet.getString("gtitle");
String title = StringUtil.makeTitle(resultSet.getString("title"));
int cid = resultSet.getInt("cid");
User lastCommentBy;
try {
int id = resultSet.getInt("last_comment_by");
if (id != 0) {
lastCommentBy = userDao.getUserCached(id);
} else {
lastCommentBy = null;
}
} catch (UserNotFoundException e) {
throw new RuntimeException(e);
}
boolean resolved = resultSet.getBoolean("resolved");
int section = resultSet.getInt("section");
String groupUrlName = resultSet.getString("urlname");
Timestamp postdate = resultSet.getTimestamp("postdate");
boolean uncommited = resultSet.getBoolean("smod") && !resultSet.getBoolean("moderate");
int pages = Topic.getPageCount(stat1, messagesInPage);
ImmutableList<String> tags;
if (msgid != 0) {