class LinkRepository extends AbstractRepository {

    /**
     * Logger.
     */
    private static final Logger LOGGER = LogManager.getLogger(LinkRepository.class);

    /**
     * Gets a link with the specified address.
     *
     * @param addr the specified address
     * @return a link, returns {@code null} if not found
     */
    public JSONObject getLink(final String addr) {<FILL_FUNCTION_BODY>}

    /**
     * Public constructor.
     */
    public LinkRepository() {
        super(Link.LINK);
    }
}

        final String hash = DigestUtils.sha1Hex(addr);
        final Query query = new Query().setFilter(new PropertyFilter(Link.LINK_ADDR_HASH, FilterOperator.EQUAL, hash)).
                setPageCount(1).setPage(1, 1);
        try {
            return getFirst(query);
        } catch (final Exception e) {
            LOGGER.log(Level.ERROR, "Gets link by address [addr=" + addr + ", hash=" + hash + "] failed", e);
            return null;
        }
    
<no_super_class>