Tea Java Runtime API
Version 3.2.4

com.pdmfc.tea.modules.tdbc
Class SResultSet

java.lang.Object
  extended by com.pdmfc.tea.modules.tos.STosObj
      extended by com.pdmfc.tea.modules.tdbc.SResultSet
All Implemented Interfaces:
SObjFunction

public class SResultSet
extends STosObj

Implements a TOS class TResultSet. Instances of this TOS class act like a Java java.sql.ResultSet.


Constructor Summary
SResultSet(STosClass myClass)
           
 
Method Summary
 void addClosedListener(SClosedEventListener listener)
          Registers a new listener interested in being notigied when this result set is closed.
 void close()
           
 java.lang.Object close(SObjFunction obj, SContext context, java.lang.Object[] args)
           
 java.lang.Object constructor(SObjFunction obj, SContext context, java.lang.Object[] args)
           
 java.lang.Object getColumnCount(SObjFunction obj, SContext context, java.lang.Object[] args)
          Retrieves the number of columns in this result set.
 java.lang.Object getColumnName(SObjFunction obj, SContext context, java.lang.Object[] args)
           
 java.lang.Object getDate(SObjFunction obj, SContext context, java.lang.Object[] args)
          Implements the getDate method of the TOS TResultSet class.
 java.lang.Object getFloat(SObjFunction obj, SContext context, java.lang.Object[] args)
          Implements the getFloat method of the TOS TResultSet class.
 java.lang.Object getInt(SObjFunction obj, SContext context, java.lang.Object[] args)
          Implements the getInt method of the TOS TResultSet class.
 java.sql.ResultSet getInternalResultSet()
          Fetches the java.sql.ResultSet used to interact with the database.
 java.lang.Object getString(SObjFunction obj, SContext context, java.lang.Object[] args)
          Implements the getString method of the TOS TResultSet class.
static java.lang.String getTosClassName()
          Fetches the TOS class name implemented by this Java class.
 java.lang.Object hasMoreRows(SObjFunction obj, SContext context, java.lang.Object[] args)
          Implements the hasMoreRows method of the TOS TResultSet class.
 java.lang.Object hasRows(SObjFunction obj, SContext context, java.lang.Object[] args)
          Implements the hasRows method of the TOS TResultSet class.
static SResultSet newInstance(SContext context)
          Creates a new TOS instance of the TResultSet class.
 java.lang.Object next(SObjFunction obj, SContext context, java.lang.Object[] args)
          Implements the next method of the TOS TResultSet class.
 void setResultSet(java.sql.ResultSet rSet)
          Specifies the underlying java.sql.ResultSet object to use.
 java.lang.Object skip(SObjFunction obj, SContext context, java.lang.Object[] args)
          Implements the skip method of the TOS TResultSet class.
 
Methods inherited from class com.pdmfc.tea.modules.tos.STosObj
exec, getTosClass, init, part, selfObj
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SResultSet

public SResultSet(STosClass myClass)
           throws STeaException
Throws:
STeaException
Method Detail

setResultSet

public void setResultSet(java.sql.ResultSet rSet)
                  throws java.sql.SQLException
Specifies the underlying java.sql.ResultSet object to use. The given result set should no longer be used by whoever supplied it.

Parameters:
rSet -
Throws:
java.sql.SQLException - Thrown if there were any problems accessing the given result set.

getInternalResultSet

public java.sql.ResultSet getInternalResultSet()
Fetches the java.sql.ResultSet used to interact with the database.

Returns:
The java.sql.ResultSet being used.

getTosClassName

public static java.lang.String getTosClassName()
Fetches the TOS class name implemented by this Java class.

Returns:
The TOS class name implemented by this Java class.

newInstance

public static SResultSet newInstance(SContext context)
                              throws STeaException
Creates a new TOS instance of the TResultSet class.

Throws:
STeaException

addClosedListener

public void addClosedListener(SClosedEventListener listener)
Registers a new listener interested in being notigied when this result set is closed.

Parameters:
listener - The listener that will be notified when this result set is closed.

constructor

public java.lang.Object constructor(SObjFunction obj,
                                    SContext context,
                                    java.lang.Object[] args)
                             throws STeaException
Throws:
STeaException

hasRows

public java.lang.Object hasRows(SObjFunction obj,
                                SContext context,
                                java.lang.Object[] args)
                         throws SRuntimeException
Implements the hasRows method of the TOS TResultSet class. Checks if the result set as any rows. It always returns the same value.

Throws:
SRuntimeException

next

public java.lang.Object next(SObjFunction obj,
                             SContext context,
                             java.lang.Object[] args)
                      throws SRuntimeException
Implements the next method of the TOS TResultSet class. Skips to the next row of the result.

Returns:
Returns true if the next row was successfuly fecthed. Returns false if all the rows have already been fetched.
Throws:
SRuntimeException

hasMoreRows

public java.lang.Object hasMoreRows(SObjFunction obj,
                                    SContext context,
                                    java.lang.Object[] args)
                             throws SRuntimeException
Implements the hasMoreRows method of the TOS TResultSet class. Checks if there are more rows to be read. If it returns true a call to the next() method must be made in order to fecth the row.

Returns:
Returns true if there are more rows to be fecthed. Returns false otherwise.
Throws:
SRuntimeException

skip

public java.lang.Object skip(SObjFunction obj,
                             SContext context,
                             java.lang.Object[] args)
                      throws SRuntimeException
Implements the skip method of the TOS TResultSet class.

Throws:
SRuntimeException

getInt

public java.lang.Object getInt(SObjFunction obj,
                               SContext context,
                               java.lang.Object[] args)
                        throws SRuntimeException
Implements the getInt method of the TOS TResultSet class.

Throws:
SRuntimeException

getFloat

public java.lang.Object getFloat(SObjFunction obj,
                                 SContext context,
                                 java.lang.Object[] args)
                          throws SRuntimeException
Implements the getFloat method of the TOS TResultSet class.

Throws:
SRuntimeException

getString

public java.lang.Object getString(SObjFunction obj,
                                  SContext context,
                                  java.lang.Object[] args)
                           throws SRuntimeException
Implements the getString method of the TOS TResultSet class.

Throws:
SRuntimeException

getDate

public java.lang.Object getDate(SObjFunction obj,
                                SContext context,
                                java.lang.Object[] args)
                         throws STeaException
Implements the getDate method of the TOS TResultSet class.

Throws:
STeaException

close

public java.lang.Object close(SObjFunction obj,
                              SContext context,
                              java.lang.Object[] args)
                       throws STeaException
Throws:
STeaException

close

public void close()
           throws java.sql.SQLException
Throws:
java.sql.SQLException

getColumnCount

public java.lang.Object getColumnCount(SObjFunction obj,
                                       SContext context,
                                       java.lang.Object[] args)
                                throws STeaException
Retrieves the number of columns in this result set.

Returns:
The number of columns in this result set.
Throws:
STeaException - Thrown if the result set has been closed or if there were any problem comunicating with the database.

getColumnName

public java.lang.Object getColumnName(SObjFunction obj,
                                      SContext context,
                                      java.lang.Object[] args)
                               throws SRuntimeException
Throws:
SRuntimeException

Tea Java Runtime API
Version 3.2.4

© 2009 PDM&FC, All Rights Reserved.