class CommentRepository extends AbstractRepository {

    /**
     * Comment cache.
     */
    @Inject
    private CommentCache commentCache;

    /**
     * Article repository.
     */
    @Inject
    private ArticleRepository articleRepository;

    /**
     * User repository.
     */
    @Inject
    private UserRepository userRepository;

    /**
     * Revision repository.
     */
    @Inject
    private RevisionRepository revisionRepository;

    /**
     * Option repository.
     */
    @Inject
    private OptionRepository optionRepository;

    /**
     * Notification repository.
     */
    @Inject
    private NotificationRepository notificationRepository;

    /**
     * Public constructor.
     */
    public CommentRepository() {
        super(Comment.COMMENT);
    }

    /**
     * Removes a comment specified with the given comment id. Calls this method will remove all existed data related
     * with the specified comment forcibly.
     *
     * @param commentId the given comment id
     * @throws RepositoryException repository exception
     */
    public void removeComment(final String commentId) throws RepositoryException {<FILL_FUNCTION_BODY>}

    @Override
    public void remove(final String id) throws RepositoryException {
        super.remove(id);

        commentCache.removeComment(id);
    }

    @Override
    public JSONObject get(final String id) throws RepositoryException {
        JSONObject ret = commentCache.getComment(id);
        if (null != ret) {
            return ret;
        }

        ret = super.get(id);
        if (null == ret) {
            return null;
        }

        commentCache.putComment(ret);

        return ret;
    }

    @Override
    public void update(final String id, final JSONObject comment, final String... propertyNames) throws RepositoryException {
        super.update(id, comment, propertyNames);

        comment.put(Keys.OBJECT_ID, id);
        commentCache.putComment(comment);
    }
}

        final JSONObject comment = get(commentId);
        if (null == comment) {
            return;
        }

        remove(comment.optString(Keys.OBJECT_ID));

        final String commentAuthorId = comment.optString(Comment.COMMENT_AUTHOR_ID);
        final JSONObject commenter = userRepository.get(commentAuthorId);
        int commentCount = commenter.optInt(UserExt.USER_COMMENT_COUNT) - 1;
        if (0 > commentCount) {
            commentCount = 0;
        }
        commenter.put(UserExt.USER_COMMENT_COUNT, commentCount);
        userRepository.update(commentAuthorId, commenter);

        final String articleId = comment.optString(Comment.COMMENT_ON_ARTICLE_ID);
        final JSONObject article = articleRepository.get(articleId);
        article.put(Article.ARTICLE_COMMENT_CNT, article.optInt(Article.ARTICLE_COMMENT_CNT) - 1);
        if (0 < article.optInt(Article.ARTICLE_COMMENT_CNT)) {
            final Query latestCmtQuery = new Query().
                    setFilter(new PropertyFilter(Comment.COMMENT_ON_ARTICLE_ID, FilterOperator.EQUAL, articleId)).
                    addSort(Keys.OBJECT_ID, SortDirection.DESCENDING).
                    setPage(1, 1);
            final JSONObject latestCmt = getFirst(latestCmtQuery);
            article.put(Article.ARTICLE_LATEST_CMT_TIME, latestCmt.optLong(Keys.OBJECT_ID));
            final JSONObject latestCmtAuthor = userRepository.get(latestCmt.optString(Comment.COMMENT_AUTHOR_ID));
            article.put(Article.ARTICLE_LATEST_CMTER_NAME, latestCmtAuthor.optString(User.USER_NAME));
        } else {
            article.put(Article.ARTICLE_LATEST_CMT_TIME, articleId);
            article.put(Article.ARTICLE_LATEST_CMTER_NAME, "");
        }
        articleRepository.update(articleId, article);

        final Query query = new Query().setFilter(CompositeFilterOperator.and(
                new PropertyFilter(Revision.REVISION_DATA_ID, FilterOperator.EQUAL, commentId),
                new PropertyFilter(Revision.REVISION_DATA_TYPE, FilterOperator.EQUAL, Revision.DATA_TYPE_C_COMMENT)));
        final List<JSONObject> commentRevisions = revisionRepository.getList(query);
        for (final JSONObject articleRevision : commentRevisions) {
            revisionRepository.remove(articleRevision.optString(Keys.OBJECT_ID));
        }

        final JSONObject commentCntOption = optionRepository.get(Option.ID_C_STATISTIC_CMT_COUNT);
        commentCntOption.put(Option.OPTION_VALUE, commentCntOption.optInt(Option.OPTION_VALUE) - 1);
        optionRepository.update(Option.ID_C_STATISTIC_CMT_COUNT, commentCntOption);

        final String originalCommentId = comment.optString(Comment.COMMENT_ORIGINAL_COMMENT_ID);
        if (StringUtils.isNotBlank(originalCommentId)) {
            final JSONObject originalComment = get(originalCommentId);
            if (null != originalComment) {
                originalComment.put(Comment.COMMENT_REPLY_CNT, originalComment.optInt(Comment.COMMENT_REPLY_CNT) - 1);

                update(originalCommentId, originalComment);
            }
        }

        notificationRepository.removeByDataId(commentId);
    
<no_super_class>