public static CommentMapper getMapper() {
return MAPPER;
}
public Comment mapRow(ResultSet rs, int rowNum) throws SQLException {
Comment c = new Comment();
c.setId(rs.getLong("id"));
c.setContent(rs.getString("content"));
c.setCreateTime(rs.getTimestamp("createtime"));
c.setCommenterId(rs.getLong("commenterId"));
c.setCommenterNickname(rs.getString("commenterNickname"));
c.setCommenterPortrait(rs.getString("commenterPortrait"));
c.setRef(rs.getLong("ref"));
c.setResourceId(rs.getLong("resourceId"));
c.setOwnerId(rs.getLong("ownerId"));
c.setAgreeNum(rs.getInt("agreeNum"));
c.setDisagreeNum(rs.getInt("disagreeNum"));
return c;
}