private void getThreadContent(Map<String, Object> jsonrpc2Params) throws Exception {

        Map<String, Object> params = getParams(jsonrpc2Params,
                new NullableExtendedParam(Constants.Param.Name.THREAD_ID, false),
                new NullableExtendedParam(Constants.Param.Name.SORT_TYPE, true));

        int threadId = (Integer) params.get(Constants.Param.Name.THREAD_ID);
        Integer sortType = (Integer) params.get(Constants.Param.Name.SORT_TYPE);

        models.Thread thread = em.find(models.Thread.class, threadId);
//        Hibernate.initialize(thread);
        if(thread == null){
            responseParams.put(Constants.Param.Status.STATUS, Constants.Param.Status.OBJECT_NOT_FOUND);
            return;
        }

        List replies = new ArrayList(thread.getReplies());

        if(sortType == null || sortType == 0){
            // Sort using standard sorting (aka time)
            Collections.sort(replies, ReplyComparator.getComparator(ReplyComparator.TIME_SORT));

        }else if(sortType == 1){
            //Sort after time
            Collections.sort(replies, ReplyComparator.getComparator(ReplyComparator.TIME_SORT));

        }else if(sortType == 2){
            //Sort after date, and secondly time
            Collections.sort(replies, ReplyComparator.getComparator( ReplyComparator.VOTE_SORT, ReplyComparator.TIME_SORT));

        }

        responseParams.put(Constants.Param.Status.STATUS, Constants.Param.Status.SUCCESS);
        responseParams.put(Constants.Param.Name.REPLIES, serialize(replies));
    }