Package com.skyline.base.model

Examples of com.skyline.base.model.Comment


    String resourceComment = commentType.toString().toLowerCase() + COMMENT_SUFFIX;
    List<Comment> comments = commentDao.queryCommentByResource(resourceId, page, resourceComment);
    List<Comment> refComments = commentDao.queryRefedCommentByResource(resourceId, resourceComment);
    for (Comment comment : comments) {
      if (comment.getRef() != 0) {
        Comment cursorComment = comment;
        for (Comment refComment : refComments) {
          // TODO: 空指针判断
          if (refComment.getId()!=null&&refComment.getId().equals(cursorComment.getRef())) {
            cursorComment.setRefComment(refComment);
            if (refComment.getRefComment() != null) {
              break;
            }
            cursorComment = refComment;
          }
View Full Code Here


  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;
  }
View Full Code Here

TOP

Related Classes of com.skyline.base.model.Comment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.