jdk/src/share/classes/java/sql/PreparedStatement.java
author alanb
Fri, 02 Nov 2012 15:50:11 +0000
changeset 14342 8435a30053c1
parent 14171 94eb36844bd7
child 15278 e081d3f73b75
permissions -rw-r--r--
7197491: update copyright year to match last edit in jdk8 jdk repository Reviewed-by: chegar, ksrini
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
14342
8435a30053c1 7197491: update copyright year to match last edit in jdk8 jdk repository
alanb
parents: 14171
diff changeset
     2
 * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package java.sql;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.math.BigDecimal;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import java.util.Calendar;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
import java.io.Reader;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
import java.io.InputStream;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * An object that represents a precompiled SQL statement.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * <P>A SQL statement is precompiled and stored in a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * <code>PreparedStatement</code> object. This object can then be used to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * efficiently execute this statement multiple times.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 * <P><B>Note:</B> The setter methods (<code>setShort</code>, <code>setString</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 * and so on) for setting IN parameter values
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * must specify types that are compatible with the defined SQL type of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * the input parameter. For instance, if the IN parameter has SQL type
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * <code>INTEGER</code>, then the method <code>setInt</code> should be used.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 * <p>If arbitrary parameter type conversions are required, the method
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 * <code>setObject</code> should be used with a target SQL type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
 * In the following example of setting a parameter, <code>con</code> represents
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 * an active connection:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * <PRE>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 *   PreparedStatement pstmt = con.prepareStatement("UPDATE EMPLOYEES
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 *                                     SET SALARY = ? WHERE ID = ?");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 *   pstmt.setBigDecimal(1, 153833.00)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 *   pstmt.setInt(2, 110592)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 * </PRE>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 * @see Connection#prepareStatement
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
 * @see ResultSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
public interface PreparedStatement extends Statement {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
     * Executes the SQL query in this <code>PreparedStatement</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
     * and returns the <code>ResultSet</code> object generated by the query.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
     * @return a <code>ResultSet</code> object that contains the data produced by the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
     *         query; never <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
     * @exception SQLException if a database access error occurs;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
     * this method is called on a closed  <code>PreparedStatement</code> or the SQL
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
     *            statement does not return a <code>ResultSet</code> object
6540
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 5506
diff changeset
    72
     * @throws SQLTimeoutException when the driver has determined that the
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 5506
diff changeset
    73
     * timeout value that was specified by the {@code setQueryTimeout}
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 5506
diff changeset
    74
     * method has been exceeded and has at least attempted to cancel
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 5506
diff changeset
    75
     * the currently running {@code Statement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
    ResultSet executeQuery() throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
     * Executes the SQL statement in this <code>PreparedStatement</code> object,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
     * which must be an SQL Data Manipulation Language (DML) statement, such as <code>INSERT</code>, <code>UPDATE</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
     * <code>DELETE</code>; or an SQL statement that returns nothing,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
     * such as a DDL statement.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
     * @return either (1) the row count for SQL Data Manipulation Language (DML) statements
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
     *         or (2) 0 for SQL statements that return nothing
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
     * @exception SQLException if a database access error occurs;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
     * this method is called on a closed  <code>PreparedStatement</code>
6540
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 5506
diff changeset
    89
     * or the SQL statement returns a <code>ResultSet</code> object
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 5506
diff changeset
    90
     * @throws SQLTimeoutException when the driver has determined that the
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 5506
diff changeset
    91
     * timeout value that was specified by the {@code setQueryTimeout}
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 5506
diff changeset
    92
     * method has been exceeded and has at least attempted to cancel
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 5506
diff changeset
    93
     * the currently running {@code Statement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
    int executeUpdate() throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
     * Sets the designated parameter to SQL <code>NULL</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
     * <P><B>Note:</B> You must specify the parameter's SQL type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
     * @param sqlType the SQL type code defined in <code>java.sql.Types</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
     * @exception SQLFeatureNotSupportedException if <code>sqlType</code> is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
     * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
     * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
     * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
     *  <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
     * or  <code>STRUCT</code> data type and the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
     * this data type
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
    void setNull(int parameterIndex, int sqlType) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
     * Sets the designated parameter to the given Java <code>boolean</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
     * The driver converts this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
     * to an SQL <code>BIT</code> or <code>BOOLEAN</code> value when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
     * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
     * marker in the SQL statement;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
     * if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
    void setBoolean(int parameterIndex, boolean x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
     * Sets the designated parameter to the given Java <code>byte</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
     * The driver converts this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
     * to an SQL <code>TINYINT</code> value when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
     * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
    void setByte(int parameterIndex, byte x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
     * Sets the designated parameter to the given Java <code>short</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
     * The driver converts this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
     * to an SQL <code>SMALLINT</code> value when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
     * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
    void setShort(int parameterIndex, short x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
     * Sets the designated parameter to the given Java <code>int</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
     * The driver converts this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
     * to an SQL <code>INTEGER</code> value when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
     * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
    void setInt(int parameterIndex, int x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
     * Sets the designated parameter to the given Java <code>long</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
     * The driver converts this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
     * to an SQL <code>BIGINT</code> value when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
     * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
    void setLong(int parameterIndex, long x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
     * Sets the designated parameter to the given Java <code>float</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
     * The driver converts this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
     * to an SQL <code>REAL</code> value when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
     * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
    void setFloat(int parameterIndex, float x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
     * Sets the designated parameter to the given Java <code>double</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
     * The driver converts this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
     * to an SQL <code>DOUBLE</code> value when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
     * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
    void setDouble(int parameterIndex, double x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
     * Sets the designated parameter to the given <code>java.math.BigDecimal</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
     * The driver converts this to an SQL <code>NUMERIC</code> value when
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
     * it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
     * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
    void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
     * Sets the designated parameter to the given Java <code>String</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
     * The driver converts this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
     * to an SQL <code>VARCHAR</code> or <code>LONGVARCHAR</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
     * (depending on the argument's
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
     * size relative to the driver's limits on <code>VARCHAR</code> values)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
     * when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
     * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
    void setString(int parameterIndex, String x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
     * Sets the designated parameter to the given Java array of bytes.  The driver converts
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
     * this to an SQL <code>VARBINARY</code> or <code>LONGVARBINARY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
     * (depending on the argument's size relative to the driver's limits on
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
     * <code>VARBINARY</code> values) when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
     * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
    void setBytes(int parameterIndex, byte x[]) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
     * Sets the designated parameter to the given <code>java.sql.Date</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
     * using the default time zone of the virtual machine that is running
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
     * the application.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
     * The driver converts this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
     * to an SQL <code>DATE</code> value when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
     * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
    void setDate(int parameterIndex, java.sql.Date x)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
            throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
     * Sets the designated parameter to the given <code>java.sql.Time</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
     * The driver converts this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
     * to an SQL <code>TIME</code> value when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
     * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
    void setTime(int parameterIndex, java.sql.Time x)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
            throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
     * Sets the designated parameter to the given <code>java.sql.Timestamp</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
     * The driver
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
     * converts this to an SQL <code>TIMESTAMP</code> value when it sends it to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
     * database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
     * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
     * this method is called on a closed <code>PreparedStatement</code>     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
    void setTimestamp(int parameterIndex, java.sql.Timestamp x)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
            throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
     * Sets the designated parameter to the given input stream, which will have
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
     * the specified number of bytes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
     * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
     * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
     * <code>java.io.InputStream</code>. Data will be read from the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
     * do any necessary conversion from ASCII to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
     * @param x the Java input stream that contains the ASCII parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
     * @param length the number of bytes in the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
    void setAsciiStream(int parameterIndex, java.io.InputStream x, int length)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
            throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
     * Sets the designated parameter to the given input stream, which
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
     * will have the specified number of bytes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
     * When a very large Unicode value is input to a <code>LONGVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
     * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
     * <code>java.io.InputStream</code> object. The data will be read from the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
     * stream as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
     * do any necessary conversion from Unicode to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
     *The byte format of the Unicode stream must be a Java UTF-8, as defined in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
     *Java Virtual Machine Specification.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
     * @param x a <code>java.io.InputStream</code> object that contains the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
     *        Unicode parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
     * @param length the number of bytes in the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
     * this method
14171
94eb36844bd7 7197395: Add @Deprecated to all deprecated methods to eliminate compiler warnings in JDBC
lancea
parents: 11016
diff changeset
   345
     * @deprecated Use {@code setCharacterStream}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
     */
14171
94eb36844bd7 7197395: Add @Deprecated to all deprecated methods to eliminate compiler warnings in JDBC
lancea
parents: 11016
diff changeset
   347
    @Deprecated
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
    void setUnicodeStream(int parameterIndex, java.io.InputStream x,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
                          int length) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
     * Sets the designated parameter to the given input stream, which will have
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
     * the specified number of bytes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
     * When a very large binary value is input to a <code>LONGVARBINARY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
     * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
     * <code>java.io.InputStream</code> object. The data will be read from the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
     * stream as needed until end-of-file is reached.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
     * @param x the java input stream which contains the binary parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
     * @param length the number of bytes in the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
    void setBinaryStream(int parameterIndex, java.io.InputStream x,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
                         int length) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
     * Clears the current parameter values immediately.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
     * <P>In general, parameter values remain in force for repeated use of a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
     * statement. Setting a parameter value automatically clears its
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
     * previous value.  However, in some cases it is useful to immediately
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
     * release the resources used by the current parameter values; this can
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
     * be done by calling the method <code>clearParameters</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
     * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
    void clearParameters() throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
    //----------------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
    // Advanced features:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
    * Sets the value of the designated parameter with the given object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
    * This method is like the method <code>setObject</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
    * above, except that it assumes a scale of zero.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
    * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
    * @param x the object containing the input parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
    * @param targetSqlType the SQL type (as defined in java.sql.Types) to be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
    *                      sent to the database
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
    * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
    * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
    * @exception SQLFeatureNotSupportedException if <code>targetSqlType</code> is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
    * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
    * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
    * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
    *  <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
    * or  <code>STRUCT</code> data type and the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
    * this data type
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
    * @see Types
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
    void setObject(int parameterIndex, Object x, int targetSqlType)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
      throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
     * <p>Sets the value of the designated parameter using the given object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
     * The second parameter must be of type <code>Object</code>; therefore, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
     * <code>java.lang</code> equivalent objects should be used for built-in types.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
     * <p>The JDBC specification specifies a standard mapping from
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
     * Java <code>Object</code> types to SQL types.  The given argument
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
     * will be converted to the corresponding SQL type before being
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
     * sent to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
     * <p>Note that this method may be used to pass datatabase-
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
     * specific abstract data types, by using a driver-specific Java
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
     * type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
     * If the object is of a class implementing the interface <code>SQLData</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
     * the JDBC driver should call the method <code>SQLData.writeSQL</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
     * to write it to the SQL data stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
     * If, on the other hand, the object is of a class implementing
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
     * <code>Ref</code>, <code>Blob</code>, <code>Clob</code>,  <code>NClob</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
     *  <code>Struct</code>, <code>java.net.URL</code>, <code>RowId</code>, <code>SQLXML</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
     * or <code>Array</code>, the driver should pass it to the database as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
     * value of the corresponding SQL type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
     *<b>Note:</b> Not all databases allow for a non-typed Null to be sent to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
     * the backend. For maximum portability, the <code>setNull</code> or the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
     * <code>setObject(int parameterIndex, Object x, int sqlType)</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
     * method should be used
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
     * instead of <code>setObject(int parameterIndex, Object x)</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
     *<p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
     * <b>Note:</b> This method throws an exception if there is an ambiguity, for example, if the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
     * object is of a class implementing more than one of the interfaces named above.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
     * @param x the object containing the input parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
     * marker in the SQL statement; if a database access error occurs;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
     *  this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
     * or the type of the given object is ambiguous
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
    void setObject(int parameterIndex, Object x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
     * Executes the SQL statement in this <code>PreparedStatement</code> object,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
     * which may be any kind of SQL statement.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
     * Some prepared statements return multiple results; the <code>execute</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
     * method handles these complex statements as well as the simpler
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
     * form of statements handled by the methods <code>executeQuery</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
     * and <code>executeUpdate</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
     * The <code>execute</code> method returns a <code>boolean</code> to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
     * indicate the form of the first result.  You must call either the method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
     * <code>getResultSet</code> or <code>getUpdateCount</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
     * to retrieve the result; you must call <code>getMoreResults</code> to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
     * move to any subsequent result(s).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
     * @return <code>true</code> if the first result is a <code>ResultSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
     *         object; <code>false</code> if the first result is an update
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
     *         count or there is no result
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
     * @exception SQLException if a database access error occurs;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
     * or an argument is supplied to this method
6540
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 5506
diff changeset
   474
     * @throws SQLTimeoutException when the driver has determined that the
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 5506
diff changeset
   475
     * timeout value that was specified by the {@code setQueryTimeout}
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 5506
diff changeset
   476
     * method has been exceeded and has at least attempted to cancel
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 5506
diff changeset
   477
     * the currently running {@code Statement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
     * @see Statement#execute
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
     * @see Statement#getResultSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
     * @see Statement#getUpdateCount
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
     * @see Statement#getMoreResults
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
    boolean execute() throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
    //--------------------------JDBC 2.0-----------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
     * Adds a set of parameters to this <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
     * object's batch of commands.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
     * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
     * @see Statement#addBatch
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
     * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   496
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
    void addBatch() throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
     * Sets the designated parameter to the given <code>Reader</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
     * object, which is the given number of characters long.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
     * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
     * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
     * <code>java.io.Reader</code> object. The data will be read from the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
     * do any necessary conversion from UNICODE to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   508
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
   509
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   513
     * @param reader the <code>java.io.Reader</code> object that contains the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   514
     *        Unicode data
90ce3da70b43 Initial load
duke
parents:
diff changeset
   515
     * @param length the number of characters in the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   519
     * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   520
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   521
    void setCharacterStream(int parameterIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   522
                          java.io.Reader reader,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   523
                          int length) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   524
90ce3da70b43 Initial load
duke
parents:
diff changeset
   525
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   526
     * Sets the designated parameter to the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
   527
     *  <code>REF(&lt;structured-type&gt;)</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   528
     * The driver converts this to an SQL <code>REF</code> value when it
90ce3da70b43 Initial load
duke
parents:
diff changeset
   529
     * sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   530
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   531
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   532
     * @param x an SQL <code>REF</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   533
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   534
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   535
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   536
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   537
     * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   538
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   539
    void setRef (int parameterIndex, Ref x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   540
90ce3da70b43 Initial load
duke
parents:
diff changeset
   541
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   542
     * Sets the designated parameter to the given <code>java.sql.Blob</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   543
     * The driver converts this to an SQL <code>BLOB</code> value when it
90ce3da70b43 Initial load
duke
parents:
diff changeset
   544
     * sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   545
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   546
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   547
     * @param x a <code>Blob</code> object that maps an SQL <code>BLOB</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   548
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   549
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   550
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   551
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   552
     * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   553
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   554
    void setBlob (int parameterIndex, Blob x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   555
90ce3da70b43 Initial load
duke
parents:
diff changeset
   556
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   557
     * Sets the designated parameter to the given <code>java.sql.Clob</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   558
     * The driver converts this to an SQL <code>CLOB</code> value when it
90ce3da70b43 Initial load
duke
parents:
diff changeset
   559
     * sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   560
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   561
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   562
     * @param x a <code>Clob</code> object that maps an SQL <code>CLOB</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   563
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   564
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   565
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   566
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   567
     * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   568
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   569
    void setClob (int parameterIndex, Clob x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   570
90ce3da70b43 Initial load
duke
parents:
diff changeset
   571
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   572
     * Sets the designated parameter to the given <code>java.sql.Array</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   573
     * The driver converts this to an SQL <code>ARRAY</code> value when it
90ce3da70b43 Initial load
duke
parents:
diff changeset
   574
     * sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   575
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   576
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   577
     * @param x an <code>Array</code> object that maps an SQL <code>ARRAY</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   578
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   579
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   580
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   581
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   582
     * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   583
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   584
    void setArray (int parameterIndex, Array x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   585
90ce3da70b43 Initial load
duke
parents:
diff changeset
   586
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   587
     * Retrieves a <code>ResultSetMetaData</code> object that contains
90ce3da70b43 Initial load
duke
parents:
diff changeset
   588
     * information about the columns of the <code>ResultSet</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   589
     * that will be returned when this <code>PreparedStatement</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   590
     * is executed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   591
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   592
     * Because a <code>PreparedStatement</code> object is precompiled, it is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   593
     * possible to know about the <code>ResultSet</code> object that it will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   594
     * return without having to execute it.  Consequently, it is possible
90ce3da70b43 Initial load
duke
parents:
diff changeset
   595
     * to invoke the method <code>getMetaData</code> on a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   596
     * <code>PreparedStatement</code> object rather than waiting to execute
90ce3da70b43 Initial load
duke
parents:
diff changeset
   597
     * it and then invoking the <code>ResultSet.getMetaData</code> method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   598
     * on the <code>ResultSet</code> object that is returned.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   599
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   600
     * <B>NOTE:</B> Using this method may be expensive for some drivers due
90ce3da70b43 Initial load
duke
parents:
diff changeset
   601
     * to the lack of underlying DBMS support.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   602
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   603
     * @return the description of a <code>ResultSet</code> object's columns or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   604
     *         <code>null</code> if the driver cannot return a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   605
     *         <code>ResultSetMetaData</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   606
     * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   607
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   608
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   609
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   610
     * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   611
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   612
    ResultSetMetaData getMetaData() throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   613
90ce3da70b43 Initial load
duke
parents:
diff changeset
   614
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   615
     * Sets the designated parameter to the given <code>java.sql.Date</code> value,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   616
     * using the given <code>Calendar</code> object.  The driver uses
90ce3da70b43 Initial load
duke
parents:
diff changeset
   617
     * the <code>Calendar</code> object to construct an SQL <code>DATE</code> value,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   618
     * which the driver then sends to the database.  With
90ce3da70b43 Initial load
duke
parents:
diff changeset
   619
     * a <code>Calendar</code> object, the driver can calculate the date
90ce3da70b43 Initial load
duke
parents:
diff changeset
   620
     * taking into account a custom timezone.  If no
90ce3da70b43 Initial load
duke
parents:
diff changeset
   621
     * <code>Calendar</code> object is specified, the driver uses the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
   622
     * timezone, which is that of the virtual machine running the application.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   623
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   624
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   625
     * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   626
     * @param cal the <code>Calendar</code> object the driver will use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   627
     *            to construct the date
90ce3da70b43 Initial load
duke
parents:
diff changeset
   628
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   629
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   630
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   631
     * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   632
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   633
    void setDate(int parameterIndex, java.sql.Date x, Calendar cal)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   634
            throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   635
90ce3da70b43 Initial load
duke
parents:
diff changeset
   636
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   637
     * Sets the designated parameter to the given <code>java.sql.Time</code> value,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   638
     * using the given <code>Calendar</code> object.  The driver uses
90ce3da70b43 Initial load
duke
parents:
diff changeset
   639
     * the <code>Calendar</code> object to construct an SQL <code>TIME</code> value,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   640
     * which the driver then sends to the database.  With
90ce3da70b43 Initial load
duke
parents:
diff changeset
   641
     * a <code>Calendar</code> object, the driver can calculate the time
90ce3da70b43 Initial load
duke
parents:
diff changeset
   642
     * taking into account a custom timezone.  If no
90ce3da70b43 Initial load
duke
parents:
diff changeset
   643
     * <code>Calendar</code> object is specified, the driver uses the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
   644
     * timezone, which is that of the virtual machine running the application.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   645
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   646
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   647
     * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   648
     * @param cal the <code>Calendar</code> object the driver will use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   649
     *            to construct the time
90ce3da70b43 Initial load
duke
parents:
diff changeset
   650
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   651
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   652
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   653
     * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   654
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   655
    void setTime(int parameterIndex, java.sql.Time x, Calendar cal)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   656
            throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   657
90ce3da70b43 Initial load
duke
parents:
diff changeset
   658
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   659
     * Sets the designated parameter to the given <code>java.sql.Timestamp</code> value,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   660
     * using the given <code>Calendar</code> object.  The driver uses
90ce3da70b43 Initial load
duke
parents:
diff changeset
   661
     * the <code>Calendar</code> object to construct an SQL <code>TIMESTAMP</code> value,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   662
     * which the driver then sends to the database.  With a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   663
     *  <code>Calendar</code> object, the driver can calculate the timestamp
90ce3da70b43 Initial load
duke
parents:
diff changeset
   664
     * taking into account a custom timezone.  If no
90ce3da70b43 Initial load
duke
parents:
diff changeset
   665
     * <code>Calendar</code> object is specified, the driver uses the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
   666
     * timezone, which is that of the virtual machine running the application.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   667
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   668
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   669
     * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   670
     * @param cal the <code>Calendar</code> object the driver will use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   671
     *            to construct the timestamp
90ce3da70b43 Initial load
duke
parents:
diff changeset
   672
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   673
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   674
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   675
     * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   676
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   677
    void setTimestamp(int parameterIndex, java.sql.Timestamp x, Calendar cal)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   678
            throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   679
90ce3da70b43 Initial load
duke
parents:
diff changeset
   680
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   681
     * Sets the designated parameter to SQL <code>NULL</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   682
     * This version of the method <code>setNull</code> should
90ce3da70b43 Initial load
duke
parents:
diff changeset
   683
     * be used for user-defined types and REF type parameters.  Examples
90ce3da70b43 Initial load
duke
parents:
diff changeset
   684
     * of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   685
     * named array types.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   686
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   687
     * <P><B>Note:</B> To be portable, applications must give the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   688
     * SQL type code and the fully-qualified SQL type name when specifying
90ce3da70b43 Initial load
duke
parents:
diff changeset
   689
     * a NULL user-defined or REF parameter.  In the case of a user-defined type
90ce3da70b43 Initial load
duke
parents:
diff changeset
   690
     * the name is the type name of the parameter itself.  For a REF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   691
     * parameter, the name is the type name of the referenced type.  If
90ce3da70b43 Initial load
duke
parents:
diff changeset
   692
     * a JDBC driver does not need the type code or type name information,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   693
     * it may ignore it.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   694
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   695
     * Although it is intended for user-defined and Ref parameters,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   696
     * this method may be used to set a null parameter of any JDBC type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   697
     * If the parameter does not have a user-defined or REF type, the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
   698
     * typeName is ignored.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   699
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   700
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   701
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   702
     * @param sqlType a value from <code>java.sql.Types</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   703
     * @param typeName the fully-qualified name of an SQL user-defined type;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   704
     *  ignored if the parameter is not a user-defined type or REF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   705
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   706
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   707
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   708
     * @exception SQLFeatureNotSupportedException if <code>sqlType</code> is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   709
     * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   710
     * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   711
     * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   712
     *  <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   713
     * or  <code>STRUCT</code> data type and the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   714
     * this data type or if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   715
     * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   716
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   717
  void setNull (int parameterIndex, int sqlType, String typeName)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   718
    throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   719
90ce3da70b43 Initial load
duke
parents:
diff changeset
   720
    //------------------------- JDBC 3.0 -----------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   721
90ce3da70b43 Initial load
duke
parents:
diff changeset
   722
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   723
     * Sets the designated parameter to the given <code>java.net.URL</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   724
     * The driver converts this to an SQL <code>DATALINK</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   725
     * when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   726
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   727
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   728
     * @param x the <code>java.net.URL</code> object to be set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   729
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   730
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   731
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   732
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   733
     * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   734
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   735
    void setURL(int parameterIndex, java.net.URL x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   736
90ce3da70b43 Initial load
duke
parents:
diff changeset
   737
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   738
     * Retrieves the number, types and properties of this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   739
     * <code>PreparedStatement</code> object's parameters.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   740
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   741
     * @return a <code>ParameterMetaData</code> object that contains information
90ce3da70b43 Initial load
duke
parents:
diff changeset
   742
     *         about the number, types and properties for each
90ce3da70b43 Initial load
duke
parents:
diff changeset
   743
     *  parameter marker of this <code>PreparedStatement</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   744
     * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   745
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   746
     * @see ParameterMetaData
90ce3da70b43 Initial load
duke
parents:
diff changeset
   747
     * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   748
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   749
    ParameterMetaData getParameterMetaData() throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   750
90ce3da70b43 Initial load
duke
parents:
diff changeset
   751
    //------------------------- JDBC 4.0 -----------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   752
90ce3da70b43 Initial load
duke
parents:
diff changeset
   753
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   754
     * Sets the designated parameter to the given <code>java.sql.RowId</code> object. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
   755
     * driver converts this to a SQL <code>ROWID</code> value when it sends it
90ce3da70b43 Initial load
duke
parents:
diff changeset
   756
     * to the database
90ce3da70b43 Initial load
duke
parents:
diff changeset
   757
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   758
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   759
     * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   760
     * @throws SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   761
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   762
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   763
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   764
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   765
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   766
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   767
    void setRowId(int parameterIndex, RowId x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   768
90ce3da70b43 Initial load
duke
parents:
diff changeset
   769
90ce3da70b43 Initial load
duke
parents:
diff changeset
   770
    /**
11016
e2665f4ac6d2 7110111: Minor Java SE javadoc & Constructor clean up
lancea
parents: 6540
diff changeset
   771
     * Sets the designated parameter to the given <code>String</code> object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   772
     * The driver converts this to a SQL <code>NCHAR</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   773
     * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   774
     * (depending on the argument's
90ce3da70b43 Initial load
duke
parents:
diff changeset
   775
     * size relative to the driver's limits on <code>NVARCHAR</code> values)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   776
     * when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   777
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   778
     * @param parameterIndex of the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   779
     * @param value the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   780
     * @throws SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   781
     * marker in the SQL statement; if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
   782
     *         character sets;  if the driver can detect that a data conversion
90ce3da70b43 Initial load
duke
parents:
diff changeset
   783
     *  error could occur; if a database access error occurs; or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   784
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   785
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   786
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   787
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   788
     void setNString(int parameterIndex, String value) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   789
90ce3da70b43 Initial load
duke
parents:
diff changeset
   790
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   791
     * Sets the designated parameter to a <code>Reader</code> object. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
   792
     * <code>Reader</code> reads the data till end-of-file is reached. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
   793
     * driver does the necessary conversion from Java character format to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   794
     * the national character set in the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   795
     * @param parameterIndex of the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   796
     * @param value the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   797
     * @param length the number of characters in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   798
     * @throws SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   799
     * marker in the SQL statement; if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
   800
     *         character sets;  if the driver can detect that a data conversion
90ce3da70b43 Initial load
duke
parents:
diff changeset
   801
     *  error could occur; if a database access error occurs; or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   802
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   803
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   804
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   805
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   806
     void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   807
90ce3da70b43 Initial load
duke
parents:
diff changeset
   808
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   809
     * Sets the designated parameter to a <code>java.sql.NClob</code> object. The driver converts this to a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   810
     * SQL <code>NCLOB</code> value when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   811
     * @param parameterIndex of the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   812
     * @param value the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   813
     * @throws SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   814
     * marker in the SQL statement; if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
   815
     *         character sets;  if the driver can detect that a data conversion
90ce3da70b43 Initial load
duke
parents:
diff changeset
   816
     *  error could occur; if a database access error occurs; or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   817
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   818
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   819
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   820
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   821
     void setNClob(int parameterIndex, NClob value) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   822
90ce3da70b43 Initial load
duke
parents:
diff changeset
   823
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   824
     * Sets the designated parameter to a <code>Reader</code> object.  The reader must contain  the number
90ce3da70b43 Initial load
duke
parents:
diff changeset
   825
     * of characters specified by length otherwise a <code>SQLException</code> will be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   826
     * generated when the <code>PreparedStatement</code> is executed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   827
     *This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   828
     * because it informs the driver that the parameter value should be sent to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   829
     * the server as a <code>CLOB</code>.  When the <code>setCharacterStream</code> method is used, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   830
     * driver may have to do extra work to determine whether the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   831
     * data should be sent to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   832
     * @param parameterIndex index of the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   833
     * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   834
     * @param length the number of characters in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   835
     * @throws SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   836
     * marker in the SQL statement; if a database access error occurs; this method is called on
90ce3da70b43 Initial load
duke
parents:
diff changeset
   837
     * a closed <code>PreparedStatement</code> or if the length specified is less than zero.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   838
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   839
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   840
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   841
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   842
     void setClob(int parameterIndex, Reader reader, long length)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   843
       throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   844
90ce3da70b43 Initial load
duke
parents:
diff changeset
   845
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   846
     * Sets the designated parameter to a <code>InputStream</code> object.  The inputstream must contain  the number
90ce3da70b43 Initial load
duke
parents:
diff changeset
   847
     * of characters specified by length otherwise a <code>SQLException</code> will be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   848
     * generated when the <code>PreparedStatement</code> is executed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   849
     * This method differs from the <code>setBinaryStream (int, InputStream, int)</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   850
     * method because it informs the driver that the parameter value should be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   851
     * sent to the server as a <code>BLOB</code>.  When the <code>setBinaryStream</code> method is used,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   852
     * the driver may have to do extra work to determine whether the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   853
     * data should be sent to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   854
     * @param parameterIndex index of the first parameter is 1,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   855
     * the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   856
     * @param inputStream An object that contains the data to set the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   857
     * value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   858
     * @param length the number of bytes in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   859
     * @throws SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   860
     * marker in the SQL statement; if a database access error occurs;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   861
     * this method is called on a closed <code>PreparedStatement</code>;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   862
     *  if the length specified
90ce3da70b43 Initial load
duke
parents:
diff changeset
   863
     * is less than zero or if the number of bytes in the inputstream does not match
90ce3da70b43 Initial load
duke
parents:
diff changeset
   864
     * the specfied length.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   865
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   866
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   867
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   868
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   869
     void setBlob(int parameterIndex, InputStream inputStream, long length)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   870
        throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   871
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   872
     * Sets the designated parameter to a <code>Reader</code> object.  The reader must contain  the number
90ce3da70b43 Initial load
duke
parents:
diff changeset
   873
     * of characters specified by length otherwise a <code>SQLException</code> will be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   874
     * generated when the <code>PreparedStatement</code> is executed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   875
     * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   876
     * because it informs the driver that the parameter value should be sent to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   877
     * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   878
     * driver may have to do extra work to determine whether the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   879
     * data should be sent to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   880
     * @param parameterIndex index of the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   881
     * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   882
     * @param length the number of characters in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   883
     * @throws SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   884
     * marker in the SQL statement; if the length specified is less than zero;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   885
     * if the driver does not support national character sets;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   886
     * if the driver can detect that a data conversion
90ce3da70b43 Initial load
duke
parents:
diff changeset
   887
     *  error could occur;  if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   888
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   889
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   890
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   891
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   892
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   893
     void setNClob(int parameterIndex, Reader reader, long length)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   894
       throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   895
90ce3da70b43 Initial load
duke
parents:
diff changeset
   896
     /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   897
      * Sets the designated parameter to the given <code>java.sql.SQLXML</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   898
      * The driver converts this to an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   899
      * SQL <code>XML</code> value when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   900
      * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   901
      *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   902
      * @param parameterIndex index of the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   903
      * @param xmlObject a <code>SQLXML</code> object that maps an SQL <code>XML</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   904
      * @throws SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   905
     * marker in the SQL statement; if a database access error occurs;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   906
      *  this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   907
      * or the <code>java.xml.transform.Result</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   908
      *  <code>Writer</code> or <code>OutputStream</code> has not been closed for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   909
      * the <code>SQLXML</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   910
      * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   911
      *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   912
      * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   913
      */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   914
     void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   915
90ce3da70b43 Initial load
duke
parents:
diff changeset
   916
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   917
     * <p>Sets the value of the designated parameter with the given object. The second
90ce3da70b43 Initial load
duke
parents:
diff changeset
   918
     * argument must be an object type; for integral values, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   919
     * <code>java.lang</code> equivalent objects should be used.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   920
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   921
     * If the second argument is an <code>InputStream</code> then the stream must contain
90ce3da70b43 Initial load
duke
parents:
diff changeset
   922
     * the number of bytes specified by scaleOrLength.  If the second argument is a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   923
     * <code>Reader</code> then the reader must contain the number of characters specified
90ce3da70b43 Initial load
duke
parents:
diff changeset
   924
     * by scaleOrLength. If these conditions are not true the driver will generate a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   925
     * <code>SQLException</code> when the prepared statement is executed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   926
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   927
     * <p>The given Java object will be converted to the given targetSqlType
90ce3da70b43 Initial load
duke
parents:
diff changeset
   928
     * before being sent to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   929
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   930
     * If the object has a custom mapping (is of a class implementing the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   931
     * interface <code>SQLData</code>),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   932
     * the JDBC driver should call the method <code>SQLData.writeSQL</code> to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   933
     * write it to the SQL data stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   934
     * If, on the other hand, the object is of a class implementing
90ce3da70b43 Initial load
duke
parents:
diff changeset
   935
     * <code>Ref</code>, <code>Blob</code>, <code>Clob</code>,  <code>NClob</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   936
     *  <code>Struct</code>, <code>java.net.URL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   937
     * or <code>Array</code>, the driver should pass it to the database as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   938
     * value of the corresponding SQL type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   939
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   940
     * <p>Note that this method may be used to pass database-specific
90ce3da70b43 Initial load
duke
parents:
diff changeset
   941
     * abstract data types.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   942
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   943
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   944
     * @param x the object containing the input parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   945
     * @param targetSqlType the SQL type (as defined in java.sql.Types) to be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   946
     * sent to the database. The scale argument may further qualify this type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   947
     * @param scaleOrLength for <code>java.sql.Types.DECIMAL</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   948
     *          or <code>java.sql.Types.NUMERIC types</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   949
     *          this is the number of digits after the decimal point. For
90ce3da70b43 Initial load
duke
parents:
diff changeset
   950
     *          Java Object types <code>InputStream</code> and <code>Reader</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   951
     *          this is the length
90ce3da70b43 Initial load
duke
parents:
diff changeset
   952
     *          of the data in the stream or reader.  For all other types,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   953
     *          this value will be ignored.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   954
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   955
     * marker in the SQL statement; if a database access error occurs;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   956
     * this method is called on a closed <code>PreparedStatement</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   957
     *            if the Java Object specified by x is an InputStream
90ce3da70b43 Initial load
duke
parents:
diff changeset
   958
     *            or Reader object and the value of the scale parameter is less
90ce3da70b43 Initial load
duke
parents:
diff changeset
   959
     *            than zero
90ce3da70b43 Initial load
duke
parents:
diff changeset
   960
     * @exception SQLFeatureNotSupportedException if <code>targetSqlType</code> is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   961
     * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   962
     * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   963
     * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   964
     *  <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   965
     * or  <code>STRUCT</code> data type and the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   966
     * this data type
90ce3da70b43 Initial load
duke
parents:
diff changeset
   967
     * @see Types
90ce3da70b43 Initial load
duke
parents:
diff changeset
   968
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   969
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   970
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   971
    void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   972
            throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   973
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   974
     * Sets the designated parameter to the given input stream, which will have
90ce3da70b43 Initial load
duke
parents:
diff changeset
   975
     * the specified number of bytes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   976
     * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   977
     * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   978
     * <code>java.io.InputStream</code>. Data will be read from the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
   979
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   980
     * do any necessary conversion from ASCII to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   981
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   982
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
   983
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   984
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   985
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   986
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   987
     * @param x the Java input stream that contains the ASCII parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   988
     * @param length the number of bytes in the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
   989
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   990
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   991
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   992
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   993
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   994
    void setAsciiStream(int parameterIndex, java.io.InputStream x, long length)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   995
            throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   996
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   997
     * Sets the designated parameter to the given input stream, which will have
90ce3da70b43 Initial load
duke
parents:
diff changeset
   998
     * the specified number of bytes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   999
     * When a very large binary value is input to a <code>LONGVARBINARY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1000
     * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1001
     * <code>java.io.InputStream</code> object. The data will be read from the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1002
     * stream as needed until end-of-file is reached.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1003
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1004
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1005
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1006
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1007
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1008
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1009
     * @param x the java input stream which contains the binary parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1010
     * @param length the number of bytes in the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1011
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1012
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1013
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1014
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1015
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1016
    void setBinaryStream(int parameterIndex, java.io.InputStream x,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1017
                         long length) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1018
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1019
     * Sets the designated parameter to the given <code>Reader</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1020
     * object, which is the given number of characters long.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1021
     * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1022
     * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1023
     * <code>java.io.Reader</code> object. The data will be read from the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1024
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1025
     * do any necessary conversion from UNICODE to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1026
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1027
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1028
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1029
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1030
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1031
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1032
     * @param reader the <code>java.io.Reader</code> object that contains the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1033
     *        Unicode data
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1034
     * @param length the number of characters in the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1035
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1036
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1037
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1038
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1039
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1040
    void setCharacterStream(int parameterIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1041
                          java.io.Reader reader,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1042
                          long length) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1043
    //-----
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1044
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1045
     * Sets the designated parameter to the given input stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1046
     * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1047
     * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1048
     * <code>java.io.InputStream</code>. Data will be read from the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1049
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1050
     * do any necessary conversion from ASCII to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1051
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1052
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1053
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1054
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1055
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1056
     * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1057
     * <code>setAsciiStream</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1058
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1059
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1060
     * @param x the Java input stream that contains the ASCII parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1061
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1062
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1063
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1064
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1065
       * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1066
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1067
    void setAsciiStream(int parameterIndex, java.io.InputStream x)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1068
            throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1069
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1070
     * Sets the designated parameter to the given input stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1071
     * When a very large binary value is input to a <code>LONGVARBINARY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1072
     * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1073
     * <code>java.io.InputStream</code> object. The data will be read from the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1074
     * stream as needed until end-of-file is reached.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1075
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1076
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1077
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1078
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1079
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1080
     * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1081
     * <code>setBinaryStream</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1082
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1083
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1084
     * @param x the java input stream which contains the binary parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1085
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1086
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1087
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1088
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1089
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1090
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1091
    void setBinaryStream(int parameterIndex, java.io.InputStream x)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1092
    throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1093
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1094
     * Sets the designated parameter to the given <code>Reader</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1095
     * object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1096
     * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1097
     * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1098
     * <code>java.io.Reader</code> object. The data will be read from the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1099
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1100
     * do any necessary conversion from UNICODE to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1101
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1102
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1103
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1104
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1105
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1106
     * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1107
     * <code>setCharacterStream</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1108
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1109
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1110
     * @param reader the <code>java.io.Reader</code> object that contains the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1111
     *        Unicode data
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1112
     * @exception SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1113
     * marker in the SQL statement; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1114
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1115
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1116
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1117
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1118
    void setCharacterStream(int parameterIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1119
                          java.io.Reader reader) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1120
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1121
     * Sets the designated parameter to a <code>Reader</code> object. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1122
     * <code>Reader</code> reads the data till end-of-file is reached. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1123
     * driver does the necessary conversion from Java character format to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1124
     * the national character set in the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1125
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1126
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1127
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1128
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1129
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1130
     * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1131
     * <code>setNCharacterStream</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1132
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1133
     * @param parameterIndex of the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1134
     * @param value the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1135
     * @throws SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1136
     * marker in the SQL statement; if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1137
     *         character sets;  if the driver can detect that a data conversion
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1138
     *  error could occur; if a database access error occurs; or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1139
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1140
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1141
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1142
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1143
     void setNCharacterStream(int parameterIndex, Reader value) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1144
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1145
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1146
     * Sets the designated parameter to a <code>Reader</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1147
     * This method differs from the <code>setCharacterStream (int, Reader)</code> method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1148
     * because it informs the driver that the parameter value should be sent to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1149
     * the server as a <code>CLOB</code>.  When the <code>setCharacterStream</code> method is used, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1150
     * driver may have to do extra work to determine whether the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1151
     * data should be sent to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1152
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1153
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1154
     * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1155
     * <code>setClob</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1156
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1157
     * @param parameterIndex index of the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1158
     * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1159
     * @throws SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1160
     * marker in the SQL statement; if a database access error occurs; this method is called on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1161
     * a closed <code>PreparedStatement</code>or if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1162
     * marker in the SQL statement
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1163
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1164
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1165
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1166
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1167
     void setClob(int parameterIndex, Reader reader)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1168
       throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1169
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1170
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1171
     * Sets the designated parameter to a <code>InputStream</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1172
     * This method differs from the <code>setBinaryStream (int, InputStream)</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1173
     * method because it informs the driver that the parameter value should be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1174
     * sent to the server as a <code>BLOB</code>.  When the <code>setBinaryStream</code> method is used,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1175
     * the driver may have to do extra work to determine whether the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1176
     * data should be sent to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1177
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1178
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1179
     * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1180
     * <code>setBlob</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1181
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1182
     * @param parameterIndex index of the first parameter is 1,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1183
     * the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1184
     * @param inputStream An object that contains the data to set the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1185
     * value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1186
     * @throws SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1187
     * marker in the SQL statement; if a database access error occurs;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1188
     * this method is called on a closed <code>PreparedStatement</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1189
     * if parameterIndex does not correspond
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1190
     * to a parameter marker in the SQL statement,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1191
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1192
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1193
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1194
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1195
     void setBlob(int parameterIndex, InputStream inputStream)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1196
        throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1197
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1198
     * Sets the designated parameter to a <code>Reader</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1199
     * This method differs from the <code>setCharacterStream (int, Reader)</code> method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1200
     * because it informs the driver that the parameter value should be sent to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1201
     * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1202
     * driver may have to do extra work to determine whether the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1203
     * data should be sent to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1204
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1205
     * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1206
     * <code>setNClob</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1207
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1208
     * @param parameterIndex index of the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1209
     * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1210
     * @throws SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1211
     * marker in the SQL statement;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1212
     * if the driver does not support national character sets;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1213
     * if the driver can detect that a data conversion
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1214
     *  error could occur;  if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1215
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1216
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1217
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1218
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1219
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1220
     void setNClob(int parameterIndex, Reader reader)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1221
       throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1222
6540
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 5506
diff changeset
  1223
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1224
}