com.ibm.db.base
Class DatabaseResultTable

java.lang.Object
  |
  +--com.ibm.db.base.DatabaseStatement
        |
        +--com.ibm.db.base.DatabaseResultTableParent
              |
              +--com.ibm.db.base.DatabaseResultTable

public class DatabaseResultTable
extends DatabaseResultTableParent


Field Summary
protected  boolean afterLastResult
           
private  java.sql.PreparedStatement aStmt
           
private static java.lang.String copyright
           
protected  java.util.Enumeration qSpecEnum
           
protected  java.util.Vector qSpecVector
           
protected  int resultCount
           
protected  int updateCount
           
 
Fields inherited from class com.ibm.db.base.DatabaseResultTableParent
copyright, dbSearchTypeInfo, resultSet, resultSetType, rowStruct
 
Fields inherited from class com.ibm.db.base.DatabaseStatement
conn, copyright, isOpen, qSpec
 
Constructor Summary
DatabaseResultTable(DatabaseConnection aConnection, DatabaseQuerySpec aQuerySpec, int type)
          This constructor sets the connection,name,and query spec It then prepares and executes the statement which produces a JDBC result set
 
Method Summary
 void addQuerySpec(DatabaseQuerySpec aQuerySpec)
          This method was created by a SmartGuide.
 void cancel()
          This method sends cancel() to the JDBC statement instance.
 void closeStatement()
          This method sends close() to the JDBC statement instance.
 void execute()
          This method executes the sql statement, and retrieves a JDBC result set (if any)
 void execute(DatabaseRow aRow)
          This method executes the sql statement, and retrieves a JDBC result set (if any)
 void executeUpdate()
          This method executes the sql statement, and retrieves a JDBC result set (if any)
 void executeUpdate(DatabaseRow aRow)
          This method executes the sql statement, and retrieves a JDBC result set (if any)
private  void fetchResultSet()
          This method was created in VisualAge.
 boolean getAfterLastResult()
          This method was created in VisualAge.
 java.lang.String getCursorName()
          This method returns the cursor name associated with the java.sql.ResultSet
 java.lang.Object getParameter(int parameterNumber, DatabaseTypeField type)
          Returns the value of the parameter at the specified index.
private  java.sql.PreparedStatement getStatement()
          This method returns the JDBC Prepared Statement
 int getUpdateCount()
          This method was created in VisualAge.
 java.sql.SQLWarning getWarnings()
          This method was created in VisualAge.
protected  boolean hasResultSet()
          This method checks if the JDBC result set has been set
 void nextResult()
           
private  void prepare(int type)
          This method prepares the sql statement
 void refresh()
           
 void refresh(DatabaseRow parms)
           
private  void registerOutputParameters()
           
private  void setInputValues(DatabaseRow aRow)
          Sets the host var values passed in aRow.
protected  void setQuerySpec(DatabaseQuerySpec aQuerySpec)
          This method was created by a SmartGuide.
private  void setStatement(java.sql.PreparedStatement aStatement)
          This method was created by a SmartGuide.
 void setTimeout(int seconds)
          This method sets the query timeout of the JDBC statement
 
Methods inherited from class com.ibm.db.base.DatabaseResultTableParent
absoluteRow, checkSearchLevel, clearWarnings, close, describe, describeCol, fillInColumnShape, getMetaData, getResultSet, getRow, getRowNumber, getRowStruct, getType, lastRow, newEmptyRow, nextRow, previousRow, relativeRow, setResultSet, setRowStruct
 
Methods inherited from class com.ibm.db.base.DatabaseStatement
getConnection, getQuerySpec, isCallStatement, isOpen, isSelectStatement, setConnection, setIsOpen
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

aStmt

private java.sql.PreparedStatement aStmt

copyright

private static final java.lang.String copyright

qSpecVector

protected java.util.Vector qSpecVector

qSpecEnum

protected java.util.Enumeration qSpecEnum

resultCount

protected int resultCount

updateCount

protected int updateCount

afterLastResult

protected boolean afterLastResult
Constructor Detail

DatabaseResultTable

public DatabaseResultTable(DatabaseConnection aConnection,
                           DatabaseQuerySpec aQuerySpec,
                           int type)
                    throws java.sql.SQLException,
                           DataException
This constructor sets the connection,name,and query spec It then prepares and executes the statement which produces a JDBC result set
Method Detail

addQuerySpec

public void addQuerySpec(DatabaseQuerySpec aQuerySpec)
This method was created by a SmartGuide.
Overrides:
addQuerySpec in class DatabaseResultTableParent
Parameters:
aQuerySpec - DatabaseQuerySpec

cancel

public void cancel()
            throws java.sql.SQLException
This method sends cancel() to the JDBC statement instance.
Overrides:
cancel in class DatabaseResultTableParent

closeStatement

public void closeStatement()
                    throws java.sql.SQLException
This method sends close() to the JDBC statement instance.
Overrides:
closeStatement in class DatabaseResultTableParent

execute

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

execute

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

executeUpdate

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

executeUpdate

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

fetchResultSet

private void fetchResultSet()
                     throws java.sql.SQLException,
                            DataException
This method was created in VisualAge.

getAfterLastResult

public boolean getAfterLastResult()
This method was created in VisualAge.
Returns:
boolean

getCursorName

public java.lang.String getCursorName()
                               throws java.sql.SQLException
This method returns the cursor name associated with the java.sql.ResultSet
Overrides:
getCursorName in class DatabaseResultTableParent

getParameter

public java.lang.Object getParameter(int parameterNumber,
                                     DatabaseTypeField type)
                              throws java.sql.SQLException
Returns the value of the parameter at the specified index. The index of the first parameter is 1.
Parameters:
parameterNumber - index of the parameter
type - DatabaseTypeField associated with the parameter
Returns:
the parameter value

getStatement

private java.sql.PreparedStatement getStatement()
This method returns the JDBC Prepared Statement

getUpdateCount

public int getUpdateCount()
This method was created in VisualAge.
Returns:
int

getWarnings

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

hasResultSet

protected boolean hasResultSet()
This method checks if the JDBC result set has been set

nextResult

public void nextResult()
                throws java.sql.SQLException,
                       DataException

prepare

private void prepare(int type)
              throws java.sql.SQLException,
                     DataException
This method prepares the sql statement

refresh

public void refresh()
             throws java.sql.SQLException,
                    DataException
Overrides:
refresh in class DatabaseResultTableParent

refresh

public void refresh(DatabaseRow parms)
             throws java.sql.SQLException,
                    DataException
Overrides:
refresh in class DatabaseResultTableParent

registerOutputParameters

private void registerOutputParameters()
                               throws java.sql.SQLException

setInputValues

private void setInputValues(DatabaseRow aRow)
                     throws java.sql.SQLException
Sets the host var values passed in aRow.

setQuerySpec

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

setStatement

private void setStatement(java.sql.PreparedStatement aStatement)
This method was created by a SmartGuide.
Parameters:
aStatement - PreparedStatement

setTimeout

public void setTimeout(int seconds)
                throws java.sql.SQLException
This method sets the query timeout of the JDBC statement
Overrides:
setTimeout in class DatabaseResultTableParent