Package org.intermine.sql.precompute
Class EncloseSubqueryBestQuery
- java.lang.Object
-
- org.intermine.sql.precompute.BestQuery
-
- org.intermine.sql.precompute.EncloseSubqueryBestQuery
-
public class EncloseSubqueryBestQuery extends BestQuery
This object is a BestQuery tracker that encloses all added queries into a surrounding query as a subquery, and passes them onto another BestQuery tracker.- Author:
- Matthew Wakeling
-
-
Constructor Summary
Constructors Constructor Description EncloseSubqueryBestQuery(BestQuery bestQuery, java.lang.String beginning, java.lang.String end)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(java.lang.String q)
Allows a Query to be added to this tracker.void
add(Query q)
Allows a Query to be added to this tracker.Query
getBestQuery()
Gets the best Query found so farjava.lang.String
getBestQueryString()
Gets the best query String found so far
-
-
-
Constructor Detail
-
EncloseSubqueryBestQuery
public EncloseSubqueryBestQuery(BestQuery bestQuery, java.lang.String beginning, java.lang.String end)
Constructor.- Parameters:
bestQuery
- another BestQuery object to delegate tobeginning
- the String to add to the beginning of all queriesend
- the String to add to the end of all queries
-
-
Method Detail
-
add
public void add(Query q) throws BestQueryException, java.sql.SQLException
Allows a Query to be added to this tracker.- Specified by:
add
in classBestQuery
- 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 void add(java.lang.String q) throws BestQueryException, java.sql.SQLException
Allows a Query to be added to this tracker.- Specified by:
add
in classBestQuery
- 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 Query getBestQuery() throws java.sql.SQLException
Gets the best Query found so far- Specified by:
getBestQuery
in classBestQuery
- 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 java.lang.String getBestQueryString() throws java.sql.SQLException
Gets the best query String found so far- Specified by:
getBestQueryString
in classBestQuery
- Returns:
- the best Query, or null if no Queries added to this object
- Throws:
java.sql.SQLException
- if error occurs in the underlying database
-
-