com.bluestream.xdb
Interface Statement

All Known Subinterfaces:
XPreparedStatement, XStatement

public interface Statement

Statement is the generic abstract interface for XStatement and XPreparedStatement.


Method Summary
 boolean cancel()
          Cancel the execution of this currently executing statement.
 void close()
          Close this statement and release all the resources used by it.
 Vector getWarnings()
          Return 0 or more XDBWarning objects, if the query was successful, but there were warnings or other information regarding the query.
 void setStatementOption(String option, String value)
          Set a statement option valid options XStatement.OPT_STMT_TIMEOUT Sets a statement timeout (in seconds).
 

Method Detail

cancel

public boolean cancel()
               throws XDBException
Cancel the execution of this currently executing statement. If the statement is not currently executing then return false.
Note: You will need another thread to cancel this Statement. This is the only case where you are allowed to have another thread.

Returns:
cancelDone: true if the cancel was done, false if this statement is not currently in EXECUTING state.
Throws:
XDBException

close

public void close()
           throws XDBException
Close this statement and release all the resources used by it. This will also close() the associated XResultSet.

Throws:
XDBException

setStatementOption

public void setStatementOption(String option,
                               String value)
                        throws XDBException
Set a statement option valid options XStatement.OPT_STMT_TIMEOUT Sets a statement timeout (in seconds). If retrieving results takes longer than this, statement is cancelled with an exception thrown. XStatement.OPT_MAX_VALUES Sets the maximum number of results to be cached in a single call to getResults. Allows a client app to limit the results cached to match a client defined cursor size. (# of rows displayed on a page for example) NOTE: Must be called before execute()

Throws:
XDBException

getWarnings

public Vector getWarnings()
                   throws XDBException
Return 0 or more XDBWarning objects, if the query was successful, but there were warnings or other information regarding the query.

Returns:
vWarnings. A vector of 0 or more XDBWarning objects.
Throws:
XDBException


Copyright 2006 Bluestream Database Software Corp. All Rights Reserved.