iiitToolkit 1.0

de.iiit.jdbc
Class JdbcResultSet

java.lang.Object
  |
  +--de.iiit.jdbc.JdbcResultSet

public class JdbcResultSet
extends Object

Encapsulates a java.sql.ResultSet

Version:
$Revision: 1.6 $ $Date: 2003/01/01 21:03:49 $

Constructor Summary
protected JdbcResultSet(JdbcConnection connection, ResultSet resultSet)
          Creates a new instance of JdbcResultSet
 
Method Summary
 void close()
          Releases this JdbcResultSet object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.
protected  void finalize()
          Release the JdbcConnection hold by this object explicitly.
 boolean first()
          Moves the cursor to the first row in this ResultSet object.
 int getInt(int columnIndex)
          Retrieves the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.
 long getLong(int columnIndex)
          Retrieves the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.
 String getString(int columnIndex)
          Retrieves the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.
 boolean next()
          Moves the cursor down one row from its current position.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcResultSet

protected JdbcResultSet(JdbcConnection connection,
                        ResultSet resultSet)
Creates a new instance of JdbcResultSet

Parameters:
connection - the connection that was used to create the meta data object.
resultSet - The encapsulated java.sql.ResultSet
Method Detail

close

public void close()
           throws JdbcException
Releases this JdbcResultSet object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.

Throws:
JdbcException - if a database access error occurs

next

public boolean next()
             throws JdbcException
Moves the cursor down one row from its current position.

Returns:
true if the new current row is valid; false if there are no more rows
Throws:
JdbcException - if a database access error occurs

first

public boolean first()
              throws JdbcException
Moves the cursor to the first row in this ResultSet object.

Returns:
true if the cursor is on a valid row; false if there are no rows in the result set
Throws:
JdbcException - if a database access error occurs or the result set type is TYPE_FORWARD_ONLY

getInt

public int getInt(int columnIndex)
           throws JdbcException
Retrieves the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.

Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
JdbcException - if a database access error occurs

getLong

public long getLong(int columnIndex)
             throws JdbcException
Retrieves the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.

Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is 0
Throws:
JdbcException - if a database access error occurs

getString

public String getString(int columnIndex)
                 throws JdbcException
Retrieves the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.

Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
JdbcException - if a database access error occurs

finalize

protected void finalize()
                 throws Throwable
Release the JdbcConnection hold by this object explicitly.

Overrides:
finalize in class Object
Throws:
Throwable - Any throwable thrown during the excution.

iiitToolkit 1.0

Copyright © 2002, 2003 ingeneurbuero fuer innovative informationstechnik, Dipl.-Ing. Joerg Beckmann, Dortmund, Germany. All Rights Reserved.
See Copyright statement