コード例 #1
0
ファイル: HomepageUpdater.java プロジェクト: hram908/kunagi
 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
ファイル: Project.java プロジェクト: sjaddow/kunagi
 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
ファイル: ScrumServiceImpl.java プロジェクト: MathesBo/kunagi
 @Override
 public void onRequestComments(GwtConversation conversation, String parentId) {
   conversation.sendToClient(commentDao.getCommentsByParentId(parentId));
 }