Tea Java Runtime API
Version 3.1.0

com.pdmfc.tea.modules.tdbc
Class SPreparedStatement

java.lang.Object
  |
  +--com.pdmfc.tea.modules.tos.STosObj
        |
        +--com.pdmfc.tea.modules.tdbc.SStatement
              |
              +--com.pdmfc.tea.modules.tdbc.SPreparedStatement
All Implemented Interfaces:
com.pdmfc.tea.modules.tdbc.SClosedEventListener, SObjFunction
Direct Known Subclasses:
SCallableStatement

public class SPreparedStatement
extends SStatement

Implements an TOS object that acts like a java PreparedStatement. It needs to be derived from because SConnection stores references to all the open SStatement, SPreparedStatement, SCallableStatement with no distinction.


Fields inherited from class com.pdmfc.tea.modules.tdbc.SStatement
_resultSets
 
Constructor Summary
SPreparedStatement(STosClass myClass)
           
 
Method Summary
 java.lang.Object constructor(SObjFunction obj, SContext context, java.lang.Object[] args)
           
 java.lang.Object execute(SObjFunction obj, SContext context, java.lang.Object[] args)
          Executes a generic SQL statement.
static java.lang.String getTosClassName()
           
 java.lang.Object methodSetInt(SObjFunction obj, SContext context, java.lang.Object[] args)
           
static SStatement newInstance(SContext context)
           
 java.lang.Object query(SObjFunction obj, SContext context, java.lang.Object[] args)
          Executes a query on the database and retrieves the result.
 java.lang.Object setFloat(SObjFunction obj, SContext context, java.lang.Object[] args)
           
 void setInt(int index, int value)
           
 void setPreparedStatement(java.sql.PreparedStatement stat)
           
 java.lang.Object setString(SObjFunction obj, SContext context, java.lang.Object[] args)
           
 java.lang.Object update(SObjFunction obj, SContext context, java.lang.Object[] args)
          Executes a SQL statement that does NOT produce a result set.
 
Methods inherited from class com.pdmfc.tea.modules.tdbc.SStatement
addClosedListener, close, close, closedEvent, setStatement
 
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

SPreparedStatement

public SPreparedStatement(STosClass myClass)
                   throws STeaException
Parameters:
stat - The PreparedStatement that this TOS objects acts on behalf of.
Method Detail

setPreparedStatement

public void setPreparedStatement(java.sql.PreparedStatement stat)

getTosClassName

public static java.lang.String getTosClassName()

newInstance

public static SStatement newInstance(SContext context)
                              throws STeaException

constructor

public java.lang.Object constructor(SObjFunction obj,
                                    SContext context,
                                    java.lang.Object[] args)
                             throws STeaException
Overrides:
constructor in class SStatement

query

public java.lang.Object query(SObjFunction obj,
                              SContext context,
                              java.lang.Object[] args)
                       throws STeaException
Executes a query on the database and retrieves the result.
Overrides:
query in class SStatement
Returns:
An SResultSet object through which the list of result records can be obtained.

update

public java.lang.Object update(SObjFunction obj,
                               SContext context,
                               java.lang.Object[] args)
                        throws STeaException
Executes a SQL statement that does NOT produce a result set.
Overrides:
update in class SStatement
Returns:
Either the row count for INSERT, UPDATE or DELETE or 0 for SQL statements that return nothing.

execute

public java.lang.Object execute(SObjFunction obj,
                                SContext context,
                                java.lang.Object[] args)
                         throws STeaException
Executes a generic SQL statement.
Overrides:
execute in class SStatement
Parameters:
sql - that return nothing.
Returns:
 

methodSetInt

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

setInt

public void setInt(int index,
                   int value)
            throws java.sql.SQLException

setFloat

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

setString

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

Tea Java Runtime API
Version 3.1.0

© 2002 PDM&FC, All Rights Reserved.