net.spy.db
Interface QuerySelector

All Known Implementing Classes:
DefaultQuerySelector

public interface QuerySelector

Select the most appropriate query for the given DBSQL instance.


Field Summary
static String DEFAULT_QUERY
          Name of the default query in the map.
 
Method Summary
 String getQuery(Connection conn, Map queryMap)
          Get the query for the given connection.
 String getQuery(SpyConfig conf, Map queryMap)
          Get the query for the given config.
 

Field Detail

DEFAULT_QUERY

public static final String DEFAULT_QUERY
Name of the default query in the map.

See Also:
Constant Field Values
Method Detail

getQuery

public String getQuery(Connection conn,
                       Map queryMap)
Get the query for the given connection.

Parameters:
conn - the connection that wants the query
queryMap - the Map of queries by name
Returns:
the query (as a String), null if a suitable query can't be found

getQuery

public String getQuery(SpyConfig conf,
                       Map queryMap)
Get the query for the given config.

Parameters:
conf - a SpyConfig containing enough information to find a query
queryMap - the Map of queries by name
Returns:
the query (as a String), null if a suitable query can't be found