Package org.intermine.sql.precompute
Class BestQuery
- java.lang.Object
-
- 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.- Author:
- Matthew Wakeling, Andrew Varley
-
-
Constructor Summary
Constructors Constructor Description BestQuery()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract void
add(java.lang.String q)
Allows a Query to be added to this tracker.abstract void
add(Query q)
Allows a Query to be added to this tracker.abstract Query
getBestQuery()
Gets the best Query found so farabstract java.lang.String
getBestQueryString()
Gets the best query String found so far
-
-
-
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 stopjava.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 stopjava.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
-
-