@Override public <T extends ServiceDocument>List<String> queryDocumentsForLinks(Class<T> documentType,ImmutableMap<String,String> terms) throws BadRequestException, DocumentNotFoundException, TimeoutException, InterruptedException {
  checkNotNull(documentType,"Cannot query documents with null documentType");
  QueryTask.QuerySpecification spec=QueryTaskUtils.buildQuerySpec(documentType,terms);
  Operation result=postToBroadcastQueryService(spec);
  Set<String> documentLinks=QueryTaskUtils.getBroadcastQueryDocumentLinks(result);
  if (documentLinks.size() <= 0) {
    return ImmutableList.of();
  }
  return ImmutableList.copyOf(documentLinks);
}

@ Override public < T extends ServiceDocument > List < String > queryDocumentsForLinks ( Class < T > documentType , ImmutableMap < String , String > terms ) throws BadRequestException , DocumentNotFoundException , TimeoutException , InterruptedException { checkNotNull ( documentType , "Cannot query documents with null documentType" ) ; QueryTask . QuerySpecification spec = QueryTaskUtils . buildQuerySpec ( documentType , terms ) ; Operation result = postToBroadcastQueryService ( spec ) ; Set < String > documentLinks = QueryTaskUtils . getBroadcastQueryDocumentLinks ( result ) ; if ( documentLinks . size ( ) <= 0 ) { return ImmutableList . of ( ) ; } return ImmutableList . copyOf ( documentLinks ) ; }
executes a xenon query which will query for documents of type t . any other filter clauses are optional . this allows for a query that returns all documents of type t . this returns the links to the resulting documents .
