Tea Java Runtime API
Version 3.2.5

com.pdmfc.tea.modules.tdbc
Class SPreparedStatement

java.lang.Object
  extended by com.pdmfc.tea.modules.tos.STosObj
      extended by com.pdmfc.tea.modules.tdbc.SStatement
          extended by com.pdmfc.tea.modules.tdbc.SPreparedStatement
All Implemented Interfaces:
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.


Field Summary
 
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)
          The implementation for the "constructor" TOS method.
 java.lang.Object execute(SObjFunction obj, SContext context, java.lang.Object[] args)
          The implementation for the "execute" TOS method.
static java.lang.String getTosClassName()
          Fetches the name of the TOS class implemented by this Java class.
static SStatement newInstance(SContext context)
           
 java.lang.Object query(SObjFunction obj, SContext context, java.lang.Object[] args)
          The implementation for the "query" TOS method.
 java.lang.Object setDate(SObjFunction obj, SContext context, java.lang.Object[] args)
          The implementation for the "setString" TOS method.
 java.lang.Object setFloat(SObjFunction obj, SContext context, java.lang.Object[] args)
          The implementation for the "setFloat" TOS method.
 java.lang.Object setInt(SObjFunction obj, SContext context, java.lang.Object[] args)
          The implementation for the "setInt" TOS method.
 void setPreparedStatement(java.sql.PreparedStatement stat)
          Specifies the underlying java.sql.PreparedStatement object to use.
 java.lang.Object setString(SObjFunction obj, SContext context, java.lang.Object[] args)
          The implementation for the "setString" TOS method.
 java.lang.Object update(SObjFunction obj, SContext context, java.lang.Object[] args)
          The implementation for the "update" TOS method.
 
Methods inherited from class com.pdmfc.tea.modules.tdbc.SStatement
addClosedListener, close, closedEvent, getFetchSize, getInternalStatement, getMoreResults, getResultSet, setFetchSize, 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
Throws:
STeaException
Method Detail

setPreparedStatement

public void setPreparedStatement(java.sql.PreparedStatement stat)
Specifies the underlying java.sql.PreparedStatement object to use. The given prepared statement should no longer be used by whoever supplied it.

Parameters:
stat - The prepared statement to use.

getTosClassName

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

Returns:
The name of the TOS class.

newInstance

public static SStatement newInstance(SContext context)
                              throws STeaException
Throws:
STeaException

constructor

public java.lang.Object constructor(SObjFunction obj,
                                    SContext context,
                                    java.lang.Object[] args)
                             throws STeaException
The implementation for the "constructor" TOS method.

Overrides:
constructor in class SStatement
Parameters:
obj - Reference to the object the TOS method was invoked for.
context - The context where the method invocation is taking place.
args - The arguments the TOS method was called with.
Throws:
STeaException

query

public java.lang.Object query(SObjFunction obj,
                              SContext context,
                              java.lang.Object[] args)
                       throws STeaException
The implementation for the "query" TOS method.

Overrides:
query in class SStatement
Parameters:
obj - Reference to the object the TOS method was invoked for.
context - The context where the method invocation is taking place.
args - The arguments the TOS method was called with.
Throws:
STeaException

update

public java.lang.Object update(SObjFunction obj,
                               SContext context,
                               java.lang.Object[] args)
                        throws STeaException
The implementation for the "update" TOS method.

Overrides:
update in class SStatement
Parameters:
obj - Reference to the object the TOS method was invoked for.
context - The context where the method invocation is taking place.
args - The arguments the TOS method was called with.
Throws:
STeaException

execute

public java.lang.Object execute(SObjFunction obj,
                                SContext context,
                                java.lang.Object[] args)
                         throws STeaException
The implementation for the "execute" TOS method.

Overrides:
execute in class SStatement
Parameters:
obj - Reference to the object the TOS method was invoked for.
context - The context where the method invocation is taking place.
args - The arguments the TOS method was called with.
Throws:
STeaException

setInt

public java.lang.Object setInt(SObjFunction obj,
                               SContext context,
                               java.lang.Object[] args)
                        throws SRuntimeException
The implementation for the "setInt" TOS method.

Parameters:
obj - Reference to the object the TOS method was invoked for.
context - The context where the method invocation is taking place.
args - The arguments the TOS method was called with.
Throws:
SRuntimeException

setFloat

public java.lang.Object setFloat(SObjFunction obj,
                                 SContext context,
                                 java.lang.Object[] args)
                          throws SRuntimeException
The implementation for the "setFloat" TOS method.

Parameters:
obj - Reference to the object the TOS method was invoked for.
context - The context where the method invocation is taking place.
args - The arguments the TOS method was called with.
Throws:
SRuntimeException

setString

public java.lang.Object setString(SObjFunction obj,
                                  SContext context,
                                  java.lang.Object[] args)
                           throws STeaException
The implementation for the "setString" TOS method.

Parameters:
obj - Reference to the object the TOS method was invoked for.
context - The context where the method invocation is taking place.
args - The arguments the TOS method was called with.
Throws:
STeaException

setDate

public java.lang.Object setDate(SObjFunction obj,
                                SContext context,
                                java.lang.Object[] args)
                         throws STeaException
The implementation for the "setString" TOS method.

Parameters:
obj - Reference to the object the TOS method was invoked for.
context - The context where the method invocation is taking place.
args - The arguments the TOS method was called with.
Throws:
STeaException

Tea Java Runtime API
Version 3.2.5

© 2009 PDM&FC, All Rights Reserved.