Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jbreport.data
Class ResultSetAdapter  view ResultSetAdapter download ResultSetAdapter.java

java.lang.Object
  extended byjbreport.data.AbstractQueryResult
      extended byjbreport.data.ResultSetAdapter
All Implemented Interfaces:
QueryResult

class ResultSetAdapter
extends AbstractQueryResult
implements QueryResult

This is an adapter for a ResultSet to make it compatible for the QueryResult interface.

Version:
$Revision: 1.1.1.1 $

Field Summary
private  java.sql.ResultSet rs
          The resultset from which data will be extracted
 
Fields inherited from class jbreport.data.AbstractQueryResult
 
Constructor Summary
ResultSetAdapter(java.sql.ResultSet rs)
           
 
Method Summary
 void close()
          Close this set of results so that any resources used can be made available for garbage collection.
 int getColumnCount()
           
 java.lang.String getString(int columnIndex)
           
 int indexForName(java.lang.String columnName)
          Returns the index of a column for a given name
 java.lang.String nameForIndex(int columnIndex)
          Returns the name of a column for a given index
 boolean next()
          Move to the next row in the set of results.
 boolean wasNull()
           
 
Methods inherited from class jbreport.data.AbstractQueryResult
assertNotNull, doBreakChecks, getBigDecimal, getBigDecimal, getBoolean, getBoolean, getDate, getDate, getDouble, getDouble, getInt, getInt, getLong, getLong, getString, registerBreakListener, unregisterAllBut
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jbreport.data.QueryResult
getBigDecimal, getBigDecimal, getBoolean, getBoolean, getDate, getDate, getDouble, getDouble, getInt, getInt, getLong, getLong, getString, registerBreakListener, unregisterAllBut
 

Field Detail

rs

private java.sql.ResultSet rs
The resultset from which data will be extracted

Constructor Detail

ResultSetAdapter

public ResultSetAdapter(java.sql.ResultSet rs)
Method Detail

next

public boolean next()
             throws jbreport.ReportException
Description copied from interface: QueryResult
Move to the next row in the set of results. When the instance is first created, the cursor is at the logical row before the first row.

Specified by:
next in interface QueryResult
Specified by:
next in class AbstractQueryResult

close

public void close()
           throws jbreport.ReportException
Description copied from interface: QueryResult
Close this set of results so that any resources used can be made available for garbage collection.

Specified by:
close in interface QueryResult
Specified by:
close in class AbstractQueryResult

indexForName

public int indexForName(java.lang.String columnName)
                 throws jbreport.ReportException
Description copied from interface: QueryResult
Returns the index of a column for a given name

Specified by:
indexForName in interface QueryResult
Specified by:
indexForName in class AbstractQueryResult

nameForIndex

public java.lang.String nameForIndex(int columnIndex)
                              throws jbreport.ReportException
Description copied from interface: QueryResult
Returns the name of a column for a given index

Specified by:
nameForIndex in interface QueryResult
Overrides:
nameForIndex in class AbstractQueryResult

getString

public java.lang.String getString(int columnIndex)
                           throws jbreport.ReportException
Specified by:
getString in interface QueryResult
Specified by:
getString in class AbstractQueryResult

wasNull

public boolean wasNull()
                throws jbreport.ReportException
Specified by:
wasNull in interface QueryResult
Specified by:
wasNull in class AbstractQueryResult

getColumnCount

public int getColumnCount()
                   throws jbreport.ReportException
Specified by:
getColumnCount in interface QueryResult
Specified by:
getColumnCount in class AbstractQueryResult