public void hideIgnored(Set<Integer> hideSet, Set<Integer> ignoreList) {
    if (comment != null) {
      if (comment.isIgnored(ignoreList)) {
        hideNode(hideSet);
      }
    }

    if (comment == null || !hideSet.contains(comment.getId())) {
      for (CommentNode child : childs) {
        child.hideIgnored(hideSet, ignoreList);
      }
    }
  }
  public void hideAnonymous(UserDao userDao, Set<Integer> hideSet)
      throws SQLException, UserNotFoundException {
    if (comment != null) {
      User commentAuthor = userDao.getUserCached(comment.getUserid());

      if (commentAuthor.isAnonymousScore()) {
        hideNode(hideSet);
      }
    }

    if (comment == null || !hideSet.contains(comment.getId())) {
      for (CommentNode child : childs) {
        child.hideAnonymous(userDao, hideSet);
      }
    }
  }
  public void hideNode(Set<Integer> hideSet) {
    if (comment != null) {
      hideSet.add(comment.getId());
    }

    for (CommentNode child : childs) {
      child.hideNode(hideSet);
    }
  }
Beispiel #4
0
 public String getReplyTitle() {
   if (reply != null) {
     String replyTitle = reply.getTitle();
     if (replyTitle.trim().isEmpty()) {
       return "комментарий";
     }
     return replyTitle;
   } else {
     return "";
   }
 }