oracle.jdbc.driver
Class OracleCallableStatement

oracle.jdbc.driver.OracleCallableStatement

public class OracleCallableStatement

Oracle callable statement.


Method Summary
 void addBatch()
          Add a set of parameters to the batch.
 void clearParameters()
           
 void close()
          Close the current result set, if any, and then close the statement.
 java.sql.Array getArray(int parameterIndex)
           
 ARRAY getARRAY(int parameterIndex)
           
 java.io.InputStream getAsciiStream(int parameterIndex)
           
 BFILE getBFILE(int parameterIndex)
           
 java.math.BigDecimal getBigDecimal(int parameterIndex)
           
 java.math.BigDecimal getBigDecimal(int parameterIndex, int scale)
           
 java.io.InputStream getBinaryStream(int parameterIndex)
           
 java.sql.Blob getBlob(int parameterIndex)
           
 BLOB getBLOB(int parameterIndex)
           
 boolean getBoolean(int parameterIndex)
           
 byte getByte(int parameterIndex)
           
 byte[] getBytes(int parameterIndex)
           
 CHAR getCHAR(int parameterIndex)
           
 java.sql.Clob getClob(int parameterIndex)
           
 CLOB getCLOB(int parameterIndex)
           
 java.sql.ResultSet getCursor(int parameterIndex)
           
 java.lang.Object getCustomDatum(int parameterIndex, CustomDatumFactory factory)
           
 java.sql.Date getDate(int parameterIndex)
           
 DATE getDATE(int parameterIndex)
           
 java.sql.Date getDate(int parameterIndex, java.util.Calendar cal)
           
 double getDouble(int parameterIndex)
           
 float getFloat(int parameterIndex)
           
 int getInt(int parameterIndex)
           
 long getLong(int parameterIndex)
           
 NUMBER getNUMBER(int parameterIndex)
           
 java.lang.Object getObject(int parameterIndex)
           
 java.lang.Object getObject(int parameterIndex, java.util.Map map)
           
 OPAQUE getOPAQUE(int parameterIndex)
           
 Datum getOracleObject(int parameterIndex)
           
 Datum[] getOraclePlsqlIndexTable(int paramIndex)
          Oracle OCI driver specific.
 java.lang.Object getORAData(int parameterIndex, ORADataFactory factory)
           
 java.lang.Object getPlsqlIndexTable(int paramIndex)
          Oracle OCI driver specific.
 java.lang.Object getPlsqlIndexTable(int paramIndex, java.lang.Class primitiveType)
          Oracle OCI driver specific.
 RAW getRAW(int parameterIndex)
           
 java.sql.Ref getRef(int parameterIndex)
           
 REF getREF(int parameterIndex)
           
 ROWID getROWID(int parameterIndex)
           
 short getShort(int parameterIndex)
           
 java.lang.String getString(int parameterIndex)
           
 STRUCT getSTRUCT(int parameterIndex)
           
 java.sql.Time getTime(int parameterIndex)
           
 java.sql.Time getTime(int parameterIndex, java.util.Calendar cal)
           
 java.sql.Timestamp getTimestamp(int parameterIndex)
           
 TIMESTAMP getTIMESTAMP(int parameterIndex)
           
 java.sql.Timestamp getTimestamp(int parameterIndex, java.util.Calendar cal)
           
 TIMESTAMPLTZ getTIMESTAMPLTZ(int parameterIndex)
           
 TIMESTAMPTZ getTIMESTAMPTZ(int parameterIndex)
           
 java.io.InputStream getUnicodeStream(int parameterIndex)
           
 void registerIndexTableOutParameter(int paramIndex, int maxLen, int elemSqlType, int elemMaxLen)
          Oracle OCI driver specific.
 void registerOutParameter(int paramIndex, int sqlType)
           
 void registerOutParameter(int paramIndex, int sqlType, int scale)
           
 void registerOutParameter(int paramIndex, int sqlType, int scale, int maxLength)
          Special Oracle version of registerOutParameter for registering CHAR, VARCHAR, LONG, RAW and LONG RAW columns.
 void registerOutParameter(int paramIndex, int sqlType, java.lang.String sqlName)
          Special Oracle version of registerOutParameter for registering Object columns.
 int sendBatch()
          Send the sets of parameters batched (for Oracle-style batching only).
 void setExecuteBatch(int nrows)
          Set the batch value (for Oracle-style batching only).
 void setFormOfUse(int paramIndex, short formOfUse)
          Sets the "Form Of Use".
 boolean wasNull()
           
 

Method Detail

registerOutParameter

public void registerOutParameter(int paramIndex,
                                 int sqlType,
                                 java.lang.String sqlName)
                          throws java.sql.SQLException
Special Oracle version of registerOutParameter for registering Object columns.
Parameters:
paramIndex - parameter index.
sqlType - use OracleTypes.STRUCT, OracleTypes.ARRAY, OracleTypes.REF, or OracleTypes.OPAQUE.
sqlName - SQL name of the object.
Throws:
java.sql.SQLException - if sqlType is invalid, or an error occurred.

registerOutParameter

public void registerOutParameter(int paramIndex,
                                 int sqlType,
                                 int scale,
                                 int maxLength)
                          throws java.sql.SQLException
Special Oracle version of registerOutParameter for registering CHAR, VARCHAR, LONG, RAW and LONG RAW columns.
Parameters:
paramIndex - parameter index (the first parameter is 1).
sqlType - type of the bind parameter,
scale - not used.
maxLength - maximum length of the column. If not specified, maximum length allowed for that type is used.

setExecuteBatch

public void setExecuteBatch(int nrows)
                     throws java.sql.SQLException
Set the batch value (for Oracle-style batching only).

Oracle-style batching is not supported for a callable statement. This method always sets the batch value to 1.


sendBatch

public int sendBatch()
              throws java.sql.SQLException
Send the sets of parameters batched (for Oracle-style batching only).

Oracle-style batching is not supported for a callable statement. This method simply returns the number of valid rows.


registerOutParameter

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

registerOutParameter

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

wasNull

public boolean wasNull()
                throws java.sql.SQLException

getString

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

getOracleObject

public Datum getOracleObject(int parameterIndex)
                      throws java.sql.SQLException

getROWID

public ROWID getROWID(int parameterIndex)
               throws java.sql.SQLException

getNUMBER

public NUMBER getNUMBER(int parameterIndex)
                 throws java.sql.SQLException

getDATE

public DATE getDATE(int parameterIndex)
             throws java.sql.SQLException

getTIMESTAMP

public TIMESTAMP getTIMESTAMP(int parameterIndex)
                       throws java.sql.SQLException

getTIMESTAMPTZ

public TIMESTAMPTZ getTIMESTAMPTZ(int parameterIndex)
                           throws java.sql.SQLException

getTIMESTAMPLTZ

public TIMESTAMPLTZ getTIMESTAMPLTZ(int parameterIndex)
                             throws java.sql.SQLException

getREF

public REF getREF(int parameterIndex)
           throws java.sql.SQLException

getARRAY

public ARRAY getARRAY(int parameterIndex)
               throws java.sql.SQLException

getSTRUCT

public STRUCT getSTRUCT(int parameterIndex)
                 throws java.sql.SQLException

getOPAQUE

public OPAQUE getOPAQUE(int parameterIndex)
                 throws java.sql.SQLException

getCHAR

public CHAR getCHAR(int parameterIndex)
             throws java.sql.SQLException

getRAW

public RAW getRAW(int parameterIndex)
           throws java.sql.SQLException

getBLOB

public BLOB getBLOB(int parameterIndex)
             throws java.sql.SQLException

getCLOB

public CLOB getCLOB(int parameterIndex)
             throws java.sql.SQLException

getBFILE

public BFILE getBFILE(int parameterIndex)
               throws java.sql.SQLException

getBoolean

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

getByte

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

getShort

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

getInt

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

getLong

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

getFloat

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

getDouble

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

getBigDecimal

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

getBytes

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

getDate

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

getTime

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

getTimestamp

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

getAsciiStream

public java.io.InputStream getAsciiStream(int parameterIndex)
                                   throws java.sql.SQLException

getUnicodeStream

public java.io.InputStream getUnicodeStream(int parameterIndex)
                                     throws java.sql.SQLException

getBinaryStream

public java.io.InputStream getBinaryStream(int parameterIndex)
                                    throws java.sql.SQLException

getObject

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

getCustomDatum

public java.lang.Object getCustomDatum(int parameterIndex,
                                       CustomDatumFactory factory)
                                throws java.sql.SQLException

getORAData

public java.lang.Object getORAData(int parameterIndex,
                                   ORADataFactory factory)
                            throws java.sql.SQLException

getCursor

public java.sql.ResultSet getCursor(int parameterIndex)
                             throws java.sql.SQLException

clearParameters

public void clearParameters()
                     throws java.sql.SQLException

getObject

public java.lang.Object getObject(int parameterIndex,
                                  java.util.Map map)
                           throws java.sql.SQLException

getRef

public java.sql.Ref getRef(int parameterIndex)
                    throws java.sql.SQLException

getBlob

public java.sql.Blob getBlob(int parameterIndex)
                      throws java.sql.SQLException

getClob

public java.sql.Clob getClob(int parameterIndex)
                      throws java.sql.SQLException

getArray

public java.sql.Array getArray(int parameterIndex)
                        throws java.sql.SQLException

getBigDecimal

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

getDate

public java.sql.Date getDate(int parameterIndex,
                             java.util.Calendar cal)
                      throws java.sql.SQLException

getTime

public java.sql.Time getTime(int parameterIndex,
                             java.util.Calendar cal)
                      throws java.sql.SQLException

getTimestamp

public java.sql.Timestamp getTimestamp(int parameterIndex,
                                       java.util.Calendar cal)
                                throws java.sql.SQLException

addBatch

public void addBatch()
              throws java.sql.SQLException
Add a set of parameters to the batch.
Throws:
java.sql.SQLException - if an error occurred. Note that stored procedures with out or inout parameters cannot be batched.
Since:
8.1.6 (JDBC 2.0).

close

public void close()
           throws java.sql.SQLException
Close the current result set, if any, and then close the statement.
Throws:
java.sql.SQLException - if error(s) occurred.

registerIndexTableOutParameter

public void registerIndexTableOutParameter(int paramIndex,
                                           int maxLen,
                                           int elemSqlType,
                                           int elemMaxLen)
                                    throws java.sql.SQLException
Oracle OCI driver specific. Special Oracle version of registerOutParameter for registering PLSQL index table parameter.
Parameters:
paramIndex - parameter index.
maxLen - the maximum possible number of elements.
curLen - the current number of elements
elemSqlType - index table element SQL type (as defined in java.sql.Types or OracleTypes).
elemMaxLen - maximum length of the element. If not specified, maximum length allowed for that type is used.
Throws:
java.sql.SQLException - if sqlType is invalid, or an error occurred.
Since:
8.1.7

getPlsqlIndexTable

public java.lang.Object getPlsqlIndexTable(int paramIndex)
                                    throws java.sql.SQLException
Oracle OCI driver specific. Get the value of a PLSQL index table parameter as a Java array. The type of the Java arry will be the default Java object type corresponding to the element's SQL type, following the mapping for built-in types specified in the JDBC spec.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
A java.lang.Object holding the parameter value.
Throws:
java.sql.SQLException - if a database-access error occurs.

getPlsqlIndexTable

public java.lang.Object getPlsqlIndexTable(int paramIndex,
                                           java.lang.Class primitiveType)
                                    throws java.sql.SQLException
Oracle OCI driver specific. Get the value of a PLSQL index table parameter as a primitive array. 'primitiveType' speicifies the return array type.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
primitiveType - is a primitive type class. For example,java.lang.Double.Type
Returns:
A java.lang.Object holding the parameter value.
Throws:
java.sql.SQLException - if a database-access error occurs.

getOraclePlsqlIndexTable

public Datum[] getOraclePlsqlIndexTable(int paramIndex)
                                 throws java.sql.SQLException
Oracle OCI driver specific. Get the value of a PLSQL index table parameter as a oracle.sql.Datum array.
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
A Datum array holding the parameter value.
Throws:
java.sql.SQLException - if a database-access error occurs.

setFormOfUse

public void setFormOfUse(int paramIndex,
                         short formOfUse)
Sets the "Form Of Use". See the javadoc in the interface.