class EmotionRepository extends AbstractRepository {

    /**
     * Public constructor.
     */
    public EmotionRepository() {
        super(Emotion.EMOTION);
    }

    /**
     * Gets a user's emotion (emoji with type=0).
     *
     * @param userId the specified user id
     * @return emoji string join with {@code ","}, returns {@code null} if not found
     * @throws RepositoryException repository exception
     */
    public String getUserEmojis(final String userId) throws RepositoryException {<FILL_FUNCTION_BODY>}

    /**
     * Remove emotions by the specified user id.
     *
     * @param userId the specified user id
     * @throws RepositoryException repository exception
     */
    public void removeByUserId(final String userId) throws RepositoryException {
        remove(new Query().setFilter(new PropertyFilter(Emotion.EMOTION_USER_ID, FilterOperator.EQUAL, userId)));
    }
}

        final Query query = new Query().setFilter(CompositeFilterOperator.and(
                new PropertyFilter(Emotion.EMOTION_USER_ID, FilterOperator.EQUAL, userId),
                new PropertyFilter(Emotion.EMOTION_TYPE, FilterOperator.EQUAL, Emotion.EMOTION_TYPE_C_EMOJI))).
                addSort(Emotion.EMOTION_SORT, SortDirection.ASCENDING);
        final List<JSONObject> result = getList(query);
        if (result.isEmpty()) {
            return null;
        }

        final StringBuilder retBuilder = new StringBuilder();
        for (int i = 0; i < result.size(); i++) {
            retBuilder.append(result.get(i).optString(Emotion.EMOTION_CONTENT));
            if (i != result.size() - 1) {
                retBuilder.append(",");
            }
        }
        return retBuilder.toString();
    
<no_super_class>