org.intermine.sql.precompute
Class BestQuery

java.lang.Object
  extended by org.intermine.sql.precompute.BestQuery
Direct Known Subclasses:
BestQueryExplainer, BestQueryFallback, BestQueryLogger, BestQueryStorer, EncloseSubqueryBestQuery

public abstract class BestQuery
extends java.lang.Object

This object is an abstract superclass for a Best Query tracker. Queries can be added to these objects, and they will keep track of them.


Constructor Summary
BestQuery()
           
 
Method Summary
abstract  void add(Query q)
          Allows a Query to be added to this tracker.
abstract  void add(java.lang.String q)
          Allows a Query to be added to this tracker.
abstract  Query getBestQuery()
          Gets the best Query found so far
abstract  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
 

Constructor Detail

BestQuery

public BestQuery()
Method Detail

add

public abstract void add(Query q)
                  throws BestQueryException,
                         java.sql.SQLException
Allows a Query to be added to this tracker.

Parameters:
q - a Query to be added to the tracker
Throws:
BestQueryException - when adding should stop
java.sql.SQLException - if error occurs in the underlying database

add

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

Parameters:
q - a query String to be added to the tracker
Throws:
BestQueryException - when adding should stop
java.sql.SQLException - if error occurs in the underlying database

getBestQuery

public abstract Query getBestQuery()
                            throws java.sql.SQLException
Gets the best Query found so far

Returns:
the best Query, or null if no Queries added to this object
Throws:
java.sql.SQLException - if error occurs in the underlying database

getBestQueryString

public abstract java.lang.String getBestQueryString()
                                             throws java.sql.SQLException
Gets the best query String found so far

Returns:
the best Query, or null if no Queries added to this object
Throws:
java.sql.SQLException - if error occurs in the underlying database