org.intermine.sql.precompute
Class BestQueryFallback

java.lang.Object
  extended by org.intermine.sql.precompute.BestQuery
      extended by org.intermine.sql.precompute.BestQueryFallback

public class BestQueryFallback
extends BestQuery

Gets the database to explain each Query added and keeps hold of the best one so far.


Field Summary
protected  Query query
           
protected  java.lang.String queryString
           
 
Constructor Summary
BestQueryFallback(Query query, java.lang.String queryString)
          Constructs a BestQueryFallback
 
Method Summary
 void add(Query q)
          Allows a Query to be added to this tracker.
 void add(java.lang.String q)
          Allows a Query to be added to this tracker.
 ExplainResult getBestExplainResult()
          Gets the ExpainResult for the best Query found so far
 Query getBestQuery()
          Gets the best Query found so far
 java.lang.String getBestQueryString()
          Gets the best query String found so far
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

query

protected Query query

queryString

protected java.lang.String queryString
Constructor Detail

BestQueryFallback

public BestQueryFallback(Query query,
                         java.lang.String queryString)
Constructs a BestQueryFallback

Parameters:
query - a Query - may be null
queryString - a String - may be null
Method Detail

add

public void add(Query q)
         throws BestQueryException
Allows a Query to be added to this tracker.

Specified by:
add in class BestQuery
Parameters:
q - a Query to be added to the tracker
Throws:
BestQueryException - always - this BestQuery does not support updates

add

public void add(java.lang.String q)
         throws BestQueryException
Allows a Query to be added to this tracker.

Specified by:
add in class BestQuery
Parameters:
q - a query String to be added to the tracker
Throws:
BestQueryException - always - this BestQuery does not support updates

getBestQuery

public Query getBestQuery()
Gets the best Query found so far

Specified by:
getBestQuery in class BestQuery
Returns:
the best Query, or null if no Queries added to this object

getBestQueryString

public java.lang.String getBestQueryString()
Gets the best query String found so far

Specified by:
getBestQueryString in class BestQuery
Returns:
the best Query, or null if no Queries added to this object

getBestExplainResult

public ExplainResult getBestExplainResult()
Gets the ExpainResult for the best Query found so far

Returns:
null