0N/A/*
2751N/A * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/Apackage java.sql;
0N/A
0N/Aimport java.math.BigDecimal;
0N/Aimport java.util.Calendar;
0N/Aimport java.io.Reader;
0N/Aimport java.io.InputStream;
0N/A
0N/A/**
0N/A * The interface used to execute SQL stored procedures. The JDBC API
0N/A * provides a stored procedure SQL escape syntax that allows stored procedures
0N/A * to be called in a standard way for all RDBMSs. This escape syntax has one
0N/A * form that includes a result parameter and one that does not. If used, the result
0N/A * parameter must be registered as an OUT parameter. The other parameters
0N/A * can be used for input, output or both. Parameters are referred to
0N/A * sequentially, by number, with the first parameter being 1.
0N/A * <PRE>
0N/A * {?= call &lt;procedure-name&gt;[(&lt;arg1&gt;,&lt;arg2&gt;, ...)]}
0N/A * {call &lt;procedure-name&gt;[(&lt;arg1&gt;,&lt;arg2&gt;, ...)]}
0N/A * </PRE>
0N/A * <P>
0N/A * IN parameter values are set using the <code>set</code> methods inherited from
0N/A * {@link PreparedStatement}. The type of all OUT parameters must be
0N/A * registered prior to executing the stored procedure; their values
0N/A * are retrieved after execution via the <code>get</code> methods provided here.
0N/A * <P>
0N/A * A <code>CallableStatement</code> can return one {@link ResultSet} object or
0N/A * multiple <code>ResultSet</code> objects. Multiple
0N/A * <code>ResultSet</code> objects are handled using operations
0N/A * inherited from {@link Statement}.
0N/A * <P>
0N/A * For maximum portability, a call's <code>ResultSet</code> objects and
0N/A * update counts should be processed prior to getting the values of output
0N/A * parameters.
0N/A * <P>
0N/A *
0N/A * @see Connection#prepareCall
0N/A * @see ResultSet
0N/A */
0N/A
0N/Apublic interface CallableStatement extends PreparedStatement {
0N/A
0N/A /**
0N/A * Registers the OUT parameter in ordinal position
0N/A * <code>parameterIndex</code> to the JDBC type
0N/A * <code>sqlType</code>. All OUT parameters must be registered
0N/A * before a stored procedure is executed.
0N/A * <p>
0N/A * The JDBC type specified by <code>sqlType</code> for an OUT
0N/A * parameter determines the Java type that must be used
0N/A * in the <code>get</code> method to read the value of that parameter.
0N/A * <p>
0N/A * If the JDBC type expected to be returned to this output parameter
0N/A * is specific to this particular database, <code>sqlType</code>
0N/A * should be <code>java.sql.Types.OTHER</code>. The method
0N/A * {@link #getObject} retrieves the value.
0N/A *
0N/A * @param parameterIndex the first parameter is 1, the second is 2,
0N/A * and so on
0N/A * @param sqlType the JDBC type code defined by <code>java.sql.Types</code>.
0N/A * If the parameter is of JDBC type <code>NUMERIC</code>
0N/A * or <code>DECIMAL</code>, the version of
0N/A * <code>registerOutParameter</code> that accepts a scale value
0N/A * should be used.
0N/A *
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if <code>sqlType</code> is
0N/A * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,
0N/A * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,
0N/A * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,
0N/A * <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
0N/A * or <code>STRUCT</code> data type and the JDBC driver does not support
0N/A * this data type
0N/A * @see Types
0N/A */
0N/A void registerOutParameter(int parameterIndex, int sqlType)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Registers the parameter in ordinal position
0N/A * <code>parameterIndex</code> to be of JDBC type
0N/A * <code>sqlType</code>. All OUT parameters must be registered
0N/A * before a stored procedure is executed.
0N/A * <p>
0N/A * The JDBC type specified by <code>sqlType</code> for an OUT
0N/A * parameter determines the Java type that must be used
0N/A * in the <code>get</code> method to read the value of that parameter.
0N/A * <p>
0N/A * This version of <code>registerOutParameter</code> should be
0N/A * used when the parameter is of JDBC type <code>NUMERIC</code>
0N/A * or <code>DECIMAL</code>.
0N/A *
0N/A * @param parameterIndex the first parameter is 1, the second is 2,
0N/A * and so on
0N/A * @param sqlType the SQL type code defined by <code>java.sql.Types</code>.
0N/A * @param scale the desired number of digits to the right of the
0N/A * decimal point. It must be greater than or equal to zero.
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if <code>sqlType</code> is
0N/A * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,
0N/A * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,
0N/A * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,
0N/A * <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
0N/A * or <code>STRUCT</code> data type and the JDBC driver does not support
0N/A * this data type
0N/A * @see Types
0N/A */
0N/A void registerOutParameter(int parameterIndex, int sqlType, int scale)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves whether the last OUT parameter read had the value of
0N/A * SQL <code>NULL</code>. Note that this method should be called only after
0N/A * calling a getter method; otherwise, there is no value to use in
0N/A * determining whether it is <code>null</code> or not.
0N/A *
0N/A * @return <code>true</code> if the last parameter read was SQL
0N/A * <code>NULL</code>; <code>false</code> otherwise
0N/A * @exception SQLException if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A */
0N/A boolean wasNull() throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated JDBC <code>CHAR</code>,
0N/A * <code>VARCHAR</code>, or <code>LONGVARCHAR</code> parameter as a
0N/A * <code>String</code> in the Java programming language.
0N/A * <p>
0N/A * For the fixed-length type JDBC <code>CHAR</code>,
0N/A * the <code>String</code> object
0N/A * returned has exactly the same value the SQL
0N/A * <code>CHAR</code> value had in the
0N/A * database, including any padding added by the database.
0N/A *
0N/A * @param parameterIndex the first parameter is 1, the second is 2,
0N/A * and so on
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>,
0N/A * the result
0N/A * is <code>null</code>.
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @see #setString
0N/A */
0N/A String getString(int parameterIndex) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated JDBC <code>BIT</code>
0N/A * or <code>BOOLEAN</code> parameter as a
0N/A * <code>boolean</code> in the Java programming language.
0N/A *
0N/A * @param parameterIndex the first parameter is 1, the second is 2,
0N/A * and so on
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>,
0N/A * the result is <code>false</code>.
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @see #setBoolean
0N/A */
0N/A boolean getBoolean(int parameterIndex) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated JDBC <code>TINYINT</code> parameter
0N/A * as a <code>byte</code> in the Java programming language.
0N/A *
0N/A * @param parameterIndex the first parameter is 1, the second is 2,
0N/A * and so on
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>, the result
0N/A * is <code>0</code>.
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @see #setByte
0N/A */
0N/A byte getByte(int parameterIndex) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated JDBC <code>SMALLINT</code> parameter
0N/A * as a <code>short</code> in the Java programming language.
0N/A *
0N/A * @param parameterIndex the first parameter is 1, the second is 2,
0N/A * and so on
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>, the result
0N/A * is <code>0</code>.
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @see #setShort
0N/A */
0N/A short getShort(int parameterIndex) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated JDBC <code>INTEGER</code> parameter
0N/A * as an <code>int</code> in the Java programming language.
0N/A *
0N/A * @param parameterIndex the first parameter is 1, the second is 2,
0N/A * and so on
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>, the result
0N/A * is <code>0</code>.
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @see #setInt
0N/A */
0N/A int getInt(int parameterIndex) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated JDBC <code>BIGINT</code> parameter
0N/A * as a <code>long</code> in the Java programming language.
0N/A *
0N/A * @param parameterIndex the first parameter is 1, the second is 2,
0N/A * and so on
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>, the result
0N/A * is <code>0</code>.
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @see #setLong
0N/A */
0N/A long getLong(int parameterIndex) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated JDBC <code>FLOAT</code> parameter
0N/A * as a <code>float</code> in the Java programming language.
0N/A *
0N/A * @param parameterIndex the first parameter is 1, the second is 2,
0N/A * and so on
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>, the result
0N/A * is <code>0</code>.
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @see #setFloat
0N/A */
0N/A float getFloat(int parameterIndex) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated JDBC <code>DOUBLE</code> parameter as a <code>double</code>
0N/A * in the Java programming language.
0N/A * @param parameterIndex the first parameter is 1, the second is 2,
0N/A * and so on
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>, the result
0N/A * is <code>0</code>.
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @see #setDouble
0N/A */
0N/A double getDouble(int parameterIndex) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated JDBC <code>NUMERIC</code> parameter as a
0N/A * <code>java.math.BigDecimal</code> object with <i>scale</i> digits to
0N/A * the right of the decimal point.
0N/A * @param parameterIndex the first parameter is 1, the second is 2,
0N/A * and so on
0N/A * @param scale the number of digits to the right of the decimal point
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>, the result
0N/A * is <code>null</code>.
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @deprecated use <code>getBigDecimal(int parameterIndex)</code>
0N/A * or <code>getBigDecimal(String parameterName)</code>
0N/A * @see #setBigDecimal
0N/A */
0N/A BigDecimal getBigDecimal(int parameterIndex, int scale)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated JDBC <code>BINARY</code> or
0N/A * <code>VARBINARY</code> parameter as an array of <code>byte</code>
0N/A * values in the Java programming language.
0N/A * @param parameterIndex the first parameter is 1, the second is 2,
0N/A * and so on
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>, the result
0N/A * is <code>null</code>.
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @see #setBytes
0N/A */
0N/A byte[] getBytes(int parameterIndex) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated JDBC <code>DATE</code> parameter as a
0N/A * <code>java.sql.Date</code> object.
0N/A * @param parameterIndex the first parameter is 1, the second is 2,
0N/A * and so on
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>, the result
0N/A * is <code>null</code>.
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @see #setDate
0N/A */
0N/A java.sql.Date getDate(int parameterIndex) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated JDBC <code>TIME</code> parameter as a
0N/A * <code>java.sql.Time</code> object.
0N/A *
0N/A * @param parameterIndex the first parameter is 1, the second is 2,
0N/A * and so on
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>, the result
0N/A * is <code>null</code>.
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @see #setTime
0N/A */
0N/A java.sql.Time getTime(int parameterIndex) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated JDBC <code>TIMESTAMP</code> parameter as a
0N/A * <code>java.sql.Timestamp</code> object.
0N/A *
0N/A * @param parameterIndex the first parameter is 1, the second is 2,
0N/A * and so on
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>, the result
0N/A * is <code>null</code>.
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @see #setTimestamp
0N/A */
0N/A java.sql.Timestamp getTimestamp(int parameterIndex)
0N/A throws SQLException;
0N/A
0N/A //----------------------------------------------------------------------
0N/A // Advanced features:
0N/A
0N/A
0N/A /**
0N/A * Retrieves the value of the designated parameter as an <code>Object</code>
0N/A * in the Java programming language. If the value is an SQL <code>NULL</code>,
0N/A * the driver returns a Java <code>null</code>.
0N/A * <p>
0N/A * This method returns a Java object whose type corresponds to the JDBC
0N/A * type that was registered for this parameter using the method
0N/A * <code>registerOutParameter</code>. By registering the target JDBC
0N/A * type as <code>java.sql.Types.OTHER</code>, this method can be used
0N/A * to read database-specific abstract data types.
0N/A *
0N/A * @param parameterIndex the first parameter is 1, the second is 2,
0N/A * and so on
0N/A * @return A <code>java.lang.Object</code> holding the OUT parameter value
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @see Types
0N/A * @see #setObject
0N/A */
0N/A Object getObject(int parameterIndex) throws SQLException;
0N/A
0N/A
0N/A //--------------------------JDBC 2.0-----------------------------
0N/A
0N/A /**
0N/A * Retrieves the value of the designated JDBC <code>NUMERIC</code> parameter as a
0N/A * <code>java.math.BigDecimal</code> object with as many digits to the
0N/A * right of the decimal point as the value contains.
0N/A * @param parameterIndex the first parameter is 1, the second is 2,
0N/A * and so on
0N/A * @return the parameter value in full precision. If the value is
0N/A * SQL <code>NULL</code>, the result is <code>null</code>.
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @see #setBigDecimal
0N/A * @since 1.2
0N/A */
0N/A BigDecimal getBigDecimal(int parameterIndex) throws SQLException;
0N/A
0N/A /**
0N/A * Returns an object representing the value of OUT parameter
0N/A * <code>parameterIndex</code> and uses <code>map</code> for the custom
0N/A * mapping of the parameter value.
0N/A * <p>
0N/A * This method returns a Java object whose type corresponds to the
0N/A * JDBC type that was registered for this parameter using the method
0N/A * <code>registerOutParameter</code>. By registering the target
0N/A * JDBC type as <code>java.sql.Types.OTHER</code>, this method can
0N/A * be used to read database-specific abstract data types.
0N/A * @param parameterIndex the first parameter is 1, the second is 2, and so on
0N/A * @param map the mapping from SQL type names to Java classes
0N/A * @return a <code>java.lang.Object</code> holding the OUT parameter value
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #setObject
0N/A * @since 1.2
0N/A */
0N/A Object getObject(int parameterIndex, java.util.Map<String,Class<?>> map)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated JDBC <code>REF(&lt;structured-type&gt;)</code>
0N/A * parameter as a {@link java.sql.Ref} object in the Java programming language.
0N/A * @param parameterIndex the first parameter is 1, the second is 2,
0N/A * and so on
0N/A * @return the parameter value as a <code>Ref</code> object in the
0N/A * Java programming language. If the value was SQL <code>NULL</code>, the value
0N/A * <code>null</code> is returned.
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.2
0N/A */
0N/A Ref getRef (int parameterIndex) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated JDBC <code>BLOB</code> parameter as a
0N/A * {@link java.sql.Blob} object in the Java programming language.
0N/A * @param parameterIndex the first parameter is 1, the second is 2, and so on
0N/A * @return the parameter value as a <code>Blob</code> object in the
0N/A * Java programming language. If the value was SQL <code>NULL</code>, the value
0N/A * <code>null</code> is returned.
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.2
0N/A */
0N/A Blob getBlob (int parameterIndex) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated JDBC <code>CLOB</code> parameter as a
0N/A * <code>java.sql.Clob</code> object in the Java programming language.
0N/A * @param parameterIndex the first parameter is 1, the second is 2, and
0N/A * so on
0N/A * @return the parameter value as a <code>Clob</code> object in the
0N/A * Java programming language. If the value was SQL <code>NULL</code>, the
0N/A * value <code>null</code> is returned.
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.2
0N/A */
0N/A Clob getClob (int parameterIndex) throws SQLException;
0N/A
0N/A /**
0N/A *
0N/A * Retrieves the value of the designated JDBC <code>ARRAY</code> parameter as an
0N/A * {@link java.sql.Array} object in the Java programming language.
0N/A * @param parameterIndex the first parameter is 1, the second is 2, and
0N/A * so on
0N/A * @return the parameter value as an <code>Array</code> object in
0N/A * the Java programming language. If the value was SQL <code>NULL</code>, the
0N/A * value <code>null</code> is returned.
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.2
0N/A */
0N/A Array getArray (int parameterIndex) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated JDBC <code>DATE</code> parameter as a
0N/A * <code>java.sql.Date</code> object, using
0N/A * the given <code>Calendar</code> object
0N/A * to construct the date.
0N/A * With a <code>Calendar</code> object, the driver
0N/A * can calculate the date taking into account a custom timezone and locale.
0N/A * If no <code>Calendar</code> object is specified, the driver uses the
0N/A * default timezone and locale.
0N/A *
0N/A * @param parameterIndex the first parameter is 1, the second is 2,
0N/A * and so on
0N/A * @param cal the <code>Calendar</code> object the driver will use
0N/A * to construct the date
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>, the result
0N/A * is <code>null</code>.
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @see #setDate
0N/A * @since 1.2
0N/A */
0N/A java.sql.Date getDate(int parameterIndex, Calendar cal)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated JDBC <code>TIME</code> parameter as a
0N/A * <code>java.sql.Time</code> object, using
0N/A * the given <code>Calendar</code> object
0N/A * to construct the time.
0N/A * With a <code>Calendar</code> object, the driver
0N/A * can calculate the time taking into account a custom timezone and locale.
0N/A * If no <code>Calendar</code> object is specified, the driver uses the
0N/A * default timezone and locale.
0N/A *
0N/A * @param parameterIndex the first parameter is 1, the second is 2,
0N/A * and so on
0N/A * @param cal the <code>Calendar</code> object the driver will use
0N/A * to construct the time
0N/A * @return the parameter value; if the value is SQL <code>NULL</code>, the result
0N/A * is <code>null</code>.
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @see #setTime
0N/A * @since 1.2
0N/A */
0N/A java.sql.Time getTime(int parameterIndex, Calendar cal)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated JDBC <code>TIMESTAMP</code> parameter as a
0N/A * <code>java.sql.Timestamp</code> object, using
0N/A * the given <code>Calendar</code> object to construct
0N/A * the <code>Timestamp</code> object.
0N/A * With a <code>Calendar</code> object, the driver
0N/A * can calculate the timestamp taking into account a custom timezone and locale.
0N/A * If no <code>Calendar</code> object is specified, the driver uses the
0N/A * default timezone and locale.
0N/A *
0N/A *
0N/A * @param parameterIndex the first parameter is 1, the second is 2,
0N/A * and so on
0N/A * @param cal the <code>Calendar</code> object the driver will use
0N/A * to construct the timestamp
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>, the result
0N/A * is <code>null</code>.
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @see #setTimestamp
0N/A * @since 1.2
0N/A */
0N/A java.sql.Timestamp getTimestamp(int parameterIndex, Calendar cal)
0N/A throws SQLException;
0N/A
0N/A
0N/A /**
0N/A * Registers the designated output parameter.
0N/A * This version of
0N/A * the method <code>registerOutParameter</code>
0N/A * should be used for a user-defined or <code>REF</code> output parameter. Examples
0N/A * of user-defined types include: <code>STRUCT</code>, <code>DISTINCT</code>,
0N/A * <code>JAVA_OBJECT</code>, and named array types.
0N/A *<p>
0N/A * All OUT parameters must be registered
0N/A * before a stored procedure is executed.
0N/A * <p> For a user-defined parameter, the fully-qualified SQL
0N/A * type name of the parameter should also be given, while a <code>REF</code>
0N/A * parameter requires that the fully-qualified type name of the
0N/A * referenced type be given. A JDBC driver that does not need the
0N/A * type code and type name information may ignore it. To be portable,
0N/A * however, applications should always provide these values for
0N/A * user-defined and <code>REF</code> parameters.
0N/A *
0N/A * Although it is intended for user-defined and <code>REF</code> parameters,
0N/A * this method may be used to register a parameter of any JDBC type.
0N/A * If the parameter does not have a user-defined or <code>REF</code> type, the
0N/A * <i>typeName</i> parameter is ignored.
0N/A *
0N/A * <P><B>Note:</B> When reading the value of an out parameter, you
0N/A * must use the getter method whose Java type corresponds to the
0N/A * parameter's registered SQL type.
0N/A *
0N/A * @param parameterIndex the first parameter is 1, the second is 2,...
0N/A * @param sqlType a value from {@link java.sql.Types}
0N/A * @param typeName the fully-qualified name of an SQL structured type
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if <code>sqlType</code> is
0N/A * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,
0N/A * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,
0N/A * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,
0N/A * <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
0N/A * or <code>STRUCT</code> data type and the JDBC driver does not support
0N/A * this data type
0N/A * @see Types
0N/A * @since 1.2
0N/A */
0N/A void registerOutParameter (int parameterIndex, int sqlType, String typeName)
0N/A throws SQLException;
0N/A
0N/A //--------------------------JDBC 3.0-----------------------------
0N/A
0N/A /**
0N/A * Registers the OUT parameter named
0N/A * <code>parameterName</code> to the JDBC type
0N/A * <code>sqlType</code>. All OUT parameters must be registered
0N/A * before a stored procedure is executed.
0N/A * <p>
0N/A * The JDBC type specified by <code>sqlType</code> for an OUT
0N/A * parameter determines the Java type that must be used
0N/A * in the <code>get</code> method to read the value of that parameter.
0N/A * <p>
0N/A * If the JDBC type expected to be returned to this output parameter
0N/A * is specific to this particular database, <code>sqlType</code>
0N/A * should be <code>java.sql.Types.OTHER</code>. The method
0N/A * {@link #getObject} retrieves the value.
0N/A * @param parameterName the name of the parameter
0N/A * @param sqlType the JDBC type code defined by <code>java.sql.Types</code>.
0N/A * If the parameter is of JDBC type <code>NUMERIC</code>
0N/A * or <code>DECIMAL</code>, the version of
0N/A * <code>registerOutParameter</code> that accepts a scale value
0N/A * should be used.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if <code>sqlType</code> is
0N/A * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,
0N/A * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,
0N/A * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,
0N/A * <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
0N/A * or <code>STRUCT</code> data type and the JDBC driver does not support
0N/A * this data type or if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.4
0N/A * @see Types
0N/A */
0N/A void registerOutParameter(String parameterName, int sqlType)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Registers the parameter named
0N/A * <code>parameterName</code> to be of JDBC type
0N/A * <code>sqlType</code>. All OUT parameters must be registered
0N/A * before a stored procedure is executed.
0N/A * <p>
0N/A * The JDBC type specified by <code>sqlType</code> for an OUT
0N/A * parameter determines the Java type that must be used
0N/A * in the <code>get</code> method to read the value of that parameter.
0N/A * <p>
0N/A * This version of <code>registerOutParameter</code> should be
0N/A * used when the parameter is of JDBC type <code>NUMERIC</code>
0N/A * or <code>DECIMAL</code>.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param sqlType SQL type code defined by <code>java.sql.Types</code>.
0N/A * @param scale the desired number of digits to the right of the
0N/A * decimal point. It must be greater than or equal to zero.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if <code>sqlType</code> is
0N/A * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,
0N/A * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,
0N/A * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,
0N/A * <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
0N/A * or <code>STRUCT</code> data type and the JDBC driver does not support
0N/A * this data type or if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.4
0N/A * @see Types
0N/A */
0N/A void registerOutParameter(String parameterName, int sqlType, int scale)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Registers the designated output parameter. This version of
0N/A * the method <code>registerOutParameter</code>
0N/A * should be used for a user-named or REF output parameter. Examples
0N/A * of user-named types include: STRUCT, DISTINCT, JAVA_OBJECT, and
0N/A * named array types.
0N/A *<p>
0N/A * All OUT parameters must be registered
0N/A * before a stored procedure is executed.
0N/A * <p>
0N/A * For a user-named parameter the fully-qualified SQL
0N/A * type name of the parameter should also be given, while a REF
0N/A * parameter requires that the fully-qualified type name of the
0N/A * referenced type be given. A JDBC driver that does not need the
0N/A * type code and type name information may ignore it. To be portable,
0N/A * however, applications should always provide these values for
0N/A * user-named and REF parameters.
0N/A *
0N/A * Although it is intended for user-named and REF parameters,
0N/A * this method may be used to register a parameter of any JDBC type.
0N/A * If the parameter does not have a user-named or REF type, the
0N/A * typeName parameter is ignored.
0N/A *
0N/A * <P><B>Note:</B> When reading the value of an out parameter, you
0N/A * must use the <code>getXXX</code> method whose Java type XXX corresponds to the
0N/A * parameter's registered SQL type.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param sqlType a value from {@link java.sql.Types}
0N/A * @param typeName the fully-qualified name of an SQL structured type
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if <code>sqlType</code> is
0N/A * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,
0N/A * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,
0N/A * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,
0N/A * <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
0N/A * or <code>STRUCT</code> data type and the JDBC driver does not support
0N/A * this data type or if the JDBC driver does not support
0N/A * this method
0N/A * @see Types
0N/A * @since 1.4
0N/A */
0N/A void registerOutParameter (String parameterName, int sqlType, String typeName)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated JDBC <code>DATALINK</code> parameter as a
0N/A * <code>java.net.URL</code> object.
0N/A *
0N/A * @param parameterIndex the first parameter is 1, the second is 2,...
0N/A * @return a <code>java.net.URL</code> object that represents the
0N/A * JDBC <code>DATALINK</code> value used as the designated
0N/A * parameter
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs,
0N/A * this method is called on a closed <code>CallableStatement</code>,
0N/A * or if the URL being returned is
0N/A * not a valid URL on the Java platform
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #setURL
0N/A * @since 1.4
0N/A */
0N/A java.net.URL getURL(int parameterIndex) throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given <code>java.net.URL</code> object.
0N/A * The driver converts this to an SQL <code>DATALINK</code> value when
0N/A * it sends it to the database.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param val the parameter value
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs;
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * or if a URL is malformed
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #getURL
0N/A * @since 1.4
0N/A */
0N/A void setURL(String parameterName, java.net.URL val) throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to SQL <code>NULL</code>.
0N/A *
0N/A * <P><B>Note:</B> You must specify the parameter's SQL type.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param sqlType the SQL type code defined in <code>java.sql.Types</code>
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.4
0N/A */
0N/A void setNull(String parameterName, int sqlType) throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given Java <code>boolean</code> value.
0N/A * The driver converts this
0N/A * to an SQL <code>BIT</code> or <code>BOOLEAN</code> value when it sends it to the database.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the parameter value
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @see #getBoolean
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.4
0N/A */
0N/A void setBoolean(String parameterName, boolean x) throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given Java <code>byte</code> value.
0N/A * The driver converts this
0N/A * to an SQL <code>TINYINT</code> value when it sends it to the database.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the parameter value
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #getByte
0N/A * @since 1.4
0N/A */
0N/A void setByte(String parameterName, byte x) throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given Java <code>short</code> value.
0N/A * The driver converts this
0N/A * to an SQL <code>SMALLINT</code> value when it sends it to the database.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the parameter value
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #getShort
0N/A * @since 1.4
0N/A */
0N/A void setShort(String parameterName, short x) throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given Java <code>int</code> value.
0N/A * The driver converts this
0N/A * to an SQL <code>INTEGER</code> value when it sends it to the database.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the parameter value
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #getInt
0N/A * @since 1.4
0N/A */
0N/A void setInt(String parameterName, int x) throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given Java <code>long</code> value.
0N/A * The driver converts this
0N/A * to an SQL <code>BIGINT</code> value when it sends it to the database.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the parameter value
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #getLong
0N/A * @since 1.4
0N/A */
0N/A void setLong(String parameterName, long x) throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given Java <code>float</code> value.
0N/A * The driver converts this
0N/A * to an SQL <code>FLOAT</code> value when it sends it to the database.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the parameter value
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #getFloat
0N/A * @since 1.4
0N/A */
0N/A void setFloat(String parameterName, float x) throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given Java <code>double</code> value.
0N/A * The driver converts this
0N/A * to an SQL <code>DOUBLE</code> value when it sends it to the database.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the parameter value
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #getDouble
0N/A * @since 1.4
0N/A */
0N/A void setDouble(String parameterName, double x) throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given
0N/A * <code>java.math.BigDecimal</code> value.
0N/A * The driver converts this to an SQL <code>NUMERIC</code> value when
0N/A * it sends it to the database.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the parameter value
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #getBigDecimal
0N/A * @since 1.4
0N/A */
0N/A void setBigDecimal(String parameterName, BigDecimal x) throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given Java <code>String</code> value.
0N/A * The driver converts this
0N/A * to an SQL <code>VARCHAR</code> or <code>LONGVARCHAR</code> value
0N/A * (depending on the argument's
0N/A * size relative to the driver's limits on <code>VARCHAR</code> values)
0N/A * when it sends it to the database.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the parameter value
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #getString
0N/A * @since 1.4
0N/A */
0N/A void setString(String parameterName, String x) throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given Java array of bytes.
0N/A * The driver converts this to an SQL <code>VARBINARY</code> or
0N/A * <code>LONGVARBINARY</code> (depending on the argument's size relative
0N/A * to the driver's limits on <code>VARBINARY</code> values) when it sends
0N/A * it to the database.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the parameter value
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #getBytes
0N/A * @since 1.4
0N/A */
0N/A void setBytes(String parameterName, byte x[]) throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given <code>java.sql.Date</code> value
0N/A * using the default time zone of the virtual machine that is running
0N/A * the application.
0N/A * The driver converts this
0N/A * to an SQL <code>DATE</code> value when it sends it to the database.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the parameter value
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #getDate
0N/A * @since 1.4
0N/A */
0N/A void setDate(String parameterName, java.sql.Date x)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given <code>java.sql.Time</code> value.
0N/A * The driver converts this
0N/A * to an SQL <code>TIME</code> value when it sends it to the database.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the parameter value
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #getTime
0N/A * @since 1.4
0N/A */
0N/A void setTime(String parameterName, java.sql.Time x)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given <code>java.sql.Timestamp</code> value.
0N/A * The driver
0N/A * converts this to an SQL <code>TIMESTAMP</code> value when it sends it to the
0N/A * database.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the parameter value
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #getTimestamp
0N/A * @since 1.4
0N/A */
0N/A void setTimestamp(String parameterName, java.sql.Timestamp x)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given input stream, which will have
0N/A * the specified number of bytes.
0N/A * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
0N/A * parameter, it may be more practical to send it via a
0N/A * <code>java.io.InputStream</code>. Data will be read from the stream
0N/A * as needed until end-of-file is reached. The JDBC driver will
0N/A * do any necessary conversion from ASCII to the database char format.
0N/A *
0N/A * <P><B>Note:</B> This stream object can either be a standard
0N/A * Java stream object or your own subclass that implements the
0N/A * standard interface.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the Java input stream that contains the ASCII parameter value
0N/A * @param length the number of bytes in the stream
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.4
0N/A */
0N/A void setAsciiStream(String parameterName, java.io.InputStream x, int length)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given input stream, which will have
0N/A * the specified number of bytes.
0N/A * When a very large binary value is input to a <code>LONGVARBINARY</code>
0N/A * parameter, it may be more practical to send it via a
0N/A * <code>java.io.InputStream</code> object. The data will be read from the stream
0N/A * as needed until end-of-file is reached.
0N/A *
0N/A * <P><B>Note:</B> This stream object can either be a standard
0N/A * Java stream object or your own subclass that implements the
0N/A * standard interface.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the java input stream which contains the binary parameter value
0N/A * @param length the number of bytes in the stream
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.4
0N/A */
0N/A void setBinaryStream(String parameterName, java.io.InputStream x,
0N/A int length) throws SQLException;
0N/A
0N/A /**
0N/A * Sets the value of the designated parameter with the given object. The second
0N/A * argument must be an object type; for integral values, the
0N/A * <code>java.lang</code> equivalent objects should be used.
0N/A *
0N/A * <p>The given Java object will be converted to the given targetSqlType
0N/A * before being sent to the database.
0N/A *
0N/A * If the object has a custom mapping (is of a class implementing the
0N/A * interface <code>SQLData</code>),
0N/A * the JDBC driver should call the method <code>SQLData.writeSQL</code> to write it
0N/A * to the SQL data stream.
0N/A * If, on the other hand, the object is of a class implementing
0N/A * <code>Ref</code>, <code>Blob</code>, <code>Clob</code>, <code>NClob</code>,
0N/A * <code>Struct</code>, <code>java.net.URL</code>,
0N/A * or <code>Array</code>, the driver should pass it to the database as a
0N/A * value of the corresponding SQL type.
0N/A * <P>
0N/A * Note that this method may be used to pass datatabase-
0N/A * specific abstract data types.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the object containing the input parameter value
0N/A * @param targetSqlType the SQL type (as defined in java.sql.Types) to be
0N/A * sent to the database. The scale argument may further qualify this type.
0N/A * @param scale for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types,
0N/A * this is the number of digits after the decimal point. For all other
0N/A * types, this value will be ignored.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if <code>targetSqlType</code> is
0N/A * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,
0N/A * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,
0N/A * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,
0N/A * <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
0N/A * or <code>STRUCT</code> data type and the JDBC driver does not support
0N/A * this data type
0N/A * @see Types
0N/A * @see #getObject
0N/A * @since 1.4
0N/A */
0N/A void setObject(String parameterName, Object x, int targetSqlType, int scale)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Sets the value of the designated parameter with the given object.
0N/A * This method is like the method <code>setObject</code>
0N/A * above, except that it assumes a scale of zero.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the object containing the input parameter value
0N/A * @param targetSqlType the SQL type (as defined in java.sql.Types) to be
0N/A * sent to the database
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if <code>targetSqlType</code> is
0N/A * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,
0N/A * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,
0N/A * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,
0N/A * <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
0N/A * or <code>STRUCT</code> data type and the JDBC driver does not support
0N/A * this data type
0N/A * @see #getObject
0N/A * @since 1.4
0N/A */
0N/A void setObject(String parameterName, Object x, int targetSqlType)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Sets the value of the designated parameter with the given object.
0N/A * The second parameter must be of type <code>Object</code>; therefore, the
0N/A * <code>java.lang</code> equivalent objects should be used for built-in types.
0N/A *
0N/A * <p>The JDBC specification specifies a standard mapping from
0N/A * Java <code>Object</code> types to SQL types. The given argument
0N/A * will be converted to the corresponding SQL type before being
0N/A * sent to the database.
0N/A * <p>Note that this method may be used to pass datatabase-
0N/A * specific abstract data types, by using a driver-specific Java
0N/A * type.
0N/A *
0N/A * If the object is of a class implementing the interface <code>SQLData</code>,
0N/A * the JDBC driver should call the method <code>SQLData.writeSQL</code>
0N/A * to write it to the SQL data stream.
0N/A * If, on the other hand, the object is of a class implementing
0N/A * <code>Ref</code>, <code>Blob</code>, <code>Clob</code>, <code>NClob</code>,
0N/A * <code>Struct</code>, <code>java.net.URL</code>,
0N/A * or <code>Array</code>, the driver should pass it to the database as a
0N/A * value of the corresponding SQL type.
0N/A * <P>
0N/A * This method throws an exception if there is an ambiguity, for example, if the
0N/A * object is of a class implementing more than one of the interfaces named above.
0N/A *<p>
0N/A *<b>Note:</b> Not all databases allow for a non-typed Null to be sent to
0N/A * the backend. For maximum portability, the <code>setNull</code> or the
0N/A * <code>setObject(String parameterName, Object x, int sqlType)</code>
0N/A * method should be used
0N/A * instead of <code>setObject(String parameterName, Object x)</code>.
0N/A *<p>
0N/A * @param parameterName the name of the parameter
0N/A * @param x the object containing the input parameter value
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs,
0N/A * this method is called on a closed <code>CallableStatement</code> or if the given
0N/A * <code>Object</code> parameter is ambiguous
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #getObject
0N/A * @since 1.4
0N/A */
0N/A void setObject(String parameterName, Object x) throws SQLException;
0N/A
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given <code>Reader</code>
0N/A * object, which is the given number of characters long.
0N/A * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
0N/A * parameter, it may be more practical to send it via a
0N/A * <code>java.io.Reader</code> object. The data will be read from the stream
0N/A * as needed until end-of-file is reached. The JDBC driver will
0N/A * do any necessary conversion from UNICODE to the database char format.
0N/A *
0N/A * <P><B>Note:</B> This stream object can either be a standard
0N/A * Java stream object or your own subclass that implements the
0N/A * standard interface.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param reader the <code>java.io.Reader</code> object that
0N/A * contains the UNICODE data used as the designated parameter
0N/A * @param length the number of characters in the stream
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.4
0N/A */
0N/A void setCharacterStream(String parameterName,
0N/A java.io.Reader reader,
0N/A int length) throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given <code>java.sql.Date</code> value,
0N/A * using the given <code>Calendar</code> object. The driver uses
0N/A * the <code>Calendar</code> object to construct an SQL <code>DATE</code> value,
0N/A * which the driver then sends to the database. With a
0N/A * a <code>Calendar</code> object, the driver can calculate the date
0N/A * taking into account a custom timezone. If no
0N/A * <code>Calendar</code> object is specified, the driver uses the default
0N/A * timezone, which is that of the virtual machine running the application.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the parameter value
0N/A * @param cal the <code>Calendar</code> object the driver will use
0N/A * to construct the date
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #getDate
0N/A * @since 1.4
0N/A */
0N/A void setDate(String parameterName, java.sql.Date x, Calendar cal)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given <code>java.sql.Time</code> value,
0N/A * using the given <code>Calendar</code> object. The driver uses
0N/A * the <code>Calendar</code> object to construct an SQL <code>TIME</code> value,
0N/A * which the driver then sends to the database. With a
0N/A * a <code>Calendar</code> object, the driver can calculate the time
0N/A * taking into account a custom timezone. If no
0N/A * <code>Calendar</code> object is specified, the driver uses the default
0N/A * timezone, which is that of the virtual machine running the application.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the parameter value
0N/A * @param cal the <code>Calendar</code> object the driver will use
0N/A * to construct the time
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #getTime
0N/A * @since 1.4
0N/A */
0N/A void setTime(String parameterName, java.sql.Time x, Calendar cal)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given <code>java.sql.Timestamp</code> value,
0N/A * using the given <code>Calendar</code> object. The driver uses
0N/A * the <code>Calendar</code> object to construct an SQL <code>TIMESTAMP</code> value,
0N/A * which the driver then sends to the database. With a
0N/A * a <code>Calendar</code> object, the driver can calculate the timestamp
0N/A * taking into account a custom timezone. If no
0N/A * <code>Calendar</code> object is specified, the driver uses the default
0N/A * timezone, which is that of the virtual machine running the application.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the parameter value
0N/A * @param cal the <code>Calendar</code> object the driver will use
0N/A * to construct the timestamp
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #getTimestamp
0N/A * @since 1.4
0N/A */
0N/A void setTimestamp(String parameterName, java.sql.Timestamp x, Calendar cal)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to SQL <code>NULL</code>.
0N/A * This version of the method <code>setNull</code> should
0N/A * be used for user-defined types and REF type parameters. Examples
0N/A * of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and
0N/A * named array types.
0N/A *
0N/A * <P><B>Note:</B> To be portable, applications must give the
0N/A * SQL type code and the fully-qualified SQL type name when specifying
0N/A * a NULL user-defined or REF parameter. In the case of a user-defined type
0N/A * the name is the type name of the parameter itself. For a REF
0N/A * parameter, the name is the type name of the referenced type.
0N/A * <p>
0N/A * Although it is intended for user-defined and Ref parameters,
0N/A * this method may be used to set a null parameter of any JDBC type.
0N/A * If the parameter does not have a user-defined or REF type, the given
0N/A * typeName is ignored.
0N/A *
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param sqlType a value from <code>java.sql.Types</code>
0N/A * @param typeName the fully-qualified name of an SQL user-defined type;
0N/A * ignored if the parameter is not a user-defined type or
0N/A * SQL <code>REF</code> value
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.4
0N/A */
0N/A void setNull (String parameterName, int sqlType, String typeName)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of a JDBC <code>CHAR</code>, <code>VARCHAR</code>,
0N/A * or <code>LONGVARCHAR</code> parameter as a <code>String</code> in
0N/A * the Java programming language.
0N/A * <p>
0N/A * For the fixed-length type JDBC <code>CHAR</code>,
0N/A * the <code>String</code> object
0N/A * returned has exactly the same value the SQL
0N/A * <code>CHAR</code> value had in the
0N/A * database, including any padding added by the database.
0N/A * @param parameterName the name of the parameter
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>, the result
0N/A * is <code>null</code>.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #setString
0N/A * @since 1.4
0N/A */
0N/A String getString(String parameterName) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of a JDBC <code>BIT</code> or <code>BOOLEAN</code>
0N/A * parameter as a
0N/A * <code>boolean</code> in the Java programming language.
0N/A * @param parameterName the name of the parameter
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>, the result
0N/A * is <code>false</code>.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #setBoolean
0N/A * @since 1.4
0N/A */
0N/A boolean getBoolean(String parameterName) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of a JDBC <code>TINYINT</code> parameter as a <code>byte</code>
0N/A * in the Java programming language.
0N/A * @param parameterName the name of the parameter
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>, the result
0N/A * is <code>0</code>.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #setByte
0N/A * @since 1.4
0N/A */
0N/A byte getByte(String parameterName) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of a JDBC <code>SMALLINT</code> parameter as a <code>short</code>
0N/A * in the Java programming language.
0N/A * @param parameterName the name of the parameter
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>, the result
0N/A * is <code>0</code>.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #setShort
0N/A * @since 1.4
0N/A */
0N/A short getShort(String parameterName) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of a JDBC <code>INTEGER</code> parameter as an <code>int</code>
0N/A * in the Java programming language.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>,
0N/A * the result is <code>0</code>.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #setInt
0N/A * @since 1.4
0N/A */
0N/A int getInt(String parameterName) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of a JDBC <code>BIGINT</code> parameter as a <code>long</code>
0N/A * in the Java programming language.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>,
0N/A * the result is <code>0</code>.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #setLong
0N/A * @since 1.4
0N/A */
0N/A long getLong(String parameterName) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of a JDBC <code>FLOAT</code> parameter as a <code>float</code>
0N/A * in the Java programming language.
0N/A * @param parameterName the name of the parameter
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>,
0N/A * the result is <code>0</code>.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #setFloat
0N/A * @since 1.4
0N/A */
0N/A float getFloat(String parameterName) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of a JDBC <code>DOUBLE</code> parameter as a <code>double</code>
0N/A * in the Java programming language.
0N/A * @param parameterName the name of the parameter
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>,
0N/A * the result is <code>0</code>.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #setDouble
0N/A * @since 1.4
0N/A */
0N/A double getDouble(String parameterName) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of a JDBC <code>BINARY</code> or <code>VARBINARY</code>
0N/A * parameter as an array of <code>byte</code> values in the Java
0N/A * programming language.
0N/A * @param parameterName the name of the parameter
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>, the result is
0N/A * <code>null</code>.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #setBytes
0N/A * @since 1.4
0N/A */
0N/A byte[] getBytes(String parameterName) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of a JDBC <code>DATE</code> parameter as a
0N/A * <code>java.sql.Date</code> object.
0N/A * @param parameterName the name of the parameter
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>, the result
0N/A * is <code>null</code>.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #setDate
0N/A * @since 1.4
0N/A */
0N/A java.sql.Date getDate(String parameterName) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of a JDBC <code>TIME</code> parameter as a
0N/A * <code>java.sql.Time</code> object.
0N/A * @param parameterName the name of the parameter
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>, the result
0N/A * is <code>null</code>.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #setTime
0N/A * @since 1.4
0N/A */
0N/A java.sql.Time getTime(String parameterName) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of a JDBC <code>TIMESTAMP</code> parameter as a
0N/A * <code>java.sql.Timestamp</code> object.
0N/A * @param parameterName the name of the parameter
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>, the result
0N/A * is <code>null</code>.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #setTimestamp
0N/A * @since 1.4
0N/A */
0N/A java.sql.Timestamp getTimestamp(String parameterName) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of a parameter as an <code>Object</code> in the Java
0N/A * programming language. If the value is an SQL <code>NULL</code>, the
0N/A * driver returns a Java <code>null</code>.
0N/A * <p>
0N/A * This method returns a Java object whose type corresponds to the JDBC
0N/A * type that was registered for this parameter using the method
0N/A * <code>registerOutParameter</code>. By registering the target JDBC
0N/A * type as <code>java.sql.Types.OTHER</code>, this method can be used
0N/A * to read database-specific abstract data types.
0N/A * @param parameterName the name of the parameter
0N/A * @return A <code>java.lang.Object</code> holding the OUT parameter value.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see Types
0N/A * @see #setObject
0N/A * @since 1.4
0N/A */
0N/A Object getObject(String parameterName) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of a JDBC <code>NUMERIC</code> parameter as a
0N/A * <code>java.math.BigDecimal</code> object with as many digits to the
0N/A * right of the decimal point as the value contains.
0N/A * @param parameterName the name of the parameter
0N/A * @return the parameter value in full precision. If the value is
0N/A * SQL <code>NULL</code>, the result is <code>null</code>.
0N/A * @exception SQLExceptionif parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #setBigDecimal
0N/A * @since 1.4
0N/A */
0N/A BigDecimal getBigDecimal(String parameterName) throws SQLException;
0N/A
0N/A /**
0N/A * Returns an object representing the value of OUT parameter
0N/A * <code>parameterName</code> and uses <code>map</code> for the custom
0N/A * mapping of the parameter value.
0N/A * <p>
0N/A * This method returns a Java object whose type corresponds to the
0N/A * JDBC type that was registered for this parameter using the method
0N/A * <code>registerOutParameter</code>. By registering the target
0N/A * JDBC type as <code>java.sql.Types.OTHER</code>, this method can
0N/A * be used to read database-specific abstract data types.
0N/A * @param parameterName the name of the parameter
0N/A * @param map the mapping from SQL type names to Java classes
0N/A * @return a <code>java.lang.Object</code> holding the OUT parameter value
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #setObject
0N/A * @since 1.4
0N/A */
0N/A Object getObject(String parameterName, java.util.Map<String,Class<?>> map)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of a JDBC <code>REF(&lt;structured-type&gt;)</code>
0N/A * parameter as a {@link java.sql.Ref} object in the Java programming language.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @return the parameter value as a <code>Ref</code> object in the
0N/A * Java programming language. If the value was SQL <code>NULL</code>,
0N/A * the value <code>null</code> is returned.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.4
0N/A */
0N/A Ref getRef (String parameterName) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of a JDBC <code>BLOB</code> parameter as a
0N/A * {@link java.sql.Blob} object in the Java programming language.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @return the parameter value as a <code>Blob</code> object in the
0N/A * Java programming language. If the value was SQL <code>NULL</code>,
0N/A * the value <code>null</code> is returned.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.4
0N/A */
0N/A Blob getBlob (String parameterName) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of a JDBC <code>CLOB</code> parameter as a
0N/A * <code>java.sql.Clob</code> object in the Java programming language.
0N/A * @param parameterName the name of the parameter
0N/A * @return the parameter value as a <code>Clob</code> object in the
0N/A * Java programming language. If the value was SQL <code>NULL</code>,
0N/A * the value <code>null</code> is returned.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.4
0N/A */
0N/A Clob getClob (String parameterName) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of a JDBC <code>ARRAY</code> parameter as an
0N/A * {@link java.sql.Array} object in the Java programming language.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @return the parameter value as an <code>Array</code> object in
0N/A * Java programming language. If the value was SQL <code>NULL</code>,
0N/A * the value <code>null</code> is returned.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.4
0N/A */
0N/A Array getArray (String parameterName) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of a JDBC <code>DATE</code> parameter as a
0N/A * <code>java.sql.Date</code> object, using
0N/A * the given <code>Calendar</code> object
0N/A * to construct the date.
0N/A * With a <code>Calendar</code> object, the driver
0N/A * can calculate the date taking into account a custom timezone and locale.
0N/A * If no <code>Calendar</code> object is specified, the driver uses the
0N/A * default timezone and locale.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param cal the <code>Calendar</code> object the driver will use
0N/A * to construct the date
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>,
0N/A * the result is <code>null</code>.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #setDate
0N/A * @since 1.4
0N/A */
0N/A java.sql.Date getDate(String parameterName, Calendar cal)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of a JDBC <code>TIME</code> parameter as a
0N/A * <code>java.sql.Time</code> object, using
0N/A * the given <code>Calendar</code> object
0N/A * to construct the time.
0N/A * With a <code>Calendar</code> object, the driver
0N/A * can calculate the time taking into account a custom timezone and locale.
0N/A * If no <code>Calendar</code> object is specified, the driver uses the
0N/A * default timezone and locale.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param cal the <code>Calendar</code> object the driver will use
0N/A * to construct the time
0N/A * @return the parameter value; if the value is SQL <code>NULL</code>, the result is
0N/A * <code>null</code>.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #setTime
0N/A * @since 1.4
0N/A */
0N/A java.sql.Time getTime(String parameterName, Calendar cal)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of a JDBC <code>TIMESTAMP</code> parameter as a
0N/A * <code>java.sql.Timestamp</code> object, using
0N/A * the given <code>Calendar</code> object to construct
0N/A * the <code>Timestamp</code> object.
0N/A * With a <code>Calendar</code> object, the driver
0N/A * can calculate the timestamp taking into account a custom timezone and locale.
0N/A * If no <code>Calendar</code> object is specified, the driver uses the
0N/A * default timezone and locale.
0N/A *
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param cal the <code>Calendar</code> object the driver will use
0N/A * to construct the timestamp
0N/A * @return the parameter value. If the value is SQL <code>NULL</code>, the result is
0N/A * <code>null</code>.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #setTimestamp
0N/A * @since 1.4
0N/A */
0N/A java.sql.Timestamp getTimestamp(String parameterName, Calendar cal)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of a JDBC <code>DATALINK</code> parameter as a
0N/A * <code>java.net.URL</code> object.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @return the parameter value as a <code>java.net.URL</code> object in the
0N/A * Java programming language. If the value was SQL <code>NULL</code>, the
0N/A * value <code>null</code> is returned.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs,
0N/A * this method is called on a closed <code>CallableStatement</code>,
0N/A * or if there is a problem with the URL
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @see #setURL
0N/A * @since 1.4
0N/A */
0N/A java.net.URL getURL(String parameterName) throws SQLException;
0N/A
0N/A //------------------------- JDBC 4.0 -----------------------------------
0N/A
0N/A /**
0N/A * Retrieves the value of the designated JDBC <code>ROWID</code> parameter as a
0N/A * <code>java.sql.RowId</code> object.
0N/A *
0N/A * @param parameterIndex the first parameter is 1, the second is 2,...
0N/A * @return a <code>RowId</code> object that represents the JDBC <code>ROWID</code>
0N/A * value is used as the designated parameter. If the parameter contains
0N/A * a SQL <code>NULL</code>, then a <code>null</code> value is returned.
0N/A * @throws SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.6
0N/A */
0N/A RowId getRowId(int parameterIndex) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated JDBC <code>ROWID</code> parameter as a
0N/A * <code>java.sql.RowId</code> object.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @return a <code>RowId</code> object that represents the JDBC <code>ROWID</code>
0N/A * value is used as the designated parameter. If the parameter contains
0N/A * a SQL <code>NULL</code>, then a <code>null</code> value is returned.
0N/A * @throws SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.6
0N/A */
0N/A RowId getRowId(String parameterName) throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given <code>java.sql.RowId</code> object. The
0N/A * driver converts this to a SQL <code>ROWID</code> when it sends it to the
0N/A * database.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the parameter value
0N/A * @throws SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.6
0N/A */
0N/A void setRowId(String parameterName, RowId x) throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given <code>String</code> object.
0N/A * The driver converts this to a SQL <code>NCHAR</code> or
0N/A * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code>
0N/A * @param parameterName the name of the parameter to be set
0N/A * @param value the parameter value
0N/A * @throws SQLException if parameterName does not correspond to a named
0N/A * parameter; if the driver does not support national
0N/A * character sets; if the driver can detect that a data conversion
0N/A * error could occur; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.6
0N/A */
0N/A void setNString(String parameterName, String value)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to a <code>Reader</code> object. The
0N/A * <code>Reader</code> reads the data till end-of-file is reached. The
0N/A * driver does the necessary conversion from Java character format to
0N/A * the national character set in the database.
0N/A * @param parameterName the name of the parameter to be set
0N/A * @param value the parameter value
0N/A * @param length the number of characters in the parameter data.
0N/A * @throws SQLException if parameterName does not correspond to a named
0N/A * parameter; if the driver does not support national
0N/A * character sets; if the driver can detect that a data conversion
0N/A * error could occur; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.6
0N/A */
0N/A void setNCharacterStream(String parameterName, Reader value, long length)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to a <code>java.sql.NClob</code> object. The object
0N/A * implements the <code>java.sql.NClob</code> interface. This <code>NClob</code>
0N/A * object maps to a SQL <code>NCLOB</code>.
0N/A * @param parameterName the name of the parameter to be set
0N/A * @param value the parameter value
0N/A * @throws SQLException if parameterName does not correspond to a named
0N/A * parameter; if the driver does not support national
0N/A * character sets; if the driver can detect that a data conversion
0N/A * error could occur; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.6
0N/A */
0N/A void setNClob(String parameterName, NClob value) throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to a <code>Reader</code> object. The <code>reader</code> must contain the number
0N/A * of characters specified by length otherwise a <code>SQLException</code> will be
0N/A * generated when the <code>CallableStatement</code> is executed.
0N/A * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
0N/A * because it informs the driver that the parameter value should be sent to
0N/A * the server as a <code>CLOB</code>. When the <code>setCharacterStream</code> method is used, the
0N/A * driver may have to do extra work to determine whether the parameter
0N/A * data should be send to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>
0N/A * @param parameterName the name of the parameter to be set
0N/A * @param reader An object that contains the data to set the parameter value to.
0N/A * @param length the number of characters in the parameter data.
0N/A * @throws SQLException if parameterName does not correspond to a named
0N/A * parameter; if the length specified is less than zero;
0N/A * a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A *
0N/A * @since 1.6
0N/A */
0N/A void setClob(String parameterName, Reader reader, long length)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to a <code>InputStream</code> object. The <code>inputstream</code> must contain the number
0N/A * of characters specified by length, otherwise a <code>SQLException</code> will be
0N/A * generated when the <code>CallableStatement</code> is executed.
0N/A * This method differs from the <code>setBinaryStream (int, InputStream, int)</code>
0N/A * method because it informs the driver that the parameter value should be
0N/A * sent to the server as a <code>BLOB</code>. When the <code>setBinaryStream</code> method is used,
0N/A * the driver may have to do extra work to determine whether the parameter
0N/A * data should be sent to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code>
0N/A *
0N/A * @param parameterName the name of the parameter to be set
0N/A * the second is 2, ...
0N/A *
0N/A * @param inputStream An object that contains the data to set the parameter
0N/A * value to.
0N/A * @param length the number of bytes in the parameter data.
0N/A * @throws SQLException if parameterName does not correspond to a named
0N/A * parameter; if the length specified
0N/A * is less than zero; if the number of bytes in the inputstream does not match
0N/A * the specfied length; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A *
0N/A * @since 1.6
0N/A */
0N/A void setBlob(String parameterName, InputStream inputStream, long length)
0N/A throws SQLException;
0N/A /**
0N/A * Sets the designated parameter to a <code>Reader</code> object. The <code>reader</code> must contain the number
0N/A * of characters specified by length otherwise a <code>SQLException</code> will be
0N/A * generated when the <code>CallableStatement</code> is executed.
0N/A * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
0N/A * because it informs the driver that the parameter value should be sent to
0N/A * the server as a <code>NCLOB</code>. When the <code>setCharacterStream</code> method is used, the
0N/A * driver may have to do extra work to determine whether the parameter
0N/A * data should be send to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
0N/A *
0N/A * @param parameterName the name of the parameter to be set
0N/A * @param reader An object that contains the data to set the parameter value to.
0N/A * @param length the number of characters in the parameter data.
0N/A * @throws SQLException if parameterName does not correspond to a named
0N/A * parameter; if the length specified is less than zero;
0N/A * if the driver does not support national
0N/A * character sets; if the driver can detect that a data conversion
0N/A * error could occur; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.6
0N/A */
0N/A void setNClob(String parameterName, Reader reader, long length)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated JDBC <code>NCLOB</code> parameter as a
0N/A * <code>java.sql.NClob</code> object in the Java programming language.
0N/A *
0N/A * @param parameterIndex the first parameter is 1, the second is 2, and
0N/A * so on
0N/A * @return the parameter value as a <code>NClob</code> object in the
0N/A * Java programming language. If the value was SQL <code>NULL</code>, the
0N/A * value <code>null</code> is returned.
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if the driver does not support national
0N/A * character sets; if the driver can detect that a data conversion
0N/A * error could occur; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.6
0N/A */
0N/A NClob getNClob (int parameterIndex) throws SQLException;
0N/A
0N/A
0N/A /**
0N/A * Retrieves the value of a JDBC <code>NCLOB</code> parameter as a
0N/A * <code>java.sql.NClob</code> object in the Java programming language.
0N/A * @param parameterName the name of the parameter
0N/A * @return the parameter value as a <code>NClob</code> object in the
0N/A * Java programming language. If the value was SQL <code>NULL</code>,
0N/A * the value <code>null</code> is returned.
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if the driver does not support national
0N/A * character sets; if the driver can detect that a data conversion
0N/A * error could occur; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.6
0N/A */
0N/A NClob getNClob (String parameterName) throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given <code>java.sql.SQLXML</code> object. The driver converts this to an
0N/A * <code>SQL XML</code> value when it sends it to the database.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param xmlObject a <code>SQLXML</code> object that maps an <code>SQL XML</code> value
0N/A * @throws SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs;
0N/A * this method is called on a closed <code>CallableStatement</code> or
0N/A * the <code>java.xml.transform.Result</code>,
0N/A * <code>Writer</code> or <code>OutputStream</code> has not been closed for the <code>SQLXML</code> object
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A *
0N/A * @since 1.6
0N/A */
0N/A void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated <code>SQL XML</code> parameter as a
0N/A * <code>java.sql.SQLXML</code> object in the Java programming language.
0N/A * @param parameterIndex index of the first parameter is 1, the second is 2, ...
0N/A * @return a <code>SQLXML</code> object that maps an <code>SQL XML</code> value
0N/A * @throws SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.6
0N/A */
0N/A SQLXML getSQLXML(int parameterIndex) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated <code>SQL XML</code> parameter as a
0N/A * <code>java.sql.SQLXML</code> object in the Java programming language.
0N/A * @param parameterName the name of the parameter
0N/A * @return a <code>SQLXML</code> object that maps an <code>SQL XML</code> value
0N/A * @throws SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.6
0N/A */
0N/A SQLXML getSQLXML(String parameterName) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated <code>NCHAR</code>,
0N/A * <code>NVARCHAR</code>
0N/A * or <code>LONGNVARCHAR</code> parameter as
0N/A * a <code>String</code> in the Java programming language.
0N/A * <p>
0N/A * For the fixed-length type JDBC <code>NCHAR</code>,
0N/A * the <code>String</code> object
0N/A * returned has exactly the same value the SQL
0N/A * <code>NCHAR</code> value had in the
0N/A * database, including any padding added by the database.
0N/A *
0N/A * @param parameterIndex index of the first parameter is 1, the second is 2, ...
0N/A * @return a <code>String</code> object that maps an
0N/A * <code>NCHAR</code>, <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> value
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.6
0N/A * @see #setNString
0N/A */
0N/A String getNString(int parameterIndex) throws SQLException;
0N/A
0N/A
0N/A /**
0N/A * Retrieves the value of the designated <code>NCHAR</code>,
0N/A * <code>NVARCHAR</code>
0N/A * or <code>LONGNVARCHAR</code> parameter as
0N/A * a <code>String</code> in the Java programming language.
0N/A * <p>
0N/A * For the fixed-length type JDBC <code>NCHAR</code>,
0N/A * the <code>String</code> object
0N/A * returned has exactly the same value the SQL
0N/A * <code>NCHAR</code> value had in the
0N/A * database, including any padding added by the database.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @return a <code>String</code> object that maps an
0N/A * <code>NCHAR</code>, <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> value
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.6
0N/A * @see #setNString
0N/A */
0N/A String getNString(String parameterName) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated parameter as a
0N/A * <code>java.io.Reader</code> object in the Java programming language.
0N/A * It is intended for use when
0N/A * accessing <code>NCHAR</code>,<code>NVARCHAR</code>
0N/A * and <code>LONGNVARCHAR</code> parameters.
0N/A *
0N/A * @return a <code>java.io.Reader</code> object that contains the parameter
0N/A * value; if the value is SQL <code>NULL</code>, the value returned is
0N/A * <code>null</code> in the Java programming language.
0N/A * @param parameterIndex the first parameter is 1, the second is 2, ...
0N/A * @exception SQLException if the parameterIndex is not valid;
0N/A * if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.6
0N/A */
0N/A java.io.Reader getNCharacterStream(int parameterIndex) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated parameter as a
0N/A * <code>java.io.Reader</code> object in the Java programming language.
0N/A * It is intended for use when
0N/A * accessing <code>NCHAR</code>,<code>NVARCHAR</code>
0N/A * and <code>LONGNVARCHAR</code> parameters.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @return a <code>java.io.Reader</code> object that contains the parameter
0N/A * value; if the value is SQL <code>NULL</code>, the value returned is
0N/A * <code>null</code> in the Java programming language
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.6
0N/A */
0N/A java.io.Reader getNCharacterStream(String parameterName) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated parameter as a
0N/A * <code>java.io.Reader</code> object in the Java programming language.
0N/A *
0N/A * @return a <code>java.io.Reader</code> object that contains the parameter
0N/A * value; if the value is SQL <code>NULL</code>, the value returned is
0N/A * <code>null</code> in the Java programming language.
0N/A * @param parameterIndex the first parameter is 1, the second is 2, ...
0N/A * @exception SQLException if the parameterIndex is not valid; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @since 1.6
0N/A */
0N/A java.io.Reader getCharacterStream(int parameterIndex) throws SQLException;
0N/A
0N/A /**
0N/A * Retrieves the value of the designated parameter as a
0N/A * <code>java.io.Reader</code> object in the Java programming language.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @return a <code>java.io.Reader</code> object that contains the parameter
0N/A * value; if the value is SQL <code>NULL</code>, the value returned is
0N/A * <code>null</code> in the Java programming language
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.6
0N/A */
0N/A java.io.Reader getCharacterStream(String parameterName) throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given <code>java.sql.Blob</code> object.
0N/A * The driver converts this to an SQL <code>BLOB</code> value when it
0N/A * sends it to the database.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x a <code>Blob</code> object that maps an SQL <code>BLOB</code> value
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.6
0N/A */
0N/A void setBlob (String parameterName, Blob x) throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given <code>java.sql.Clob</code> object.
0N/A * The driver converts this to an SQL <code>CLOB</code> value when it
0N/A * sends it to the database.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x a <code>Clob</code> object that maps an SQL <code>CLOB</code> value
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.6
0N/A */
0N/A void setClob (String parameterName, Clob x) throws SQLException;
0N/A /**
0N/A * Sets the designated parameter to the given input stream, which will have
0N/A * the specified number of bytes.
0N/A * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
0N/A * parameter, it may be more practical to send it via a
0N/A * <code>java.io.InputStream</code>. Data will be read from the stream
0N/A * as needed until end-of-file is reached. The JDBC driver will
0N/A * do any necessary conversion from ASCII to the database char format.
0N/A *
0N/A * <P><B>Note:</B> This stream object can either be a standard
0N/A * Java stream object or your own subclass that implements the
0N/A * standard interface.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the Java input stream that contains the ASCII parameter value
0N/A * @param length the number of bytes in the stream
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.6
0N/A */
0N/A void setAsciiStream(String parameterName, java.io.InputStream x, long length)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to the given input stream, which will have
0N/A * the specified number of bytes.
0N/A * When a very large binary value is input to a <code>LONGVARBINARY</code>
0N/A * parameter, it may be more practical to send it via a
0N/A * <code>java.io.InputStream</code> object. The data will be read from the stream
0N/A * as needed until end-of-file is reached.
0N/A *
0N/A * <P><B>Note:</B> This stream object can either be a standard
0N/A * Java stream object or your own subclass that implements the
0N/A * standard interface.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the java input stream which contains the binary parameter value
0N/A * @param length the number of bytes in the stream
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.6
0N/A */
0N/A void setBinaryStream(String parameterName, java.io.InputStream x,
0N/A long length) throws SQLException;
0N/A /**
0N/A * Sets the designated parameter to the given <code>Reader</code>
0N/A * object, which is the given number of characters long.
0N/A * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
0N/A * parameter, it may be more practical to send it via a
0N/A * <code>java.io.Reader</code> object. The data will be read from the stream
0N/A * as needed until end-of-file is reached. The JDBC driver will
0N/A * do any necessary conversion from UNICODE to the database char format.
0N/A *
0N/A * <P><B>Note:</B> This stream object can either be a standard
0N/A * Java stream object or your own subclass that implements the
0N/A * standard interface.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param reader the <code>java.io.Reader</code> object that
0N/A * contains the UNICODE data used as the designated parameter
0N/A * @param length the number of characters in the stream
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
0N/A * this method
0N/A * @since 1.6
0N/A */
0N/A void setCharacterStream(String parameterName,
0N/A java.io.Reader reader,
0N/A long length) throws SQLException;
0N/A //--
0N/A /**
0N/A * Sets the designated parameter to the given input stream.
0N/A * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
0N/A * parameter, it may be more practical to send it via a
0N/A * <code>java.io.InputStream</code>. Data will be read from the stream
0N/A * as needed until end-of-file is reached. The JDBC driver will
0N/A * do any necessary conversion from ASCII to the database char format.
0N/A *
0N/A * <P><B>Note:</B> This stream object can either be a standard
0N/A * Java stream object or your own subclass that implements the
0N/A * standard interface.
0N/A * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
0N/A * it might be more efficient to use a version of
0N/A * <code>setAsciiStream</code> which takes a length parameter.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the Java input stream that contains the ASCII parameter value
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method
0N/A * @since 1.6
0N/A */
0N/A void setAsciiStream(String parameterName, java.io.InputStream x)
0N/A throws SQLException;
0N/A /**
0N/A * Sets the designated parameter to the given input stream.
0N/A * When a very large binary value is input to a <code>LONGVARBINARY</code>
0N/A * parameter, it may be more practical to send it via a
0N/A * <code>java.io.InputStream</code> object. The data will be read from the
0N/A * stream as needed until end-of-file is reached.
0N/A *
0N/A * <P><B>Note:</B> This stream object can either be a standard
0N/A * Java stream object or your own subclass that implements the
0N/A * standard interface.
0N/A * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
0N/A * it might be more efficient to use a version of
0N/A * <code>setBinaryStream</code> which takes a length parameter.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param x the java input stream which contains the binary parameter value
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method
0N/A * @since 1.6
0N/A */
0N/A void setBinaryStream(String parameterName, java.io.InputStream x)
0N/A throws SQLException;
0N/A /**
0N/A * Sets the designated parameter to the given <code>Reader</code>
0N/A * object.
0N/A * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
0N/A * parameter, it may be more practical to send it via a
0N/A * <code>java.io.Reader</code> object. The data will be read from the stream
0N/A * as needed until end-of-file is reached. The JDBC driver will
0N/A * do any necessary conversion from UNICODE to the database char format.
0N/A *
0N/A * <P><B>Note:</B> This stream object can either be a standard
0N/A * Java stream object or your own subclass that implements the
0N/A * standard interface.
0N/A * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
0N/A * it might be more efficient to use a version of
0N/A * <code>setCharacterStream</code> which takes a length parameter.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param reader the <code>java.io.Reader</code> object that contains the
0N/A * Unicode data
0N/A * @exception SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method
0N/A * @since 1.6
0N/A */
0N/A void setCharacterStream(String parameterName,
0N/A java.io.Reader reader) throws SQLException;
0N/A /**
0N/A * Sets the designated parameter to a <code>Reader</code> object. The
0N/A * <code>Reader</code> reads the data till end-of-file is reached. The
0N/A * driver does the necessary conversion from Java character format to
0N/A * the national character set in the database.
0N/A
0N/A * <P><B>Note:</B> This stream object can either be a standard
0N/A * Java stream object or your own subclass that implements the
0N/A * standard interface.
0N/A * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
0N/A * it might be more efficient to use a version of
0N/A * <code>setNCharacterStream</code> which takes a length parameter.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param value the parameter value
0N/A * @throws SQLException if parameterName does not correspond to a named
0N/A * parameter; if the driver does not support national
0N/A * character sets; if the driver can detect that a data conversion
0N/A * error could occur; if a database access error occurs; or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method
0N/A * @since 1.6
0N/A */
0N/A void setNCharacterStream(String parameterName, Reader value) throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to a <code>Reader</code> object.
0N/A * This method differs from the <code>setCharacterStream (int, Reader)</code> method
0N/A * because it informs the driver that the parameter value should be sent to
0N/A * the server as a <code>CLOB</code>. When the <code>setCharacterStream</code> method is used, the
0N/A * driver may have to do extra work to determine whether the parameter
0N/A * data should be send to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>
0N/A *
0N/A * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
0N/A * it might be more efficient to use a version of
0N/A * <code>setClob</code> which takes a length parameter.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param reader An object that contains the data to set the parameter value to.
0N/A * @throws SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or this method is called on
0N/A * a closed <code>CallableStatement</code>
0N/A *
0N/A * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method
0N/A * @since 1.6
0N/A */
0N/A void setClob(String parameterName, Reader reader)
0N/A throws SQLException;
0N/A
0N/A /**
0N/A * Sets the designated parameter to a <code>InputStream</code> object.
0N/A * This method differs from the <code>setBinaryStream (int, InputStream)</code>
0N/A * method because it informs the driver that the parameter value should be
0N/A * sent to the server as a <code>BLOB</code>. When the <code>setBinaryStream</code> method is used,
0N/A * the driver may have to do extra work to determine whether the parameter
0N/A * data should be send to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code>
0N/A *
0N/A * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
0N/A * it might be more efficient to use a version of
0N/A * <code>setBlob</code> which takes a length parameter.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param inputStream An object that contains the data to set the parameter
0N/A * value to.
0N/A * @throws SQLException if parameterName does not correspond to a named
0N/A * parameter; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method
0N/A *
0N/A * @since 1.6
0N/A */
0N/A void setBlob(String parameterName, InputStream inputStream)
0N/A throws SQLException;
0N/A /**
0N/A * Sets the designated parameter to a <code>Reader</code> object.
0N/A * This method differs from the <code>setCharacterStream (int, Reader)</code> method
0N/A * because it informs the driver that the parameter value should be sent to
0N/A * the server as a <code>NCLOB</code>. When the <code>setCharacterStream</code> method is used, the
0N/A * driver may have to do extra work to determine whether the parameter
0N/A * data should be send to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
0N/A * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
0N/A * it might be more efficient to use a version of
0N/A * <code>setNClob</code> which takes a length parameter.
0N/A *
0N/A * @param parameterName the name of the parameter
0N/A * @param reader An object that contains the data to set the parameter value to.
0N/A * @throws SQLException if parameterName does not correspond to a named
0N/A * parameter; if the driver does not support national character sets;
0N/A * if the driver can detect that a data conversion
0N/A * error could occur; if a database access error occurs or
0N/A * this method is called on a closed <code>CallableStatement</code>
0N/A * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method
0N/A *
0N/A * @since 1.6
0N/A */
0N/A void setNClob(String parameterName, Reader reader)
0N/A throws SQLException;
2751N/A
2751N/A //------------------------- JDBC 4.1 -----------------------------------
2751N/A
2751N/A
2751N/A /**
2751N/A *<p>Returns an object representing the value of OUT parameter
2751N/A * {@code parameterIndex} and will convert from the
2751N/A * SQL type of the parameter to the requested Java data type, if the
2751N/A * conversion is supported. If the conversion is not
2751N/A * supported or null is specified for the type, a
2751N/A * <code>SQLException</code> is thrown.
2751N/A *<p>
2751N/A * At a minimum, an implementation must support the conversions defined in
2751N/A * Appendix B, Table B-3 and conversion of appropriate user defined SQL
2751N/A * types to a Java type which implements {@code SQLData}, or {@code Struct}.
2751N/A * Additional conversions may be supported and are vendor defined.
2751N/A *
2751N/A * @param parameterIndex the first parameter is 1, the second is 2, and so on
2751N/A * @param type Class representing the Java data type to convert the
2751N/A * designated parameter to.
2751N/A * @return an instance of {@code type} holding the OUT parameter value
2751N/A * @throws SQLException if conversion is not supported, type is null or
2751N/A * another error occurs. The getCause() method of the
2751N/A * exception may provide a more detailed exception, for example, if
2751N/A * a conversion error occurs
2751N/A * @throws SQLFeatureNotSupportedException if the JDBC driver does not support
2751N/A * this method
2751N/A * @since 1.7
2751N/A */
2751N/A public <T> T getObject(int parameterIndex, Class<T> type) throws SQLException;
2751N/A
2751N/A
2751N/A /**
2751N/A *<p>Returns an object representing the value of OUT parameter
2751N/A * {@code parameterName} and will convert from the
2751N/A * SQL type of the parameter to the requested Java data type, if the
2751N/A * conversion is supported. If the conversion is not
2751N/A * supported or null is specified for the type, a
2751N/A * <code>SQLException</code> is thrown.
2751N/A *<p>
2751N/A * At a minimum, an implementation must support the conversions defined in
2751N/A * Appendix B, Table B-3 and conversion of appropriate user defined SQL
2751N/A * types to a Java type which implements {@code SQLData}, or {@code Struct}.
2751N/A * Additional conversions may be supported and are vendor defined.
2751N/A *
2751N/A * @param parameterName the name of the parameter
2751N/A * @param type Class representing the Java data type to convert
2751N/A * the designated parameter to.
2751N/A * @return an instance of {@code type} holding the OUT parameter
2751N/A * value
2751N/A * @throws SQLException if conversion is not supported, type is null or
2751N/A * another error occurs. The getCause() method of the
2751N/A * exception may provide a more detailed exception, for example, if
2751N/A * a conversion error occurs
2751N/A * @throws SQLFeatureNotSupportedException if the JDBC driver does not support
2751N/A * this method
2751N/A * @since 1.7
2751N/A */
2751N/A public <T> T getObject(String parameterName, Class<T> type) throws SQLException;
2751N/A
0N/A}