public abstract class CallableProcedureStatement extends ServerSidePreparedStatement implements CallableStatement, Cloneable
| Modifier and Type | Field and Description |
|---|---|
protected String |
arguments |
protected boolean |
hasInOutParameters |
protected int[] |
outputParameterMapper |
protected CallableParameterMetaData |
parameterMetadata |
protected List<com.oceanbase.jdbc.CallParameter> |
params
Information about parameters, merely from registerOutputParameter() and setXXX() calls.
|
currentParameterHolder, isObFunction, parametersList, serverPrepareResultautoGeneratedKeys, hasLongData, indexMap, parameterCount, SPEC_ISO_ZONED_DATE_TIMEactualSql, addRowid, batchQueries, canUseServerTimeout, closed, connection, exceptionFactory, executing, fetchSize, isFetchSizeSet, lock, maxRows, options, originalSql, parameterSql, processedSql, protocol, queryTimeout, results, resultSetConcurrency, resultSetScrollType, rowidSql, selectEndPos, simpleSql, sqlType, STMT_ALTER, STMT_BEGIN, STMT_CALL, STMT_CREATE, STMT_DECLARE, STMT_DELETE, STMT_DROP, STMT_INSERT, STMT_SELECT, STMT_UNKNOWN, STMT_UPDATE, utickSql, whereEndPosCLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO| Constructor and Description |
|---|
CallableProcedureStatement(boolean isObFuction,
OceanBaseConnection connection,
String sql,
int resultSetScrollType,
int resultSetConcurrency,
ExceptionFactory exceptionFactory)
Constructor for getter/setter of callableStatement.
|
| Modifier and Type | Method and Description |
|---|---|
CallableProcedureStatement |
clone(OceanBaseConnection connection)
Clone data.
|
Array |
getArray(int parameterIndex) |
Array |
getArray(String parameterName) |
BigDecimal |
getBigDecimal(int parameterIndex) |
BigDecimal |
getBigDecimal(int parameterIndex,
int scale)
Deprecated.
|
BigDecimal |
getBigDecimal(String parameterName) |
Blob |
getBlob(int parameterIndex) |
Blob |
getBlob(String parameterName) |
boolean |
getBoolean(int parameterIndex) |
boolean |
getBoolean(String parameterName) |
byte |
getByte(int parameterIndex) |
byte |
getByte(String parameterName) |
byte[] |
getBytes(int parameterIndex) |
byte[] |
getBytes(String parameterName) |
Reader |
getCharacterStream(int parameterIndex) |
Reader |
getCharacterStream(String parameterName) |
Clob |
getClob(int parameterIndex) |
Clob |
getClob(String parameterName) |
Date |
getDate(int parameterIndex) |
Date |
getDate(int parameterIndex,
Calendar cal) |
Date |
getDate(String parameterName) |
Date |
getDate(String parameterName,
Calendar cal) |
double |
getDouble(int parameterIndex) |
double |
getDouble(String parameterName) |
float |
getFloat(int parameterIndex) |
float |
getFloat(String parameterName) |
int |
getInt(int parameterIndex) |
int |
getInt(String parameterName) |
long |
getLong(int parameterIndex) |
long |
getLong(String parameterName) |
Reader |
getNCharacterStream(int parameterIndex) |
Reader |
getNCharacterStream(String parameterName) |
NClob |
getNClob(int parameterIndex) |
NClob |
getNClob(String parameterName) |
String |
getNString(int parameterIndex) |
String |
getNString(String parameterName) |
Object |
getObject(int parameterIndex) |
<T> T |
getObject(int parameterIndex,
Class<T> type) |
Object |
getObject(int parameterIndex,
Map<String,Class<?>> map) |
Object |
getObject(String parameterName) |
<T> T |
getObject(String parameterName,
Class<T> type) |
Object |
getObject(String parameterName,
Map<String,Class<?>> map) |
protected abstract SelectResultSet |
getOutputResult() |
ParameterMetaData |
getParameterMetaData()
Retrieves the number, types and properties of this
PreparedStatement object's
parameters. |
Ref |
getRef(int parameterIndex) |
Ref |
getRef(String parameterName) |
RowId |
getRowId(int parameterIndex) |
RowId |
getRowId(String parameterName) |
short |
getShort(int parameterIndex) |
short |
getShort(String parameterName) |
SQLXML |
getSQLXML(int parameterIndex) |
SQLXML |
getSQLXML(String parameterName) |
String |
getString(int parameterIndex) |
String |
getString(String parameterName) |
Time |
getTime(int parameterIndex) |
Time |
getTime(int parameterIndex,
Calendar cal) |
Time |
getTime(String parameterName) |
Time |
getTime(String parameterName,
Calendar cal) |
Timestamp |
getTimestamp(int parameterIndex) |
Timestamp |
getTimestamp(int parameterIndex,
Calendar cal) |
Timestamp |
getTimestamp(String parameterName) |
Timestamp |
getTimestamp(String parameterName,
Calendar cal) |
URL |
getURL(int parameterIndex) |
URL |
getURL(String parameterName) |
void |
registerOutParameter(int parameterIndex,
int sqlType) |
void |
registerOutParameter(int parameterIndex,
int sqlType,
int scale)
Registers the parameter in ordinal position
parameterIndex to be of JDBC type
sqlType. |
void |
registerOutParameter(int parameterIndex,
int sqlType,
String typeName)
Registers the designated output parameter.
|
void |
registerOutParameter(int parameterIndex,
SQLType sqlType) |
void |
registerOutParameter(int parameterIndex,
SQLType sqlType,
int scale) |
void |
registerOutParameter(int parameterIndex,
SQLType sqlType,
String typeName) |
void |
registerOutParameter(String parameterName,
int sqlType) |
void |
registerOutParameter(String parameterName,
int sqlType,
int scale) |
void |
registerOutParameter(String parameterName,
int sqlType,
String typeName) |
void |
registerOutParameter(String parameterName,
SQLType sqlType) |
void |
registerOutParameter(String parameterName,
SQLType sqlType,
int scale) |
void |
registerOutParameter(String parameterName,
SQLType sqlType,
String typeName) |
void |
setArray(int parameterIndex,
Array x)
Sets the designated parameter to the given
java.sql.Array object. |
void |
setAsciiStream(int parameterIndex,
InputStream x)
This function reads up the entire stream and stores it in memory since we need to know the
length when sending it to the server use the corresponding method with a length parameter if
memory is an issue
Sets the designated parameter to the given input stream. |
void |
setAsciiStream(int parameterIndex,
InputStream x,
int length)
Sets the designated parameter to the given input stream, which will have the specified number
of bytes.
|
void |
setAsciiStream(int parameterIndex,
InputStream x,
long length)
Sets the designated parameter to the given input stream, which will have the specified number
of bytes.
|
void |
setAsciiStream(String parameterName,
InputStream inputStream) |
void |
setAsciiStream(String parameterName,
InputStream inputStream,
int length) |
void |
setAsciiStream(String parameterName,
InputStream inputStream,
long length) |
void |
setBigDecimal(int parameterIndex,
BigDecimal x)
Sets the designated parameter to the given
java.math.BigDecimal value. |
void |
setBigDecimal(String parameterName,
BigDecimal bigDecimal) |
void |
setBinaryStream(int parameterIndex,
InputStream x)
This function reads up the entire stream and stores it in memory since we need to know the
length when sending it to the server
Sets the designated parameter to the given input stream. |
void |
setBinaryStream(int parameterIndex,
InputStream x,
int length)
Sets the designated parameter to the given input stream, which will have the specified number
of bytes.
|
void |
setBinaryStream(int parameterIndex,
InputStream x,
long length)
Sets the designated parameter to the given input stream, which will have the specified number
of bytes.
|
void |
setBinaryStream(String parameterName,
InputStream inputStream) |
void |
setBinaryStream(String parameterName,
InputStream inputStream,
int length) |
void |
setBinaryStream(String parameterName,
InputStream inputStream,
long length) |
void |
setBlob(int parameterIndex,
Blob x)
Sets the designated parameter to the given
java.sql.Blob object. |
void |
setBlob(int parameterIndex,
InputStream inputStream)
Sets the designated parameter to a
InputStream object. |
void |
setBlob(int parameterIndex,
InputStream inputStream,
long length)
Sets the designated parameter to a
InputStream object. |
void |
setBlob(String parameterName,
Blob blob) |
void |
setBlob(String parameterName,
InputStream inputStream) |
void |
setBlob(String parameterName,
InputStream inputStream,
long length) |
void |
setBoolean(int parameterIndex,
boolean x)
Sets the designated parameter to the given Java
boolean value. |
void |
setBoolean(String parameterName,
boolean booleanValue) |
void |
setByte(int parameterIndex,
byte x)
Sets the designated parameter to the given Java
byte value. |
void |
setByte(String parameterName,
byte byteValue) |
void |
setBytes(int parameterIndex,
byte[] x)
Sets the designated parameter to the given Java array of bytes.
|
void |
setBytes(String parameterName,
byte[] bytes) |
void |
setCharacterStream(int parameterIndex,
Reader reader)
Sets the designated parameter to the given
Reader object. |
void |
setCharacterStream(int parameterIndex,
Reader reader,
int length)
Sets the designated parameter to the given
Reader object, which is the given
number of characters long. |
void |
setCharacterStream(int parameterIndex,
Reader reader,
long length)
Sets the designated parameter to the given
Reader object, which is the given
number of characters long. |
void |
setCharacterStream(String parameterName,
Reader reader) |
void |
setCharacterStream(String parameterName,
Reader reader,
int length) |
void |
setCharacterStream(String parameterName,
Reader reader,
long length) |
void |
setClob(int parameterIndex,
Clob x)
Sets the designated parameter to the given
java.sql.Clob object. |
void |
setClob(int parameterIndex,
Reader reader)
Sets the designated parameter to a
Reader object. |
void |
setClob(int parameterIndex,
Reader reader,
long length)
Sets the designated parameter to a
Reader object. |
void |
setClob(String parameterName,
Clob clob) |
void |
setClob(String parameterName,
Reader reader) |
void |
setClob(String parameterName,
Reader reader,
long length) |
void |
setDate(int parameterIndex,
Date x)
Sets the designated parameter to the given
java.sql.Date value using the default
time zone of the virtual machine that is running the application. |
void |
setDate(int parameterIndex,
Date x,
Calendar cal)
Sets the designated parameter to the given
java.sql.Date value, using the given
Calendar object. |
void |
setDate(String parameterName,
Date date) |
void |
setDate(String parameterName,
Date date,
Calendar cal) |
void |
setDouble(int parameterIndex,
double x)
Sets the designated parameter to the given Java
double value. |
void |
setDouble(String parameterName,
double doubleValue) |
void |
setFloat(int parameterIndex,
float x)
Sets the designated parameter to the given Java
float value. |
void |
setFloat(String parameterName,
float floatValue) |
void |
setInt(int parameterIndex,
int x) |
void |
setInt(String parameterName,
int intValue) |
void |
setLong(int parameterIndex,
long x)
Sets the designated parameter to the given Java
long value. |
void |
setLong(String parameterName,
long longValue) |
void |
setNCharacterStream(int parameterIndex,
Reader value)
Sets the designated parameter to a
Reader object. |
void |
setNCharacterStream(int parameterIndex,
Reader value,
long length)
Sets the designated parameter to a
Reader object. |
void |
setNCharacterStream(String parameterName,
Reader value) |
void |
setNCharacterStream(String parameterName,
Reader value,
long length) |
void |
setNClob(int parameterIndex,
NClob value)
Sets the designated parameter to a
java.sql.NClob object. |
void |
setNClob(int parameterIndex,
Reader reader)
Sets the designated parameter to a
Reader object. |
void |
setNClob(int parameterIndex,
Reader reader,
long length)
Sets the designated parameter to a
Reader object. |
void |
setNClob(String parameterName,
NClob value) |
void |
setNClob(String parameterName,
Reader reader) |
void |
setNClob(String parameterName,
Reader reader,
long length) |
void |
setNString(int parameterIndex,
String value)
Sets the designated paramter to the given
String object. |
void |
setNString(String parameterName,
String value) |
void |
setNull(int parameterIndex,
int sqlType)
Sets the designated parameter to SQL
NULL. |
void |
setNull(int parameterIndex,
int sqlType,
String typeName)
Sets the designated parameter to SQL
NULL. |
void |
setNull(String parameterName,
int sqlType) |
void |
setNull(String parameterName,
int sqlType,
String typeName) |
void |
setObject(int parameterIndex,
Object x)
Sets the value of the designated parameter using the given object.
|
void |
setObject(int parameterIndex,
Object x,
int targetSqlType)
Sets the value of the designated parameter with the given object.
|
void |
setObject(int parameterIndex,
Object x,
int targetSqlType,
int scaleOrLength)
Sets the value of the designated parameter with the given object.
|
void |
setObject(String parameterName,
Object obj) |
void |
setObject(String parameterName,
Object obj,
int targetSqlType) |
void |
setObject(String parameterName,
Object obj,
int targetSqlType,
int scale) |
void |
setObject(String parameterName,
Object obj,
SQLType targetSqlType) |
void |
setObject(String parameterName,
Object obj,
SQLType targetSqlType,
int scaleOrLength) |
void |
setRef(int parameterIndex,
Ref x)
Sets the designated parameter to the given
REF(<structured-type>) value. |
void |
setRowId(int parameterIndex,
RowId x)
Sets the designated parameter to the given
java.sql.RowId object. |
void |
setRowId(String parameterName,
RowId rowid) |
void |
setShort(int parameterIndex,
short x)
Sets the designated parameter to the given Java
short value. |
void |
setShort(String parameterName,
short shortValue) |
void |
setSQLXML(int parameterIndex,
SQLXML xmlObject)
Sets the designated parameter to the given
java.sql.SQLXML object. |
void |
setSQLXML(String parameterName,
SQLXML xmlObject) |
void |
setString(int parameterIndex,
String x)
Set string parameter.
|
void |
setString(String parameterName,
String stringValue) |
void |
setTime(int parameterIndex,
Time x)
Sets the designated parameter to the given
java.sql.Time value. |
void |
setTime(int parameterIndex,
Time x,
Calendar cal)
Sets the designated parameter to the given
java.sql.Time value, using the given
Calendar object. |
void |
setTime(String parameterName,
Time time) |
void |
setTime(String parameterName,
Time time,
Calendar cal) |
void |
setTimestamp(int parameterIndex,
Timestamp x)
Sets the designated parameter to the given
java.sql.Timestamp value. |
void |
setTimestamp(int parameterIndex,
Timestamp x,
Calendar cal)
Sets the designated parameter to the given
java.sql.Timestamp value, using the
given Calendar object. |
void |
setTimestamp(String parameterName,
Timestamp timestamp) |
void |
setTimestamp(String parameterName,
Timestamp timestamp,
Calendar cal) |
void |
setUnicodeStream(int parameterIndex,
InputStream x,
int length)
Sets the designated parameter to the given input stream, which will have the specified number
of bytes.
|
void |
setURL(int parameterIndex,
URL x)
Sets the designated parameter to the given
java.net.URL value. |
void |
setURL(String parameterName,
URL url) |
boolean |
wasNull() |
addBatch, addBatch, clearBatch, clearParameters, close, closeCursor, cursorFetch, cursorFetchForOracle, execute, executeBatch, executeBatchQuerys, executeInternal, executeLargeBatch, executeLargeBatchQuerys, executeLargeUpdate, executeQuery, executeUpdate, getMetaData, getParameters, getServerThreadId, prepareExecuteInternal, realClose, setParameter, setParameters, toString, validParametersasSql, getParameterCount, setBINARY_DOUBLE, setBINARY_FLOAT, setIndexMap, setINTERVALDS, setINTERVALYM, setLobLocator, setLocalDateTime, setNull, setNUMBER_FLOAT, setNUMBER, setObject, setObject, setParameterCount, setStruct, setTIMESTAMP, setTIMESTAMPLTZ, setTIMESTAMPTZcancel, checkClose, checkCloseOnCompletion, clearWarnings, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, execute, execute, execute, executeBatchEpilogue, executeBatchExceptionEpilogue, executeBatchExceptionEpilogue, executeEpilogue, executeExceptionEpilogue, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeQueryPrologue, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getActualSql, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResults, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getSqlType, getUpdateCount, getWarnings, getWhereEndPos, isAddRowid, isClosed, isCloseOnCompletion, isCursorResultSet, isPoolable, isSimpleIdentifier, isWrapperFor, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setLocalInfileInputStream, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, setTimerTask, skipMoreResults, testExecute, unwrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddBatch, clearParameters, execute, executeLargeUpdate, executeQuery, executeUpdate, getMetaData, setObject, setObjectaddBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeoutisWrapperFor, unwrapprotected List<com.oceanbase.jdbc.CallParameter> params
protected int[] outputParameterMapper
protected CallableParameterMetaData parameterMetadata
protected boolean hasInOutParameters
protected String arguments
public CallableProcedureStatement(boolean isObFuction,
OceanBaseConnection connection,
String sql,
int resultSetScrollType,
int resultSetConcurrency,
ExceptionFactory exceptionFactory)
throws SQLException
connection - current connectionsql - queryresultSetScrollType - one of the following ResultSet constants:
ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEresultSetConcurrency - a concurrency type; one of ResultSet.CONCUR_READ_ONLY
or ResultSet.CONCUR_UPDATABLEexceptionFactory - Exception factorySQLException - is prepareStatement connection throw any errorpublic CallableProcedureStatement clone(OceanBaseConnection connection) throws CloneNotSupportedException
clone in class JDBC4ServerPreparedStatementconnection - connectionCloneNotSupportedException - if any error occur.protected abstract SelectResultSet getOutputResult() throws SQLException
SQLExceptionpublic ParameterMetaData getParameterMetaData() throws SQLException
BasePrepareStatementPreparedStatement object's
parameters.getParameterMetaData in interface PreparedStatementgetParameterMetaData in class JDBC4ServerPreparedStatementParameterMetaData object that contains information about the number,
types and properties for each parameter marker of this PreparedStatement
objectSQLException - if a database access error occurs or this method is called on a closed
PreparedStatementParameterMetaDatapublic boolean wasNull()
throws SQLException
wasNull in interface CallableStatementSQLExceptionpublic String getString(int parameterIndex) throws SQLException
getString in interface CallableStatementSQLExceptionpublic String getString(String parameterName) throws SQLException
getString in interface CallableStatementSQLExceptionpublic boolean getBoolean(int parameterIndex)
throws SQLException
getBoolean in interface CallableStatementSQLExceptionpublic boolean getBoolean(String parameterName) throws SQLException
getBoolean in interface CallableStatementSQLExceptionpublic byte getByte(int parameterIndex)
throws SQLException
getByte in interface CallableStatementSQLExceptionpublic byte getByte(String parameterName) throws SQLException
getByte in interface CallableStatementSQLExceptionpublic short getShort(int parameterIndex)
throws SQLException
getShort in interface CallableStatementSQLExceptionpublic short getShort(String parameterName) throws SQLException
getShort in interface CallableStatementSQLExceptionpublic int getInt(String parameterName) throws SQLException
getInt in interface CallableStatementSQLExceptionpublic int getInt(int parameterIndex)
throws SQLException
getInt in interface CallableStatementSQLExceptionpublic long getLong(String parameterName) throws SQLException
getLong in interface CallableStatementSQLExceptionpublic long getLong(int parameterIndex)
throws SQLException
getLong in interface CallableStatementSQLExceptionpublic float getFloat(String parameterName) throws SQLException
getFloat in interface CallableStatementSQLExceptionpublic float getFloat(int parameterIndex)
throws SQLException
getFloat in interface CallableStatementSQLExceptionpublic double getDouble(int parameterIndex)
throws SQLException
getDouble in interface CallableStatementSQLExceptionpublic double getDouble(String parameterName) throws SQLException
getDouble in interface CallableStatementSQLException@Deprecated public BigDecimal getBigDecimal(int parameterIndex, int scale) throws SQLException
getBigDecimal in interface CallableStatementSQLExceptionpublic BigDecimal getBigDecimal(int parameterIndex) throws SQLException
getBigDecimal in interface CallableStatementSQLExceptionpublic BigDecimal getBigDecimal(String parameterName) throws SQLException
getBigDecimal in interface CallableStatementSQLExceptionpublic byte[] getBytes(String parameterName) throws SQLException
getBytes in interface CallableStatementSQLExceptionpublic byte[] getBytes(int parameterIndex)
throws SQLException
getBytes in interface CallableStatementSQLExceptionpublic Date getDate(int parameterIndex) throws SQLException
getDate in interface CallableStatementSQLExceptionpublic Date getDate(String parameterName) throws SQLException
getDate in interface CallableStatementSQLExceptionpublic Date getDate(String parameterName, Calendar cal) throws SQLException
getDate in interface CallableStatementSQLExceptionpublic Date getDate(int parameterIndex, Calendar cal) throws SQLException
getDate in interface CallableStatementSQLExceptionpublic Time getTime(int parameterIndex, Calendar cal) throws SQLException
getTime in interface CallableStatementSQLExceptionpublic Time getTime(String parameterName) throws SQLException
getTime in interface CallableStatementSQLExceptionpublic Time getTime(String parameterName, Calendar cal) throws SQLException
getTime in interface CallableStatementSQLExceptionpublic Time getTime(int parameterIndex) throws SQLException
getTime in interface CallableStatementSQLExceptionpublic Timestamp getTimestamp(int parameterIndex) throws SQLException
getTimestamp in interface CallableStatementSQLExceptionpublic Timestamp getTimestamp(int parameterIndex, Calendar cal) throws SQLException
getTimestamp in interface CallableStatementSQLExceptionpublic Timestamp getTimestamp(String parameterName) throws SQLException
getTimestamp in interface CallableStatementSQLExceptionpublic Timestamp getTimestamp(String parameterName, Calendar cal) throws SQLException
getTimestamp in interface CallableStatementSQLExceptionpublic Object getObject(int parameterIndex, Map<String,Class<?>> map) throws SQLException
getObject in interface CallableStatementSQLExceptionpublic Object getObject(int parameterIndex) throws SQLException
getObject in interface CallableStatementSQLExceptionpublic Object getObject(String parameterName) throws SQLException
getObject in interface CallableStatementSQLExceptionpublic Object getObject(String parameterName, Map<String,Class<?>> map) throws SQLException
getObject in interface CallableStatementSQLExceptionpublic <T> T getObject(int parameterIndex,
Class<T> type)
throws SQLException
getObject in interface CallableStatementSQLExceptionpublic <T> T getObject(String parameterName, Class<T> type) throws SQLException
getObject in interface CallableStatementSQLExceptionpublic Ref getRef(int parameterIndex) throws SQLException
getRef in interface CallableStatementSQLExceptionpublic Ref getRef(String parameterName) throws SQLException
getRef in interface CallableStatementSQLExceptionpublic Blob getBlob(int parameterIndex) throws SQLException
getBlob in interface CallableStatementSQLExceptionpublic Blob getBlob(String parameterName) throws SQLException
getBlob in interface CallableStatementSQLExceptionpublic Clob getClob(String parameterName) throws SQLException
getClob in interface CallableStatementSQLExceptionpublic Clob getClob(int parameterIndex) throws SQLException
getClob in interface CallableStatementSQLExceptionpublic Array getArray(String parameterName) throws SQLException
getArray in interface CallableStatementSQLExceptionpublic Array getArray(int parameterIndex) throws SQLException
getArray in interface CallableStatementSQLExceptionpublic URL getURL(int parameterIndex) throws SQLException
getURL in interface CallableStatementSQLExceptionpublic URL getURL(String parameterName) throws SQLException
getURL in interface CallableStatementSQLExceptionpublic RowId getRowId(int parameterIndex) throws SQLException
getRowId in interface CallableStatementSQLExceptionpublic RowId getRowId(String parameterName) throws SQLException
getRowId in interface CallableStatementSQLExceptionpublic NClob getNClob(int parameterIndex) throws SQLException
getNClob in interface CallableStatementSQLExceptionpublic NClob getNClob(String parameterName) throws SQLException
getNClob in interface CallableStatementSQLExceptionpublic SQLXML getSQLXML(int parameterIndex) throws SQLException
getSQLXML in interface CallableStatementSQLExceptionpublic SQLXML getSQLXML(String parameterName) throws SQLException
getSQLXML in interface CallableStatementSQLExceptionpublic String getNString(int parameterIndex) throws SQLException
getNString in interface CallableStatementSQLExceptionpublic String getNString(String parameterName) throws SQLException
getNString in interface CallableStatementSQLExceptionpublic Reader getNCharacterStream(int parameterIndex) throws SQLException
getNCharacterStream in interface CallableStatementSQLExceptionpublic Reader getNCharacterStream(String parameterName) throws SQLException
getNCharacterStream in interface CallableStatementSQLExceptionpublic Reader getCharacterStream(int parameterIndex) throws SQLException
getCharacterStream in interface CallableStatementSQLExceptionpublic Reader getCharacterStream(String parameterName) throws SQLException
getCharacterStream in interface CallableStatementSQLExceptionpublic void registerOutParameter(int parameterIndex,
int sqlType,
String typeName)
throws SQLException
registerOutParameter should be used for a user-defined or REF output
parameter. Examples of user-defined types include: STRUCT, DISTINCT,
JAVA_OBJECT, and named array types.
All OUT parameters must be registered before a stored procedure is executed.
For a user-defined parameter, the fully-qualified SQL type name of the parameter should also
be given, while a REF parameter requires that the fully-qualified type name of the
referenced type be given. A JDBC driver that does not need the type code and type name
information may ignore it. To be portable, however, applications should always provide these
values for user-defined and REF parameters.
Although it is intended for user-defined and REF parameters, this method may be
used to register a parameter of any JDBC type. If the parameter does not have a user-defined or
REF type, the typeName parameter is ignored.
Note: When reading the value of an out parameter, you must use the getter method whose Java type corresponds to the parameter's registered SQL type.
registerOutParameter in interface CallableStatementparameterIndex - the first parameter is 1, the second is 2,...sqlType - a value from TypestypeName - the fully-qualified name of an SQL structured typeSQLException - if the parameterIndex is not valid; if a database access error occurs or
this method is called on a closed CallableStatementTypespublic void registerOutParameter(int parameterIndex,
int sqlType)
throws SQLException
registerOutParameter in interface CallableStatementSQLExceptionpublic void registerOutParameter(int parameterIndex,
int sqlType,
int scale)
throws SQLException
parameterIndex to be of JDBC type
sqlType. All OUT parameters must be registered before a stored procedure is
executed.
The JDBC type specified by sqlType for an OUT parameter determines the Java
type that must be used in the get method to read the value of that parameter.
This version of registerOutParameter should be used when the parameter is of
JDBC type NUMERIC or DECIMAL.
registerOutParameter in interface CallableStatementparameterIndex - the first parameter is 1, the second is 2, and so onsqlType - the SQL type code defined by java.sql.Types.scale - the desired number of digits to the right of the decimal point. It must be greater
than or equal to zero.SQLException - if the parameterIndex is not valid; if a database access error occurs or
this method is called on a closed CallableStatementTypespublic void registerOutParameter(String parameterName, int sqlType) throws SQLException
registerOutParameter in interface CallableStatementSQLExceptionpublic void registerOutParameter(String parameterName, int sqlType, int scale) throws SQLException
registerOutParameter in interface CallableStatementSQLExceptionpublic void registerOutParameter(String parameterName, int sqlType, String typeName) throws SQLException
registerOutParameter in interface CallableStatementSQLExceptionpublic void registerOutParameter(int parameterIndex,
SQLType sqlType)
throws SQLException
registerOutParameter in interface CallableStatementSQLExceptionpublic void registerOutParameter(int parameterIndex,
SQLType sqlType,
int scale)
throws SQLException
registerOutParameter in interface CallableStatementSQLExceptionpublic void registerOutParameter(int parameterIndex,
SQLType sqlType,
String typeName)
throws SQLException
registerOutParameter in interface CallableStatementSQLExceptionpublic void registerOutParameter(String parameterName, SQLType sqlType) throws SQLException
registerOutParameter in interface CallableStatementSQLExceptionpublic void registerOutParameter(String parameterName, SQLType sqlType, int scale) throws SQLException
registerOutParameter in interface CallableStatementSQLExceptionpublic void registerOutParameter(String parameterName, SQLType sqlType, String typeName) throws SQLException
registerOutParameter in interface CallableStatementSQLExceptionpublic void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException
setSQLXML in interface CallableStatementSQLExceptionpublic void setRowId(String parameterName, RowId rowid) throws SQLException
setRowId in interface CallableStatementSQLExceptionpublic void setNString(String parameterName, String value) throws SQLException
setNString in interface CallableStatementSQLExceptionpublic void setNCharacterStream(String parameterName, Reader value, long length) throws SQLException
setNCharacterStream in interface CallableStatementSQLExceptionpublic void setNCharacterStream(String parameterName, Reader value) throws SQLException
setNCharacterStream in interface CallableStatementSQLExceptionpublic void setNClob(String parameterName, NClob value) throws SQLException
setNClob in interface CallableStatementSQLExceptionpublic void setNClob(String parameterName, Reader reader, long length) throws SQLException
setNClob in interface CallableStatementSQLExceptionpublic void setNClob(String parameterName, Reader reader) throws SQLException
setNClob in interface CallableStatementSQLExceptionpublic void setClob(String parameterName, Reader reader, long length) throws SQLException
setClob in interface CallableStatementSQLExceptionpublic void setClob(String parameterName, Clob clob) throws SQLException
setClob in interface CallableStatementSQLExceptionpublic void setClob(String parameterName, Reader reader) throws SQLException
setClob in interface CallableStatementSQLExceptionpublic void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException
setBlob in interface CallableStatementSQLExceptionpublic void setBlob(String parameterName, Blob blob) throws SQLException
setBlob in interface CallableStatementSQLExceptionpublic void setBlob(String parameterName, InputStream inputStream) throws SQLException
setBlob in interface CallableStatementSQLExceptionpublic void setAsciiStream(String parameterName, InputStream inputStream, long length) throws SQLException
setAsciiStream in interface CallableStatementSQLExceptionpublic void setAsciiStream(String parameterName, InputStream inputStream, int length) throws SQLException
setAsciiStream in interface CallableStatementSQLExceptionpublic void setAsciiStream(String parameterName, InputStream inputStream) throws SQLException
setAsciiStream in interface CallableStatementSQLExceptionpublic void setBinaryStream(String parameterName, InputStream inputStream, long length) throws SQLException
setBinaryStream in interface CallableStatementSQLExceptionpublic void setBinaryStream(String parameterName, InputStream inputStream) throws SQLException
setBinaryStream in interface CallableStatementSQLExceptionpublic void setBinaryStream(String parameterName, InputStream inputStream, int length) throws SQLException
setBinaryStream in interface CallableStatementSQLExceptionpublic void setCharacterStream(String parameterName, Reader reader, long length) throws SQLException
setCharacterStream in interface CallableStatementSQLExceptionpublic void setCharacterStream(String parameterName, Reader reader) throws SQLException
setCharacterStream in interface CallableStatementSQLExceptionpublic void setCharacterStream(String parameterName, Reader reader, int length) throws SQLException
setCharacterStream in interface CallableStatementSQLExceptionpublic void setURL(String parameterName, URL url) throws SQLException
setURL in interface CallableStatementSQLExceptionpublic void setNull(String parameterName, int sqlType) throws SQLException
setNull in interface CallableStatementSQLExceptionpublic void setNull(String parameterName, int sqlType, String typeName) throws SQLException
setNull in interface CallableStatementSQLExceptionpublic void setBoolean(String parameterName, boolean booleanValue) throws SQLException
setBoolean in interface CallableStatementSQLExceptionpublic void setByte(String parameterName, byte byteValue) throws SQLException
setByte in interface CallableStatementSQLExceptionpublic void setShort(String parameterName, short shortValue) throws SQLException
setShort in interface CallableStatementSQLExceptionpublic void setInt(String parameterName, int intValue) throws SQLException
setInt in interface CallableStatementSQLExceptionpublic void setLong(String parameterName, long longValue) throws SQLException
setLong in interface CallableStatementSQLExceptionpublic void setFloat(String parameterName, float floatValue) throws SQLException
setFloat in interface CallableStatementSQLExceptionpublic void setDouble(String parameterName, double doubleValue) throws SQLException
setDouble in interface CallableStatementSQLExceptionpublic void setBigDecimal(String parameterName, BigDecimal bigDecimal) throws SQLException
setBigDecimal in interface CallableStatementSQLExceptionpublic void setString(String parameterName, String stringValue) throws SQLException
setString in interface CallableStatementSQLExceptionpublic void setBytes(String parameterName, byte[] bytes) throws SQLException
setBytes in interface CallableStatementSQLExceptionpublic void setDate(String parameterName, Date date) throws SQLException
setDate in interface CallableStatementSQLExceptionpublic void setDate(String parameterName, Date date, Calendar cal) throws SQLException
setDate in interface CallableStatementSQLExceptionpublic void setTime(String parameterName, Time time) throws SQLException
setTime in interface CallableStatementSQLExceptionpublic void setTime(String parameterName, Time time, Calendar cal) throws SQLException
setTime in interface CallableStatementSQLExceptionpublic void setTimestamp(String parameterName, Timestamp timestamp) throws SQLException
setTimestamp in interface CallableStatementSQLExceptionpublic void setTimestamp(String parameterName, Timestamp timestamp, Calendar cal) throws SQLException
setTimestamp in interface CallableStatementSQLExceptionpublic void setObject(String parameterName, Object obj, int targetSqlType, int scale) throws SQLException
setObject in interface CallableStatementSQLExceptionpublic void setObject(String parameterName, Object obj, int targetSqlType) throws SQLException
setObject in interface CallableStatementSQLExceptionpublic void setObject(String parameterName, Object obj) throws SQLException
setObject in interface CallableStatementSQLExceptionpublic void setObject(String parameterName, Object obj, SQLType targetSqlType, int scaleOrLength) throws SQLException
setObject in interface CallableStatementSQLExceptionpublic void setObject(String parameterName, Object obj, SQLType targetSqlType) throws SQLException
setObject in interface CallableStatementSQLExceptionpublic void setNull(int parameterIndex,
int sqlType)
throws SQLException
BasePrepareStatementNULL.
Note: You must specify the parameter's SQL type.
setNull in interface PreparedStatementsetNull in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...sqlType - the SQL type code defined in java.sql.TypesSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setBoolean(int parameterIndex,
boolean x)
throws SQLException
BasePrepareStatementboolean value. The driver converts
this to an SQL BIT or BOOLEAN value when it sends it to the database.setBoolean in interface PreparedStatementsetBoolean in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setByte(int parameterIndex,
byte x)
throws SQLException
BasePrepareStatementbyte value. The driver converts
this to an SQL TINYINT value when it sends it to the database.setByte in interface PreparedStatementsetByte in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setShort(int parameterIndex,
short x)
throws SQLException
BasePrepareStatementshort value. The driver converts
this to an SQL SMALLINT value when it sends it to the database.setShort in interface PreparedStatementsetShort in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setInt(int parameterIndex,
int x)
throws SQLException
setInt in interface PreparedStatementsetInt in class BasePrepareStatementSQLExceptionpublic void setLong(int parameterIndex,
long x)
throws SQLException
BasePrepareStatementlong value. The driver converts
this to an SQL BIGINT value when it sends it to the database.setLong in interface PreparedStatementsetLong in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setFloat(int parameterIndex,
float x)
throws SQLException
BasePrepareStatementfloat value. The driver converts
this to an SQL REAL value when it sends it to the database.setFloat in interface PreparedStatementsetFloat in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setDouble(int parameterIndex,
double x)
throws SQLException
BasePrepareStatementdouble value. The driver converts
this to an SQL DOUBLE value when it sends it to the database.setDouble in interface PreparedStatementsetDouble in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setBigDecimal(int parameterIndex,
BigDecimal x)
throws SQLException
BasePrepareStatementjava.math.BigDecimal value. The driver
converts this to an SQL NUMERIC value when it sends it to the database.setBigDecimal in interface PreparedStatementsetBigDecimal in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setString(int parameterIndex,
String x)
throws SQLException
BasePrepareStatementsetString in interface PreparedStatementsetString in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - StringSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setBytes(int parameterIndex,
byte[] x)
throws SQLException
BasePrepareStatementVARBINARY or LONGVARBINARY (depending on the argument's size
relative to the driver's limits on VARBINARY values) when it sends it to the
database.setBytes in interface PreparedStatementsetBytes in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setDate(int parameterIndex,
Date x)
throws SQLException
BasePrepareStatementjava.sql.Date value using the default
time zone of the virtual machine that is running the application. The driver converts this to
an SQL DATE value when it sends it to the database.setDate in interface PreparedStatementsetDate in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setTime(int parameterIndex,
Time x)
throws SQLException
BasePrepareStatementjava.sql.Time value. the driver uses
the default timezone, which is that of the virtual machine running the application.setTime in interface PreparedStatementsetTime in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setTimestamp(int parameterIndex,
Timestamp x)
throws SQLException
BasePrepareStatementjava.sql.Timestamp value. The driver
converts this to an SQL TIMESTAMP value when it sends it to the database.setTimestamp in interface PreparedStatementsetTimestamp in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setAsciiStream(int parameterIndex,
InputStream x,
int length)
throws SQLException
BasePrepareStatementLONGVARCHAR parameter, it
may be more practical to send it via a java.io.InputStream. Data will be read from
the stream as needed until end-of-file is reached. The JDBC driver will do any necessary
conversion from ASCII to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
setAsciiStream in interface PreparedStatementsetAsciiStream in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the Java input stream that contains the ASCII parameter valuelength - the number of bytes in the streamSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setUnicodeStream(int parameterIndex,
InputStream x,
int length)
throws SQLException
BasePrepareStatementLONGVARCHAR parameter, it may be
more practical to send it via a java.io.InputStream object. The data will be read
from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary
conversion from Unicode to the database char format. Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
setUnicodeStream in interface PreparedStatementsetUnicodeStream in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - a java.io.InputStream object that contains the Unicode parameter valuelength - the number of bytes in the streamSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setBinaryStream(int parameterIndex,
InputStream x,
int length)
throws SQLException
BasePrepareStatementLONGVARBINARY parameter, it
may be more practical to send it via a java.io.InputStream object. The data will
be read from the stream as needed until end-of-file is reached.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
setBinaryStream in interface PreparedStatementsetBinaryStream in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the java input stream which contains the binary parameter valuelength - the number of bytes in the streamSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setObject(int parameterIndex,
Object x,
int targetSqlType)
throws SQLException
BasePrepareStatementsetObject above, except that it assumes a scale of zero.setObject in interface PreparedStatementsetObject in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the object containing the input parameter valuetargetSqlType - the SQL type (as defined in java.sql.Types) to be sent to the databaseSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementsTypespublic void setObject(int parameterIndex,
Object x)
throws SQLException
BasePrepareStatementObject; therefore, the java.lang equivalent objects should be
used for built-in types.
The JDBC specification specifies a standard mapping from Java Object types to
SQL types. The given argument will be converted to the corresponding SQL type before being sent
to the database.
setObject in interface PreparedStatementsetObject in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the object containing the input parameter valueSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs; this method is called on a closed
PreparedStatement or the type of the given object is ambiguouspublic void setCharacterStream(int parameterIndex,
Reader reader,
int length)
throws SQLException
BasePrepareStatementReader object, which is the given
number of characters long. When a very large UNICODE value is input to a LONGVARCHAR
parameter, it may be more practical to send it via a java.io.Reader
object. The data will be read from the stream as needed until end-of-file is reached. The JDBC
driver will do any necessary conversion from UNICODE to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
setCharacterStream in interface PreparedStatementsetCharacterStream in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...reader - the java.io.Reader object that contains the Unicode datalength - the number of characters in the streamSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setRef(int parameterIndex,
Ref x)
throws SQLException
BasePrepareStatementREF(<structured-type>) value. The
driver converts this to an SQL REF value when it sends it to the database.setRef in interface PreparedStatementsetRef in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - an SQL REF valueSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setBlob(int parameterIndex,
Blob x)
throws SQLException
BasePrepareStatementjava.sql.Blob object. The driver
converts this to an SQL BLOB value when it sends it to the database.setBlob in interface PreparedStatementsetBlob in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - a Blob object that maps an SQL BLOB valueSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setClob(int parameterIndex,
Clob x)
throws SQLException
BasePrepareStatementjava.sql.Clob object. The driver
converts this to an SQL CLOB value when it sends it to the database.setClob in interface PreparedStatementsetClob in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - a Clob object that maps an SQL CLOB valueSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setArray(int parameterIndex,
Array x)
throws SQLException
BasePrepareStatementjava.sql.Array object. The driver
converts this to an SQL ARRAY value when it sends it to the database.setArray in interface PreparedStatementsetArray in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - an Array object that maps an SQL ARRAY valueSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setDate(int parameterIndex,
Date x,
Calendar cal)
throws SQLException
BasePrepareStatementjava.sql.Date value, using the given
Calendar object. The driver uses the Calendar object to construct an
SQL DATE value, which the driver then sends to the database. With a Calendar
object, the driver can calculate the date taking into account a custom timezone. If no
Calendar object is specified, the driver uses the default timezone, which is that
of the virtual machine running the application.setDate in interface PreparedStatementsetDate in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuecal - the Calendar object the driver will use to construct the dateSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setTime(int parameterIndex,
Time x,
Calendar cal)
throws SQLException
BasePrepareStatementjava.sql.Time value, using the given
Calendar object. The driver uses the Calendar object to construct an
SQL TIME value, which the driver then sends to the database. With a Calendar
object, the driver can calculate the time taking into account a custom timezone. If no
Calendar object is specified, the driver uses the default timezone, which is that
of the virtual machine running the application.setTime in interface PreparedStatementsetTime in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuecal - the Calendar object the driver will use to construct the timeSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setTimestamp(int parameterIndex,
Timestamp x,
Calendar cal)
throws SQLException
BasePrepareStatementjava.sql.Timestamp value, using the
given Calendar object. The driver uses the Calendar object to
construct an SQL TIMESTAMP value, which the driver then sends to the database.
With a Calendar object, the driver can calculate the timestamp taking into account
a custom timezone. If no Calendar object is specified, the driver uses the default
timezone, which is that of the virtual machine running the application.setTimestamp in interface PreparedStatementsetTimestamp in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuecal - the Calendar object the driver will use to construct the timestampSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setNull(int parameterIndex,
int sqlType,
String typeName)
throws SQLException
BasePrepareStatementNULL. This version of the method
setNull should be used for user-defined types and REF type parameters. Examples of
user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and named array types.
Note: To be portable, applications must give the SQL type code and the fully-qualified SQL type name when specifying a NULL user-defined or REF parameter. In the case of a user-defined type the name is the type name of the parameter itself. For a REF parameter, the name is the type name of the referenced type. If a JDBC driver does not need the type code or type name information, it may ignore it.
Although it is intended for user-defined and Ref parameters, this method may be used to set a null parameter of any JDBC type. If the parameter does not have a user-defined or REF type, the given typeName is ignored.
setNull in interface PreparedStatementsetNull in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...sqlType - a value from java.sql.TypestypeName - the fully-qualified name of an SQL user-defined type; ignored if the parameter
is not a user-defined type or REFSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setURL(int parameterIndex,
URL x)
throws SQLException
BasePrepareStatementjava.net.URL value. The driver converts
this to an SQL DATALINK value when it sends it to the database.setURL in interface PreparedStatementsetURL in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the java.net.URL object to be setSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setRowId(int parameterIndex,
RowId x)
throws SQLException
BasePrepareStatementjava.sql.RowId object. The driver
converts this to a SQL ROWID value when it sends it to the databasesetRowId in interface PreparedStatementsetRowId in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setNString(int parameterIndex,
String value)
throws SQLException
BasePrepareStatementString object. The driver converts this
to a SQL NCHAR or NVARCHAR or LONGNVARCHAR value
(depending on the argument's size relative to the driver's limits on NVARCHAR
values) when it sends it to the database.setNString in interface PreparedStatementsetNString in class BasePrepareStatementparameterIndex - of the first parameter is 1, the second is 2, ...value - the parameter valueSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if the driver does not support national character sets; if the driver can detect
that a data conversion error could occur; if a database access error occurs; or this method
is called on a closed PreparedStatementpublic void setNCharacterStream(int parameterIndex,
Reader value,
long length)
throws SQLException
BasePrepareStatementReader object. The Reader reads
the data till end-of-file is reached. The driver does the necessary conversion from Java
character format to the national character set in the database.setNCharacterStream in interface PreparedStatementsetNCharacterStream in class BasePrepareStatementparameterIndex - of the first parameter is 1, the second is 2, ...value - the parameter valuelength - the number of characters in the parameter data.SQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if the driver does not support national character sets; if the driver can detect
that a data conversion error could occur; if a database access error occurs; or this method
is called on a closed PreparedStatementpublic void setNClob(int parameterIndex,
NClob value)
throws SQLException
BasePrepareStatementjava.sql.NClob object. The driver converts this
to a SQL NCLOB value when it sends it to the database.setNClob in interface PreparedStatementsetNClob in class BasePrepareStatementparameterIndex - of the first parameter is 1, the second is 2, ...value - the parameter valueSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if the driver does not support national character sets; if the driver can detect
that a data conversion error could occur; if a database access error occurs; or this method
is called on a closed PreparedStatementpublic void setClob(int parameterIndex,
Reader reader,
long length)
throws SQLException
BasePrepareStatementReader object. The reader must contain the
number of characters specified by length otherwise a SQLException will be
generated when the PreparedStatement is executed. This method differs from the
setCharacterStream (int, Reader,
int) method because it informs the driver that the parameter value should be sent to the
server as a CLOB. When the setCharacterStream method is used, the
driver may have to do extra work to determine whether the parameter data should be sent to the
server as a LONGVARCHAR or a CLOBsetClob in interface PreparedStatementsetClob in class BasePrepareStatementparameterIndex - index of the first parameter is 1, the second is 2, ...reader - An object that contains the data to set the parameter value to.length - the number of characters in the parameter data.SQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs; this method is called on a closed
PreparedStatement or if the length specified is less than zero.public void setBlob(int parameterIndex,
InputStream inputStream,
long length)
throws SQLException
BasePrepareStatementInputStream object. The inputstream must
contain the number of characters specified by length otherwise a SQLException will
be generated when the PreparedStatement is executed. This method differs from the
setBinaryStream
(int, InputStream, int) method because it informs the driver that the parameter value
should be sent to the server as a BLOB. When the setBinaryStream
method is used, the driver may have to do extra work to determine whether the parameter data
should be sent to the server as a LONGVARBINARY or a BLOBsetBlob in interface PreparedStatementsetBlob in class BasePrepareStatementparameterIndex - index of the first parameter is 1, the second is 2, ...inputStream - An object that contains the data to set the parameter value to.length - the number of bytes in the parameter data.SQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs; this method is called on a closed
PreparedStatement; if the length specified is less than zero or if the number of
bytes in the inputstream does not match the specfied length.public void setNClob(int parameterIndex,
Reader reader,
long length)
throws SQLException
BasePrepareStatementReader object. The reader must contain the
number of characters specified by length otherwise a SQLException will be
generated when the PreparedStatement is executed. This method differs from the
setCharacterStream (int, Reader,
int) method because it informs the driver that the parameter value should be sent to the
server as a NCLOB. When the setCharacterStream method is used, the
driver may have to do extra work to determine whether the parameter data should be sent to the
server as a LONGNVARCHAR or a NCLOBsetNClob in interface PreparedStatementsetNClob in class BasePrepareStatementparameterIndex - index of the first parameter is 1, the second is 2, ...reader - An object that contains the data to set the parameter value to.length - the number of characters in the parameter data.SQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if the length specified is less than zero; if the driver does not support
national character sets; if the driver can detect that a data conversion error could occur;
if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setSQLXML(int parameterIndex,
SQLXML xmlObject)
throws SQLException
BasePrepareStatementjava.sql.SQLXML object. The driver
converts this to an SQL XML value when it sends it to the database. setSQLXML in interface PreparedStatementsetSQLXML in class BasePrepareStatementparameterIndex - index of the first parameter is 1, the second is 2, ...xmlObject - a SQLXML object that maps an SQL XML valueSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs; this method is called on a closed
PreparedStatement or the java.xml.transform.Result, Writer
or OutputStream has not been closed for the SQLXML objectpublic void setObject(int parameterIndex,
Object x,
int targetSqlType,
int scaleOrLength)
throws SQLException
BasePrepareStatementjava.lang equivalent objects should be
used.
If the second argument is an InputStream then the stream must contain the
number of bytes specified by scaleOrLength. If the second argument is a Reader
then the reader must contain the number of characters specified by scaleOrLength. If these
conditions are not true the driver will generate a SQLException when the prepared
statement is executed.
The given Java object will be converted to the given targetSqlType before being sent to the database.
If the object has a custom mapping (is of a class implementing the interface SQLData
), the JDBC driver should call the method SQLData.writeSQL to write it to
the SQL data stream. If, on the other hand, the object is of a class implementing Ref
, Blob, Clob, NClob, Struct,
java.net.URL, or Array, the driver should pass it to the database as a
value of the corresponding SQL type.
Note that this method may be used to pass database-specific abstract data types.
setObject in interface PreparedStatementsetObject in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the object containing the input parameter valuetargetSqlType - the SQL type (as defined in java.sql.Types) to be sent to the database.
The scale argument may further qualify this type.scaleOrLength - for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC
types, this is the number of digits after the decimal point. For
Java Object types InputStream and Reader, this is the length of
the data in the stream or reader. For all other types, this value will be ignored.SQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs; this method is called on a closed
PreparedStatement or if the Java Object specified by x is an InputStream or Reader
object and the value of the scale parameter is less than zeroTypespublic void setAsciiStream(int parameterIndex,
InputStream x,
long length)
throws SQLException
BasePrepareStatementLONGVARCHAR parameter, it
may be more practical to send it via a java.io.InputStream. Data will be read from
the stream as needed until end-of-file is reached. The JDBC driver will do any necessary
conversion from ASCII to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
setAsciiStream in interface PreparedStatementsetAsciiStream in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the Java input stream that contains the ASCII parameter valuelength - the number of bytes in the streamSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setBinaryStream(int parameterIndex,
InputStream x,
long length)
throws SQLException
BasePrepareStatementLONGVARBINARY parameter, it
may be more practical to send it via a java.io.InputStream object. The data will
be read from the stream as needed until end-of-file is reached.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
setBinaryStream in interface PreparedStatementsetBinaryStream in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the java input stream which contains the binary parameter valuelength - the number of bytes in the streamSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setCharacterStream(int parameterIndex,
Reader reader,
long length)
throws SQLException
BasePrepareStatementReader object, which is the given
number of characters long. When a very large UNICODE value is input to a LONGVARCHAR
parameter, it may be more practical to send it via a java.io.Reader
object. The data will be read from the stream as needed until end-of-file is reached. The JDBC
driver will do any necessary conversion from UNICODE to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
setCharacterStream in interface PreparedStatementsetCharacterStream in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...reader - the java.io.Reader object that contains the Unicode datalength - the number of characters in the streamSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setAsciiStream(int parameterIndex,
InputStream x)
throws SQLException
BasePrepareStatementLONGVARCHAR parameter, it may be more practical to send it via a
java.io.InputStream. Data will be read from the stream as needed until end-of-file is
reached. The JDBC driver will do any necessary conversion from ASCII to the database char
format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Note: Consult your JDBC driver documentation to determine if it might be more
efficient to use a version of setAsciiStream which takes a length parameter.
setAsciiStream in interface PreparedStatementsetAsciiStream in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the Java input stream that contains the ASCII parameter valueSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setBinaryStream(int parameterIndex,
InputStream x)
throws SQLException
BasePrepareStatementLONGVARBINARY parameter, it may be more practical to send it via a
java.io.InputStream object. The data will be read from the stream as needed until
end-of-file is reached.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Note: Consult your JDBC driver documentation to determine if it might be more
efficient to use a version of setBinaryStream which takes a length parameter.
setBinaryStream in interface PreparedStatementsetBinaryStream in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the java input stream which contains the binary parameter valueSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setCharacterStream(int parameterIndex,
Reader reader)
throws SQLException
BasePrepareStatementReader object. When a very large
UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to
send it via a java.io.Reader object. The data will be read from the stream as
needed until end-of-file is reached. The JDBC driver will do any necessary conversion from
UNICODE to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Note: Consult your JDBC driver documentation to determine if it might be more
efficient to use a version of setCharacterStream which takes a length parameter.
setCharacterStream in interface PreparedStatementsetCharacterStream in class BasePrepareStatementparameterIndex - the first parameter is 1, the second is 2, ...reader - the java.io.Reader object that contains the Unicode dataSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs or this method is called on a closed
PreparedStatementpublic void setNCharacterStream(int parameterIndex,
Reader value)
throws SQLException
BasePrepareStatementReader object. The Reader reads
the data till end-of-file is reached. The driver does the necessary conversion from Java
character format to the national character set in the database.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Note: Consult your JDBC driver documentation to determine if it might be more
efficient to use a version of setNCharacterStream which takes a length parameter.
setNCharacterStream in interface PreparedStatementsetNCharacterStream in class BasePrepareStatementparameterIndex - of the first parameter is 1, the second is 2, ...value - the parameter valueSQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if the driver does not support national character sets; if the driver can detect
that a data conversion error could occur; if a database access error occurs; or this method
is called on a closed PreparedStatementpublic void setClob(int parameterIndex,
Reader reader)
throws SQLException
BasePrepareStatementReader object. This method differs from the
setCharacterStream (int, Reader) method because it informs the driver that the
parameter value should be sent to the server as a CLOB. When the
setCharacterStream method is used, the driver may have to do extra work to determine
whether the parameter data should be sent to the server as a LONGVARCHAR or a
CLOB
Note: Consult your JDBC driver documentation to determine if it might be more
efficient to use a version of setClob which takes a length parameter.
setClob in interface PreparedStatementsetClob in class BasePrepareStatementparameterIndex - index of the first parameter is 1, the second is 2, ...reader - An object that contains the data to set the parameter value to.SQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs; this method is called on a closed
PreparedStatementor if parameterIndex does not correspond to a parameter marker in
the SQL statementpublic void setBlob(int parameterIndex,
InputStream inputStream)
throws SQLException
BasePrepareStatementInputStream object. This method differs from
the setBinaryStream (int, InputStream) method because it informs the driver that
the parameter value should be sent to the server as a BLOB. When the
setBinaryStream method is used, the driver may have to do extra work to determine
whether the parameter data should be sent to the server as a LONGVARBINARY or a
BLOB
Note: Consult your JDBC driver documentation to determine if it might be more
efficient to use a version of setBlob which takes a length parameter.
setBlob in interface PreparedStatementsetBlob in class BasePrepareStatementparameterIndex - index of the first parameter is 1, the second is 2, ...inputStream - An object that contains the data to set the parameter value to.SQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if a database access error occurs; this method is called on a closed
PreparedStatement or if parameterIndex does not correspond to a parameter marker in
the SQL statement,public void setNClob(int parameterIndex,
Reader reader)
throws SQLException
BasePrepareStatementReader object. This method differs from the
setCharacterStream (int, Reader) method because it informs the driver that the
parameter value should be sent to the server as a NCLOB. When the
setCharacterStream method is used, the driver may have to do extra work to determine
whether the parameter data should be sent to the server as a LONGNVARCHAR or a
NCLOB
Note: Consult your JDBC driver documentation to determine if it might be more
efficient to use a version of setNClob which takes a length parameter.
setNClob in interface PreparedStatementsetNClob in class BasePrepareStatementparameterIndex - index of the first parameter is 1, the second is 2, ...reader - An object that contains the data to set the parameter value to.SQLException - if parameterIndex does not correspond to a parameter marker in the SQL
statement; if the driver does not support national character sets; if the driver can detect
that a data conversion error could occur; if a database access error occurs or this method
is called on a closed PreparedStatementCopyright © 2022 oceanbase.com. All rights reserved.