net.sf.eodsql
Interface BaseQuery

All Known Subinterfaces:
TransactionQuery

public interface BaseQuery

The BaseQuery is the super-interface for any interface wishing to do database queries. This validation is made by the QueryTool class when the implementation of a query is requested. Each BaseQuery implementation will hold a Connection to the database which is closed through the BaseQuery's close method.

Methods within a query implementation (subclass of BaseQuery) may declare throws SQLException, in which case database errors resulting from calls to that method will be thrown as normal checked exceptions. If the method does not declare the exception, it will be wrapped in a RuntimeException and thrown as an unchecked exception.

Author:
jason
See Also:
QueryTool

Method Summary
 void close()
          Closes this BaseQuery, and releases any database resources it is currently holding.
 boolean isClosed()
          Determines whether this BaseQuery implementation has been closed.
 

Method Detail

close

void close()
Closes this BaseQuery, and releases any database resources it is currently holding. This method may throw an SQLException if the Connection.


isClosed

boolean isClosed()
Determines whether this BaseQuery implementation has been closed. This method directly uses the underlying Connection's isClosed method, with one change: if the call would result in an SQLException, this method swallows the exception and returns false.

Returns:
true if this BaseQuery is still using database resources, otherwise false