class TagTagRepository extends AbstractRepository {

    /**
     * Public constructor.
     */
    public TagTagRepository() {
        super(Tag.TAG + "_" + Tag.TAG);
    }

    /**
     * Gets tag-tag relations by the specified tag1 id.
     *
     * @param tag1Id         the specified tag1 id
     * @param currentPageNum the specified current page number, MUST greater then {@code 0}
     * @param pageSize       the specified page size(count of a page contains objects), MUST greater then {@code 0}
     * @return for example      <pre>
     * {
     *     "pagination": {
     *       "paginationPageCount": 88250
     *     },
     *     "rslts": [{
     *         "oId": "",
     *         "tag1_oId": tag1Id,
     *         "tag2_oId": "",
     *         "weight": int
     *     }, ....]
     * }
     * </pre>
     * @throws RepositoryException repository exception
     */
    public JSONObject getByTag1Id(final String tag1Id, final int currentPageNum, final int pageSize)
            throws RepositoryException {
        final List<Filter> filters = new ArrayList<>();
        filters.add(new PropertyFilter(Tag.TAG + "1_" + Keys.OBJECT_ID, FilterOperator.EQUAL, tag1Id));
        filters.add(new PropertyFilter(Common.WEIGHT, FilterOperator.GREATER_THAN_OR_EQUAL, Symphonys.TAG_RELATED_WEIGHT));

        final Query query = new Query().setFilter(new CompositeFilter(CompositeFilterOperator.AND, filters)).
                setPage(currentPageNum, pageSize).setPageCount(1).
                addSort(Common.WEIGHT, SortDirection.DESCENDING);

        return get(query);
    }

    /**
     * Gets tag-tag relations by the specified tag2 id.
     *
     * @param tag2Id         the specified tag2 id
     * @param currentPageNum the specified current page number, MUST greater then {@code 0}
     * @param pageSize       the specified page size(count of a page contains objects), MUST greater then {@code 0}
     * @return for example      <pre>
     * {
     *     "pagination": {
     *       "paginationPageCount": 88250
     *     },
     *     "rslts": [{
     *         "oId": "",
     *         "tag1_oId": "",
     *         "tag2_oId": tag2Id,
     *         "weight": int
     *     }, ....]
     * }
     * </pre>
     * @throws RepositoryException repository exception
     */
    public JSONObject getByTag2Id(final String tag2Id, final int currentPageNum, final int pageSize)
            throws RepositoryException {<FILL_FUNCTION_BODY>}

    /**
     * Gets a tag-tag relation by the specified tag1 id and tag2 id.
     *
     * @param tag1Id the specified tag1 id
     * @param tag2Id the specified tag2 id
     * @return for example      <pre>
     * {
     *     "oId": "",
     *     "tag1_oId": tag1Id,
     *     "tag2_oId": tag2Id,
     *     "weight": int
     * }, returns {@code null} if not found
     * </pre>
     * @throws RepositoryException repository exception
     */
    public JSONObject getByTag1IdAndTag2Id(final String tag1Id, final String tag2Id) throws RepositoryException {
        final List<Filter> filters = new ArrayList<>();
        filters.add(new PropertyFilter(Tag.TAG + "1_" + Keys.OBJECT_ID, FilterOperator.EQUAL, tag1Id));
        filters.add(new PropertyFilter(Tag.TAG + "2_" + Keys.OBJECT_ID, FilterOperator.EQUAL, tag2Id));
        final Query query = new Query().setFilter(new CompositeFilter(CompositeFilterOperator.AND, filters));
        return getFirst(query);
    }
}

        final List<Filter> filters = new ArrayList<>();
        filters.add(new PropertyFilter(Tag.TAG + "2_" + Keys.OBJECT_ID, FilterOperator.EQUAL, tag2Id));
        filters.add(new PropertyFilter(Common.WEIGHT, FilterOperator.GREATER_THAN_OR_EQUAL, Symphonys.TAG_RELATED_WEIGHT));

        final Query query = new Query().setFilter(new CompositeFilter(CompositeFilterOperator.AND, filters)).
                setPage(currentPageNum, pageSize).setPageCount(1).
                addSort(Common.WEIGHT, SortDirection.DESCENDING);

        return get(query);
    
<no_super_class>