@Override
    public <T extends GedObject> T find(final FinderObject owner,
            final String str, final Class<T> clazz) {
        if (!(owner instanceof Root)) {
            throw new IllegalArgumentException("Owner must be root");
        }
        final FindableDocument<? extends GedObject, ? extends GedDocument<?>>
            repo = repositoryManager.get(clazz);
        if (repo == null) {
            return null;
        }
        final Root root = (Root) owner;
        final RootDocumentMongo rootDocument =
                (RootDocumentMongo) toDocConverter.createGedDocument(root);
        final GedDocument<?> document =
                repo.findByRootAndString(rootDocument, str);
        if (document == null) {
            return null;
        }
        return clazz.cast(document.getGedObject());
    }
@ Override public < T extends GedObject > T find ( final FinderObject owner , final String str , final Class < T > clazz ) { if ( ! ( owner instanceof Root ) ) { throw new IllegalArgumentException ( "Owner must be root" ) ; } final FindableDocument < ? extends GedObject , ? extends GedDocument < ? > > repo = repositoryManager . get ( clazz ) ; if ( repo == null ) { return null ; } final Root root = ( Root ) owner ; final RootDocumentMongo rootDocument = ( RootDocumentMongo ) toDocConverter . createGedDocument ( root ) ; final GedDocument < ? > document = repo . findByRootAndString ( rootDocument , str ) ; if ( document == null ) { return null ; } return clazz . cast ( document . getGedObject ( ) ) ; }
{@inheritDoc}