示例#1
0
 private void fillComments(ContextBuilder context, AEntity entity) {
   CommentDao commentDao = (CommentDao) entity.getDaoService().getDaoByClass(Comment.class);
   Collection<Comment> comments = commentDao.getPublishedCommentsByParent(entity);
   comments = Utl.sort(comments);
   for (Comment comment : comments) {
     fillComment(context.addSubContext("comments"), comment);
   }
 }
示例#2
0
 private Set<Comment> getComments(Collection<? extends AEntity> entities, boolean latestOnly) {
   Set<Comment> ret = new HashSet<Comment>();
   for (AEntity entity : entities) {
     Set<Comment> comments = commentDao.getCommentsByParent(entity);
     ret.addAll(latestOnly ? getLatest(comments) : comments);
   }
   return ret;
 }
示例#3
0
 @Override
 public void onRequestComments(GwtConversation conversation, String parentId) {
   conversation.sendToClient(commentDao.getCommentsByParentId(parentId));
 }