wt.pds
Class WTCallableStatement

java.lang.Object
  extended bywt.pds.AbstractPersistentStore
      extended bywt.pds.WTPreparedStatement
          extended bywt.pds.WTCallableStatement
All Implemented Interfaces:
PersistentRetrieveIfc, PersistentStoreIfc, WTAttributeNameIfc
Direct Known Subclasses:
OracleWTCallableStatement, SQLServerWTCallableStatement

public abstract class WTCallableStatement
extends WTPreparedStatement
implements PersistentRetrieveIfc

WTCallableStatement


Field Summary
private static String BLOB
           
 
Fields inherited from class wt.pds.WTPreparedStatement
attributeMap, DEBUG, idx, lobMap, lobOid, skip, stmt, topObject
 
Fields inherited from class wt.pds.AbstractPersistentStore
INLINE_BLOB_OVERFLOW
 
Fields inherited from interface wt.pds.PersistentRetrieveIfc
versionID
 
Fields inherited from interface wt.util.WTAttributeNameIfc
CREATE_STAMP_NAME, ID_NAME, LATEST_ITERATION, LINK_REFA, LINK_REFB, MODIFY_STAMP_NAME, OBJECT_IDENTIFIER, OID_CLASSNAME, PERSIST_INFO, REF_CLASSNAME, REF_OBJECT_ID, REF_SUFFIX, ROLE_AOBJECT_ROLE, ROLE_BOBJECT_ROLE, ROLEA_CLASSNAME, ROLEA_OBJECT_ID, ROLEA_VERSION_ID, ROLEB_CLASSNAME, ROLEB_OBJECT_ID, ROLEB_VERSION_ID, UPDATE_COUNT_NAME, UPDATE_STAMP_NAME
 
Fields inherited from interface wt.pds.PersistentStoreIfc
versionID
 
Constructor Summary
WTCallableStatement()
           
WTCallableStatement(PreparedStatement aStmt, Map aMap)
           
 
Method Summary
 void close()
          Immediately release a ResultSet's datastore and connection resources
 InputStream getAsciiStream(String attrName)
          Dummy methods to satisfy PersistentRetrieveIfc
 BigDecimal getBigDecimal(String attrName)
          Get the value of a column in the current row as a BigDecimal
 BigDecimal getBigDecimal(String attrName, int scale)
           
 InputStream getBinaryStream(String attrName)
          Get the value of a column in the current row as a stream of uninterpreted bytes.
 boolean getBoolean(String attrName)
          Get the value of a column in the current row as a Java boolean.
 Boolean getBooleanObject(String attrName)
          Get the value of a column in the current row as a Boolean.
 byte getByte(String attrName)
          Get the value of a column in the current row as a Java byte.
 Byte getByteObject(String attrName)
          Get the value of a column in the current row as a Byte.
 byte[] getBytes(String attrName)
          Get the value of a column in the current row as a Java byte array.
 char getChar(String attrName)
          Get the value of a column in the current row as a Java char.
 Character getCharObject(String attrName)
          Get the value of a column in the current row as a Character.
 Date getDate(String attrName)
          Get the value of a column in the current row as a java.sql.Date object.
 double getDouble(String attrName)
          Get the value of a column in the current row as a Java double.
 Double getDoubleObject(String attrName)
          Get the value of a column in the current row as a Double.
 float getFloat(String attrName)
          Get the value of a column in the current row as a Java float.
 Float getFloatObject(String attrName)
          Get the value of a column in the current row as a Float.
 Object getInlineObject(String attributeName, String blobAttributeName)
          Get the value of a blob column as a Java Object.
 int getInt(String attrName)
          Get the value of a column in the current row as a Java int.
 Integer getIntObject(String attrName)
          Get the value of a column in the current row as an Integer.
 LobLocator getLobLocator(String attrName)
          Get a LobLocator for the given attribute.
 long getLong(String attrName)
          Get the value of a column in the current row as a Java long.
 Long getLongObject(String attrName)
          Get the value of a column in the current row as a Long.
 Object getObject(String attrName)
          Get the value of a column in the current row as a Java object.
 short getShort(String attrName)
          Get the value of a column in the current row as a Java short.
 Short getShortObject(String attrName)
          Get the value of a column in the current row as a Short.
 Object getSmallObject(String attrName)
          Get the value of a column in the current row as a Java object.
 String getString(String attrName)
          Get the value of a column in the current row as a Java String.
 Time getTime(String attrName)
          Get the value of a column in the current row as a java.sql.Time object.
 Timestamp getTimestamp(String attrName)
          Get the value of a column in the current row as a java.sql.Timestamp object.
 InputStream getUnicodeStream(String attrName)
          Get the value of a column in the current row as a stream of Unicode characters and then read in chunks.
 boolean next()
          A ResultSet is initially positioned before its first row; the first call to next makes the first row the current row; the second call makes the second row the current row, etc.
 ObjectMappable readObject(String attribute_name, ObjectMappable obj, Class concrete_class, boolean is_required)
          Get the values corresponding to a nested ObjectMappable Object.
 void registerOutParameter(String attrName, int sqlType)
          Utilities
 void registerOutParameter(String attrName, int sqlType, int scale)
           
 boolean wasNull()
          A column may have the value of SQL NULL; wasNull reports whether the last column read had this special value.
 
Methods inherited from class wt.pds.WTPreparedStatement
clearParameters, findColumn, getAttributeMap, getBindParameterIndex, getBindParameters, getContainer, getDescriptorName, getFullAttrName, getLobMap, getStatement, indexOf, isSkip, postProcessLobs, setAsciiStream, setAttributeMap, setBigDecimal, setBinaryStream, setBoolean, setBooleanObject, setByte, setByteObject, setBytes, setChar, setCharObject, setDate, setDouble, setDoubleObject, setFloat, setFloatObject, setInt, setIntObject, setLobLocator, setLoggingEnabled, setLong, setLongObject, setNull, setNull, setObject, setShort, setShortObject, setSmallObject, setStatement, setString, setString, setTime, setTimestamp, setUnicodeStream, writeObject
 
Methods inherited from class wt.pds.AbstractPersistentStore
getUserConnection, setInlineObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface wt.pds.PersistentRetrieveIfc
getContainer
 

Field Detail

BLOB

private static final String BLOB
See Also:
Constant Field Values
Constructor Detail

WTCallableStatement

public WTCallableStatement()

WTCallableStatement

public WTCallableStatement(PreparedStatement aStmt,
                           Map aMap)
Method Detail

getBigDecimal

public BigDecimal getBigDecimal(String attrName,
                                int scale)
                         throws SQLException
Throws:
SQLException

getBoolean

public boolean getBoolean(String attrName)
                   throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a Java boolean.

Specified by:
getBoolean in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, the result is false
Throws:
SQLException - if a database-access error occurs.

getBooleanObject

public Boolean getBooleanObject(String attrName)
                         throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a Boolean.

Specified by:
getBooleanObject in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, then null is returned
Throws:
SQLException - if a database-access error occurs.

getByte

public byte getByte(String attrName)
             throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a Java byte.

Specified by:
getByte in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, the result is 0
Throws:
SQLException - if a database-access error occurs.

getByteObject

public Byte getByteObject(String attrName)
                   throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a Byte.

Specified by:
getByteObject in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, then null is returned
Throws:
SQLException - if a database-access error occurs.

getBytes

public byte[] getBytes(String attrName)
                throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a Java byte array.

Specified by:
getBytes in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, the result is null
Throws:
SQLException - if a database-access error occurs.

getChar

public char getChar(String attrName)
             throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a Java char.

Specified by:
getChar in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, the result is 0
Throws:
SQLException - if a database-access error occurs.

getCharObject

public Character getCharObject(String attrName)
                        throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a Character.

Specified by:
getCharObject in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, then null is returned
Throws:
SQLException - if a database-access error occurs.

getDate

public Date getDate(String attrName)
             throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a java.sql.Date object.

Specified by:
getDate in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, the result is null
Throws:
SQLException - if a database-access error occurs.

getDouble

public double getDouble(String attrName)
                 throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a Java double.

Specified by:
getDouble in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, the result is 0
Throws:
SQLException - if a database-access error occurs.

getDoubleObject

public Double getDoubleObject(String attrName)
                       throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a Double.

Specified by:
getDoubleObject in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, then null is returned
Throws:
SQLException - if a database-access error occurs.

getFloat

public float getFloat(String attrName)
               throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a Java float.

Specified by:
getFloat in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, the result is 0
Throws:
SQLException - if a database-access error occurs.

getFloatObject

public Float getFloatObject(String attrName)
                     throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a Float.

Specified by:
getFloatObject in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, then null is returned
Throws:
SQLException - if a database-access error occurs.

getInlineObject

public Object getInlineObject(String attributeName,
                              String blobAttributeName)
                       throws SQLException,
                              DatastoreException
Description copied from interface: PersistentRetrieveIfc
Get the value of a blob column as a Java Object.

Specified by:
getInlineObject in interface PersistentRetrieveIfc
Parameters:
attributeName - a class attribute name
blobAttributeName - a blob attribute name
Throws:
SQLException - if a database-access error occurs.
DatastoreException

getInt

public int getInt(String attrName)
           throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a Java int.

Specified by:
getInt in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, the result is 0
Throws:
SQLException - if a database-access error occurs.

getIntObject

public Integer getIntObject(String attrName)
                     throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as an Integer.

Specified by:
getIntObject in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, then null is returned
Throws:
SQLException - if a database-access error occurs.

getLong

public long getLong(String attrName)
             throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a Java long.

Specified by:
getLong in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, the result is 0
Throws:
SQLException - if a database-access error occurs.

getLongObject

public Long getLongObject(String attrName)
                   throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a Long.

Specified by:
getLongObject in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, then null is returned
Throws:
SQLException - if a database-access error occurs.

getObject

public Object getObject(String attrName)
                 throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a Java object.

Specified by:
getObject in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, the result is null
Throws:
SQLException - if a database-access error occurs.

getSmallObject

public Object getSmallObject(String attrName)
                      throws SQLException,
                             DatastoreException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a Java object.

Specified by:
getSmallObject in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, the result is null
Throws:
SQLException - if a database-access error occurs.
DatastoreException

getShort

public short getShort(String attrName)
               throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a Java short.

Specified by:
getShort in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, the result is 0
Throws:
SQLException - if a database-access error occurs.

getShortObject

public Short getShortObject(String attrName)
                     throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a Short.

Specified by:
getShortObject in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, then null is returned
Throws:
SQLException - if a database-access error occurs.

getString

public String getString(String attrName)
                 throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a Java String.

Specified by:
getString in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, the result is null
Throws:
SQLException - if a database-access error occurs.

getTime

public Time getTime(String attrName)
             throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a java.sql.Time object.

Specified by:
getTime in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, the result is null
Throws:
SQLException - if a database-access error occurs.

getTimestamp

public Timestamp getTimestamp(String attrName)
                       throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a java.sql.Timestamp object.

Specified by:
getTimestamp in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, the result is null
Throws:
SQLException - if a database-access error occurs.

registerOutParameter

public void registerOutParameter(String attrName,
                                 int sqlType)
                          throws SQLException
Utilities

Throws:
SQLException

registerOutParameter

public void registerOutParameter(String attrName,
                                 int sqlType,
                                 int scale)
                          throws SQLException
Throws:
SQLException

wasNull

public boolean wasNull()
                throws SQLException
Description copied from interface: PersistentRetrieveIfc
A column may have the value of SQL NULL; wasNull reports whether the last column read had this special value. Note that you must first call getXXX on a column to try to read its value and then call wasNull() to find if the value was the SQL NULL.

Specified by:
wasNull in interface PersistentRetrieveIfc
Returns:
true if last column was a null value
Throws:
SQLException - if a database-access error occurs.

getAsciiStream

public InputStream getAsciiStream(String attrName)
                           throws SQLException
Dummy methods to satisfy PersistentRetrieveIfc

Specified by:
getAsciiStream in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, the result is null
Throws:
SQLException - if a database-access error occurs.

getBinaryStream

public InputStream getBinaryStream(String attrName)
                            throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a stream of uninterpreted bytes.

Specified by:
getBinaryStream in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, the result is null
Throws:
SQLException - if a database-access error occurs.

getBigDecimal

public BigDecimal getBigDecimal(String attrName)
                         throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a BigDecimal

Specified by:
getBigDecimal in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, the result is null
Throws:
SQLException - if a database-access error occurs.

getUnicodeStream

public InputStream getUnicodeStream(String attrName)
                             throws SQLException
Description copied from interface: PersistentRetrieveIfc
Get the value of a column in the current row as a stream of Unicode characters and then read in chunks.

Specified by:
getUnicodeStream in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Returns:
the column value; if the value is SQL NULL, the result is null
Throws:
SQLException - if a database-access error occurs.

getLobLocator

public LobLocator getLobLocator(String attrName)
                         throws SQLException,
                                DatastoreException
Description copied from interface: PersistentRetrieveIfc
Get a LobLocator for the given attribute.

Specified by:
getLobLocator in interface PersistentRetrieveIfc
Parameters:
attrName - a class attribute name
Throws:
SQLException - if a database-access error occurs.
DatastoreException

readObject

public ObjectMappable readObject(String attribute_name,
                                 ObjectMappable obj,
                                 Class concrete_class,
                                 boolean is_required)
                          throws SQLException,
                                 DatastoreException
Description copied from interface: PersistentRetrieveIfc
Get the values corresponding to a nested ObjectMappable Object. This results in a call to the nested object's readExternal method.

Specified by:
readObject in interface PersistentRetrieveIfc
Parameters:
attribute_name - a class attribute name
obj - the nested object
concrete_class - the class to instantiate if needed
Throws:
DatastoreException - if any other internal error occurs.
SQLException - if a database-access error occurs.

next

public boolean next()
             throws SQLException
Description copied from interface: PersistentRetrieveIfc
A ResultSet is initially positioned before its first row; the first call to next makes the first row the current row; the second call makes the second row the current row, etc.

Specified by:
next in interface PersistentRetrieveIfc
Returns:
true if new row is valid, false if there are no more rows
Throws:
SQLException - if a database-access error occurs.

close

public void close()
           throws SQLException
Description copied from interface: PersistentRetrieveIfc
Immediately release a ResultSet's datastore and connection resources

Specified by:
close in interface PersistentRetrieveIfc
Throws:
SQLException - if a database-access error occurs.