com.ibm.db.base
Class DatabaseStatement

java.lang.Object
  |
  +--com.ibm.db.base.DatabaseStatement
Direct Known Subclasses:
DatabaseResultTableParent

public abstract class DatabaseStatement
extends java.lang.Object


Field Summary
protected  DatabaseConnection conn
           
private static java.lang.String copyright
           
protected  boolean isOpen
           
protected  DatabaseQuerySpec qSpec
           
 
Constructor Summary
DatabaseStatement()
          This method was created in VisualAge.
DatabaseStatement(DatabaseConnection aConnection, DatabaseQuerySpec aQuerySpec)
          This constructor sets the connection,name,and query spec It then prepares and executes the statement which produces a JDBC result set
 
Method Summary
abstract  void cancel()
          This method sends cancel() to the JDBC statement instance.
abstract  void clearWarnings()
          This method was created in VisualAge.
abstract  void closeStatement()
          This method sends close() to the JDBC statement instance.
abstract  void execute()
          This method executes the sql statement, and retrieves a JDBC result set (if any)
abstract  void execute(DatabaseRow aRow)
          This method executes the sql statement, and retrieves a JDBC result set (if any)
protected  DatabaseConnection getConnection()
          This method returns the connection
protected  DatabaseQuerySpec getQuerySpec()
          This method returns the query spec
abstract  java.sql.SQLWarning getWarnings()
          This method was created in VisualAge.
static boolean isCallStatement(java.lang.String sql)
           
 boolean isOpen()
          This method checks if the table is still open
static boolean isSelectStatement(java.lang.String sql)
           
protected  void setConnection(DatabaseConnection aConnection)
          This method was created by a SmartGuide.
protected  void setIsOpen(boolean aValue)
          This method was created by a SmartGuide.
protected  void setQuerySpec(DatabaseQuerySpec aQuerySpec)
          This method was created by a SmartGuide.
abstract  void setTimeout(int seconds)
          This method sets the query timeout of the JDBC statement
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

isOpen

protected boolean isOpen

qSpec

protected DatabaseQuerySpec qSpec

conn

protected DatabaseConnection conn

copyright

private static final java.lang.String copyright
Constructor Detail

DatabaseStatement

public DatabaseStatement()
This method was created in VisualAge.

DatabaseStatement

public DatabaseStatement(DatabaseConnection aConnection,
                         DatabaseQuerySpec aQuerySpec)
This constructor sets the connection,name,and query spec It then prepares and executes the statement which produces a JDBC result set
Method Detail

cancel

public abstract void cancel()
                     throws java.sql.SQLException
This method sends cancel() to the JDBC statement instance.

clearWarnings

public abstract void clearWarnings()
                            throws java.sql.SQLException
This method was created in VisualAge.
Throws:
DataException - The exception description.

closeStatement

public abstract void closeStatement()
                             throws java.sql.SQLException
This method sends close() to the JDBC statement instance.

execute

public abstract void execute()
                      throws java.sql.SQLException,
                             DataException
This method executes the sql statement, and retrieves a JDBC result set (if any)

execute

public abstract void execute(DatabaseRow aRow)
                      throws java.sql.SQLException,
                             DataException
This method executes the sql statement, and retrieves a JDBC result set (if any)

getConnection

protected DatabaseConnection getConnection()
This method returns the connection

getQuerySpec

protected DatabaseQuerySpec getQuerySpec()
This method returns the query spec

getWarnings

public abstract java.sql.SQLWarning getWarnings()
                                         throws java.sql.SQLException
This method was created in VisualAge.
Returns:
java.sql.SQLWarning

isCallStatement

public static boolean isCallStatement(java.lang.String sql)
                               throws DataException

isOpen

public boolean isOpen()
This method checks if the table is still open

isSelectStatement

public static boolean isSelectStatement(java.lang.String sql)
                                 throws DataException

setConnection

protected void setConnection(DatabaseConnection aConnection)
This method was created by a SmartGuide.
Parameters:
aParameter - int

setIsOpen

protected void setIsOpen(boolean aValue)
This method was created by a SmartGuide.

setQuerySpec

protected void setQuerySpec(DatabaseQuerySpec aQuerySpec)
This method was created by a SmartGuide.
Parameters:
aQuerySpec - DatabaseQuerySpec

setTimeout

public abstract void setTimeout(int seconds)
                         throws java.sql.SQLException
This method sets the query timeout of the JDBC statement