use of net.jforum.search.SearchPost in project jforum2 by rafaelsteil.
the class GenericLuceneDAO method makePost.
private Post makePost(ResultSet rs) throws SQLException {
Post p = new SearchPost();
p.setId(rs.getInt("post_id"));
p.setForumId(rs.getInt("forum_id"));
p.setTopicId(rs.getInt("topic_id"));
p.setUserId(rs.getInt("user_id"));
p.setTime(new Date(rs.getTimestamp("post_time").getTime()));
p.setText(this.readPostTextFromResultSet(rs));
p.setBbCodeEnabled(rs.getInt("enable_bbcode") == 1);
p.setSmiliesEnabled(rs.getInt("enable_smilies") == 1);
String subject = rs.getString("post_subject");
if (subject == null || subject.trim().length() == 0) {
subject = rs.getString("topic_title");
}
p.setSubject(subject);
return p;
}
Aggregations