com.ibm.websphere.rsadapter

Interface WSRdbRecord

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


    public interface WSRdbRecord
    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

      Methods 
      Modifier and Type Method and Description
      java.sql.Array getArray(int i)
      Retrieves the value of the designated JDBC ARRAY parameter as an Array object in the Java programming language.
      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.
      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.
      java.math.BigDecimal getBigDecimal(int parameterIndex, int scale)
      Deprecated. 
      use getBigDecimal(int parameterIndex) or getBigDecimal(String parameterName)
      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.
      java.sql.Blob getBlob(int i)
      Retrieves the value of the designated JDBC BLOB parameter as a Blob object in the Java programming language.
      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.
      boolean getBoolean(int parameterIndex)
      Retrieves the value of the designated JDBC BIT parameter as a boolean in the Java programming language.
      boolean getBoolean(java.lang.String parameterName)
      Retrieves the value of a JDBC BIT parameter as a boolean in the Java programming language.
      byte getByte(int parameterIndex)
      Retrieves the value of the designated JDBC TINYINT parameter as a byte in the Java programming language.
      byte getByte(java.lang.String parameterName)
      Retrieves the value of a JDBC TINYINT parameter as a byte in the Java programming language.
      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.
      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.
      java.sql.Clob getClob(int i)
      Retrieves the value of the designated JDBC CLOB parameter as a Clob object in the Java programming language.
      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.
      java.sql.Date getDate(int parameterIndex)
      Retrieves the value of the designated JDBC DATE parameter as a java.sql.Date object.
      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.
      java.sql.Date getDate(java.lang.String parameterName)
      Retrieves the value of a JDBC DATE parameter as a java.sql.Date object.
      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.
      double getDouble(int parameterIndex)
      Retrieves the value of the designated JDBC DOUBLE parameter as a double in the Java programming language.
      double getDouble(java.lang.String parameterName)
      Retrieves the value of a JDBC DOUBLE parameter as a double in the Java programming language.
      float getFloat(int parameterIndex)
      Retrieves the value of the designated JDBC FLOAT parameter as a float in the Java programming language.
      float getFloat(java.lang.String parameterName)
      Retrieves the value of a JDBC FLOAT parameter as a float in the Java programming language.
      int getInt(int parameterIndex)
      Retrieves the value of the designated JDBC INTEGER parameter as an int in the Java programming language.
      int getInt(java.lang.String parameterName)
      Retrieves the value of a JDBC INTEGER parameter as an int in the Java programming language.
      long getLong(int parameterIndex)
      Retrieves the value of the designated JDBC BIGINT parameter as a long in the Java programming language.
      long getLong(java.lang.String parameterName)
      Retrieves the value of a JDBC BIGINT parameter as a long in the Java programming language.
      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.
      java.lang.Object getObject(int parameterIndex)
      Retrieves the value of the designated parameter as an Object in the Java programming language.
      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.
      java.lang.Object getObject(java.lang.String parameterName)
      Retrieves the value of a parameter as an Object in the Java programming language.
      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.
      java.sql.Ref getRef(int i)
      Retrieves the value of the designated JDBC REF() parameter as a Ref object in the Java programming language.
      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.
      java.sql.ResultSet getResultSet()
      Retrieves the current result as a ResultSet object.
      short getShort(int parameterIndex)
      Retrieves the value of the designated JDBC SMALLINT parameter as a short in the Java programming language.
      short getShort(java.lang.String parameterName)
      Retrieves the value of a JDBC SMALLINT parameter as a short in the Java programming language.
      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.
      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.
      java.sql.Time getTime(int parameterIndex)
      Retrieves the value of the designated JDBC TIME parameter as a java.sql.Time object.
      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.
      java.sql.Time getTime(java.lang.String parameterName)
      Retrieves the value of a JDBC TIME parameter as a java.sql.Time object.
      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.
      java.sql.Timestamp getTimestamp(int parameterIndex)
      Retrieves the value of the designated JDBC TIMESTAMP parameter as a java.sql.Timestamp object.
      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.
      java.sql.Timestamp getTimestamp(java.lang.String parameterName)
      Retrieves the value of the designated JDBC TIMESTAMP parameter as a java.sql.Timestamp object.
      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.
      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.
      java.net.URL getURL(int parameterIndex)
      Retrieves the value of the designated JDBC DATALINK parameter as a java.net.URL object.
      java.net.URL getURL(java.lang.String parameterName)
      Retrieves the value of a JDBC DATALINK parameter as a java.net.URL object.
      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

        java.sql.ResultSet getResultSet()
                                        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

        int getUpdateCount()
                           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

        boolean getMoreResults()
                               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

        java.sql.Array getArray(int i)
                                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

        java.sql.Array getArray(java.lang.String parameterName)
                                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
      • getBigDecimal

        java.math.BigDecimal getBigDecimal(int parameterIndex)
                                           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

        java.math.BigDecimal getBigDecimal(int parameterIndex,
                                         int scale)
                                           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

        java.math.BigDecimal getBigDecimal(java.lang.String parameterName)
                                           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

        java.sql.Blob getBlob(int i)
                              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

        java.sql.Blob getBlob(java.lang.String parameterName)
                              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

        boolean getBoolean(int parameterIndex)
                           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

        boolean getBoolean(java.lang.String parameterName)
                           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

        byte getByte(int parameterIndex)
                     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

        byte getByte(java.lang.String parameterName)
                     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

        byte[] getBytes(int parameterIndex)
                        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

        byte[] getBytes(java.lang.String parameterName)
                        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

        java.sql.Clob getClob(int i)
                              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

        java.sql.Clob getClob(java.lang.String parameterName)
                              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

        java.sql.Date getDate(int parameterIndex)
                              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

        java.sql.Date getDate(int parameterIndex,
                            java.util.Calendar cal)
                              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

        java.sql.Date getDate(java.lang.String parameterName)
                              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

        java.sql.Date getDate(java.lang.String parameterName,
                            java.util.Calendar cal)
                              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

        double getDouble(int parameterIndex)
                         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

        double getDouble(java.lang.String parameterName)
                         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

        float getFloat(int parameterIndex)
                       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

        float getFloat(java.lang.String parameterName)
                       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

        int getInt(int parameterIndex)
                   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

        int getInt(java.lang.String parameterName)
                   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

        long getLong(int parameterIndex)
                     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

        long getLong(java.lang.String parameterName)
                     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

        java.lang.Object getObject(int parameterIndex)
                                   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

        java.lang.Object getObject(int i,
                                 java.util.Map map)
                                   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

        java.lang.Object getObject(java.lang.String parameterName)
                                   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

        java.lang.Object getObject(java.lang.String parameterName,
                                 java.util.Map map)
                                   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

        java.sql.Ref getRef(int i)
                            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

        java.sql.Ref getRef(java.lang.String parameterName)
                            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

        short getShort(int parameterIndex)
                       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

        short getShort(java.lang.String parameterName)
                       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

        java.lang.String getString(int parameterIndex)
                                   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

        java.lang.String getString(java.lang.String parameterName)
                                   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

        java.sql.Time getTime(int parameterIndex)
                              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

        java.sql.Time getTime(int parameterIndex,
                            java.util.Calendar cal)
                              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

        java.sql.Time getTime(java.lang.String parameterName)
                              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

        java.sql.Time getTime(java.lang.String parameterName,
                            java.util.Calendar cal)
                              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

        java.sql.Timestamp getTimestamp(int parameterIndex)
                                        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

        java.sql.Timestamp getTimestamp(int parameterIndex,
                                      java.util.Calendar cal)
                                        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

        java.sql.Timestamp getTimestamp(java.lang.String parameterName)
                                        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

        java.sql.Timestamp getTimestamp(java.lang.String parameterName,
                                      java.util.Calendar cal)
                                        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.

        Parameters:
        prameterName - the name of the parameter
        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

        java.net.URL getURL(int parameterIndex)
                            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

        java.net.URL getURL(java.lang.String parameterName)
                            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

        boolean wasNull()
                        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.5