EspressReport 6.6

quadbase.reportdesigner.util
Class QueryResultSet

java.lang.Object
  extended by quadbase.reportdesigner.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)
          Create a new QueryResultSet using the specified java.sql.ResultSet object
QueryResultSet(java.sql.Statement stmt)
          Create a new QueryResultSet using the specified java.sql.Statement object
QueryResultSet(java.sql.Statement stmt, java.lang.String productName)
          Create a QueryResultSet object using the specified Statement and product name
 
Method Summary
 void close()
          For internal use
 int getColumnCount()
          Get total number of columns
 int getColumnDisplaySize(int col)
           
 java.lang.String getColumnName(int col)
          Get name of specified column
 int getColumnType(int col)
          Get type of specified column
 IRSMetaData getMetaData()
          Get original data
 java.lang.Object getObject(int colNo)
          Get object of specified column number
 java.lang.String getTableName(int col)
           
 boolean next()
          For internal use
 
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
Create a new QueryResultSet using the specified java.sql.ResultSet object

Throws:
java.sql.SQLException

QueryResultSet

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

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
Create 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
For internal use

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

close

public void close()
           throws java.sql.SQLException
For internal use

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

getObject

public java.lang.Object getObject(int colNo)
                           throws java.sql.SQLException
Get object of specified column number

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
Get original data

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

getColumnCount

public int getColumnCount()
                   throws java.sql.SQLException
Get total number of columns

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

getColumnName

public java.lang.String getColumnName(int col)
                               throws java.sql.SQLException
Get name of specified column

Specified by:
getColumnName in interface IRSMetaData
Returns:
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
Get type of specified column

Specified by:
getColumnType in interface IRSMetaData
Returns:
the column SQL data type (as represented in java.sql.Types).
Throws:
java.sql.SQLException
See Also:
Types

getColumnDisplaySize

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

EspressReport 6.6