java.sql
Interface BaseQuery


public interface BaseQuery

The interface that needs to be extended by all Query interfaces in order to free up the resources that this Query object uses. After the close() method is called, the Query object is no longer usable. The isClosed() method is used to determine whether the Query object is still valid or has been closed.

Since:
1.6

Method Summary
 void clearWarnings()
          Clears all warnings reported on this Query object.
 void close()
          Closes this Query Object and makes it no longer usable.
 SQLWarning getWarnings()
          Retrieves the first warning reported by invoking methods on this Query object.
 boolean isClosed()
          This method returns the status of this object, the return value determining whether the object can be used or not.
 

Method Detail

close

void close()
Closes this Query Object and makes it no longer usable. All the resources held by this object are released

Throws:
SQLRuntimeException - if an access error occurs
Since:
1.6

isClosed

boolean isClosed()
This method returns the status of this object, the return value determining whether the object can be used or not.

Returns:
true if the Query Object is closed, false otherwise.
Since:
1.6

getWarnings

SQLWarning getWarnings()
Retrieves the first warning reported by invoking methods on this Query object. Subsequent Query object warnings will be chained to this SQLWarning object.

The warning chain is automatically cleared each time a method is (re)executed. This method may not be called on a closed Query object; doing so will cause an SQLRuntimeException to be thrown.

Returns:
the first SQLWarning object or null if there are no warnings
Throws:
SQLRuntimeException - if a database access error occurs or this method is called on a closed Query Object
Since:
1.6

clearWarnings

void clearWarnings()
Clears all warnings reported on this Query object. After this method is called, the method getWarnings returns null until a new warning is reported for this Query object.

Throws:
SQLRuntimeException - if a database access error occurs
Since:
1.6