java.sql

Interface CallableStatement

All Superinterfaces:
PreparedStatement, Statement

public interface CallableStatement
extends PreparedStatement

This interface provides a mechanism for calling stored procedures.

Fields inherited from interface java.sql.Statement

CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO

Method Summary

Array
getArray(int index)
This method returns the value of the specified parameter as a Java Array.
Array
getArray(String name)
This method returns the value of the specified parameter as a Java Array.
BigDecimal
getBigDecimal(int index)
This method returns the value of the specified parameter as a Java BigDecimal.
BigDecimal
getBigDecimal(int index, int scale)
Deprecated. Use getBigDecimal(int index) or getBigDecimal(String name) instead.
BigDecimal
getBigDecimal(String name)
This method returns the value of the specified parameter as a Java BigDecimal.
Blob
getBlob(int index)
This method returns the value of the specified parameter as a Java Blob.
Blob
getBlob(String name)
This method returns the value of the specified parameter as a Java Blob.
boolean
getBoolean(int index)
This method returns the value of the specified parameter as a Java boolean.
boolean
getBoolean(String name)
This method returns the value of the specified parameter as a Java boolean.
byte
getByte(int index)
This method returns the value of the specified parameter as a Java byte.
byte
getByte(String name)
This method returns the value of the specified parameter as a Java byte.
byte[]
getBytes(int index)
This method returns the value of the specified parameter as a Java byte array.
byte[]
getBytes(String name)
This method returns the value of the specified parameter as a Java byte array.
Clob
getClob(int index)
This method returns the value of the specified parameter as a Java Clob.
Clob
getClob(String name)
This method returns the value of the specified parameter as a Java Clob.
Date
getDate(int index)
This method returns the value of the specified parameter as a Java java.sql.Date.
Date
getDate(int index, Calendar cal)
This method returns the value of the specified parameter as a Java java.sql.Date.
Date
getDate(String name)
This method returns the value of the specified parameter as a Java java.sql.Date.
Date
getDate(String name, Calendar cal)
This method returns the value of the specified parameter as a Java java.sql.Date.
double
getDouble(int index)
This method returns the value of the specified parameter as a Java double.
double
getDouble(String name)
This method returns the value of the specified parameter as a Java double.
float
getFloat(int index)
This method returns the value of the specified parameter as a Java float.
float
getFloat(String name)
This method returns the value of the specified parameter as a Java float.
int
getInt(int index)
This method returns the value of the specified parameter as a Java int.
int
getInt(String name)
This method returns the value of the specified parameter as a Java int.
long
getLong(int index)
This method returns the value of the specified parameter as a Java long.
long
getLong(String name)
This method returns the value of the specified parameter as a Java long.
Object
getObject(int index)
This method returns the value of the specified parameter as a Java Object.
Object
getObject(int index, Map> map)
This method returns the value of the specified parameter as a Java Object.
Object
getObject(String name)
This method returns the value of the specified parameter as a Java Object.
Object
getObject(String name, Map> map)
This method returns the value of the specified parameter as a Java Object using the specified mapping for conversion from SQL to Java types.
Ref
getRef(int index)
This method returns the value of the specified parameter as a Java Ref.
Ref
getRef(String name)
This method returns the value of the specified parameter as a Java Ref.
short
getShort(int index)
This method returns the value of the specified parameter as a Java short.
short
getShort(String name)
This method returns the value of the specified parameter as a Java short.
String
getString(int index)
This method returns the value of the specified parameter as a Java String.
String
getString(String name)
This method returns the value of the specified parameter as a Java String.
Time
getTime(int index)
This method returns the value of the specified parameter as a Java java.sql.Time.
Time
getTime(int index, Calendar cal)
This method returns the value of the specified parameter as a Java java.sql.Time.
Time
getTime(String name)
This method returns the value of the specified parameter as a Java java.sql.Time.
Time
getTime(String name, Calendar cal)
This method returns the value of the specified parameter as a Java java.sql.Time.
Timestamp
getTimestamp(int index)
This method returns the value of the specified parameter as a Java java.sql.Timestamp.
Timestamp
getTimestamp(int index, Calendar cal)
This method returns the value of the specified parameter as a Java java.sql.Timestamp.
Timestamp
getTimestamp(String name)
This method returns the value of the specified parameter as a Java java.sql.Timestamp.
Timestamp
getTimestamp(String name, Calendar cal)
This method returns the value of the specified parameter as a Java java.sql.Timestamp.
URL
getURL(int index)
This method returns the value of the specified parameter as a Java java.net.URL.
URL
getURL(String name)
This method returns the value of the specified parameter as a Java java.net.URL.
void
registerOutParameter(int index, int sqlType)
This method registers the specified parameter as an output parameter of the specified SQL type.
void
registerOutParameter(int index, int sqlType, int scale)
This method registers the specified parameter as an output parameter of the specified SQL type and scale.
void
registerOutParameter(int index, int sqlType, String typeName)
This method registers the specified parameter as an output parameter of the specified SQL type.
void
registerOutParameter(String name, int sqlType)
This method registers the specified parameter as an output parameter of the specified SQL type.
void
registerOutParameter(String name, int sqlType, int scale)
This method registers the specified parameter as an output parameter of the specified SQL type.
void
registerOutParameter(String name, int sqlType, String typeName)
This method registers the specified parameter as an output parameter of the specified SQL type.
void
setAsciiStream(String name, InputStream stream, int count)
This method sets the specified parameter from the given Java ASCII InputStream value.
void
setBigDecimal(String name, BigDecimal value)
This method sets the specified parameter from the given Java BigDecimal value.
void
setBinaryStream(String name, InputStream stream, int count)
This method sets the specified parameter from the given Java binary InputStream value.
void
setBoolean(String name, boolean value)
This method sets the specified parameter from the given Java boolean value.
void
setByte(String name, byte value)
This method sets the specified parameter from the given Java byte value.
void
setBytes(String name, byte[] value)
This method sets the specified parameter from the given Java byte array value.
void
setCharacterStream(String name, Reader reader, int count)
This method sets the specified parameter from the given Java character Reader value.
void
setDate(String name, Date value)
This method sets the specified parameter from the given Java java.sql.Date value.
void
setDate(String name, Date value, Calendar cal)
This method sets the specified parameter from the given Java java.sql.Date value.
void
setDouble(String name, double value)
This method sets the specified parameter from the given Java double value.
void
setFloat(String name, float value)
This method sets the specified parameter from the given Java float value.
void
setInt(String name, int value)
This method sets the specified parameter from the given Java int value.
void
setLong(String name, long value)
This method sets the specified parameter from the given Java long value.
void
setNull(String name, int sqlType)
This method populates the specified parameter with a SQL NULL value for the specified type.
void
setNull(String name, int sqlType, String typeName)
This method populates the specified parameter with a SQL NULL value for the specified type.
void
setObject(String name, Object value)
This method sets the specified parameter from the given Java Object value.
void
setObject(String name, Object value, int sqlType)
This method sets the specified parameter from the given Java Object value.
void
setObject(String name, Object value, int sqlType, int scale)
This method sets the specified parameter from the given Java Object value.
void
setShort(String name, short value)
This method sets the specified parameter from the given Java short value.
void
setString(String name, String value)
This method sets the specified parameter from the given Java String value.
void
setTime(String name, Time value)
This method sets the specified parameter from the given Java java.sql.Time value.
void
setTime(String name, Time value, Calendar cal)
This method sets the specified parameter from the given Java java.sql.Time value.
void
setTimestamp(String name, Timestamp value)
This method sets the specified parameter from the given Java java.sql.Timestamp value.
void
setTimestamp(String name, Timestamp value, Calendar cal)
This method sets the specified parameter from the given Java java.sql.Timestamp value.
void
setURL(String name, URL value)
This method sets the value of the specified parameter to the specified java.net.URL
boolean
wasNull()
This method tests whether the value of the last parameter that was fetched was actually a SQL NULL value.

Methods inherited from interface java.sql.PreparedStatement

addBatch, clearParameters, execute, executeQuery, executeUpdate, getMetaData, getParameterMetaData, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNull, setNull, setObject, setObject, setObject, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setURL, setUnicodeStream

Methods inherited from interface java.sql.Statement

addBatch, cancel, clearBatch, clearWarnings, close, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout

Method Details

getArray

public Array getArray(int index)
            throws SQLException
This method returns the value of the specified parameter as a Java Array.
Parameters:
index - The index of the parameter to return.
Returns:
The parameter value as a Array.
Throws:
SQLException - If an error occurs.
Since:
1.2

getArray

public Array getArray(String name)
            throws SQLException
This method returns the value of the specified parameter as a Java Array.
Parameters:
name - The name of the parameter to return.
Returns:
The parameter value as a Array.
Throws:
SQLException - If an error occurs.
Since:
1.4

getBigDecimal

public BigDecimal getBigDecimal(int index)
            throws SQLException
This method returns the value of the specified parameter as a Java BigDecimal.
Parameters:
index - The index of the parameter to return.
Returns:
The parameter value as a BigDecimal.
Throws:
SQLException - If an error occurs.
Since:
1.2

getBigDecimal

public BigDecimal getBigDecimal(int index,
                                int scale)
            throws SQLException

Deprecated. Use getBigDecimal(int index) or getBigDecimal(String name) instead.

This method returns the value of the specified parameter as a Java BigDecimal.
Parameters:
index - The index of the parameter to return.
scale - The number of digits to the right of the decimal to return.
Returns:
The parameter value as a BigDecimal.
Throws:
SQLException - If an error occurs.

getBigDecimal

public BigDecimal getBigDecimal(String name)
            throws SQLException
This method returns the value of the specified parameter as a Java BigDecimal.
Parameters:
name - The name of the parameter to return.
Returns:
The parameter value as a BigDecimal.
Throws:
SQLException - If an error occurs.
Since:
1.4

getBlob

public Blob getBlob(int index)
            throws SQLException
This method returns the value of the specified parameter as a Java Blob.
Parameters:
index - The index of the parameter to return.
Returns:
The parameter value as a Blob.
Throws:
SQLException - If an error occurs.
Since:
1.2

getBlob

public Blob getBlob(String name)
            throws SQLException
This method returns the value of the specified parameter as a Java Blob.
Parameters:
name - The name of the parameter to return.
Returns:
The parameter value as a Blob.
Throws:
SQLException - If an error occurs.
Since:
1.4

getBoolean

public boolean getBoolean(int index)
            throws SQLException
This method returns the value of the specified parameter as a Java boolean.
Parameters:
index - The index of the parameter to return.
Returns:
The parameter value as a boolean.
Throws:
SQLException - If an error occurs.

getBoolean

public boolean getBoolean(String name)
            throws SQLException
This method returns the value of the specified parameter as a Java boolean.
Parameters:
name - The name of the parameter to return.
Returns:
The parameter value as a boolean.
Throws:
SQLException - If an error occurs.
Since:
1.4

getByte

public byte getByte(int index)
            throws SQLException
This method returns the value of the specified parameter as a Java byte.
Parameters:
index - The index of the parameter to return.
Returns:
The parameter value as a byte.
Throws:
SQLException - If an error occurs.

getByte

public byte getByte(String name)
            throws SQLException
This method returns the value of the specified parameter as a Java byte.
Parameters:
name - The name of the parameter to return.
Returns:
The parameter value as a byte.
Throws:
SQLException - If an error occurs.
Since:
1.4

getBytes

public byte[] getBytes(int index)
            throws SQLException
This method returns the value of the specified parameter as a Java byte array.
Parameters:
index - The index of the parameter to return.
Returns:
The parameter value as a byte array
Throws:
SQLException - If an error occurs.

getBytes

public byte[] getBytes(String name)
            throws SQLException
This method returns the value of the specified parameter as a Java byte array.
Parameters:
name - The name of the parameter to return.
Returns:
The parameter value as a byte[].
Throws:
SQLException - If an error occurs.
Since:
1.4

getClob

public Clob getClob(int index)
            throws SQLException
This method returns the value of the specified parameter as a Java Clob.
Parameters:
index - The index of the parameter to return.
Returns:
The parameter value as a Clob.
Throws:
SQLException - If an error occurs.
Since:
1.2

getClob

public Clob getClob(String name)
            throws SQLException
This method returns the value of the specified parameter as a Java Clob.
Parameters:
name - The name of the parameter to return.
Returns:
The parameter value as a Clob.
Throws:
SQLException - If an error occurs.
Since:
1.4

getDate

public Date getDate(int index)
            throws SQLException
This method returns the value of the specified parameter as a Java java.sql.Date.
Parameters:
index - The index of the parameter to return.
Returns:
The parameter value as a java.sql.Date.
Throws:
SQLException - If an error occurs.

getDate

public Date getDate(int index,
                    Calendar cal)
            throws SQLException
This method returns the value of the specified parameter as a Java java.sql.Date.
Parameters:
index - The index of the parameter to return.
cal - The Calendar to use for timezone and locale.
Returns:
The parameter value as a java.sql.Date.
Throws:
SQLException - If an error occurs.
Since:
1.2

getDate

public Date getDate(String name)
            throws SQLException
This method returns the value of the specified parameter as a Java java.sql.Date.
Parameters:
name - The name of the parameter to return.
Returns:
The parameter value as a java.sql.Date.
Throws:
SQLException - If an error occurs.
Since:
1.4

getDate

public Date getDate(String name,
                    Calendar cal)
            throws SQLException
This method returns the value of the specified parameter as a Java java.sql.Date.
Parameters:
name - The name of the parameter to return.
cal - The Calendar to use for timezone and locale.
Returns:
The parameter value as a java.sql.Date.
Throws:
SQLException - If an error occurs.
Since:
1.4

getDouble

public double getDouble(int index)
            throws SQLException
This method returns the value of the specified parameter as a Java double.
Parameters:
index - The index of the parameter to return.
Returns:
The parameter value as a double.
Throws:
SQLException - If an error occurs.

getDouble

public double getDouble(String name)
            throws SQLException
This method returns the value of the specified parameter as a Java double.
Parameters:
name - The name of the parameter to return.
Returns:
The parameter value as a double.
Throws:
SQLException - If an error occurs.
Since:
1.4

getFloat

public float getFloat(int index)
            throws SQLException
This method returns the value of the specified parameter as a Java float.
Parameters:
index - The index of the parameter to return.
Returns:
The parameter value as a float.
Throws:
SQLException - If an error occurs.

getFloat

public float getFloat(String name)
            throws SQLException
This method returns the value of the specified parameter as a Java float.
Parameters:
name - The name of the parameter to return.
Returns:
The parameter value as a float.
Throws:
SQLException - If an error occurs.
Since:
1.4

getInt

public int getInt(int index)
            throws SQLException
This method returns the value of the specified parameter as a Java int.
Parameters:
index - The index of the parameter to return.
Returns:
The parameter value as a int.
Throws:
SQLException - If an error occurs.

getInt

public int getInt(String name)
            throws SQLException
This method returns the value of the specified parameter as a Java int.
Parameters:
name - The name of the parameter to return.
Returns:
The parameter value as a int.
Throws:
SQLException - If an error occurs.
Since:
1.4

getLong

public long getLong(int index)
            throws SQLException
This method returns the value of the specified parameter as a Java long.
Parameters:
index - The index of the parameter to return.
Returns:
The parameter value as a long.
Throws:
SQLException - If an error occurs.

getLong

public long getLong(String name)
            throws SQLException
This method returns the value of the specified parameter as a Java long.
Parameters:
name - The name of the parameter to return.
Returns:
The parameter value as a long.
Throws:
SQLException - If an error occurs.
Since:
1.4

getObject

public Object getObject(int index)
            throws SQLException
This method returns the value of the specified parameter as a Java Object.
Parameters:
index - The index of the parameter to return.
Returns:
The parameter value as an Object.
Throws:
SQLException - If an error occurs.
Since:
1.2

getObject

public Object getObject(int index,
                        Map> map)
            throws SQLException
This method returns the value of the specified parameter as a Java Object.
Parameters:
index - The index of the parameter to return.
map - The mapping to use for conversion from SQL to Java types.
Returns:
The parameter value as an Object.
Throws:
SQLException - If an error occurs.
Since:
1.2

getObject

public Object getObject(String name)
            throws SQLException
This method returns the value of the specified parameter as a Java Object.
Parameters:
name - The name of the parameter to return.
Returns:
The parameter value as a Object.
Throws:
SQLException - If an error occurs.
Since:
1.4

getObject

public Object getObject(String name,
                        Map> map)
            throws SQLException
This method returns the value of the specified parameter as a Java Object using the specified mapping for conversion from SQL to Java types.
Parameters:
name - The name of the parameter to return.
map - The mapping to use for conversion from SQL to Java types.
Returns:
The parameter value as an Object.
Throws:
SQLException - If an error occurs.
Since:
1.4

getRef

public Ref getRef(int index)
            throws SQLException
This method returns the value of the specified parameter as a Java Ref.
Parameters:
index - The index of the parameter to return.
Returns:
The parameter value as a Ref.
Throws:
SQLException - If an error occurs.
Since:
1.2

getRef

public Ref getRef(String name)
            throws SQLException
This method returns the value of the specified parameter as a Java Ref.
Parameters:
name - The name of the parameter to return.
Returns:
The parameter value as a Ref.
Throws:
SQLException - If an error occurs.
Since:
1.4

getShort

public short getShort(int index)
            throws SQLException
This method returns the value of the specified parameter as a Java short.
Parameters:
index - The index of the parameter to return.
Returns:
The parameter value as a short.
Throws:
SQLException - If an error occurs.

getShort

public short getShort(String name)
            throws SQLException
This method returns the value of the specified parameter as a Java short.
Parameters:
name - The name of the parameter to return.
Returns:
The parameter value as a short.
Throws:
SQLException - If an error occurs.
Since:
1.4

getString

public String getString(int index)
            throws SQLException
This method returns the value of the specified parameter as a Java String.
Parameters:
index - The index of the parameter to return.
Returns:
The parameter value as a String.
Throws:
SQLException - If an error occurs.

getString

public String getString(String name)
            throws SQLException
This method returns the value of the specified parameter as a Java String.
Parameters:
name - The name of the parameter to return.
Returns:
The parameter value as a String.
Throws:
SQLException - If an error occurs.
Since:
1.4

getTime

public Time getTime(int index)
            throws SQLException
This method returns the value of the specified parameter as a Java java.sql.Time.
Parameters:
index - The index of the parameter to return.
Returns:
The parameter value as a java.sql.Time.
Throws:
SQLException - If an error occurs.

getTime

public Time getTime(int index,
                    Calendar cal)
            throws SQLException
This method returns the value of the specified parameter as a Java java.sql.Time.
Parameters:
index - The index of the parameter to return.
cal - The Calendar to use for timezone and locale.
Returns:
The parameter value as a java.sql.Time.
Throws:
SQLException - If an error occurs.
Since:
1.2

getTime

public Time getTime(String name)
            throws SQLException
This method returns the value of the specified parameter as a Java java.sql.Time.
Parameters:
name - The name of the parameter to return.
Returns:
The parameter value as a java.sql.Time.
Throws:
SQLException - If an error occurs.
Since:
1.4

getTime

public Time getTime(String name,
                    Calendar cal)
            throws SQLException
This method returns the value of the specified parameter as a Java java.sql.Time.
Parameters:
name - The name of the parameter to return.
cal - The Calendar to use for timezone and locale.
Returns:
The parameter value as a java.sql.Time.
Throws:
SQLException - If an error occurs.
Since:
1.4

getTimestamp

public Timestamp getTimestamp(int index)
            throws SQLException
This method returns the value of the specified parameter as a Java java.sql.Timestamp.
Parameters:
index - The index of the parameter to return.
Returns:
The parameter value as a java.sql.Timestamp.
Throws:
SQLException - If an error occurs.

getTimestamp

public Timestamp getTimestamp(int index,
                              Calendar cal)
            throws SQLException
This method returns the value of the specified parameter as a Java java.sql.Timestamp.
Parameters:
index - The index of the parameter to return.
Returns:
The parameter value as a java.sql.Timestamp.
Throws:
SQLException - If an error occurs.
Since:
1.2

getTimestamp

public Timestamp getTimestamp(String name)
            throws SQLException
This method returns the value of the specified parameter as a Java java.sql.Timestamp.
Parameters:
name - The name of the parameter to return.
Returns:
The parameter value as a java.sql.Timestamp.
Throws:
SQLException - If an error occurs.
Since:
1.4

getTimestamp

public Timestamp getTimestamp(String name,
                              Calendar cal)
            throws SQLException
This method returns the value of the specified parameter as a Java java.sql.Timestamp.
Parameters:
name - The name of the parameter to return.
cal - The Calendar to use for timezone and locale.
Returns:
The parameter value as a java.sql.Timestamp.
Throws:
SQLException - If an error occurs.
Since:
1.4

getURL

public URL getURL(int index)
            throws SQLException