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
This method returns the value of the specified parameter as a Java java.net.URL.
Parameters:
index - The index of the parameter to return.
Returns:
The parameter value as a URL.
Throws:
SQLException - If an error occurs.
Since:
1.4

getURL

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

registerOutParameter

public void registerOutParameter(int index,
                                 int sqlType)
            throws SQLException
This method registers the specified parameter as an output parameter of the specified SQL type.
Parameters:
index - The index of the parameter to register as output.
sqlType - The SQL type value from Types.
Throws:
SQLException - If an error occurs.

registerOutParameter

public void registerOutParameter(int index,
                                 int sqlType,
                                 int scale)
            throws SQLException
This method registers the specified parameter as an output parameter of the specified SQL type and scale.
Parameters:
index - The index of the parameter to register as output.
sqlType - The SQL type value from Types.
scale - The scale of the value that will be returned.
Throws:
SQLException - If an error occurs.

registerOutParameter

public void registerOutParameter(int index,
                                 int sqlType,
                                 String typeName)
            throws SQLException
This method registers the specified parameter as an output parameter of the specified SQL type.
Parameters:
index - The index of the parameter to register as output.
sqlType - The SQL type value from Types.
typeName - The user defined data type name.
Throws:
SQLException - If an error occurs.
Since:
1.2

registerOutParameter

public void registerOutParameter(String name,
                                 int sqlType)
            throws SQLException
This method registers the specified parameter as an output parameter of the specified SQL type.
Parameters:
name - The name of the parameter to register as output.
sqlType - The SQL type value from Types.
Throws:
SQLException - If an error occurs.
Since:
1.4

registerOutParameter

public void registerOutParameter(String name,
                                 int sqlType,
                                 int scale)
            throws SQLException
This method registers the specified parameter as an output parameter of the specified SQL type. This version of registerOutParameter is used for NUMERIC or DECIMAL types.
Parameters:
name - The name of the parameter to register as output.
sqlType - The SQL type value from Types.
scale - Number of digits to the right of the decimal point.
Throws:
SQLException - If an error occurs.
Since:
1.4

registerOutParameter

public void registerOutParameter(String name,
                                 int sqlType,
                                 String typeName)
            throws SQLException
This method registers the specified parameter as an output parameter of the specified SQL type. This version of registerOutParameter is used for user-named or REF types. If the type of the output parameter does not have such a type, the typeName argument is ignored.
Parameters:
name - The name of the parameter to register as output.
sqlType - The SQL type value from Types.
typeName - The SQL structured type name.
Throws:
SQLException - If an error occurs.
Since:
1.4

setAsciiStream

public void setAsciiStream(String name,
                           InputStream stream,
                           int count)
            throws SQLException
This method sets the specified parameter from the given Java ASCII InputStream value.
Parameters:
name - The name of the parameter value to set.
stream - The stream from which the parameter value is read.
count - The number of bytes in the stream.
Throws:
SQLException - If an error occurs.
Since:
1.4

setBigDecimal

public void setBigDecimal(String name,
                          BigDecimal value)
            throws SQLException
This method sets the specified parameter from the given Java BigDecimal value.
Parameters:
name - The name of the parameter value to set.
value - The value of the parameter.
Throws:
SQLException - If an error occurs.
Since:
1.4

setBinaryStream

public void setBinaryStream(String name,
                            InputStream stream,
                            int count)
            throws SQLException
This method sets the specified parameter from the given Java binary InputStream value.
Parameters:
name - The name of the parameter value to set.
stream - The stream from which the parameter value is read.
count - The number of bytes in the stream.
Throws:
SQLException - If an error occurs.
Since:
1.4

setBoolean

public void setBoolean(String name,
                       boolean value)
            throws SQLException
This method sets the specified parameter from the given Java boolean value.
Parameters:
name - The name of the parameter value to set.
value - The value of the parameter.
Throws:
SQLException - If an error occurs.
Since:
1.4

setByte

public void setByte(String name,
                    byte value)
            throws SQLException
This method sets the specified parameter from the given Java byte value.
Parameters:
name - The name of the parameter value to set.
value - The value of the parameter.
Throws:
SQLException - If an error occurs.
Since:
1.4

setBytes

public void setBytes(String name,
                     byte[] value)
            throws SQLException
This method sets the specified parameter from the given Java byte array value.
Parameters:
name - The name of the parameter value to set.
value - The value of the parameter.
Throws:
SQLException - If an error occurs.
Since:
1.4

setCharacterStream

public void setCharacterStream(String name,
                               Reader reader,
                               int count)
            throws SQLException
This method sets the specified parameter from the given Java character Reader value.
Parameters:
name - The name of the parameter value to set.
reader - The reader from which the parameter value is read.
count - The number of characters in the stream.
Throws:
SQLException - If an error occurs.
Since:
1.4

setDate

public void setDate(String name,
                    Date value)
            throws SQLException
This method sets the specified parameter from the given Java java.sql.Date value.
Parameters:
name - The name of the parameter value to set.
value - The value of the parameter.
Throws:
SQLException - If an error occurs.
Since:
1.4

setDate

public void setDate(String name,
                    Date value,
                    Calendar cal)
            throws SQLException
This method sets the specified parameter from the given Java java.sql.Date value.
Parameters:
name - The name of the parameter value to set.
value - The value of the parameter.
cal - The Calendar to use for timezone and locale.
Throws:
SQLException - If an error occurs.
Since:
1.4

setDouble

public void setDouble(String name,
                      double value)
            throws SQLException
This method sets the specified parameter from the given Java double value.
Parameters:
name - The name of the parameter value to set.
value - The value of the parameter.
Throws:
SQLException - If an error occurs.
Since:
1.4

setFloat

public void setFloat(String name,
                     float value)
            throws SQLException
This method sets the specified parameter from the given Java float value.
Parameters:
name - The name of the parameter value to set.
value - The value of the parameter.
Throws:
SQLException - If an error occurs.
Since:
1.4

setInt

public void setInt(String name,
                   int value)
            throws SQLException
This method sets the specified parameter from the given Java int value.
Parameters:
name - The name of the parameter value to set.
value - The value of the parameter.
Throws:
SQLException - If an error occurs.
Since:
1.4

setLong

public void setLong(String name,
                    long value)
            throws SQLException
This method sets the specified parameter from the given Java long value.
Parameters:
name - The name of the parameter value to set.
value - The value of the parameter.
Throws:
SQLException - If an error occurs.
Since:
1.4

setNull

public void setNull(String name,
                    int sqlType)
            throws SQLException
This method populates the specified parameter with a SQL NULL value for the specified type.
Parameters:
name - The name of the parameter to set.
sqlType - The SQL type identifier of the parameter from Types
Throws:
SQLException - If an error occurs.
Since:
1.4

setNull

public void setNull(String name,
                    int sqlType,
                    String typeName)
            throws SQLException
This method populates the specified parameter with a SQL NULL value for the specified type.
Parameters:
name - The name of the parameter to set.
sqlType - The SQL type identifier of the parameter from Types
typeName - The name of the data type, for user defined types.
Throws:
SQLException - If an error occurs.
Since:
1.4

setObject

public void setObject(String name,
                      Object value)
            throws SQLException
This method sets the specified parameter from the given Java Object value. The default object type to SQL type mapping will be used.
Parameters:
name - The name of the parameter value to set.
value - The value of the parameter.
Throws:
SQLException - If an error occurs.
Since:
1.4

setObject

public void setObject(String name,
                      Object value,
                      int sqlType)
            throws SQLException
This method sets the specified parameter from the given Java Object value. The specified SQL object type will be used.
Parameters:
name - The name of the parameter value to set.
value - The value of the parameter.
sqlType - The SQL type to use for the parameter, from Types
Throws:
SQLException - If an error occurs.
Since:
1.4
See Also:
Types

setObject

public void setObject(String name,
                      Object value,
                      int sqlType,
                      int scale)
            throws SQLException
This method sets the specified parameter from the given Java Object value. The specified SQL object type will be used.
Parameters:
name - The name of the parameter value to set.
value - The value of the parameter.
sqlType - The SQL type to use for the parameter, from Types
scale - The scale of the value, for numeric values only.
Throws:
SQLException - If an error occurs.
Since:
1.4
See Also:
Types

setShort

public void setShort(String name,
                     short value)
            throws SQLException
This method sets the specified parameter from the given Java short value.
Parameters:
name - The name of the parameter value to set.
value - The value of the parameter.
Throws:
SQLException - If an error occurs.
Since:
1.4

setString

public void setString(String name,
                      String value)
            throws SQLException
This method sets the specified parameter from the given Java String value.
Parameters:
name - The name of the parameter value to set.
value - The value of the parameter.
Throws:
SQLException - If an error occurs.
Since:
1.4

setTime

public void setTime(String name,
                    Time value)
            throws SQLException
This method sets the specified parameter from the given Java java.sql.Time value.
Parameters:
name - The name of the parameter value to set.
value - The value of the parameter.
Throws:
SQLException - If an error occurs.
Since:
1.4

setTime

public void setTime(String name,
                    Time value,
                    Calendar cal)
            throws SQLException
This method sets the specified parameter from the given Java java.sql.Time value.
Parameters:
name - The name of the parameter value to set.
value - The value of the parameter.
cal - The Calendar to use for timezone and locale.
Throws:
SQLException - If an error occurs.
Since:
1.4

setTimestamp

public void setTimestamp(String name,
                         Timestamp value)
            throws SQLException
This method sets the specified parameter from the given Java java.sql.Timestamp value.
Parameters:
name - The name of the parameter value to set.
value - The value of the parameter.
Throws:
SQLException - If an error occurs.
Since:
1.4

setTimestamp

public void setTimestamp(String name,
                         Timestamp value,
                         Calendar cal)
            throws SQLException
This method sets the specified parameter from the given Java java.sql.Timestamp value.
Parameters:
name - The name of the parameter value to set.
value - The value of the parameter.
cal - The Calendar to use for timezone and locale.
Throws:
SQLException - If an error occurs.
Since:
1.4

setURL

public void setURL(String name,
                   URL value)
            throws SQLException
This method sets the value of the specified parameter to the specified java.net.URL
Parameters:
name - The name of the parameter to set.
value - The value the parameter.
Since:
1.4

wasNull

public boolean wasNull()
            throws SQLException
This method tests whether the value of the last parameter that was fetched was actually a SQL NULL value.
Returns:
true if the last parameter fetched was a NULL, false otherwise.
Throws:
SQLException - If an error occurs.

CallableStatement.java -- A statement for calling stored procedures. Copyright (C) 1999, 2000, 2002, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.