public Collection<Token> query(final TokenFilter tokenFilter) throws CoreTokenException {
  debug("Query: queued with Filter: {0}",tokenFilter);
  ResultHandler<Collection<Token>,CoreTokenException> handler=handlerFactory.getQueryHandler();
  dispatcher.query(tokenFilter,handler);
  try {
    Collection<Token> tokens=handler.getResults();
    for (    Token token : tokens) {
      reverseBlobStrategy(token);
    }
    debug("Query: returned {0} Tokens with Filter: {1}",tokens.size(),tokenFilter);
    return tokens;
  }
 catch (  CoreTokenException e) {
    throw new QueryFailedException(tokenFilter,e);
  }
}

public Collection < Token > query ( final TokenFilter tokenFilter ) throws CoreTokenException { debug ( "Query: queued with Filter: {0}" , tokenFilter ) ; ResultHandler < Collection < Token > , CoreTokenException > handler = handlerFactory . getQueryHandler ( ) ; dispatcher . query ( tokenFilter , handler ) ; try { Collection < Token > tokens = handler . getResults ( ) ; for ( Token token : tokens ) { reverseBlobStrategy ( token ) ; } debug ( "Query: returned {0} Tokens with Filter: {1}" , tokens . size ( ) , tokenFilter ) ; return tokens ; } catch ( CoreTokenException e ) { throw new QueryFailedException ( tokenFilter , e ) ; } }
queries the persistence layer using the given tokenfilter to constrain the values .
