This interface provides a mechanism for calling stored procedures.
getArray
public Array getArray(int index)
throws SQLException
This method returns the value of the specified parameter as a Java
Array
.
- The parameter value as a
Array
.
getBigDecimal
public BigDecimal getBigDecimal(int parameterIndex)
throws SQLException
This method returns the value of the specified parameter as a Java
BigDecimal
.
parameterIndex
- The index of the parameter to return.
- The parameter value as a
BigDecimal
.
getBigDecimal
public BigDecimal getBigDecimal(int parameterIndex,
int scale)
throws SQLException
Use getBigDecimal(int parameterIndex)
or getBigDecimal(String parameterName) instead.
This method returns the value of the specified parameter as a Java
BigDecimal
.
parameterIndex
- The index of the parameter to return.scale
- The number of digits to the right of the decimal to return.
- The parameter value as a
BigDecimal
.
getBlob
public Blob getBlob(int index)
throws SQLException
This method returns the value of the specified parameter as a Java
Blob
.
index
- The index of the parameter to return.
- The parameter value as a
Blob
.
getBoolean
public boolean getBoolean(int parameterIndex)
throws SQLException
This method returns the value of the specified parameter as a Java
boolean
.
- The parameter value as a
boolean
.
getByte
public byte getByte(int parameterIndex)
throws SQLException
This method returns the value of the specified parameter as a Java
byte
.
- The parameter value as a
byte
.
getBytes
public byte[] getBytes(int parameterIndex)
throws SQLException
This method returns the value of the specified parameter as a Java
byte array.
parameterIndex
- The index of the parameter to return.
- The parameter value as a byte array
getClob
public Clob getClob(int index)
throws SQLException
This method returns the value of the specified parameter as a Java
Clob
.
index
- The index of the parameter to return.
- The parameter value as a
Clob
.
getDate
public Date getDate(int parameterIndex)
throws SQLException
This method returns the value of the specified parameter as a Java
java.sql.Date
.
- The parameter value as a
java.sql.Date
.
getDate
public Date getDate(int parameterIndex,
Calendar cal)
throws SQLException
This method returns the value of the specified parameter as a Java
java.sql.Date
.
parameterIndex
- The index of the parameter to return.cal
- The Calendar
to use for timezone and locale.
- The parameter value as a
java.sql.Date
.
getDouble
public double getDouble(int parameterIndex)
throws SQLException
This method returns the value of the specified parameter as a Java
double
.
- The parameter value as a
double
.
getFloat
public float getFloat(int parameterIndex)
throws SQLException
This method returns the value of the specified parameter as a Java
float
.
- The parameter value as a
float
.
getInt
public int getInt(int parameterIndex)
throws SQLException
This method returns the value of the specified parameter as a Java
int
.
- The parameter value as a
int
.
getLong
public long getLong(int parameterIndex)
throws SQLException
This method returns the value of the specified parameter as a Java
long
.
- The parameter value as a
long
.
getObject
public Object getObject(int parameterIndex)
throws SQLException
This method returns the value of the specified parameter as a Java
Object
.
parameterIndex
- The index of the parameter to return.
- The parameter value as an
Object
.
getObject
public Object getObject(int index,
Map map)
throws SQLException
This method returns the value of the specified parameter as a Java
Object
.
index
- The index of the parameter to return.map
- The mapping to use for conversion from SQL to Java types.
- The parameter value as an
Object
.
getRef
public Ref getRef(int index)
throws SQLException
This method returns the value of the specified parameter as a Java
Ref
.
index
- The index of the parameter to return.
- The parameter value as a
Ref
.
getShort
public short getShort(int parameterIndex)
throws SQLException
This method returns the value of the specified parameter as a Java
short
.
- The parameter value as a
short
.
getString
public String getString(int parameterIndex)
throws SQLException
This method returns the value of the specified parameter as a Java
String
.
- The parameter value as a
String
.
getTime
public Time getTime(int parameterIndex)
throws SQLException
This method returns the value of the specified parameter as a Java
java.sql.Time
.
- The parameter value as a
java.sql.Time
.
getTime
public Time getTime(int parameterIndex,
Calendar cal)
throws SQLException
This method returns the value of the specified parameter as a Java
java.sql.Time
.
parameterIndex
- The index of the parameter to return.cal
- The Calendar
to use for timezone and locale.
- The parameter value as a
java.sql.Time
.
getTimestamp
public Timestamp getTimestamp(int parameterIndex)
throws SQLException
This method returns the value of the specified parameter as a Java
java.sql.Timestamp
.
- The parameter value as a
java.sql.Timestamp
.
getTimestamp
public Timestamp getTimestamp(int parameterIndex,
Calendar cal)
throws SQLException
This method returns the value of the specified parameter as a Java
java.sql.Timestamp
.
- The parameter value as a
java.sql.Timestamp
.
registerOutParameter
public void registerOutParameter(int parameterIndex,
int sqlType)
throws SQLException
This method registers the specified parameter as an output parameter
of the specified SQL type.
registerOutParameter
public void registerOutParameter(int parameterIndex,
int sqlType,
int scale)
throws SQLException
This method registers the specified parameter as an output parameter
of the specified SQL type and scale.
scale
- The scale of the value that will be returned.
registerOutParameter
public void registerOutParameter(int paramIndex,
int sqlType,
String typeName)
throws SQLException
This method registers the specified parameter as an output parameter
of the specified SQL type.
registerOutParameter
public void registerOutParameter(String parameterName,
int sqlType)
throws SQLException
This method registers the specified parameter as an output parameter
of the specified SQL type.
parameterName
- The name of the parameter to register as output.sqlType
- The SQL type value from Types
.
registerOutParameter
public void registerOutParameter(String parameterName,
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.
parameterName
- 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.
registerOutParameter
public void registerOutParameter(String parameterName,
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.
parameterName
- The name of the parameter to register as output.sqlType
- The SQL type value from Types
.typeName
- The SQL structured type name.
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.
true
if the last parameter fetched was a NULL,
false
otherwise.
CallableStatement.java -- A statement for calling stored procedures.
Copyright (C) 1999, 2000, 2002 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.