org.intermine.sql.precompute
Class BestQueryExplainerVerbose

java.lang.Object
  extended by org.intermine.sql.precompute.BestQuery
      extended by org.intermine.sql.precompute.BestQueryExplainer
          extended by org.intermine.sql.precompute.BestQueryExplainerVerbose

public class BestQueryExplainerVerbose
extends BestQueryExplainer

Gets the database to explain each Query added and keeps hold of the best one, logging all actions for the benefit of the IqlShell user.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.intermine.sql.precompute.BestQueryExplainer
BestQueryExplainer.Candidate
 
Field Summary
 
Fields inherited from class org.intermine.sql.precompute.BestQueryExplainer
ALWAYS_EXPLAIN_TABLES, bestCandidate, candidates, candidateTables, con, NEVER_EXPLAIN_TABLES, start, timeLimit
 
Constructor Summary
BestQueryExplainerVerbose(java.sql.Connection con, long timeLimit)
          Constructs an empty BestQueryExplainerVerbose.
 
Method Summary
protected  void didNotExplain(BestQueryExplainer.Candidate c)
          Internal method that records that a query was not explained.
protected  ExplainResult getExplainResult(Query q)
          Internal method that creates an ExplainResult.
protected  ExplainResult getExplainResult(java.lang.String q)
          Internal method that creates an ExplainResult.
 void throwBestQueryException(java.lang.String message)
          Throws an exception.
 
Methods inherited from class org.intermine.sql.precompute.BestQueryExplainer
add, add, add, getBest, getBestExplainResult, getBestQuery, getBestQueryString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BestQueryExplainerVerbose

public BestQueryExplainerVerbose(java.sql.Connection con,
                                 long timeLimit)
Constructs an empty BestQueryExplainerVerbose.

Parameters:
con - the Connection to use
timeLimit - the time limit
Method Detail

getExplainResult

protected ExplainResult getExplainResult(Query q)
                                  throws java.sql.SQLException
Internal method that creates an ExplainResult. It can be overridden by subclasses.

Overrides:
getExplainResult in class BestQueryExplainer
Parameters:
q - the Query
Returns:
an ExplainResult
Throws:
java.sql.SQLException - if an error occurs in the underlying database

getExplainResult

protected ExplainResult getExplainResult(java.lang.String q)
                                  throws java.sql.SQLException
Internal method that creates an ExplainResult. It can be overridden by subclasses.

Overrides:
getExplainResult in class BestQueryExplainer
Parameters:
q - the query String
Returns:
an ExplainResult
Throws:
java.sql.SQLException - if an error occurs in the underlying database

didNotExplain

protected void didNotExplain(BestQueryExplainer.Candidate c)
Internal method that records that a query was not explained. It can be overridden by subclasses.

Overrides:
didNotExplain in class BestQueryExplainer
Parameters:
c - the Candidate

throwBestQueryException

public void throwBestQueryException(java.lang.String message)
                             throws BestQueryException
Throws an exception. This gives the subclasses a chance to intercept it.

Overrides:
throwBestQueryException in class BestQueryExplainer
Parameters:
message - a message
Throws:
BestQueryException - with the message