EspressReport 6.6

quadbase.util
Class QueryResultSet

java.lang.Object
  extended by quadbase.util.QueryResultSet
All Implemented Interfaces:
IResultSet, IRow, IRSMetaData

public class QueryResultSet
extends java.lang.Object
implements IResultSet, IRSMetaData

A wrapper around java.sql.ResultSet/ResultSetMetaData to implement IResultSet and IRSMetaData interfaces. This class was implemented later to create a uniform IResultSet interface for data obtained from all sources.


Constructor Summary
QueryResultSet(java.sql.ResultSet rs)
          Creates a QueryResultSet object using the specified ResultSet
QueryResultSet(java.sql.Statement stmt)
          Creates a QueryResultSet object using the specified Statement
QueryResultSet(java.sql.Statement stmt, java.lang.String productName)
          Creates a QueryResultSet object using the specified Statement and product name
 
Method Summary
 void close()
          Closes the cursor
 int getColumnCount()
          Gets the number of columns in the result set.
 int getColumnDisplaySize(int col)
           
 java.lang.String getColumnName(int col)
          Gets the name of a column in the result set.
 int getColumnType(int col)
          Gets the data type of a column in the result set.
 IRSMetaData getMetaData()
          Gets the meta data object
 java.lang.Object getObject(int colNo)
          Returns the data value stored in the specified column of this row.
 java.lang.String getTableName(int col)
           
 boolean next()
          Advances cursor to next row
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryResultSet

public QueryResultSet(java.sql.ResultSet rs)
               throws java.sql.SQLException
Creates a QueryResultSet object using the specified ResultSet

Throws:
java.sql.SQLException

QueryResultSet

public QueryResultSet(java.sql.Statement stmt)
               throws java.sql.SQLException
Creates a QueryResultSet object using the specified Statement

Parameters:
stmt - must be an executed statement
Throws:
java.sql.SQLException

QueryResultSet

public QueryResultSet(java.sql.Statement stmt,
                      java.lang.String productName)
               throws java.sql.SQLException
Creates a QueryResultSet object using the specified Statement and product name

Parameters:
stmt - must be an executed statement
productName - product name
Throws:
java.sql.SQLException
Method Detail

next

public boolean next()
             throws java.sql.SQLException
Description copied from interface: IResultSet
Advances cursor to next row

Specified by:
next in interface IResultSet
Throws:
java.sql.SQLException

close

public void close()
           throws java.sql.SQLException
Description copied from interface: IResultSet
Closes the cursor

Specified by:
close in interface IResultSet
Throws:
java.sql.SQLException

getObject

public java.lang.Object getObject(int colNo)
                           throws java.sql.SQLException
Description copied from interface: IRow
Returns the data value stored in the specified column of this row.

Specified by:
getObject in interface IRow
Parameters:
colNo - The column number for the field, beginning with 1.
Returns:
The data value stored in that column field.
Throws:
java.sql.SQLException

getMetaData

public IRSMetaData getMetaData()
                        throws java.sql.SQLException
Description copied from interface: IResultSet
Gets the meta data object

Specified by:
getMetaData in interface IResultSet
Throws:
java.sql.SQLException

getColumnCount

public int getColumnCount()
                   throws java.sql.SQLException
Description copied from interface: IRSMetaData
Gets the number of columns in the result set.

Specified by:
getColumnCount in interface IRSMetaData
Throws:
java.sql.SQLException

getColumnName

public java.lang.String getColumnName(int col)
                               throws java.sql.SQLException
Description copied from interface: IRSMetaData
Gets the name of a column in the result set.

Specified by:
getColumnName in interface IRSMetaData
Returns:
col the column name
Throws:
java.sql.SQLException

getTableName

public java.lang.String getTableName(int col)
                              throws java.sql.SQLException
Specified by:
getTableName in interface IRSMetaData
Throws:
java.sql.SQLException

getColumnType

public int getColumnType(int col)
                  throws java.sql.SQLException
Description copied from interface: IRSMetaData
Gets the data type of a column in the result set.

Specified by:
getColumnType in interface IRSMetaData
Parameters:
col - the column index (beginning at 1)
Returns:
the column SQL data type (as represented in java.sql.Types).
Throws:
java.sql.SQLException

getColumnDisplaySize

public int getColumnDisplaySize(int col)
                         throws java.sql.SQLException
Throws:
java.sql.SQLException

EspressReport 6.6