public static IterableResult < Extension > search ( ExtensionRepository repository , ExtensionQuery query , IterableResult < Extension > previousSearchResult ) throws SearchException { IterableResult < Extension > result ; if ( repository instanceof Searchable ) { if ( repository instanceof AdvancedSearchable ) { AdvancedSearchable searchableRepository = ( AdvancedSearchable ) repository ; result = searchableRepository . search ( query ) ; } else { Searchable searchableRepository = ( Searchable ) repository ; result = searchableRepository . search ( query . getQuery ( ) , query . getOffset ( ) , query . getLimit ( ) ) ; } if ( previousSearchResult != null ) { result = RepositoryUtils . appendSearchResults ( previousSearchResult , result ) ; } } else { result = previousSearchResult ; } return result ; }
Search one repository .