public class IfxCallableStatement extends IfxPreparedStatement implements java.sql.CallableStatement, IfmxCallableStatement
CallableStatement is used to execute SQL stored procedures.
Ifx provides a stored procedure SQL escape that allows stored procedures to be called in a standard way for all RDBMS's. This escape syntax has one form that includes a result parameter and one that does not. If used, the result parameter must be registered as an OUT parameter. The other parameters may be used for input, output or both. Parameters are refered to sequentially, by number. The first parameter is 1.
{?= call
{call
IN parameter values are set using the set methods inherited from PreparedStatement. The type of all OUT parameters must be registered prior to executing the stored procedure; their values are retrieved after execution via the get methods provided here.
A Callable statement may return a ResultSet or multiple ResultSets. Multiple ResultSets are handled using operations inherited from Statement. Please note that Informix does not support Multiple ResultSets.
Connection.prepareCall(java.lang.String)
,
ResultSet
Modifier and Type | Field and Description |
---|---|
static int |
IN |
static int |
INOUT |
static int |
OUT |
namedCalls, ordinalCalls, vector
BatchParamVector, BatchVector, Closed, commandString, currentResult, cursorOpen, executeBatchInProgress, jconn, numqmarks, outputMetaData, pool, poolable, prot, SGK_ALL_KEYS, SGK_indexes, SGK_KEYS_BY_INDEX, SGK_KEYS_BY_NAME, SGK_metaData, SGK_names, SGK_NO_KEYS, SGK_resultSet, statementType
Modifier and Type | Method and Description |
---|---|
void |
close()
In many cases, it is desirable to immediately release a
Statements's database and JDBC resources instead of waiting for
this to happen when it is automatically closed; the close
method provides this immediate release.
|
void |
closeOnCompletion() |
boolean |
execute()
Some prepared statements return multiple results; the execute
method handles these complex statements as well as the simpler
form of statements handled by executeQuery and executeUpdate.
|
java.sql.ResultSet |
executeQuery()
A prepared SQL query is executed and its ResultSet is returned.
|
int |
executeUpdate()
Execute a SQL INSERT, UPDATE or DELETE statement.
|
java.sql.Array |
getArray(int parameterIndex)
Get an Array OUT paramater.
|
java.sql.Array |
getArray(java.lang.String parameterName) |
java.math.BigDecimal |
getBigDecimal(int parameterIndex)
Get the value of a NUMERIC parameter as a java.math.BigDecimal object.
|
java.math.BigDecimal |
getBigDecimal(int parameterIndex,
int scale)
Deprecated.
|
java.math.BigDecimal |
getBigDecimal(java.lang.String parameterName) |
java.sql.Blob |
getBlob(int parameterIndex)
Get an BLOB OUT paramater.
|
java.sql.Blob |
getBlob(java.lang.String parameterName) |
boolean |
getBoolean(int parameterIndex)
Get the value of a BIT parameter as a Java boolean.
|
boolean |
getBoolean(java.lang.String parameterName) |
byte |
getByte(int parameterIndex)
Get the value of a TINYINT parameter as a Java byte.
|
byte |
getByte(java.lang.String parameterName) |
byte[] |
getBytes(int parameterIndex)
Get the value of a SQL BINARY or VARBINARY parameter as a Java byte[]
|
byte[] |
getBytes(java.lang.String parameterName) |
java.io.Reader |
getCharacterStream(int parameterIndex) |
java.io.Reader |
getCharacterStream(java.lang.String parameterName) |
java.sql.Clob |
getClob(int parameterIndex)
Get an CLOB OUT paramater.
|
java.sql.Clob |
getClob(java.lang.String parameterName) |
java.sql.Date |
getDate(int parameterIndex)
Get the value of a SQL DATE parameter as a java.sql.Date object
|
java.sql.Date |
getDate(int parameterIndex,
java.util.Calendar cal)
Get the value of a SQL DATE parameter as a java.sql.Date object
|
java.sql.Date |
getDate(java.lang.String parameterName) |
java.sql.Date |
getDate(java.lang.String parameterName,
java.util.Calendar cal) |
double |
getDouble(int parameterIndex)
Get the value of a DOUBLE parameter as a Java double.
|
double |
getDouble(java.lang.String parameterName) |
float |
getFloat(int parameterIndex)
Get the value of a FLOAT parameter as a Java float.
|
float |
getFloat(java.lang.String parameterName) |
int |
getInt(int parameterIndex)
Get the value of a INTEGER parameter as a Java int.
|
int |
getInt(java.lang.String parameterName) |
long |
getLong(int parameterIndex)
Get the value of a BIGINT parameter as a Java long.
|
long |
getLong(java.lang.String parameterName) |
boolean |
getMoreResults()
getMoreResults moves to a Statement's next result.
|
java.io.Reader |
getNCharacterStream(int parameterIndex) |
java.io.Reader |
getNCharacterStream(java.lang.String parameterName) |
java.sql.NClob |
getNClob(int parameterIndex) |
java.sql.NClob |
getNClob(java.lang.String parameterName) |
java.lang.String |
getNString(int parameterIndex) |
java.lang.String |
getNString(java.lang.String parameterName) |
java.lang.Object |
getObject(int parameterIndex)
Get the value of a parameter as a Java object.
|
<T> T |
getObject(int parameterIndex,
java.lang.Class<T> type) |
java.lang.Object |
getObject(int parameterIndex,
java.util.Map<java.lang.String,java.lang.Class<?>> map)
Get the value of a parameter as a Java object.
|
java.lang.Object |
getObject(java.lang.String parameterName) |
<T> T |
getObject(java.lang.String parameterName,
java.lang.Class<T> type) |
java.lang.Object |
getObject(java.lang.String parameterName,
java.util.Map<java.lang.String,java.lang.Class<?>> map) |
java.sql.ParameterMetaData |
getParameterMetaData()
A SQ_CIDESRIBE is sent to server and SQ_IDESCRIBE is received
with parameter data.
|
java.sql.Ref |
getRef(int parameterIndex)
Get a REF(
|
java.sql.Ref |
getRef(java.lang.String parameterName) |
java.sql.ResultSet |
getResultSet()
Override getResults method from IfxStatement
|
java.sql.RowId |
getRowId(int parameterIndex) |
java.sql.RowId |
getRowId(java.lang.String parameterName) |
short |
getShort(int parameterIndex)
Get the value of a SMALLINT parameter as a Java short.
|
short |
getShort(java.lang.String parameterName) |
java.sql.SQLXML |
getSQLXML(int parameterIndex) |
java.sql.SQLXML |
getSQLXML(java.lang.String parameterName) |
java.lang.String |
getString(int parameterIndex)
Get the value of a CHAR, VARCHAR, or LONGVARCHAR parameter as a
Java String.
|
java.lang.String |
getString(java.lang.String parameterName) |
java.sql.Time |
getTime(int parameterIndex)
Get the value of a SQL TIME parameter as a java.sql.Time object.
|
java.sql.Time |
getTime(int parameterIndex,
java.util.Calendar cal)
Get the value of a SQL TIME parameter as a java.sql.Time object.
|
java.sql.Time |
getTime(java.lang.String parameterName) |
java.sql.Time |
getTime(java.lang.String parameterName,
java.util.Calendar cal) |
java.sql.Timestamp |
getTimestamp(int parameterIndex)
Get the value of a SQL TIMESTAMP parameter as a java.sql.Timestamp object.
|
java.sql.Timestamp |
getTimestamp(int parameterIndex,
java.util.Calendar cal) |
java.sql.Timestamp |
getTimestamp(java.lang.String parameterName) |
java.sql.Timestamp |
getTimestamp(java.lang.String parameterName,
java.util.Calendar cal) |
java.net.URL |
getURL(int parameterIndex) |
java.net.URL |
getURL(java.lang.String parameterName) |
protected int |
handleParameterName(java.lang.String parameterName) |
boolean |
hasOutParameter()
Returns true if the routine has an output parameter.
|
void |
IfxRegisterOutParameter(int parameterIndex,
int ifxType)
Before executing a stored procedure call you must explicitly
call registerOutParameter to register the java.sql.Type or
com.informix.IfxTypes of each out parameter.
|
void |
IfxRegisterOutParameter(int parameterIndex,
int ifxType,
int scale)
Use this version of IfxRegisterOutParameter for registering
IFX_TYPE_DECIMAL out parameters.
|
void |
IfxRegisterOutParameter(int parameterIndex,
int ifxType,
java.lang.String name)
Before executing a stored procedure call you must explicitly
call registerOutParameter to register the java.sql.Type or
com.informix.IfxTypes of each out parameter.
|
void |
IfxSetNull(int i,
int ifxType)
Set a parameter to SQL NULL.
|
void |
IfxSetNull(int i,
int ifxType,
java.lang.String name)
Set a parameter to SQL NULL.
|
boolean |
isCloseOnCompletion() |
void |
putOutParamInfoIntoVector()
As per JDBC Spec, user is not required to call setXXX()
method for OUT parameters, this creates problem at binding
times as IDS server requires all parameters to have binding
information, even though it gets ignored
Following routine will update "vector" with dummy calls
to setXXX() methods for each OUT parameters, so that
binding information get passed to the server
|
void |
registerOutParameter(int parameterIndex,
int sqlType)
Before executing a stored procedure call you must explicitly
call registerOutParameter to register the java.sql.Type of each
out parameter.
|
void |
registerOutParameter(int parameterIndex,
int sqlType,
int scale)
Use this version of registerOutParameter for registering
Numeric or Decimal out parameters.
|
void |
registerOutParameter(int parameterIndex,
int sqlType,
java.lang.String name) |
void |
registerOutParameter(java.lang.String parameterName,
int sqlType) |
void |
registerOutParameter(java.lang.String parameterName,
int sqlType,
int scale) |
void |
registerOutParameter(java.lang.String parameterName,
int sqlType,
java.lang.String typeName) |
void |
setArray(int i,
java.sql.Array x,
java.lang.String collectionType)
Set an Array/Object parameter.
|
void |
setAsciiStream(java.lang.String parameterName,
java.io.InputStream x) |
void |
setAsciiStream(java.lang.String parameterName,
java.io.InputStream x,
int length) |
void |
setAsciiStream(java.lang.String parameterName,
java.io.InputStream x,
long length) |
void |
setBigDecimal(java.lang.String parameterName,
java.math.BigDecimal x) |
void |
setBinaryStream(java.lang.String parameterName,
java.io.InputStream x) |
void |
setBinaryStream(java.lang.String parameterName,
java.io.InputStream x,
int length) |
void |
setBinaryStream(java.lang.String parameterName,
java.io.InputStream x,
long length) |
void |
setBlob(java.lang.String parameterName,
java.sql.Blob x) |
void |
setBlob(java.lang.String parameterName,
java.io.InputStream inputStream) |
void |
setBlob(java.lang.String parameterName,
java.io.InputStream inputStream,
long length) |
void |
setBoolean(int i,
boolean x)
Set a parameter to a Java boolean value.
|
void |
setBoolean(java.lang.String parameterName,
boolean x) |
void |
setByte(java.lang.String parameterName,
byte x) |
void |
setBytes(java.lang.String parameterName,
byte[] x) |
void |
setCharacterStream(java.lang.String parameterName,
java.io.Reader reader) |
void |
setCharacterStream(java.lang.String parameterName,
java.io.Reader reader,
int length) |
void |
setCharacterStream(java.lang.String parameterName,
java.io.Reader reader,
long length) |
void |
setClob(java.lang.String parameterName,
java.sql.Clob x) |
void |
setClob(java.lang.String parameterName,
java.io.Reader reader) |
void |
setClob(java.lang.String parameterName,
java.io.Reader reader,
long length) |
void |
setDate(java.lang.String parameterName,
java.sql.Date x) |
void |
setDate(java.lang.String parameterName,
java.sql.Date x,
java.util.Calendar cal) |
void |
setDouble(java.lang.String parameterName,
double x) |
void |
setFloat(java.lang.String parameterName,
float x) |
void |
setInt(java.lang.String parameterName,
int x) |
void |
setLong(java.lang.String parameterName,
long x) |
void |
setNCharacterStream(java.lang.String parameterName,
java.io.Reader value) |
void |
setNCharacterStream(java.lang.String parameterName,
java.io.Reader value,
long length) |
void |
setNClob(java.lang.String parameterName,
java.sql.NClob value) |
void |
setNClob(java.lang.String parameterName,
java.io.Reader reader) |
void |
setNClob(java.lang.String parameterName,
java.io.Reader reader,
long length) |
void |
setNString(java.lang.String parameterName,
java.lang.String value) |
void |
setNull(java.lang.String parameterName,
int sqlType) |
void |
setNull(java.lang.String parameterName,
int sqlType,
java.lang.String typeName) |
void |
setObject(int i,
java.sql.Array x,
java.lang.String collectionType)
Set an Object parameter.
|
void |
setObject(java.lang.String parameterName,
java.lang.Object x) |
void |
setObject(java.lang.String parameterName,
java.lang.Object x,
int targetSqlType) |
void |
setObject(java.lang.String parameterName,
java.lang.Object x,
int targetSqlType,
int scale) |
void |
setRowId(java.lang.String parameterName,
java.sql.RowId x) |
void |
setShort(java.lang.String parameterName,
short x) |
void |
setSQLXML(java.lang.String parameterName,
java.sql.SQLXML xmlObject) |
void |
setString(java.lang.String parameterName,
java.lang.String x) |
void |
setTime(java.lang.String parameterName,
java.sql.Time x) |
void |
setTime(java.lang.String parameterName,
java.sql.Time x,
java.util.Calendar cal) |
void |
setTimestamp(java.lang.String parameterName,
java.sql.Timestamp x) |
void |
setTimestamp(java.lang.String parameterName,
java.sql.Timestamp x,
java.util.Calendar cal) |
void |
setURL(java.lang.String parameterName,
java.net.URL val) |
boolean |
wasNull()
An OUT parameter may have the value of SQL NULL; wasNull reports
whether the last value read has this special value.
|
addBatch, addBatch, ambiguousSQLType, checkParameterIndex, clearBatch, clearBindColType, clearParameters, closeCursor, execute, execute, execute, execute, executeBatch, executeQuery, executeQuery, executeQuery, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getMetaData, getParameterMetaData, getResultSetProtocol, IfxSetObject, IfxSetObject, isWrapperFor, setArray, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBinaryStream, setBindColIfxType, setBindColIfxType, setBindColIfxType, setBindColType, setBindColType, setBindColType, setBlob, setBlob, setBlob, setBlob, setBoolean, setByte, setByte, setBytes, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setClob, setDate, setDate, setDate, setDate, setDouble, setDouble, setFloat, setFloat, setIfxBSONObject, setInt, setInt, setInterval, setIntervalDF, setIntervalYM, setLong, setLong, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNull, setNull, setNull, setNull, setObject, setObject, setObject, setObject, setRef, setRowId, setShort, setShort, setSQLXML, setString, setString, setTime, setTime, setTime, setTime, setTimestamp, setTimestamp, setTimestamp, setTimestamp, setUnicodeStream, setURL, superClose, unwrap
cancel, chkAndSetGetRsltCalledFlag, clearWarnings, executeImpl, executeQueryImpl, getAutoFree, getBigSerial, getConnection, getCursorName, getFetchBufferSize, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getQueryTimeout, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getSerial, getSerial8, getStatementType, getUpdateCount, getWarnings, isClosed, isPoolable, resetMethodCalledFlags, scrubBatch, setAutoFree, setCursorName, setEscapeProcessing, setFetchBufferSize, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, setResultSetConcurrency, setResultSetType, setStatementType, transferWarnings
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addBatch, clearParameters, getMetaData, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setByte, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNull, setNull, setObject, setObject, setObject, setRef, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL
addBatch, cancel, clearBatch, clearWarnings, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getQueryTimeout, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout
public static final int IN
public static final int OUT
public static final int INOUT
public java.sql.ResultSet executeQuery() throws java.sql.SQLException
executeQuery
in interface java.sql.PreparedStatement
executeQuery
in class IfxPreparedStatement
java.sql.SQLException
public java.sql.ResultSet getResultSet() throws java.sql.SQLException
getResultSet
in interface java.sql.Statement
getResultSet
in class IfxStatement
java.sql.SQLException
IfxStatement.execute(java.lang.String)
public boolean getMoreResults() throws java.sql.SQLException
IfxStatement
getMoreResults
in interface java.sql.Statement
getMoreResults
in class IfxStatement
java.sql.SQLException
IfxStatement.execute(java.lang.String)
public void close() throws java.sql.SQLException
IfxStatement
Note: A Statement is automatically closed when it is garbage collected. When a Statement is closed its current ResultSet, if one exists, is also closed.
close
in interface java.lang.AutoCloseable
close
in interface java.sql.Statement
close
in class IfxPreparedStatement
java.sql.SQLException
public boolean execute() throws java.sql.SQLException
execute
in interface java.sql.PreparedStatement
execute
in class IfxPreparedStatement
java.sql.SQLException
Statement.execute(java.lang.String)
public int executeUpdate() throws java.sql.SQLException
executeUpdate
in interface java.sql.PreparedStatement
executeUpdate
in class IfxPreparedStatement
java.sql.SQLException
public void IfxSetNull(int i, int ifxType) throws java.sql.SQLException
Note: You must specify the parameter's Informix type.
IfxSetNull
in interface IfmxCallableStatement
parameterIndex
- the first parameter is 1, the second is 2, ...ifxType
- Informix type code defined by com.informix.jdbc.IfxTypesjava.sql.SQLException
- if parameterIndex is greater than the number
of arguments.public void IfxSetNull(int i, int ifxType, java.lang.String name) throws java.sql.SQLException
Note: You must specify the parameter's Informix type.
IfxSetNull
in interface IfmxCallableStatement
parameterIndex
- the first parameter is 1, the second is 2, ...ifxType
- Informix type code defined by com.informix.jdbc.IfxTypesname
- Opaque type name, named row name, distinct type name or
collection / unnamed row definition.java.sql.SQLException
- if parameterIndex is greater than the number
of arguments.public void setArray(int i, java.sql.Array x, java.lang.String collectionType) throws java.sql.SQLException
setArray
in interface IfmxCallableStatement
setArray
in class IfxPreparedStatement
i
- the first parameter is 1, the second is 2, ...x
- an object representing an SQL arraycollectionType
- Collection definitionjava.sql.SQLException
- if a database-access error occurs.public void setObject(int i, java.sql.Array x, java.lang.String collectionType) throws java.sql.SQLException
IfmxCallableStatement
setObject
in interface IfmxCallableStatement
i
- the first parameter is 1, the second is 2, ...x
- an object representing an SQL arraycollectionType
- Collection definition stringjava.sql.SQLException
- if parameterIndex is greater than the number
of arguments or a conversion error occurs.public void setBoolean(int i, boolean x) throws java.sql.SQLException
IfxPreparedStatement
setBoolean
in interface java.sql.PreparedStatement
setBoolean
in class IfxPreparedStatement
x
- the parameter valuejava.sql.SQLException
public void registerOutParameter(int parameterIndex, int sqlType) throws java.sql.SQLException
Note: When reading the value of an out parameter you must use the getXXX method whose Java type XXX corresponds to the parameter's registered SQL type.
registerOutParameter
in interface java.sql.CallableStatement
parameterIndex
- the first parameter is 1, the second is 2,...sqlType
- SQL type code defined by java.sql.Types;
for parameters of type Numeric or Decimal use the version of
registerOutParameter that accepts a scale valuejava.sql.SQLException
Types
public void registerOutParameter(int parameterIndex, int sqlType, java.lang.String name) throws java.sql.SQLException
registerOutParameter
in interface java.sql.CallableStatement
java.sql.SQLException
public void registerOutParameter(int parameterIndex, int sqlType, int scale) throws java.sql.SQLException
Note: When reading the value of an out parameter you must use the getXXX method whose Java type XXX corresponds to the parameter's registered SQL type.
registerOutParameter
in interface java.sql.CallableStatement
parameterIndex
- the first parameter is 1, the second is 2, ...sqlType
- use either java.sql.Type.NUMERIC or java.sql.Type.DECIMALscale
- a value greater than or equal to zero representing the
desired number of digits to the right of the decimal pointjava.sql.SQLException
Types
public void IfxRegisterOutParameter(int parameterIndex, int ifxType) throws java.sql.SQLException
Note: When reading the value of an out parameter you must use the getXXX method whose Java type XXX corresponds to the parameter's registered Informix type.
IfxRegisterOutParameter
in interface IfmxCallableStatement
parameterIndex
- the first parameter is 1, the second is 2,...ifxType
- type code defined by com.informix.IfxTypes
for parameters of type Numeric, Decimal, Datetime or Interval use the
version of IfxRegisterOutParameter that accepts a scale valuejava.sql.SQLException
- if there is no out parameter or if
parameterIndex is greater than the number of arguments.Types
public void IfxRegisterOutParameter(int parameterIndex, int ifxType, java.lang.String name) throws java.sql.SQLException
Note: When reading the value of an out parameter you must use the getXXX method whose Java type XXX corresponds to the parameter's registered Informix type.
IfxRegisterOutParameter
in interface IfmxCallableStatement
parameterIndex
- the first parameter is 1, the second is 2,...ifxType
- type code defined by com.informix.IfxTypes
for parameters of type Numeric, Decimal, Datetime or Interval use the
version of IfxRegisterOutParameter that accepts a scale valuename
- Opaque type name, named row name, distinct type name or
collection / unnamed row definition.java.sql.SQLException
- if there is no out parameter, if
parameterIndex is greater than the number of arguments or if the
type is not UDTVAR or UDTFIXED.Types
public void IfxRegisterOutParameter(int parameterIndex, int ifxType, int scale) throws java.sql.SQLException
Note: When reading the value of an out parameter you must use the getXXX method whose Java type XXX corresponds to the parameter's registered Informix type.
IfxRegisterOutParameter
in interface IfmxCallableStatement
parameterIndex
- the first parameter is 1, the second is 2, ...ifxType
- use either com.informix.lang.IfxTypes.IFX_TYPE_DECIMAL
IFX_TYPE_DATETIME or IFX_TYPE_INTERVAL.scale
- a value greater than or equal to zero representing the
desired number of digits to the right of the decimal point.
Or the encoded length if this is a datetime or interval.java.sql.SQLException
- if there is no out parameter or if
parameterIndex is greater than the number of arguments.Types
public boolean wasNull() throws java.sql.SQLException
Note: You must first call getXXX on a parameter to read its value and then call wasNull() to find if the value was SQL NULL.
wasNull
in interface java.sql.CallableStatement
java.sql.SQLException
public java.lang.String getString(int parameterIndex) throws java.sql.SQLException
getString
in interface java.sql.CallableStatement
parameterIndex
- the first parameter is 1, the second is 2, ...java.sql.SQLException
public boolean getBoolean(int parameterIndex) throws java.sql.SQLException
getBoolean
in interface java.sql.CallableStatement
parameterIndex
- the first parameter is 1, the second is 2, ...java.sql.SQLException
public byte getByte(int parameterIndex) throws java.sql.SQLException
getByte
in interface java.sql.CallableStatement
parameterIndex
- the first parameter is 1, the second is 2, ...java.sql.SQLException
public short getShort(int parameterIndex) throws java.sql.SQLException
getShort
in interface java.sql.CallableStatement
parameterIndex
- the first parameter is 1, the second is 2, ...java.sql.SQLException
public int getInt(int parameterIndex) throws java.sql.SQLException
getInt
in interface java.sql.CallableStatement
parameterIndex
- the first parameter is 1, the second is 2, ...java.sql.SQLException
public long getLong(int parameterIndex) throws java.sql.SQLException
getLong
in interface java.sql.CallableStatement
parameterIndex
- the first parameter is 1, the second is 2, ...java.sql.SQLException
public float getFloat(int parameterIndex) throws java.sql.SQLException
getFloat
in interface java.sql.CallableStatement
parameterIndex
- the first parameter is 1, the second is 2, ...java.sql.SQLException
public double getDouble(int parameterIndex) throws java.sql.SQLException
getDouble
in interface java.sql.CallableStatement
parameterIndex
- the first parameter is 1, the second is 2, ...java.sql.SQLException
public java.math.BigDecimal getBigDecimal(int parameterIndex, int scale) throws java.sql.SQLException
getBigDecimal
in interface java.sql.CallableStatement
parameterIndex
- the first parameter is 1, the second is 2, ...scale
- - a value greater than or equal to zero representing the
number of digits to the right of the decimal point.java.sql.SQLException
public java.math.BigDecimal getBigDecimal(int parameterIndex) throws java.sql.SQLException
getBigDecimal
in interface java.sql.CallableStatement
parameterIndex
- the first parameter is 1, the second is 2, ...java.sql.SQLException
public byte[] getBytes(int parameterIndex) throws java.sql.SQLException
getBytes
in interface java.sql.CallableStatement
parameterIndex
- the first parameter is 1, the second is 2, ...java.sql.SQLException
public java.sql.Date getDate(int parameterIndex) throws java.sql.SQLException
getDate
in interface java.sql.CallableStatement
parameterIndex
- the first parameter is 1, the second is 2, ...java.sql.SQLException
public java.sql.Time getTime(int parameterIndex) throws java.sql.SQLException
getTime
in interface java.sql.CallableStatement
parameterIndex
- the first parameter is 1, the second is 2, ...java.sql.SQLException
public java.sql.Time getTime(int parameterIndex, java.util.Calendar cal) throws java.sql.SQLException
getTime
in interface java.sql.CallableStatement
parameterIndex
- the first parameter is 1, the second is 2, ...java.sql.SQLException
public java.sql.Timestamp getTimestamp(int parameterIndex) throws java.sql.SQLException
getTimestamp
in interface java.sql.CallableStatement
parameterIndex
- the first parameter is 1, the second is 2, ...java.sql.SQLException
public java.sql.Timestamp getTimestamp(int parameterIndex, java.util.Calendar cal) throws java.sql.SQLException
getTimestamp
in interface java.sql.CallableStatement
java.sql.SQLException
public java.lang.Object getObject(int parameterIndex) throws java.sql.SQLException
Get the value of a parameter as a Java object.
This method returns a Java object whose type coresponds to the SQL type that was registered for this parameter using registerOutParameter.
Note that this method may be used to read datatabase specific abstract data types, by specifying a targetSqlType of java.sql.types.OTHER which allows the driver to return a database specific Java type.
getObject
in interface java.sql.CallableStatement
parameterIndex
- The first parameter is 1, the second is 2, ...java.sql.SQLException
Types
public java.lang.Object getObject(int parameterIndex, java.util.Map<java.lang.String,java.lang.Class<?>> map) throws java.sql.SQLException
Get the value of a parameter as a Java object.
Returns an object representing the value of OUT parameter @i. Use the @map to determine the class from which to construct data of SQL structured and distinct types
getObject
in interface java.sql.CallableStatement
parameterIndex
- The first parameter is 1, the second is 2, ...map
- - the mapping from SQL type names to Java classesjava.sql.SQLException
public java.sql.Array getArray(int parameterIndex) throws java.sql.SQLException
Get an Array OUT paramater.
getArray
in interface java.sql.CallableStatement
parameterIndex
- The first parameter is 1, the second is 2, ...java.sql.SQLException
public java.sql.Blob getBlob(int parameterIndex) throws java.sql.SQLException
Get an BLOB OUT paramater.
getBlob
in interface java.sql.CallableStatement
parameterIndex
- The first parameter is 1, the second is 2, ...java.sql.SQLException
public java.sql.Clob getClob(int parameterIndex) throws java.sql.SQLException
Get an CLOB OUT paramater.
getClob
in interface java.sql.CallableStatement
parameterIndex
- The first parameter is 1, the second is 2, ...java.sql.SQLException
public java.sql.Ref getRef(int parameterIndex) throws java.sql.SQLException
Get a REF(
getRef
in interface java.sql.CallableStatement
parameterIndex
- The first parameter is 1, the second is 2, ...java.sql.SQLException
public java.sql.Date getDate(int parameterIndex, java.util.Calendar cal) throws java.sql.SQLException
getDate
in interface java.sql.CallableStatement
parameterIndex
- the first parameter is 1, the second is 2, ...java.sql.SQLException
- if a database-access error occurs.public boolean hasOutParameter()
hasOutParameter
in interface IfmxCallableStatement
public void putOutParamInfoIntoVector() throws java.sql.SQLException
java.sql.SQLException
public void registerOutParameter(java.lang.String parameterName, int sqlType) throws java.sql.SQLException
registerOutParameter
in interface java.sql.CallableStatement
java.sql.SQLException
public void registerOutParameter(java.lang.String parameterName, int sqlType, int scale) throws java.sql.SQLException
registerOutParameter
in interface java.sql.CallableStatement
java.sql.SQLException
public void registerOutParameter(java.lang.String parameterName, int sqlType, java.lang.String typeName) throws java.sql.SQLException
registerOutParameter
in interface java.sql.CallableStatement
java.sql.SQLException
public java.net.URL getURL(int parameterIndex) throws java.sql.SQLException
getURL
in interface java.sql.CallableStatement
java.sql.SQLException
public void setURL(java.lang.String parameterName, java.net.URL val) throws java.sql.SQLException
setURL
in interface java.sql.CallableStatement
java.sql.SQLException
public void setNull(java.lang.String parameterName, int sqlType) throws java.sql.SQLException
setNull
in interface java.sql.CallableStatement
java.sql.SQLException
public void setNull(java.lang.String parameterName, int sqlType, java.lang.String typeName) throws java.sql.SQLException
setNull
in interface java.sql.CallableStatement
java.sql.SQLException
public void setBoolean(java.lang.String parameterName, boolean x) throws java.sql.SQLException
setBoolean
in interface java.sql.CallableStatement
java.sql.SQLException
public void setByte(java.lang.String parameterName, byte x) throws java.sql.SQLException
setByte
in interface java.sql.CallableStatement
java.sql.SQLException
public void setShort(java.lang.String parameterName, short x) throws java.sql.SQLException
setShort
in interface java.sql.CallableStatement
java.sql.SQLException
public void setInt(java.lang.String parameterName, int x) throws java.sql.SQLException
setInt
in interface java.sql.CallableStatement
java.sql.SQLException
public void setLong(java.lang.String parameterName, long x) throws java.sql.SQLException
setLong
in interface java.sql.CallableStatement
java.sql.SQLException
public void setFloat(java.lang.String parameterName, float x) throws java.sql.SQLException
setFloat
in interface java.sql.CallableStatement
java.sql.SQLException
public void setDouble(java.lang.String parameterName, double x) throws java.sql.SQLException
setDouble
in interface java.sql.CallableStatement
java.sql.SQLException
public void setBigDecimal(java.lang.String parameterName, java.math.BigDecimal x) throws java.sql.SQLException
setBigDecimal
in interface java.sql.CallableStatement
java.sql.SQLException
public void setString(java.lang.String parameterName, java.lang.String x) throws java.sql.SQLException
setString
in interface java.sql.CallableStatement
java.sql.SQLException
public void setBytes(java.lang.String parameterName, byte[] x) throws java.sql.SQLException
setBytes
in interface java.sql.CallableStatement
java.sql.SQLException
public void setDate(java.lang.String parameterName, java.sql.Date x) throws java.sql.SQLException
setDate
in interface java.sql.CallableStatement
java.sql.SQLException
public void setTime(java.lang.String parameterName, java.sql.Time x) throws java.sql.SQLException
setTime
in interface java.sql.CallableStatement
java.sql.SQLException
public void setTimestamp(java.lang.String parameterName, java.sql.Timestamp x) throws java.sql.SQLException
setTimestamp
in interface java.sql.CallableStatement
java.sql.SQLException
public void setAsciiStream(java.lang.String parameterName, java.io.InputStream x, int length) throws java.sql.SQLException
setAsciiStream
in interface java.sql.CallableStatement
java.sql.SQLException
public void setBinaryStream(java.lang.String parameterName, java.io.InputStream x, int length) throws java.sql.SQLException
setBinaryStream
in interface java.sql.CallableStatement
java.sql.SQLException
public void setObject(java.lang.String parameterName, java.lang.Object x, int targetSqlType) throws java.sql.SQLException
setObject
in interface java.sql.CallableStatement
java.sql.SQLException
public void setObject(java.lang.String parameterName, java.lang.Object x, int targetSqlType, int scale) throws java.sql.SQLException
setObject
in interface java.sql.CallableStatement
java.sql.SQLException
public void setObject(java.lang.String parameterName, java.lang.Object x) throws java.sql.SQLException
setObject
in interface java.sql.CallableStatement
java.sql.SQLException
public void setCharacterStream(java.lang.String parameterName, java.io.Reader reader, int length) throws java.sql.SQLException
setCharacterStream
in interface java.sql.CallableStatement
java.sql.SQLException
public void setDate(java.lang.String parameterName, java.sql.Date x, java.util.Calendar cal) throws java.sql.SQLException
setDate
in interface java.sql.CallableStatement
java.sql.SQLException
public void setTime(java.lang.String parameterName, java.sql.Time x, java.util.Calendar cal) throws java.sql.SQLException
setTime
in interface java.sql.CallableStatement
java.sql.SQLException
public void setTimestamp(java.lang.String parameterName, java.sql.Timestamp x, java.util.Calendar cal) throws java.sql.SQLException
setTimestamp
in interface java.sql.CallableStatement
java.sql.SQLException
public java.lang.String getString(java.lang.String parameterName) throws java.sql.SQLException
getString
in interface java.sql.CallableStatement
java.sql.SQLException
public boolean getBoolean(java.lang.String parameterName) throws java.sql.SQLException
getBoolean
in interface java.sql.CallableStatement
java.sql.SQLException
public byte getByte(java.lang.String parameterName) throws java.sql.SQLException
getByte
in interface java.sql.CallableStatement
java.sql.SQLException
public short getShort(java.lang.String parameterName) throws java.sql.SQLException
getShort
in interface java.sql.CallableStatement
java.sql.SQLException
public int getInt(java.lang.String parameterName) throws java.sql.SQLException
getInt
in interface java.sql.CallableStatement
java.sql.SQLException
public long getLong(java.lang.String parameterName) throws java.sql.SQLException
getLong
in interface java.sql.CallableStatement
java.sql.SQLException
public float getFloat(java.lang.String parameterName) throws java.sql.SQLException
getFloat
in interface java.sql.CallableStatement
java.sql.SQLException
public double getDouble(java.lang.String parameterName) throws java.sql.SQLException
getDouble
in interface java.sql.CallableStatement
java.sql.SQLException
public byte[] getBytes(java.lang.String parameterName) throws java.sql.SQLException
getBytes
in interface java.sql.CallableStatement
java.sql.SQLException
public java.sql.Date getDate(java.lang.String parameterName) throws java.sql.SQLException
getDate
in interface java.sql.CallableStatement
java.sql.SQLException
public java.sql.Time getTime(java.lang.String parameterName) throws java.sql.SQLException
getTime
in interface java.sql.CallableStatement
java.sql.SQLException
public java.sql.Timestamp getTimestamp(java.lang.String parameterName) throws java.sql.SQLException
getTimestamp
in interface java.sql.CallableStatement
java.sql.SQLException
public java.lang.Object getObject(java.lang.String parameterName) throws java.sql.SQLException
getObject
in interface java.sql.CallableStatement
java.sql.SQLException
public java.math.BigDecimal getBigDecimal(java.lang.String parameterName) throws java.sql.SQLException
getBigDecimal
in interface java.sql.CallableStatement
java.sql.SQLException
public java.lang.Object getObject(java.lang.String parameterName, java.util.Map<java.lang.String,java.lang.Class<?>> map) throws java.sql.SQLException
getObject
in interface java.sql.CallableStatement
java.sql.SQLException
public java.sql.Ref getRef(java.lang.String parameterName) throws java.sql.SQLException
getRef
in interface java.sql.CallableStatement
java.sql.SQLException
public java.sql.Blob getBlob(java.lang.String parameterName) throws java.sql.SQLException
getBlob
in interface java.sql.CallableStatement
java.sql.SQLException
public java.sql.Clob getClob(java.lang.String parameterName) throws java.sql.SQLException
getClob
in interface java.sql.CallableStatement
java.sql.SQLException
public java.sql.Array getArray(java.lang.String parameterName) throws java.sql.SQLException
getArray
in interface java.sql.CallableStatement
java.sql.SQLException
public java.sql.Date getDate(java.lang.String parameterName, java.util.Calendar cal) throws java.sql.SQLException
getDate
in interface java.sql.CallableStatement
java.sql.SQLException
public java.sql.Time getTime(java.lang.String parameterName, java.util.Calendar cal) throws java.sql.SQLException
getTime
in interface java.sql.CallableStatement
java.sql.SQLException
public java.sql.Timestamp getTimestamp(java.lang.String parameterName, java.util.Calendar cal) throws java.sql.SQLException
getTimestamp
in interface java.sql.CallableStatement
java.sql.SQLException
public java.net.URL getURL(java.lang.String parameterName) throws java.sql.SQLException
getURL
in interface java.sql.CallableStatement
java.sql.SQLException
public java.sql.ParameterMetaData getParameterMetaData() throws java.sql.SQLException
getParameterMetaData
in interface java.sql.PreparedStatement
getParameterMetaData
in class IfxPreparedStatement
java.sql.SQLException
protected int handleParameterName(java.lang.String parameterName) throws java.sql.SQLException
java.sql.SQLException
public java.io.Reader getCharacterStream(int parameterIndex) throws java.sql.SQLException
getCharacterStream
in interface java.sql.CallableStatement
java.sql.SQLException
public java.io.Reader getCharacterStream(java.lang.String parameterName) throws java.sql.SQLException
getCharacterStream
in interface java.sql.CallableStatement
java.sql.SQLException
public java.io.Reader getNCharacterStream(int parameterIndex) throws java.sql.SQLException
getNCharacterStream
in interface java.sql.CallableStatement
java.sql.SQLException
public java.io.Reader getNCharacterStream(java.lang.String parameterName) throws java.sql.SQLException
getNCharacterStream
in interface java.sql.CallableStatement
java.sql.SQLException
public java.sql.NClob getNClob(int parameterIndex) throws java.sql.SQLException
getNClob
in interface java.sql.CallableStatement
java.sql.SQLException
public java.sql.NClob getNClob(java.lang.String parameterName) throws java.sql.SQLException
getNClob
in interface java.sql.CallableStatement
java.sql.SQLException
public java.lang.String getNString(int parameterIndex) throws java.sql.SQLException
getNString
in interface java.sql.CallableStatement
java.sql.SQLException
public java.lang.String getNString(java.lang.String parameterName) throws java.sql.SQLException
getNString
in interface java.sql.CallableStatement
java.sql.SQLException
public java.sql.RowId getRowId(int parameterIndex) throws java.sql.SQLException
getRowId
in interface java.sql.CallableStatement
java.sql.SQLException
public java.sql.RowId getRowId(java.lang.String parameterName) throws java.sql.SQLException
getRowId
in interface java.sql.CallableStatement
java.sql.SQLException
public java.sql.SQLXML getSQLXML(int parameterIndex) throws java.sql.SQLException
getSQLXML
in interface java.sql.CallableStatement
java.sql.SQLException
public java.sql.SQLXML getSQLXML(java.lang.String parameterName) throws java.sql.SQLException
getSQLXML
in interface java.sql.CallableStatement
java.sql.SQLException
public void setAsciiStream(java.lang.String parameterName, java.io.InputStream x) throws java.sql.SQLException
setAsciiStream
in interface java.sql.CallableStatement
java.sql.SQLException
public void setAsciiStream(java.lang.String parameterName, java.io.InputStream x, long length) throws java.sql.SQLException
setAsciiStream
in interface java.sql.CallableStatement
java.sql.SQLException
public void setBinaryStream(java.lang.String parameterName, java.io.InputStream x) throws java.sql.SQLException
setBinaryStream
in interface java.sql.CallableStatement
java.sql.SQLException
public void setBinaryStream(java.lang.String parameterName, java.io.InputStream x, long length) throws java.sql.SQLException
setBinaryStream
in interface java.sql.CallableStatement
java.sql.SQLException
public void setBlob(java.lang.String parameterName, java.sql.Blob x) throws java.sql.SQLException
setBlob
in interface java.sql.CallableStatement
java.sql.SQLException
public void setBlob(java.lang.String parameterName, java.io.InputStream inputStream) throws java.sql.SQLException
setBlob
in interface java.sql.CallableStatement
java.sql.SQLException
public void setBlob(java.lang.String parameterName, java.io.InputStream inputStream, long length) throws java.sql.SQLException
setBlob
in interface java.sql.CallableStatement
java.sql.SQLException
public void setCharacterStream(java.lang.String parameterName, java.io.Reader reader) throws java.sql.SQLException
setCharacterStream
in interface java.sql.CallableStatement
java.sql.SQLException
public void setCharacterStream(java.lang.String parameterName, java.io.Reader reader, long length) throws java.sql.SQLException
setCharacterStream
in interface java.sql.CallableStatement
java.sql.SQLException
public void setClob(java.lang.String parameterName, java.sql.Clob x) throws java.sql.SQLException
setClob
in interface java.sql.CallableStatement
java.sql.SQLException
public void setClob(java.lang.String parameterName, java.io.Reader reader) throws java.sql.SQLException
setClob
in interface java.sql.CallableStatement
java.sql.SQLException
public void setClob(java.lang.String parameterName, java.io.Reader reader, long length) throws java.sql.SQLException
setClob
in interface java.sql.CallableStatement
java.sql.SQLException
public void setNCharacterStream(java.lang.String parameterName, java.io.Reader value) throws java.sql.SQLException
setNCharacterStream
in interface java.sql.CallableStatement
java.sql.SQLException
public void setNCharacterStream(java.lang.String parameterName, java.io.Reader value, long length) throws java.sql.SQLException
setNCharacterStream
in interface java.sql.CallableStatement
java.sql.SQLException
public void setNClob(java.lang.String parameterName, java.sql.NClob value) throws java.sql.SQLException
setNClob
in interface java.sql.CallableStatement
java.sql.SQLException
public void setNClob(java.lang.String parameterName, java.io.Reader reader) throws java.sql.SQLException
setNClob
in interface java.sql.CallableStatement
java.sql.SQLException
public void setNClob(java.lang.String parameterName, java.io.Reader reader, long length) throws java.sql.SQLException
setNClob
in interface java.sql.CallableStatement
java.sql.SQLException
public void setNString(java.lang.String parameterName, java.lang.String value) throws java.sql.SQLException
setNString
in interface java.sql.CallableStatement
java.sql.SQLException
public void setRowId(java.lang.String parameterName, java.sql.RowId x) throws java.sql.SQLException
setRowId
in interface java.sql.CallableStatement
java.sql.SQLException
public void setSQLXML(java.lang.String parameterName, java.sql.SQLXML xmlObject) throws java.sql.SQLException
setSQLXML
in interface java.sql.CallableStatement
java.sql.SQLException
public void closeOnCompletion() throws java.sql.SQLException
closeOnCompletion
in interface java.sql.Statement
closeOnCompletion
in class IfxStatement
java.sql.SQLException
public boolean isCloseOnCompletion() throws java.sql.SQLException
isCloseOnCompletion
in interface java.sql.Statement
isCloseOnCompletion
in class IfxStatement
java.sql.SQLException
public <T> T getObject(int parameterIndex, java.lang.Class<T> type) throws java.sql.SQLException
getObject
in interface java.sql.CallableStatement
java.sql.SQLException
public <T> T getObject(java.lang.String parameterName, java.lang.Class<T> type) throws java.sql.SQLException
getObject
in interface java.sql.CallableStatement
java.sql.SQLException