class FollowRepository extends AbstractRepository {

    /**
     * Public constructor.
     */
    public FollowRepository() {
        super(Follow.FOLLOW);
    }

    /**
     * Removes a follow relationship by the specified follower id and the specified following entity id.
     *
     * @param followerId    the specified follower id
     * @param followingId   the specified following entity id
     * @param followingType the specified following type
     * @throws RepositoryException repository exception
     */
    public void removeByFollowerIdAndFollowingId(final String followerId, final String followingId, final int followingType) throws RepositoryException {<FILL_FUNCTION_BODY>}

    /**
     * Gets a follow relationship by the specified follower id and the specified following entity id.
     *
     * @param followerId    the specified follower id
     * @param followingId   the specified following entity id
     * @param followingType the specified following type
     * @return follow relationship, returns {@code null} if not found
     * @throws RepositoryException repository exception
     */
    public JSONObject getByFollowerIdAndFollowingId(final String followerId, final String followingId, final int followingType) throws RepositoryException {
        final List<Filter> filters = new ArrayList<Filter>();
        filters.add(new PropertyFilter(Follow.FOLLOWER_ID, FilterOperator.EQUAL, followerId));
        filters.add(new PropertyFilter(Follow.FOLLOWING_ID, FilterOperator.EQUAL, followingId));
        filters.add(new PropertyFilter(Follow.FOLLOWING_TYPE, FilterOperator.EQUAL, followingType));
        final Query query = new Query().setFilter(new CompositeFilter(CompositeFilterOperator.AND, filters));
        return getFirst(query);
    }

    /**
     * Determines whether exists a follow relationship for the specified follower and the specified following entity.
     *
     * @param followerId    the specified follower id
     * @param followingId   the specified following entity id
     * @param followingType the specified following type
     * @return {@code true} if exists, returns {@code false} otherwise
     * @throws RepositoryException repository exception
     */
    public boolean exists(final String followerId, final String followingId, final int followingType) throws RepositoryException {
        return null != getByFollowerIdAndFollowingId(followerId, followingId, followingType);
    }

    /**
     * Get follows by the specified following id and type.
     *
     * @param followingId    the specified following id
     * @param type           the specified type
     * @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": [{
     *         Follow
     *     }, ....]
     * }
     * </pre>
     * @throws RepositoryException repository exception
     */
    public JSONObject getByFollowingId(final String followingId, final int type, final int currentPageNum, final int pageSize) throws RepositoryException {
        final Query query = new Query().
                setFilter(CompositeFilterOperator.and(
                        new PropertyFilter(Follow.FOLLOWING_ID, FilterOperator.EQUAL, followingId),
                        new PropertyFilter(Follow.FOLLOWING_TYPE, FilterOperator.EQUAL, type))).
                setPage(currentPageNum, pageSize).setPageCount(1);
        return get(query);
    }
}

        final JSONObject toRemove = getByFollowerIdAndFollowingId(followerId, followingId, followingType);
        if (null == toRemove) {
            return;
        }
        remove(toRemove.optString(Keys.OBJECT_ID));
    
<no_super_class>