com.ibm.websphere.rsadapter

Interface WSRdbRecord

All Superinterfaces:
java.lang.Cloneable, javax.resource.cci.Record, java.io.Serializable

  1. public interface WSRdbRecord
  2. extends javax.resource.cci.Record

This interface extends from javax.resource.cci.Record. An implementation of this interface serves as a Record.

The WSRdbRecord is a record from which users can access the ResultSet object and retrieve the out parameters of the CallableStatement.

One typical usage of this interface is that users call getMoreResults() and getResultSet() to get the result sets. After retrieving all the result sets, users can call getXXX() to get the out parameter values of the CallableStatement.

Here is one example:

In FunctionSet class, users write the following code:

 cstmt = prepareCall(obj, "{call transfer{?,?,?,?)}");
 
 cstmt.setString(1, fromAccountNumber);
 cstmt.setString(2, toAccountNumber);
 cstmt.setDouble(3, amount);
 
 cstmt.registerOutParameter(4, java.sql.Types.DATE);
 
 cstmt.execute();
 
 return createCCIRecord(obj, cstmt);
 
 

In the above code, createCCIRecord(obj, cstmt) creates a WSRdbRecord object. We only allow users call execute to the CallableStatement. Users will get method unsupported exceptions if users call other executeXXX() methods.

In the CMP bean BusinessMethodExtractor class, users can access the result sets by calling WSRdbRecord.getMoreResults() and WSRdbRecord.getResultSet(), and access the out parameter values of the CallableStatement by calling WSRdbRecord.getXXX() methods.

 WSRdbRecord record = (WSRdbRecord) indexedRecord;
 
 while (record.getMoreResults()) {
                java.sql.ResultSet rs = record.getResultSet();
                
                // access the results.
                ...
 }
 
 // Get the out parameter values
 record.getDate(4); 
 

Currently, we don't support multiple open result sets.

Since:
WAS 5.1

Method Summary

Modifier and Type Method and Description
  1. java.sql.Array
getArray(int i)
Retrieves the value of the designated JDBC ARRAY parameter as an Array object in the Java programming language.
  1. java.sql.Array
getArray(java.lang.String parameterName)
Retrieves the value of the designated JDBC ARRAY parameter as an Array object in the Java programming language.
  1. java.math.BigDecimal
getBigDecimal(int parameterIndex)
Retrieves the value of the designated JDBC NUMERIC parameter as a java.math.BigDecimal object with as many digits to the right of the decimal point as the value contains.
  1. java.math.BigDecimal
getBigDecimal(int parameterIndex,int scale)
Deprecated. use getBigDecimal(int parameterIndex) or getBigDecimal(String parameterName)
  1. java.math.BigDecimal
getBigDecimal(java.lang.String parameterName)
Retrieves the value of a JDBC NUMERIC parameter as a java.math.BigDecimal object with as many digits to the right of the decimal point as the value contains.
  1. java.sql.Blob
getBlob(int i)
Retrieves the value of the designated JDBC BLOB parameter as a Blob object in the Java programming language.
  1. java.sql.Blob
getBlob(java.lang.String parameterName)
Retrieves the value of a JDBC BLOB parameter as a Blob object in the Java programming language.
  1. boolean
getBoolean(int parameterIndex)
Retrieves the value of the designated JDBC BIT parameter as a boolean in the Java programming language.
  1. boolean
getBoolean(java.lang.String parameterName)
Retrieves the value of a JDBC BIT parameter as a boolean in the Java programming language.
  1. byte
getByte(int parameterIndex)
Retrieves the value of the designated JDBC TINYINT parameter as a byte in the Java programming language.
  1. byte
getByte(java.lang.String parameterName)
Retrieves the value of a JDBC TINYINT parameter as a byte in the Java programming language.
  1. byte[]
getBytes(int parameterIndex)
Retrieves the value of the designated JDBC BINARY or VARBINARY parameter as an array of byte values in the Java programming language.
  1. byte[]
getBytes(java.lang.String parameterName)
Retrieves the value of a JDBC BINARY or VARBINARY parameter as an array of byte values in the Java programming language.
  1. java.sql.Clob
getClob(int i)
Retrieves the value of the designated JDBC CLOB parameter as a Clob object in the Java programming language.
  1. java.sql.Clob
getClob(java.lang.String parameterName)
Retrieves the value of a JDBC CLOB parameter as a Clob object in the Java programming language.
  1. java.sql.Date
getDate(int parameterIndex)
Retrieves the value of the designated JDBC DATE parameter as a java.sql.Date object.
  1. java.sql.Date
getDate(int parameterIndex,java.util.Calendar cal)
Retrieves the value of the designated JDBC DATE parameter as a java.sql.Date object, using the given Calendar object to construct the date.
  1. java.sql.Date
getDate(java.lang.String parameterName)
Retrieves the value of a JDBC DATE parameter as a java.sql.Date object.
  1. java.sql.Date
getDate(java.lang.String parameterName,java.util.Calendar cal)
Retrieves the value of a JDBC DATE parameter as a java.sql.Date object, using the given Calendar object to construct the date.
  1. double
getDouble(int parameterIndex)
Retrieves the value of the designated JDBC DOUBLE parameter as a double in the Java programming language.
  1. double
getDouble(java.lang.String parameterName)
Retrieves the value of a JDBC DOUBLE parameter as a double in the Java programming language.
  1. float
getFloat(int parameterIndex)
Retrieves the value of the designated JDBC FLOAT parameter as a float in the Java programming language.
  1. float
getFloat(java.lang.String parameterName)
Retrieves the value of a JDBC FLOAT parameter as a float in the Java programming language.
  1. int
getInt(int parameterIndex)
Retrieves the value of the designated JDBC INTEGER parameter as an int in the Java programming language.
  1. int
getInt(java.lang.String parameterName)
Retrieves the value of a JDBC INTEGER parameter as an int in the Java programming language.
  1. long
getLong(int parameterIndex)
Retrieves the value of the designated JDBC BIGINT parameter as a long in the Java programming language.
  1. long
getLong(java.lang.String parameterName)
Retrieves the value of a JDBC BIGINT parameter as a long in the Java programming language.
  1. boolean
getMoreResults()
Moves to this Record object's next result, returns true if it is a ResultSet object, and implicitly closes any current ResultSet object(s) obtained with the method getResultSet.
  1. java.lang.Object
getObject(int parameterIndex)
Retrieves the value of the designated parameter as an Object in the Java programming language.
  1. java.lang.Object
getObject(int i,java.util.Map map)
Returns an object representing the value of OUT parameter i and uses map for the custom mapping of the parameter value.
  1. java.lang.Object
getObject(java.lang.String parameterName)
Retrieves the value of a parameter as an Object in the Java programming language.
  1. java.lang.Object
getObject(java.lang.String parameterName,java.util.Map map)
Returns an object representing the value of OUT parameter i and uses map for the custom mapping of the parameter value.
  1. java.sql.Ref
getRef(int i)
Retrieves the value of the designated JDBC REF() parameter as a Ref object in the Java programming language.
  1. java.sql.Ref
getRef(java.lang.String parameterName)
Retrieves the value of a JDBC REF() parameter as a Ref object in the Java programming language.
  1. java.sql.ResultSet
getResultSet()
Retrieves the current result as a ResultSet object.
  1. short
getShort(int parameterIndex)
Retrieves the value of the designated JDBC SMALLINT parameter as a short in the Java programming language.
  1. short
getShort(java.lang.String parameterName)
Retrieves the value of a JDBC SMALLINT parameter as a short in the Java programming language.
  1. java.lang.String
getString(int parameterIndex)
Retrieves the value of the designated JDBC CHAR, VARCHAR, or LONGVARCHAR parameter as a String in the Java programming language.
  1. java.lang.String
getString(java.lang.String parameterName)
Retrieves the value of a JDBC CHAR, VARCHAR, or LONGVARCHAR parameter as a String in the Java programming language.
  1. java.sql.Time
getTime(int parameterIndex)
Retrieves the value of the designated JDBC TIME parameter as a java.sql.Time object.
  1. java.sql.Time
getTime(int parameterIndex,java.util.Calendar cal)
Retrieves the value of the designated JDBC TIME parameter as a java.sql.Time object, using the given Calendar object to construct the time.
  1. java.sql.Time
getTime(java.lang.String parameterName)
Retrieves the value of a JDBC TIME parameter as a java.sql.Time object.
  1. java.sql.Time
getTime(java.lang.String parameterName,java.util.Calendar cal)
Retrieves the value of a JDBC TIME parameter as a java.sql.Time object, using the given Calendar object to construct the time.
  1. java.sql.Timestamp
getTimestamp(int parameterIndex)
Retrieves the value of the designated JDBC TIMESTAMP parameter as a java.sql.Timestamp object.
  1. java.sql.Timestamp
getTimestamp(int parameterIndex,java.util.Calendar cal)
Retrieves the value of the designated JDBC TIMESTAMP parameter as a java.sql.Timestamp object, using the given Calendar object to construct the Timestamp object.
  1. java.sql.Timestamp
getTimestamp(java.lang.String parameterName)
Retrieves the value of the designated JDBC TIMESTAMP parameter as a java.sql.Timestamp object.
  1. java.sql.Timestamp
getTimestamp(java.lang.String parameterName,java.util.Calendar cal)
Retrieves the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object, using the given Calendar object to construct the Timestamp object.
  1. int
getUpdateCount()
Retrieves the current result as an update count; if the result is a ResultSet object or there are no more results, -1 is returned.
  1. java.net.URL
getURL(int parameterIndex)
Retrieves the value of the designated JDBC DATALINK parameter as a java.net.URL object.
  1. java.net.URL
getURL(java.lang.String parameterName)
Retrieves the value of a JDBC DATALINK parameter as a java.net.URL object.
  1. boolean
wasNull()
Retrieves whether the last OUT parameter read had the value of SQL NULL.
Methods inherited from interface javax.resource.cci.Record
clone, equals, getRecordName, getRecordShortDescription, hashCode, setRecordName, setRecordShortDescription

Method Detail

getResultSet

  1. java.sql.ResultSet getResultSet( )
  2. throws java.sql.SQLException

Retrieves the current result as a ResultSet object. This method should be called only once per result.

Returns:
the current result as a ResultSet object or null if the result is an update count or there are no more results
Throws:
java.sql.SQLException - if a database access error occurs

getUpdateCount

  1. int getUpdateCount()
  2. throws java.sql.SQLException

Retrieves the current result as an update count; if the result is a ResultSet object or there are no more results, -1 is returned. This method should be called only once per result.

Returns:
the current result as an update count; -1 if the current result is a ResultSet object or there are no more results
Throws:
java.sql.SQLException - if a database access error occurs

getMoreResults

  1. boolean getMoreResults()
  2. throws java.sql.SQLException

Moves to this Record object's next result, returns true if it is a ResultSet object, and implicitly closes any current ResultSet object(s) obtained with the method getResultSet.

There are no more results when the following is true:

       (!getMoreResults() && (getUpdateCount() == -1)
 
Returns:
true if the next result is a ResultSet object; false if it is an update count or there are no more results
Throws:
java.sql.SQLException - if a database access error occurs

getArray

  1. java.sql.Array getArray(int i)
  2. throws java.sql.SQLException

Retrieves the value of the designated JDBC ARRAY parameter as an Array object in the Java programming language.

Parameters:
i - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value as an Array object in the Java programming language. If the value was SQL NULL, the value null is returned.
Throws:
java.sql.SQLException - if a database access error occurs.

getArray

  1. java.sql.Array getArray(java.lang.String parameterName)
  2. throws java.sql.SQLException

Retrieves the value of the designated JDBC ARRAY parameter as an Array object in the Java programming language.

Returns:
the parameter value as an Array object in the Java programming language. If the value was SQL NULL, the value null is returned.
Throws:
java.sql.SQLException - if a database access error occurs

getBigDecimal

  1. java.math.BigDecimal getBigDecimal( int parameterIndex)
  2. throws java.sql.SQLException

Retrieves the value of the designated JDBC NUMERIC parameter as a java.math.BigDecimal object with as many digits to the right of the decimal point as the value contains.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value in full precision. If the value is SQL NULL, the result is null.
Throws:
java.sql.SQLException - if a database access error occurs

getBigDecimal

  1. java.math.BigDecimal getBigDecimal( int parameterIndex,
  2. int scale)
  3. throws java.sql.SQLException
Deprecated. use getBigDecimal(int parameterIndex) or getBigDecimal(String parameterName)

Retrieves the value of the designated JDBC NUMERIC parameter as a java.math.BigDecimal object with scale digits to the right of the decimal point.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
scale - the number of digits to the right of the decimal point
Returns:
the parameter value. If the value is SQL NULL, the result is null.
Throws:
java.sql.SQLException - if a database access error occurs

getBigDecimal

  1. java.math.BigDecimal getBigDecimal( java.lang.String parameterName)
  2. throws java.sql.SQLException

Retrieves the value of a JDBC NUMERIC parameter as a java.math.BigDecimal object with as many digits to the right of the decimal point as the value contains.

Parameters:
parameterName - the name of the parameter
Returns:
the parameter value in full precision. If the value is SQL NULL, the result is null.
Throws:
java.sql.SQLException - if a database access error occurs

getBlob

  1. java.sql.Blob getBlob(int i)
  2. throws java.sql.SQLException

Retrieves the value of the designated JDBC BLOB parameter as a Blob object in the Java programming language.

Parameters:
i - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value as a Blob object in the Java programming language. If the value was SQL NULL, the value null is returned.
Throws:
java.sql.SQLException - if a database access error occurs

getBlob

  1. java.sql.Blob getBlob(java.lang.String parameterName)
  2. throws java.sql.SQLException

Retrieves the value of a JDBC BLOB parameter as a Blob object in the Java programming language.

Parameters:
parameterName - the name of the parameter
Returns:
the parameter value as a Blob object in the Java programming language. If the value was SQL NULL, the value null is returned.
Throws:
java.sql.SQLException - if a database access error occurs

getBoolean

  1. boolean getBoolean(int parameterIndex)
  2. throws java.sql.SQLException

Retrieves the value of the designated JDBC BIT parameter as a boolean in the Java programming language.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value. If the value is SQL NULL, the result is false.
Throws:
java.sql.SQLException - if a database access error occurs

getBoolean

  1. boolean getBoolean(java.lang.String parameterName)
  2. throws java.sql.SQLException

Retrieves the value of a JDBC BIT parameter as a boolean in the Java programming language.

Parameters:
parameterName - the name of the parameter
Returns:
the parameter value. If the value is SQL NULL, the result is false.
Throws:
java.sql.SQLException - if a database access error occurs

getByte

  1. byte getByte(int parameterIndex)
  2. throws java.sql.SQLException

Retrieves the value of the designated JDBC TINYINT parameter as a byte in the Java programming language.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value. If the value is SQL NULL, the result is 0.
Throws:
java.sql.SQLException - if a database access error occurs

getByte

  1. byte getByte(java.lang.String parameterName)
  2. throws java.sql.SQLException

Retrieves the value of a JDBC TINYINT parameter as a byte in the Java programming language.

Parameters:
parameterName - the name of the parameter
Returns:
the parameter value. If the value is SQL NULL, the result is 0.
Throws:
java.sql.SQLException - if a database access error occurs

getBytes

  1. byte[] getBytes(int parameterIndex)
  2. throws java.sql.SQLException

Retrieves the value of the designated JDBC BINARY or VARBINARY parameter as an array of byte values in the Java programming language.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value. If the value is SQL NULL, the result is null.
Throws:
java.sql.SQLException - if a database access error occurs

getBytes

  1. byte[] getBytes(java.lang.String parameterName)
  2. throws java.sql.SQLException

Retrieves the value of a JDBC BINARY or VARBINARY parameter as an array of byte values in the Java programming language.

Parameters:
parameterName - the name of the parameter
Returns:
the parameter value. If the value is SQL NULL, the result is null.
Throws:
java.sql.SQLException - if a database access error occurs

getClob

  1. java.sql.Clob getClob(int i)
  2. throws java.sql.SQLException

Retrieves the value of the designated JDBC CLOB parameter as a Clob object in the Java programming language.

Parameters:
i - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value as a Clob object in the Java programming language. If the value was SQL NULL, the value null is returned.
Throws:
java.sql.SQLException - if a database access error occurs

getClob

  1. java.sql.Clob getClob(java.lang.String parameterName)
  2. throws java.sql.SQLException

Retrieves the value of a JDBC CLOB parameter as a Clob object in the Java programming language.

Parameters:
parameterName - the name of the parameter
Returns:
the parameter value as a Clob object in the Java programming language. If the value was SQL NULL, the value null is returned.
Throws:
java.sql.SQLException - if a database access error occurs

getDate

  1. java.sql.Date getDate(int parameterIndex)
  2. throws java.sql.SQLException

Retrieves the value of the designated JDBC DATE parameter as a java.sql.Date object.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value. If the value is SQL NULL, the result is null.
Throws:
java.sql.SQLException - if a database access error occurs

getDate

  1. java.sql.Date getDate(int parameterIndex,
  2. java.util.Calendar cal)
  3. throws java.sql.SQLException

Retrieves the value of the designated JDBC DATE parameter as a java.sql.Date object, using the given Calendar object to construct the date. With a Calendar object, the driver can calculate the date taking into account a custom timezone and locale. If no Calendar object is specified, the driver uses the default timezone and locale.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
cal - the Calendar object the driver will use to construct the date
Returns:
the parameter value. If the value is SQL NULL, the result is null.
Throws:
java.sql.SQLException - if a database access error occurs

getDate

  1. java.sql.Date getDate(java.lang.String parameterName)
  2. throws java.sql.SQLException

Retrieves the value of a JDBC DATE parameter as a java.sql.Date object.

Parameters:
parameterName - the name of the parameter
Returns:
the parameter value. If the value is SQL NULL, the result is null.
Throws:
java.sql.SQLException - if a database access error occurs

getDate

  1. java.sql.Date getDate(java.lang.String parameterName,
  2. java.util.Calendar cal)
  3. throws java.sql.SQLException

Retrieves the value of a JDBC DATE parameter as a java.sql.Date object, using the given Calendar object to construct the date. With a Calendar object, the driver can calculate the date taking into account a custom timezone and locale. If no Calendar object is specified, the driver uses the default timezone and locale.

Parameters:
parameterName - the name of the parameter
cal - the Calendar object the driver will use to construct the date
Returns:
the parameter value. If the value is SQL NULL, the result is null.
Throws:
java.sql.SQLException - if a database access error occurs

getDouble

  1. double getDouble(int parameterIndex)
  2. throws java.sql.SQLException

Retrieves the value of the designated JDBC DOUBLE parameter as a double in the Java programming language.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value. If the value is SQL NULL, the result is 0.
Throws:
java.sql.SQLException - if a database access error occurs

getDouble

  1. double getDouble(java.lang.String parameterName)
  2. throws java.sql.SQLException

Retrieves the value of a JDBC DOUBLE parameter as a double in the Java programming language.

Parameters:
parameterName - the name of the parameter
Returns:
the parameter value. If the value is SQL NULL, the result is 0.
Throws:
java.sql.SQLException - if a database access error occurs

getFloat

  1. float getFloat(int parameterIndex)
  2. throws java.sql.SQLException

Retrieves the value of the designated JDBC FLOAT parameter as a float in the Java programming language.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value. If the value is SQL NULL, the result is 0.
Throws:
java.sql.SQLException - if a database access error occurs

getFloat

  1. float getFloat(java.lang.String parameterName)
  2. throws java.sql.SQLException

Retrieves the value of a JDBC FLOAT parameter as a float in the Java programming language.

Parameters:
parameterName - the name of the parameter
Returns:
the parameter value. If the value is SQL NULL, the result is 0.
Throws:
java.sql.SQLException - if a database access error occurs

getInt

  1. int getInt(int parameterIndex)
  2. throws java.sql.SQLException

Retrieves the value of the designated JDBC INTEGER parameter as an int in the Java programming language.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value. If the value is SQL NULL, the result is 0.
Throws:
java.sql.SQLException - if a database access error occurs

getInt

  1. int getInt(java.lang.String parameterName)
  2. throws java.sql.SQLException

Retrieves the value of a JDBC INTEGER parameter as an int in the Java programming language.

Parameters:
parameterName - the name of the parameter
Returns:
the parameter value. If the value is SQL NULL, the result is 0.
Throws:
java.sql.SQLException - if a database access error occurs

getLong

  1. long getLong(int parameterIndex)
  2. throws java.sql.SQLException

Retrieves the value of the designated JDBC BIGINT parameter as a long in the Java programming language.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value. If the value is SQL NULL, the result is 0.
Throws:
java.sql.SQLException - if a database access error occurs

getLong

  1. long getLong(java.lang.String parameterName)
  2. throws java.sql.SQLException

Retrieves the value of a JDBC BIGINT parameter as a long in the Java programming language.

Parameters:
parameterName - the name of the parameter
Returns:
the parameter value. If the value is SQL NULL, the result is 0.
Throws:
java.sql.SQLException - if a database access error occurs

getObject

  1. java.lang.Object getObject(int parameterIndex)
  2. throws java.sql.SQLException

Retrieves the value of the designated parameter as an Object in the Java programming language. If the value is an SQL NULL, the driver returns a Java null.

This method returns a Java object whose type corresponds to the JDBC type that was registered for this parameter using the method registerOutParameter. By registering the target JDBC type as java.sql.Types.OTHER, this method can be used to read database-specific abstract data types.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
A java.lang.Object holding the OUT parameter value
Throws:
java.sql.SQLException - if a database access error occurs

getObject

  1. java.lang.Object getObject(int i,
  2. java.util.Map map)
  3. throws java.sql.SQLException

Returns an object representing the value of OUT parameter i and uses map for the custom mapping of the parameter value.

This method returns a Java object whose type corresponds to the JDBC type that was registered for this parameter using the method registerOutParameter. By registering the target JDBC type as java.sql.Types.OTHER, this method can be used to read database-specific abstract data types.

Parameters:
i - the first parameter is 1, the second is 2, and so on
map - the mapping from SQL type names to Java classes
Returns:
a java.lang.Object holding the OUT parameter value
Throws:
java.sql.SQLException - if a database access error occurs

getObject

  1. java.lang.Object getObject(java.lang.String parameterName)
  2. throws java.sql.SQLException

Retrieves the value of a parameter as an Object in the Java programming language. If the value is an SQL NULL, the driver returns a Java null.

This method returns a Java object whose type corresponds to the JDBC type that was registered for this parameter using the method registerOutParameter. By registering the target JDBC type as java.sql.Types.OTHER, this method can be used to read database-specific abstract data types.

Parameters:
parameterName - the name of the parameter
Returns:
A java.lang.Object holding the OUT parameter value.
Throws:
java.sql.SQLException - if a database access error occurs

getObject

  1. java.lang.Object getObject(java.lang.String parameterName,
  2. java.util.Map map)
  3. throws java.sql.SQLException

Returns an object representing the value of OUT parameter i and uses map for the custom mapping of the parameter value.

This method returns a Java object whose type corresponds to the JDBC type that was registered for this parameter using the method registerOutParameter. By registering the target JDBC type as java.sql.Types.OTHER, this method can be used to read database-specific abstract data types.

Parameters:
parameterName - the name of the parameter
map - the mapping from SQL type names to Java classes
Returns:
a java.lang.Object holding the OUT parameter value
Throws:
java.sql.SQLException - if a database access error occurs

getRef

  1. java.sql.Ref getRef(int i)
  2. throws java.sql.SQLException

Retrieves the value of the designated JDBC REF() parameter as a Ref object in the Java programming language.

Parameters:
i - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value as a Ref object in the Java programming language. If the value was SQL NULL, the value null is returned.
Throws:
java.sql.SQLException - if a database access error occurs

getRef

  1. java.sql.Ref getRef(java.lang.String parameterName)
  2. throws java.sql.SQLException

Retrieves the value of a JDBC REF() parameter as a Ref object in the Java programming language.

Parameters:
parameterName - the name of the parameter
Returns:
the parameter value as a Ref object in the Java programming language. If the value was SQL NULL, the value null is returned.
Throws:
java.sql.SQLException - if a database access error occurs

getShort

  1. short getShort(int parameterIndex)
  2. throws java.sql.SQLException

Retrieves the value of the designated JDBC SMALLINT parameter as a short in the Java programming language.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value. If the value is SQL NULL, the result is 0.
Throws:
java.sql.SQLException - if a database access error occurs

getShort

  1. short getShort(java.lang.String parameterName)
  2. throws java.sql.SQLException

Retrieves the value of a JDBC SMALLINT parameter as a short in the Java programming language.

Parameters:
parameterName - the name of the parameter
Returns:
the parameter value. If the value is SQL NULL, the result is 0.
Throws:
java.sql.SQLException - if a database access error occurs

getString

  1. java.lang.String getString(int parameterIndex)
  2. throws java.sql.SQLException

Retrieves the value of the designated JDBC CHAR, VARCHAR, or LONGVARCHAR parameter as a String in the Java programming language.

For the fixed-length type JDBC CHAR, the String object returned has exactly the same value the JDBC CHAR value had in the database, including any padding added by the database.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value. If the value is SQL NULL, the result is null.
Throws:
java.sql.SQLException - if a database access error occurs

getString

  1. java.lang.String getString(java.lang.String parameterName)
  2. throws java.sql.SQLException

Retrieves the value of a JDBC CHAR, VARCHAR, or LONGVARCHAR parameter as a String in the Java programming language.

For the fixed-length type JDBC CHAR, the String object returned has exactly the same value the JDBC CHAR value had in the database, including any padding added by the database.

Parameters:
parameterName - - the name of the parameter
Returns:
the parameter value. If the value is SQL NULL, the result is null.
Throws:
java.sql.SQLException - if a database access error occurs

getTime

  1. java.sql.Time getTime(int parameterIndex)
  2. throws java.sql.SQLException

Retrieves the value of the designated JDBC TIME parameter as a java.sql.Time object.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value. If the value is SQL NULL, the result is null.
Throws:
java.sql.SQLException - if a database access error occurs

getTime

  1. java.sql.Time getTime(int parameterIndex,
  2. java.util.Calendar cal)
  3. throws java.sql.SQLException

Retrieves the value of the designated JDBC TIME parameter as a java.sql.Time object, using the given Calendar object to construct the time. With a Calendar object, the driver can calculate the time taking into account a custom timezone and locale. If no Calendar object is specified, the driver uses the default timezone and locale.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
cal - the Calendar object the driver will use to construct the time
Returns:
the parameter value; if the value is SQL NULL, the result is null.
Throws:
java.sql.SQLException - if a database access error occurs

getTime

  1. java.sql.Time getTime(java.lang.String parameterName)
  2. throws java.sql.SQLException

Retrieves the value of a JDBC TIME parameter as a java.sql.Time object.

Parameters:
parameterName - the name of the parameter
Returns:
the parameter value. If the value is SQL NULL, the result is null.
Throws:
java.sql.SQLException - if a database access error occurs

getTime

  1. java.sql.Time getTime(java.lang.String parameterName,
  2. java.util.Calendar cal)
  3. throws java.sql.SQLException

Retrieves the value of a JDBC TIME parameter as a java.sql.Time object, using the given Calendar object to construct the time. With a Calendar object, the driver can calculate the time taking into account a custom timezone and locale. If no Calendar object is specified, the driver uses the default timezone and locale.

Parameters:
parameterName - the name of the parameter
cal - the Calendar object the driver will use to construct the time
Returns:
the parameter value; if the value is SQL NULL, the result is null.
Throws:
java.sql.SQLException - - if a database access error occurs

getTimestamp

  1. java.sql.Timestamp getTimestamp( int parameterIndex)
  2. throws java.sql.SQLException

Retrieves the value of the designated JDBC TIMESTAMP parameter as a java.sql.Timestamp object.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
Returns:
the parameter value. If the value is SQL NULL, the result is null.
Throws:
java.sql.SQLException - if a database access error occurs

getTimestamp

  1. java.sql.Timestamp getTimestamp( int parameterIndex,
  2. java.util.Calendar cal)
  3. throws java.sql.SQLException

Retrieves the value of the designated JDBC TIMESTAMP parameter as a java.sql.Timestamp object, using the given Calendar object to construct the Timestamp object. With a Calendar object, the driver can calculate the timestamp taking into account a custom timezone and locale. If no Calendar object is specified, the driver uses the default timezone and locale.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, and so on
cal - the Calendar object the driver will use to construct the timestamp
Returns:
the parameter value. If the value is SQL NULL, the result is null.
Throws:
java.sql.SQLException - if a database access error occurs

getTimestamp

  1. java.sql.Timestamp getTimestamp( java.lang.String parameterName)
  2. throws java.sql.SQLException

Retrieves the value of the designated JDBC TIMESTAMP parameter as a java.sql.Timestamp object.

Parameters:
parameterName - the name of the parameter
Returns:
the parameter value. If the value is SQL NULL, the result is null.
Throws:
java.sql.SQLException - if a database access error occurs

getTimestamp

  1. java.sql.Timestamp getTimestamp( java.lang.String parameterName,
  2. java.util.Calendar cal)
  3. throws java.sql.SQLException

Retrieves the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object, using the given Calendar object to construct the Timestamp object. With a Calendar object, the driver can calculate the timestamp taking into account a custom timezone and locale. If no Calendar object is specified, the driver uses the default timezone and locale.

cal - the Calendar object the driver will use to construct the timestamp
Returns:
the parameter value. If the value is SQL NULL, the result is null.
Throws:
java.sql.SQLException - if a database access error occurs

getURL

  1. java.net.URL getURL(int parameterIndex)
  2. throws java.sql.SQLException

Retrieves the value of the designated JDBC DATALINK parameter as a java.net.URL object.

Parameters:
parameterIndex - the first parameter is 1, the second is 2,...
Returns:
a java.net.URL object that represents the JDBC DATALINK value used as the designated parameter
Throws:
java.sql.SQLException - if a database access error occurs, or if the URL being returned is not a valid URL on the Java platform

getURL

  1. java.net.URL getURL(java.lang.String parameterName)
  2. throws java.sql.SQLException

Retrieves the value of a JDBC DATALINK parameter as a java.net.URL object.

Parameters:
parameterName - the name of the parameter
Returns:
the parameter value as a java.net.URL object in the Java programming language. If the value was SQL NULL, the value null is returned.
Throws:
java.sql.SQLException - if a database access error occurs, or if there is a problem with the URL

wasNull

  1. boolean wasNull()
  2. throws java.sql.SQLException

Retrieves whether the last OUT parameter read had the value of SQL NULL. Note that this method should be called only after calling a getter method; otherwise, there is no value to use in determining whether it is null or not.

Returns:
true if the last parameter read was SQL NULL; false otherwise
Throws:
java.sql.SQLException - if a database access error occurs
IBM WebSphere Application ServerTM
Release 8