Methods Summary |
---|
public java.sql.Array | getArray(int parameterIndex)Gets the value of a specified JDBC {@code ARRAY} parameter as a
{@code java.sql.Array}.
|
public java.sql.Array | getArray(java.lang.String parameterName)Gets the value of a specified JDBC {@code ARRAY} parameter as a {@code
java.sql.Array}.
|
public java.math.BigDecimal | getBigDecimal(int parameterIndex)Returns a new {@link BigDecimal} representation of the JDBC {@code
NUMERIC} parameter specified by the input index.
|
public java.math.BigDecimal | getBigDecimal(int parameterIndex, int scale)Returns a new {@link BigDecimal} representation of the JDBC {@code
NUMERIC} parameter specified by the input index. The number of digits
after the decimal point is specified by {@code scale}.
|
public java.math.BigDecimal | getBigDecimal(java.lang.String parameterName)Returns a new {@link BigDecimal} representation of the JDBC {@code
NUMERIC} parameter specified by the input name.
|
public java.sql.Blob | getBlob(int parameterIndex)Gets the value of a specified JDBC {@code BLOB} parameter as a {@code
java.sql.Blob}.
|
public java.sql.Blob | getBlob(java.lang.String parameterName)Gets the value of a specified JDBC {@code BLOB} parameter as a {@code
java.sql.Blob}.
|
public boolean | getBoolean(int parameterIndex)Gets the value of a specified JDBC {@code BIT} parameter as a boolean.
|
public boolean | getBoolean(java.lang.String parameterName)Gets the value of a specified JDBC {@code BIT} parameter as a {@code
boolean}.
|
public byte | getByte(int parameterIndex)Gets the value of a specified JDBC {@code TINYINT} parameter as a {@code
byte}.
|
public byte | getByte(java.lang.String parameterName)Gets the value of a specified JDBC {@code TINYINT} parameter as a Java
{@code byte}.
|
public byte[] | getBytes(int parameterIndex)Returns a byte array representation of the indexed JDBC {@code BINARY} or
{@code VARBINARY} parameter.
|
public byte[] | getBytes(java.lang.String parameterName)Returns a byte array representation of the named JDBC {@code BINARY} or
{@code VARBINARY} parameter.
|
public java.sql.Clob | getClob(int parameterIndex)Gets the value of a specified JDBC {@code CLOB} parameter as a {@code
java.sql.Clob}.
|
public java.sql.Clob | getClob(java.lang.String parameterName)Gets the value of a specified JDBC {@code CLOB} parameter as a {@code
java.sql.Clob}.
|
public java.sql.Date | getDate(int parameterIndex)Gets the value of the specified JDBC {@code DATE} parameter as a {@code
java.sql.Date}.
|
public java.sql.Date | getDate(int parameterIndex, java.util.Calendar cal)Gets the value of the specified JDBC {@code DATE} parameter as a {@code
java.sql.Date}, using the specified {@code Calendar} to construct the date.
The JDBC driver uses the calendar to create the Date using a particular
timezone and locale. The default behavior of the driver is to use the Java
virtual machine default settings.
|
public java.sql.Date | getDate(java.lang.String parameterName)Gets the value of the specified JDBC {@code DATE} parameter as a {@code
java.sql.Date}.
|
public java.sql.Date | getDate(java.lang.String parameterName, java.util.Calendar cal)Gets the value of the specified JDBC {@code DATE} parameter as a {@code
java.sql.Date}, using the specified {@code Calendar} to construct the date.
The JDBC driver uses the calendar to create the date using a particular
timezone and locale. The default behavior of the driver is to use the Java
virtual machine default settings.
|
public double | getDouble(int parameterIndex)Gets the value of the specified JDBC {@code DOUBLE} parameter as a
{@code double}.
|
public double | getDouble(java.lang.String parameterName)Gets the value of the specified JDBC {@code DOUBLE} parameter as a
{@code double}.
|
public float | getFloat(int parameterIndex)Gets the value of the specified JDBC {@code FLOAT} parameter as a {@code
float}.
|
public float | getFloat(java.lang.String parameterName)Gets the value of the specified JDBC {@code FLOAT} parameter as a Java
{@code float}.
|
public int | getInt(int parameterIndex)Gets the value of the specified JDBC {@code INTEGER} parameter as an
{@code int}.
|
public int | getInt(java.lang.String parameterName)Gets the value of the specified JDBC {@code INTEGER} parameter as an
{@code int}.
|
public long | getLong(int parameterIndex)Gets the value of the specified JDBC {@code BIGINT} parameter as a
{@code long}.
|
public long | getLong(java.lang.String parameterName)Gets the value of the specified JDBC {@code BIGINT} parameter as a
{@code long}.
|
public java.lang.Object | getObject(int parameterIndex)Gets the value of the specified parameter as a Java {@code Object}.
The object type returned is the JDBC type registered for the parameter
with a {@code registerOutParameter} call. If a parameter was registered
as a {@code java.sql.Types.OTHER} then it may hold abstract types that
are particular to the connected database.
|
public java.lang.Object | getObject(int parameterIndex, java.util.Map map)Gets the value of the specified parameter as an {@code Object}. The
{@code Map} gives the correspondence between SQL types and Java classes.
|
public java.lang.Object | getObject(java.lang.String parameterName)Gets the value of the specified parameter as an {@code Object}.
The object type returned is the JDBC type that was registered for
the parameter by an earlier call to {@link #registerOutParameter}.
If a parameter was registered as a {@code java.sql.Types.OTHER}
then it may hold abstract types that are particular to the
connected database.
|
public java.lang.Object | getObject(java.lang.String parameterName, java.util.Map map)Gets the value of a specified parameter as an {@code Object}. The
actual return type is determined by the {@code Map} parameter which
gives the correspondence between SQL types and Java classes.
|
public java.sql.Ref | getRef(int parameterIndex)Gets the value of a specified SQL {@code REF()}
parameter as a {@code java.sql.Ref}.
|
public java.sql.Ref | getRef(java.lang.String parameterName)Gets the value of a specified SQL {@code REF()}
parameter as a {@code java.sql.Ref}.
|
public short | getShort(int parameterIndex)Gets the value of a specified JDBC {@code SMALLINT} parameter as a
{@code short}.
|
public short | getShort(java.lang.String parameterName)Gets the value of a specified JDBC {@code SMALLINT} parameter as a
{@code short}.
|
public java.lang.String | getString(int parameterIndex)Returns the indexed parameter's value as a {@code String}. The
parameter value must be one of the JDBC types {@code CHAR},
{@code VARCHAR} or {@code LONGVARCHAR}.
The {@code String} corresponding to a {@code CHAR} of fixed length
will be of identical length to the value in the database inclusive
of padding characters.
|
public java.lang.String | getString(java.lang.String parameterName)Returns the named parameter's value as a string. The parameter value must
be one of the JDBC types {@code CHAR}, {@code VARCHAR} or {@code
LONGVARCHAR}.
The string corresponding to a {@code CHAR} of fixed length will be of
identical length to the value in the database inclusive of padding
characters.
|
public java.sql.Time | getTime(int parameterIndex)Gets the value of a specified JDBC {@code TIME} parameter as a {@code
java.sql.Time}.
|
public java.sql.Time | getTime(int parameterIndex, java.util.Calendar cal)Gets the value of a specified JDBC {@code TIME} parameter as a {@code
java.sql.Time}, using the supplied {@code Calendar} to construct the
time. The JDBC driver uses the calendar to handle specific timezones
and locales in order to determine {@code Time}.
|
public java.sql.Time | getTime(java.lang.String parameterName)Gets the value of a specified JDBC {@code TIME} parameter as a {@code
java.sql.Time}.
|
public java.sql.Time | getTime(java.lang.String parameterName, java.util.Calendar cal)Gets the value of a specified JDBC {@code TIME} parameter as a {@code
java.sql.Time}, using the supplied {@code Calendar} to construct
the time. The JDBC driver uses the calendar to handle specific
timezones and locales when creating {@code Time}.
|
public java.sql.Timestamp | getTimestamp(int parameterIndex)Returns the indexed parameter's {@code TIMESTAMP} value as a {@code
java.sql.Timestamp}.
|
public java.sql.Timestamp | getTimestamp(int parameterIndex, java.util.Calendar cal)Returns the indexed parameter's {@code TIMESTAMP} value as a {@code
java.sql.Timestamp}. The JDBC driver uses the supplied {@code Calendar}
to handle specific timezones and locales when creating the result.
|
public java.sql.Timestamp | getTimestamp(java.lang.String parameterName)Returns the named parameter's {@code TIMESTAMP} value as a {@code
java.sql.Timestamp}.
|
public java.sql.Timestamp | getTimestamp(java.lang.String parameterName, java.util.Calendar cal)Returns the indexed parameter's {@code TIMESTAMP} value as a {@code
java.sql.Timestamp}. The JDBC driver uses the supplied {@code Calendar}
to handle specific timezones and locales when creating the result.
|
public java.net.URL | getURL(int parameterIndex)Gets the value of a specified JDBC {@code DATALINK} parameter as a
{@code java.net.URL}.
|
public java.net.URL | getURL(java.lang.String parameterName)Returns the named parameter's JDBC {@code DATALINK} value in a new Java
{@code java.net.URL}.
|
public void | registerOutParameter(int parameterIndex, int sqlType)Defines the type of a specified {@code OUT} parameter. All {@code OUT}
parameters must have their type defined before a stored procedure is
executed.
The type supplied in the {@code sqlType} parameter fixes the
type that will be returned by the getter methods of
{@code CallableStatement}.
If a database specific type is expected for a parameter, the Type {@code
java.sql.Types.OTHER} should be used. Note that there is another variant
of this method for User Defined Types or a {@code REF} type.
|
public void | registerOutParameter(int parameterIndex, int sqlType, int scale)Defines the Type of a specified {@code OUT} parameter. All {@code OUT}
parameters must have their type defined before a stored procedure is
executed. This version of the {@code registerOutParameter} method, which
has a scale parameter, should be used for the JDBC types {@code NUMERIC}
and {@code DECIMAL}, where there is a need to specify the number of
digits expected after the decimal point.
The type supplied in the {@code sqlType} parameter fixes the
type that will be returned by the getter methods of
{@code CallableStatement}.
|
public void | registerOutParameter(int paramIndex, int sqlType, java.lang.String typeName)Defines the Type of a specified {@code OUT} parameter. This variant
of the method is designed for use with parameters that are
User Defined Types (UDT) or a {@code REF} type, although it
can be used for any type.
|
public void | registerOutParameter(java.lang.String parameterName, int sqlType)Defines the Type of a specified {@code OUT} parameter. All OUT parameters
must have their Type defined before a stored procedure is executed.
The type supplied in the {@code sqlType} parameter fixes the
type that will be returned by the getter methods of
{@code CallableStatement}.
If a database-specific type is expected for a parameter, the Type {@code
java.sql.Types.OTHER} should be used. Note that there is another variant
of this method for User Defined Types or a {@code REF} type.
|
public void | registerOutParameter(java.lang.String parameterName, int sqlType, int scale)Defines the Type of a specified {@code OUT} parameter. All {@code OUT}
parameters must have their Type defined before a stored procedure is
executed. This version of the {@code registerOutParameter} method, which
has a scale parameter, should be used for the JDBC types {@code NUMERIC}
and {@code DECIMAL}, where there is a need to specify the number of
digits expected after the decimal point.
The type supplied in the {@code sqlType} parameter fixes the
type that will be returned by the getter methods of
{@code CallableStatement}.
|
public void | registerOutParameter(java.lang.String parameterName, int sqlType, java.lang.String typeName)Defines the Type of a specified {@code OUT} parameter. This variant of
the method is designed for use with parameters that are User Defined
Types (UDT) or a {@code REF} type, although it can be used for any
type.
|
public void | setAsciiStream(java.lang.String parameterName, java.io.InputStream theInputStream, int length)Sets the value of a specified parameter to the content of a supplied
{@code InputStream}, which has a specified number of bytes.
This is a good method for setting an SQL {@code LONVARCHAR} parameter
where the length of the data is large. Data is read from the {@code
InputStream} until end-of-file is reached or the specified number of
bytes is copied.
|
public void | setBigDecimal(java.lang.String parameterName, java.math.BigDecimal theBigDecimal)Sets the value of a specified parameter to a supplied {@code
java.math.BigDecimal} value.
|
public void | setBinaryStream(java.lang.String parameterName, java.io.InputStream theInputStream, int length)Sets the value of a specified parameter to the content of a supplied
binary {@code InputStream}, which has a specified number of bytes.
Use this method when a large amount of data needs to be set into a
{@code LONGVARBINARY} parameter.
|
public void | setBoolean(java.lang.String parameterName, boolean theBoolean)Sets the value of a specified parameter to a supplied {@code boolean}
value.
|
public void | setByte(java.lang.String parameterName, byte theByte)Sets the value of a specified parameter to a supplied {@code byte} value.
|
public void | setBytes(java.lang.String parameterName, byte[] theBytes)Sets the value of a specified parameter to a supplied array of bytes. The
array is mapped to {@code VARBINARY} or else {@code LONGVARBINARY} in the
connected database.
|
public void | setCharacterStream(java.lang.String parameterName, java.io.Reader reader, int length)Sets the value of a specified parameter to the character content of a
{@code Reader} object, with the specified length of character data.
|
public void | setDate(java.lang.String parameterName, java.sql.Date theDate)Sets the value of a specified parameter to a supplied {@code
java.sql.Date} value.
|
public void | setDate(java.lang.String parameterName, java.sql.Date theDate, java.util.Calendar cal)Sets the value of a specified parameter to a supplied {@code
java.sql.Date} value, using a supplied calendar to map the date. The
calendar allows the application to control the timezone used to compute
the SQL {@code DATE} in the database. In case that no calendar is
supplied, the driver uses the default timezone of the Java virtual
machine.
|
public void | setDouble(java.lang.String parameterName, double theDouble)Sets the value of a specified parameter to a supplied {@code double}
value.
|
public void | setFloat(java.lang.String parameterName, float theFloat)Sets the value of a specified parameter to to a supplied {@code float}
value.
|
public void | setInt(java.lang.String parameterName, int theInt)Sets the value of a specified parameter to a supplied {@code int} value.
|
public void | setLong(java.lang.String parameterName, long theLong)Sets the value of a specified parameter to a supplied {@code long} value.
|
public void | setNull(java.lang.String parameterName, int sqlType)Sets the value of a specified parameter to SQL {@code NULL}. Don't use
this version of {@code setNull} for User Defined Types (UDT) or
for {@code REF} type parameters.
|
public void | setNull(java.lang.String parameterName, int sqlType, java.lang.String typeName)Sets the value of a specified parameter to be SQL {@code NULL} where the
parameter type is either {@code REF} or user defined (e.g. {@code STRUCT}
, {@code JAVA_OBJECT} etc).
For reasons of portability, the caller is expected to supply both the SQL
type code and type name (which is just the parameter name if the type is
user defined, referred to as a {@code UDT}, or the name of the referenced
type in case of a {@code REF} type).
|
public void | setObject(java.lang.String parameterName, java.lang.Object theObject)Sets the value of a specified parameter using a supplied object. Prior to
issuing this request to the connected database {@code theObject} is
transformed to the corresponding SQL type according to the standard Java
to SQL mapping rules.
If the object's class implements the interface {@code SQLData}, the JDBC
driver calls {@code SQLData.writeSQL} to write it to the SQL data stream.
If {@code theObject} implements any of the following interfaces then the
driver is in charge of mapping the value to the appropriate SQL type.
- {@link Ref}
- {@link Struct}
- {@link Array}
- {@link Clob}
- {@link Blob}
|
public void | setObject(java.lang.String parameterName, java.lang.Object theObject, int targetSqlType)Sets the value of a specified parameter using a supplied object.
The parameter {@code theObject} is converted to the given {@code
targetSqlType} before it is sent to the database. If the object has a
custom mapping (its class implements the interface {@code SQLData}), the
JDBC driver calls the method {@code SQLData.writeSQL} to write it to the
SQL data stream. If {@code theObject} is an instance of one of the
following types
- {@link Ref}
- {@link Struct}
- {@link Array}
- {@link Clob}
- {@link Blob}
then the driver is in charge of mapping the value to the appropriate
SQL type and deliver it to the database.
|
public void | setObject(java.lang.String parameterName, java.lang.Object theObject, int targetSqlType, int scale)Sets the value of a specified parameter using a supplied object.
The object is converted to the given {@code targetSqlType} before it is
sent to the database. If the object has a custom mapping (its class
implements the interface {@code SQLData}), the JDBC driver calls the
method {@code SQLData.writeSQL} to write it to the SQL data stream. If
{@code theObject} implements any of the following interfaces
- {@link Ref}
- {@link Struct}
- {@link Array}
- {@link Clob}
- {@link Blob}
then the driver is charge of mapping the value to the appropriate
SQL type.
|
public void | setShort(java.lang.String parameterName, short theShort)Sets the value of a specified parameter to a supplied {@code short}
value.
|
public void | setString(java.lang.String parameterName, java.lang.String theString)Sets the value of a specified parameter to a supplied {@code String}.
|
public void | setTime(java.lang.String parameterName, java.sql.Time theTime)Sets the value of the parameter named {@code parameterName} to the value
of the supplied {@code java.sql.Time}.
|
public void | setTime(java.lang.String parameterName, java.sql.Time theTime, java.util.Calendar cal)Sets the value of the parameter named {@code parameterName} to the value
of the supplied {@code java.sql.Time} using the supplied calendar.
The driver uses the supplied {@code Calendar} to create the SQL
{@code TIME} value, which allows it to use a custom timezone -
otherwise the driver uses the default timezone of the Java
virtual machine.
|
public void | setTimestamp(java.lang.String parameterName, java.sql.Timestamp theTimestamp)Sets the value of a specified parameter to a supplied {@code
java.sql.Timestamp} value.
|
public void | setTimestamp(java.lang.String parameterName, java.sql.Timestamp theTimestamp, java.util.Calendar cal)Sets the value of a specified parameter to a supplied {@code
java.sql.Timestamp} value, using the supplied calendar.
The driver uses the supplied calendar to create the SQL {@code TIMESTAMP}
value, which allows it to use a custom timezone - otherwise the driver
uses the default timezone of the Java virtual machine.
|
public void | setURL(java.lang.String parameterName, java.net.URL theURL)Sets the value of a specified parameter to the supplied {@code
java.net.URL}.
|
public boolean | wasNull()Gets whether the value of the last {@code OUT} parameter read was SQL
{@code NULL}.
|