Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.share.sql
Class CallableStatementWrapper

    java.lang.Object
      oracle.ifs.share.sql.StatementWrapper
          oracle.ifs.share.sql.PreparedStatementWrapper
              oracle.ifs.share.sql.CallableStatementWrapper

Direct Known Subclasses:
  IfsCallableStatement

    public class CallableStatementWrapper

extends PreparedStatementWrapper

A CallableStatementWrapper wraps a JDBC CallableStatement, so that execution can be delegated to a ConnectionWrapper.

(Published)

Constructor Summary
`CallableStatementWrapper(java.sql.CallableStatement cstmt, ConnectionWrapper cw)` Constructs a CallableStatementWrapper.

Method Summary
`void` | `dispose()` Dispose and close the CallableStatementWrapper.
`java.math.BigDecimal` | `getBigDecimal(int paramIndex, int scale)` Get the value of a NUMERIC parameter as a java.math.BigDecimal object.
`boolean` | `getBoolean(int paramIndex)` Get the value of a BIT parameter as a Java boolean.
`byte` | `getByte(int paramIndex)` Get the value of a TINYINT parameter as a Java byte.
`byte[]` | `getBytes(int paramIndex)` Get the value of a SQL BINARY or VARBINARY parameter as a Java byte[]
`java.sql.Date` | `getDate(int paramIndex)` Get the value of a SQL DATE parameter as a Date object
`double` | `getDouble(int paramIndex)` Get the value of a DOUBLE parameter as a Java double.
`float` | `getFloat(int paramIndex)` Get the value of a FLOAT parameter as a Java float.
`int` | `getInt(int paramIndex)` Get the value of an INTEGER parameter as a Java int.
`long` | `getLong(int paramIndex)` Get the value of a BIGINT parameter as a Java long.
`java.lang.Object` | `getObject(int paramIndex)` Get the value of a parameter as a Java object.
`short` | `getShort(int paramIndex)` Get the value of a SMALLINT parameter as a Java short.
`java.lang.String` | `getString(int paramIndex)` Get the value of a CHAR, VARCHAR, or LONGVARCHAR parameter as a Java String.
`java.sql.Time` | `getTime(int paramIndex)` Get the value of a SQL TIME parameter as a Time object.
`java.sql.Timestamp` | `getTimestamp(int paramIndex)` Get the value of a SQL TIMESTAMP parameter as a Timestamp object.
`void` | `registerOutParameter(int paramIndex, int sqlType)` Before executing a stored procedure call, you must explicitly call registerOutParameter to register the Type of each out parameter.
`void` | `registerOutParameter(int paramIndex, int sqlType, int scale)` Use this version of registerOutParameter for registering Numeric or Decimal out parameters.
`boolean` | `wasNull()` An OUT parameter may have the value of SQL NULL; wasNull reports whether the last value read has this special value.

Methods inherited from class oracle.ifs.share.sql.PreparedStatementWrapper
`addBatch, clearParameters, execute, executeQuery, executeUpdate, setAsciiStream, setBigDecimal, setBinaryStream, setBoolean, setByte, setBytes, setDate, setDouble, setFloat, setInt, setLong, setNull, setObject, setObject, setObject, setShort, setString, setTime, setTimestamp, setUnicodeStream`

Methods inherited from class oracle.ifs.share.sql.StatementWrapper
`addBatch, cancel, clearBatch, clearWarnings, close, closeResultSet, closeStatement, closeStatement, execute, executeBatch, executeQuery, executeUpdate, getConnectionWrapper, getMaxFieldSize, getMaxRows, getMoreResults, getQueryTimeout, getResultSet, getUpdateCount, getWarnings, setCursorName, setEscapeProcessing, setMaxFieldSize, setMaxRows, setQueryTimeout`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CallableStatementWrapper

    public CallableStatementWrapper(java.sql.CallableStatement cstmt,
                                    ConnectionWrapper cw)

  Constructs a CallableStatementWrapper.

  Parameters:
    `cstmt` - CallableStatement instance to wrap
    `cw` - the ConnectionWrapper context
  (Published)

Method Detail

### registerOutParameter

    public void registerOutParameter(int paramIndex,
                                     int sqlType)
                              throws java.sql.SQLException

  Description copied from class: `CallableStatementWrapper`
  Before executing a stored procedure call, you must explicitly call registerOutParameter to register the Type of each out parameter.

  Note: When reading the value of an out parameter, you must use the getXXX method whose Java type XXX corresponds to the parameter's registered SQL type.

  Parameters:
    `paramIndex` - the first parameter is 1, the second is 2,...
    `sqlType` - SQL type code defined by Types; for parameters of type Numeric or Decimal use the version of registerOutParameter that accepts a scale value
  Throws:
    `java.sql.SQLException` - if a database-access error occurs.
  (Published)

### registerOutParameter

    public void registerOutParameter(int paramIndex,
                                     int sqlType,
                                     int scale)
                              throws java.sql.SQLException

  Description copied from class: `CallableStatementWrapper`
  Use this version of registerOutParameter for registering Numeric or Decimal out parameters.

  Note: When reading the value of an out parameter, you must use the getXXX method whose Java type XXX corresponds to the parameter's registered SQL type.

  Parameters:
    `paramIndex` - the first parameter is 1, the second is 2, ...
    `sqlType` - use either Type.NUMERIC or Type.DECIMAL
    `scale` - a value greater than or equal to zero representing the desired number of digits to the right of the decimal point.
  Throws:
    `java.sql.SQLException` - if a database-access error occurs.
  (Published)

### wasNull

    public boolean wasNull()
                    throws java.sql.SQLException

  Description copied from class: `CallableStatementWrapper`
  An OUT parameter may have the value of SQL NULL; wasNull reports whether the last value read has this special value.

  Note: You must first call getXXX on a parameter to read its value and then call wasNull() to see if the value was SQL NULL.

  Returns:
    true if the last parameter read was SQL NULL
  Throws:
    `java.sql.SQLException` - if a database-access error occurs.
  (Published)

### getString

    public java.lang.String getString(int paramIndex)
                               throws java.sql.SQLException

  Description copied from class: `CallableStatementWrapper`
  Get the value of a CHAR, VARCHAR, or LONGVARCHAR parameter as a Java String.

  Parameters:
    `paramIndex` - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is null
  Throws:
    `java.sql.SQLException` - if a database-access error occurs.
  (Published)

### getBoolean

    public boolean getBoolean(int paramIndex)
                       throws java.sql.SQLException

  Description copied from class: `CallableStatementWrapper`
  Get the value of a BIT parameter as a Java boolean.

  Parameters:
    `paramIndex` - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is false
  Throws:
    `java.sql.SQLException` - if a database-access error occurs.
  (Published)

### getByte

    public byte getByte(int paramIndex)
                 throws java.sql.SQLException

  Description copied from class: `CallableStatementWrapper`
  Get the value of a TINYINT parameter as a Java byte.

  Parameters:
    `paramIndex` - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is 0
  Throws:
    `java.sql.SQLException` - if a database-access error occurs.
  (Published)

### getShort

    public short getShort(int paramIndex)
                   throws java.sql.SQLException

  Description copied from class: `CallableStatementWrapper`
  Get the value of a SMALLINT parameter as a Java short.

  Parameters:
    `paramIndex` - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is 0
  Throws:
    `java.sql.SQLException` - if a database-access error occurs.
  (Published)

### getInt

    public int getInt(int paramIndex)
               throws java.sql.SQLException

  Description copied from class: `CallableStatementWrapper`
  Get the value of an INTEGER parameter as a Java int.

  Parameters:
    `paramIndex` - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is 0
  Throws:
    `java.sql.SQLException` - if a database-access error occurs.
  (Published)

### getLong

    public long getLong(int paramIndex)
                 throws java.sql.SQLException

  Description copied from class: `CallableStatementWrapper`
  Get the value of a BIGINT parameter as a Java long.

  Parameters:
    `paramIndex` - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is 0
  Throws:
    `java.sql.SQLException` - if a database-access error occurs.
  (Published)

### getFloat

    public float getFloat(int paramIndex)
                   throws java.sql.SQLException

  Description copied from class: `CallableStatementWrapper`
  Get the value of a FLOAT parameter as a Java float.

  Parameters:
    `paramIndex` - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is 0
  Throws:
    `java.sql.SQLException` - if a database-access error occurs.
  (Published)

### getDouble

    public double getDouble(int paramIndex)
                     throws java.sql.SQLException

  Description copied from class: `CallableStatementWrapper`
  Get the value of a DOUBLE parameter as a Java double.

  Parameters:
    `paramIndex` - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is 0
  Throws:
    `java.sql.SQLException` - if a database-access error occurs.
  (Published)

### getBigDecimal

    public java.math.BigDecimal getBigDecimal(int paramIndex,
                                              int scale)
                                       throws java.sql.SQLException

  Description copied from class: `CallableStatementWrapper`
  Get the value of a NUMERIC parameter as a java.math.BigDecimal object.

  Parameters:
    `paramIndex` - the first parameter is 1, the second is 2, ...
    `scale` - a value greater than or equal to zero representing the desired 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.
  (Published)

### getBytes

    public byte[] getBytes(int paramIndex)
                    throws java.sql.SQLException

  Description copied from class: `CallableStatementWrapper`
  Get the value of a SQL BINARY or VARBINARY parameter as a Java byte[]

  Parameters:
    `paramIndex` - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is null
  Throws:
    `java.sql.SQLException` - if a database-access error occurs.
  (Published)

### getDate

    public java.sql.Date getDate(int paramIndex)
                          throws java.sql.SQLException

  Description copied from class: `CallableStatementWrapper`
  Get the value of a SQL DATE parameter as a Date object

  Parameters:
    `paramIndex` - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is null
  Throws:
    `java.sql.SQLException` - if a database-access error occurs.
  (Published)

### getTime

    public java.sql.Time getTime(int paramIndex)
                          throws java.sql.SQLException

  Description copied from class: `CallableStatementWrapper`
  Get the value of a SQL TIME parameter as a Time object.

  Parameters:
    `paramIndex` - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is null
  Throws:
    `java.sql.SQLException` - if a database-access error occurs.
  (Published)

### getTimestamp

    public java.sql.Timestamp getTimestamp(int paramIndex)
                                    throws java.sql.SQLException

  Description copied from class: `CallableStatementWrapper`
  Get the value of a SQL TIMESTAMP parameter as a Timestamp object.

  Parameters:
    `paramIndex` - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is null
  Throws:
    `java.sql.SQLException` - if a database-access error occurs.
  (Published)

### getObject

    public java.lang.Object getObject(int paramIndex)
                               throws java.sql.SQLException

  Description copied from class: `CallableStatementWrapper`
  Get the value of a parameter as a Java object.

  This method returns a Java object whose type coresponds to the SQL type that was registered for this parameter using registerOutParameter.

  Note that this method may be used to read datatabase-specific, abstract data types. This is done by specifying a targetSqlType of java.sql.types.OTHER, which allows the driver to return a database-specific Java type.

  Parameters:
    `paramIndex` - The first parameter is 1, the second is 2, ...
  Returns:
    An object holding the OUT parameter value.
  Throws:
    `java.sql.SQLException` - if a database-access error occurs.
  (Published)

### dispose

    public void dispose()

  Description copied from class: `CallableStatementWrapper`
  Dispose and close the CallableStatementWrapper.

  Overrides:
    `dispose` in class `PreparedStatementWrapper`
  (Published)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD