src/java.sql.rowset/share/classes/com/sun/rowset/JdbcRowSetImpl.java
author rriggs
Fri, 07 Dec 2018 11:51:17 -0500
changeset 52902 e3398b2e1ab0
parent 47216 71c04702a3d5
child 53134 6459eb210418
permissions -rw-r--r--
8214971: Replace use of string.equals("") with isEmpty() Reviewed-by: jlaskey, prappo, lancea, dfuchs, redestad
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
23010
6dadb192ad81 8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents: 21278
diff changeset
     2
 * Copyright (c) 2003, 2013, 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 com.sun.rowset;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.sql.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import javax.sql.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
import javax.naming.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
import java.io.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
import java.math.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
import java.util.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
import javax.sql.rowset.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
/**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
    38
 * The standard implementation of the {@code JdbcRowSet} interface. See the interface
21278
ef8a3a2a72f2 8022746: List of spelling errors in API doc
malenkov
parents: 14171
diff changeset
    39
 * definition for full behavior and implementation requirements.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * @author Jonathan Bruce, Amit Handa
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
    47
     * The {@code Connection} object that is this rowset's
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
     * current connection to the database.  This field is set
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
     * internally when the connection is established.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
    private Connection conn;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
    54
     * The {@code PreparedStatement} object that is this rowset's
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
     * current command.  This field is set internally when the method
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
    56
     * {@code execute} creates the {@code PreparedStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
     * object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
    private PreparedStatement ps;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
    62
     * The {@code ResultSet} object that is this rowset's
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
     * current result set.  This field is set internally when the method
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
    64
     * {@code execute} executes the rowset's command and thereby
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
    65
     * creates the rowset's {@code ResultSet} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
    private ResultSet rs;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
    70
     * The {@code RowSetMetaDataImpl} object that is constructed when
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
    71
     * a {@code ResultSet} object is passed to the {@code JdbcRowSet}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
     * constructor. This helps in constructing all metadata associated
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
    73
     * with the {@code ResultSet} object using the setter methods of
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
    74
     * {@code RowSetMetaDataImpl}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
    private RowSetMetaDataImpl rowsMD;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
    79
     * The {@code ResultSetMetaData} object from which this
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
    80
     * {@code RowSetMetaDataImpl} is formed and which  helps in getting
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
     * the metadata information.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
    private ResultSetMetaData resMD;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
     * The Vector holding the Match Columns
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
     */
9257
53e6d7bc31b0 7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents: 6697
diff changeset
    89
    private Vector<Integer> iMatchColumns;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
     * The Vector that will hold the Match Column names.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
     */
9257
53e6d7bc31b0 7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents: 6697
diff changeset
    94
    private Vector<String> strMatchColumns;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
    97
    protected transient JdbcRowSetResourceBundle resBundle;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   100
     * Constructs a default {@code JdbcRowSet} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   101
     * The new instance of {@code JdbcRowSet} will serve as a proxy
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   102
     * for the {@code ResultSet} object it creates, and by so doing,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
     * it will make it possible to use the result set as a JavaBeans
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
     * component.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
     * <P>
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   106
     * The following is true of a default {@code JdbcRowSet} instance:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
     * <UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
     *   <LI>Does not show deleted rows
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
     *   <LI>Has no time limit for how long a driver may take to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
     *       execute the rowset's command
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
     *   <LI>Has no limit for the number of rows it may contain
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
     *   <LI>Has no limit for the number of bytes a column may contain
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
     *   <LI>Has a scrollable cursor and does not show changes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
     *       made by others
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
     *   <LI>Will not see uncommitted data (make "dirty" reads)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
     *   <LI>Has escape processing turned on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   117
     *   <LI>Has its connection's type map set to {@code null}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   118
     *   <LI>Has an empty {@code Hashtable} object for storing any
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
     *       parameters that are set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
     * </UL>
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   121
     * A newly created {@code JdbcRowSet} object must have its
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   122
     * {@code execute} method invoked before other public methods
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
     * are called on it; otherwise, such method calls will cause an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
     * exception to be thrown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
     * @throws SQLException [1] if any of its public methods are called prior
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   127
     * to calling the {@code execute} method; [2] if invalid JDBC driver
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
     * properties are set or [3] if no connection to a data source exists.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
    public JdbcRowSetImpl() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
        conn = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
        ps   = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
        rs   = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
        try {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   136
           resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
        } catch(IOException ioe) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
            throw new RuntimeException(ioe);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
        initParams();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
        // set the defaults
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
            setShowDeleted(false);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
        } catch(SQLException sqle) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   149
             System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setshowdeleted").toString() +
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
                                sqle.getLocalizedMessage());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
            setQueryTimeout(0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
        } catch(SQLException sqle) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   156
            System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setquerytimeout").toString() +
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
                                sqle.getLocalizedMessage());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
            setMaxRows(0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
        } catch(SQLException sqle) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   163
            System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setmaxrows").toString() +
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
                                sqle.getLocalizedMessage());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
            setMaxFieldSize(0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
        } catch(SQLException sqle) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   170
             System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setmaxfieldsize").toString() +
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
                                sqle.getLocalizedMessage());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
            setEscapeProcessing(true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
        } catch(SQLException sqle) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   177
             System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setescapeprocessing").toString() +
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
                                sqle.getLocalizedMessage());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
            setConcurrency(ResultSet.CONCUR_UPDATABLE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
        } catch (SQLException sqle) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   184
            System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setconcurrency").toString() +
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
                                sqle.getLocalizedMessage());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
        setTypeMap(null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
            setType(ResultSet.TYPE_SCROLL_INSENSITIVE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
        } catch(SQLException sqle){
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   193
          System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.settype").toString() +
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
                                sqle.getLocalizedMessage());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
        setReadOnly(true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
            setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
        } catch(SQLException sqle){
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   202
            System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.settransactionisolation").toString() +
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
                                sqle.getLocalizedMessage());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
        //Instantiating the vector for MatchColumns
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
9257
53e6d7bc31b0 7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents: 6697
diff changeset
   208
        iMatchColumns = new Vector<Integer>(10);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
        for(int i = 0; i < 10 ; i++) {
6697
39929804f9d4 6989139: Address JDBC Findbugs where Number type Constructor are used
lancea
parents: 6540
diff changeset
   210
           iMatchColumns.add(i,Integer.valueOf(-1));
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
9257
53e6d7bc31b0 7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents: 6697
diff changeset
   213
        strMatchColumns = new Vector<String>(10);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
        for(int j = 0; j < 10; j++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
           strMatchColumns.add(j,null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   220
     * Constructs a default {@code JdbcRowSet} object given a
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   221
     * valid {@code Connection} object. The new
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   222
     * instance of {@code JdbcRowSet} will serve as a proxy for
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   223
     * the {@code ResultSet} object it creates, and by so doing,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
     * it will make it possible to use the result set as a JavaBeans
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
     * component.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
     * <P>
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   227
     * The following is true of a default {@code JdbcRowSet} instance:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
     * <UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
     *   <LI>Does not show deleted rows
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
     *   <LI>Has no time limit for how long a driver may take to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
     *       execute the rowset's command
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
     *   <LI>Has no limit for the number of rows it may contain
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
     *   <LI>Has no limit for the number of bytes a column may contain
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
     *   <LI>Has a scrollable cursor and does not show changes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
     *       made by others
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
     *   <LI>Will not see uncommitted data (make "dirty" reads)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
     *   <LI>Has escape processing turned on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   238
     *   <LI>Has its connection's type map set to {@code null}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   239
     *   <LI>Has an empty {@code Hashtable} object for storing any
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
     *       parameters that are set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
     * </UL>
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   242
     * A newly created {@code JdbcRowSet} object must have its
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   243
     * {@code execute} method invoked before other public methods
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
     * are called on it; otherwise, such method calls will cause an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
     * exception to be thrown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
     * @throws SQLException [1] if any of its public methods are called prior
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   248
     * to calling the {@code execute} method, [2] if invalid JDBC driver
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
     * properties are set, or [3] if no connection to a data source exists.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
    public JdbcRowSetImpl(Connection con) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
        conn = con;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
        ps = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
        rs = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
        try {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   258
           resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
        } catch(IOException ioe) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
            throw new RuntimeException(ioe);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
        initParams();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
        // set the defaults
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
        setShowDeleted(false);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
        setQueryTimeout(0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
        setMaxRows(0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
        setMaxFieldSize(0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
        setParams();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
        setReadOnly(true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
        setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
        setEscapeProcessing(true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
        setTypeMap(null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
        //Instantiating the vector for MatchColumns
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
9257
53e6d7bc31b0 7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents: 6697
diff changeset
   280
        iMatchColumns = new Vector<Integer>(10);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
        for(int i = 0; i < 10 ; i++) {
6697
39929804f9d4 6989139: Address JDBC Findbugs where Number type Constructor are used
lancea
parents: 6540
diff changeset
   282
           iMatchColumns.add(i,Integer.valueOf(-1));
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
9257
53e6d7bc31b0 7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents: 6697
diff changeset
   285
        strMatchColumns = new Vector<String>(10);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
        for(int j = 0; j < 10; j++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
           strMatchColumns.add(j,null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   292
     * Constructs a default {@code JdbcRowSet} object using the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
     * URL, username, and password arguments supplied. The new
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   294
     * instance of {@code JdbcRowSet} will serve as a proxy for
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   295
     * the {@code ResultSet} object it creates, and by so doing,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
     * it will make it possible to use the result set as a JavaBeans
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
     * component.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
     * <P>
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   300
     * The following is true of a default {@code JdbcRowSet} instance:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
     * <UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
     *   <LI>Does not show deleted rows
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
     *   <LI>Has no time limit for how long a driver may take to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
     *       execute the rowset's command
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
     *   <LI>Has no limit for the number of rows it may contain
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
     *   <LI>Has no limit for the number of bytes a column may contain
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
     *   <LI>Has a scrollable cursor and does not show changes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
     *       made by others
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
     *   <LI>Will not see uncommitted data (make "dirty" reads)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
     *   <LI>Has escape processing turned on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   311
     *   <LI>Has its connection's type map set to {@code null}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   312
     *   <LI>Has an empty {@code Hashtable} object for storing any
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
     *       parameters that are set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
     * </UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   316
     * @param url a JDBC URL for the database to which this {@code JdbcRowSet}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
     *        object will be connected. The form for a JDBC URL is
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   318
     *        {@code jdbc:subprotocol:subname}.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   319
     * @param user the database user on whose behalf the connection
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
     *        is being made
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   321
     * @param password the user's password
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
    public JdbcRowSetImpl(String url, String user, String password) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
        conn = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
        ps = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
        rs = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
        try {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   332
           resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
        } catch(IOException ioe) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
            throw new RuntimeException(ioe);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
        initParams();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
        // Pass the arguments to BaseRowSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
        // setter methods now.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
        setUsername(user);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
        setPassword(password);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
        setUrl(url);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
        // set the defaults
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
        setShowDeleted(false);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
        setQueryTimeout(0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
        setMaxRows(0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
        setMaxFieldSize(0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
        setParams();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
        setReadOnly(true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
        setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
        setEscapeProcessing(true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
        setTypeMap(null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
        //Instantiating the vector for MatchColumns
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
9257
53e6d7bc31b0 7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents: 6697
diff changeset
   362
        iMatchColumns = new Vector<Integer>(10);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
        for(int i = 0; i < 10 ; i++) {
6697
39929804f9d4 6989139: Address JDBC Findbugs where Number type Constructor are used
lancea
parents: 6540
diff changeset
   364
           iMatchColumns.add(i,Integer.valueOf(-1));
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
9257
53e6d7bc31b0 7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents: 6697
diff changeset
   367
        strMatchColumns = new Vector<String>(10);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
        for(int j = 0; j < 10; j++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
           strMatchColumns.add(j,null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   375
     * Constructs a {@code JdbcRowSet} object using the given valid
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   376
     * {@code ResultSet} object. The new
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   377
     * instance of {@code JdbcRowSet} will serve as a proxy for
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   378
     * the {@code ResultSet} object, and by so doing,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
     * it will make it possible to use the result set as a JavaBeans
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
     * component.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
     * <P>
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   383
     * The following is true of a default {@code JdbcRowSet} instance:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
     * <UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
     *   <LI>Does not show deleted rows
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
     *   <LI>Has no time limit for how long a driver may take to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
     *       execute the rowset's command
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
     *   <LI>Has no limit for the number of rows it may contain
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
     *   <LI>Has no limit for the number of bytes a column may contain
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
     *   <LI>Has a scrollable cursor and does not show changes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
     *       made by others
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
     *   <LI>Will not see uncommitted data (make "dirty" reads)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
     *   <LI>Has escape processing turned on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   394
     *   <LI>Has its connection's type map set to {@code null}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   395
     *   <LI>Has an empty {@code Hashtable} object for storing any
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
     *       parameters that are set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
     * </UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   399
     * @param res a valid {@code ResultSet} object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
     * @throws SQLException if a database access occurs due to a non
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
     * valid ResultSet handle.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
    public JdbcRowSetImpl(ResultSet res) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
        // A ResultSet handle encapsulates a connection handle.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
        // But there is no way we can retrieve a Connection handle
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
        // from a ResultSet object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
        // So to avoid any anomalies we keep the conn = null
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
        // The passed rs handle will be a wrapper around for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
        // "this" object's all operations.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
        conn = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
        ps = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
        rs = res;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
        try {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   419
           resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
        } catch(IOException ioe) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
            throw new RuntimeException(ioe);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
        initParams();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
        // get the values from the resultset handle.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
        setShowDeleted(false);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
        setQueryTimeout(0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
        setMaxRows(0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
        setMaxFieldSize(0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
        setParams();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
        setReadOnly(true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
        setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
        setEscapeProcessing(true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
        setTypeMap(null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
        // Get a handle to ResultSetMetaData
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
        // Construct RowSetMetaData out of it.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
        resMD = rs.getMetaData();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
        rowsMD = new RowSetMetaDataImpl();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
        initMetaData(rowsMD, resMD);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
        //Instantiating the vector for MatchColumns
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
9257
53e6d7bc31b0 7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents: 6697
diff changeset
   451
        iMatchColumns = new Vector<Integer>(10);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
        for(int i = 0; i < 10 ; i++) {
6697
39929804f9d4 6989139: Address JDBC Findbugs where Number type Constructor are used
lancea
parents: 6540
diff changeset
   453
           iMatchColumns.add(i,Integer.valueOf(-1));
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
9257
53e6d7bc31b0 7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents: 6697
diff changeset
   456
        strMatchColumns = new Vector<String>(10);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
        for(int j = 0; j < 10; j++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
           strMatchColumns.add(j,null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   463
     * Initializes the given {@code RowSetMetaData} object with the values
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   464
     * in the given {@code ResultSetMetaData} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   465
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   466
     * @param md the {@code RowSetMetaData} object for this
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   467
     *           {@code JdbcRowSetImpl} object, which will be set with
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
     *           values from rsmd
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   469
     * @param rsmd the {@code ResultSetMetaData} object from which new
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
     *             values for md will be read
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
     * @throws SQLException if an error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
    protected void initMetaData(RowSetMetaData md, ResultSetMetaData rsmd) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
        int numCols = rsmd.getColumnCount();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
        md.setColumnCount(numCols);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
        for (int col=1; col <= numCols; col++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
            md.setAutoIncrement(col, rsmd.isAutoIncrement(col));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
            md.setCaseSensitive(col, rsmd.isCaseSensitive(col));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
            md.setCurrency(col, rsmd.isCurrency(col));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
            md.setNullable(col, rsmd.isNullable(col));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
            md.setSigned(col, rsmd.isSigned(col));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
            md.setSearchable(col, rsmd.isSearchable(col));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
            md.setColumnDisplaySize(col, rsmd.getColumnDisplaySize(col));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
            md.setColumnLabel(col, rsmd.getColumnLabel(col));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
            md.setColumnName(col, rsmd.getColumnName(col));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
            md.setSchemaName(col, rsmd.getSchemaName(col));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
            md.setPrecision(col, rsmd.getPrecision(col));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
            md.setScale(col, rsmd.getScale(col));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
            md.setTableName(col, rsmd.getTableName(col));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
            md.setCatalogName(col, rsmd.getCatalogName(col));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
            md.setColumnType(col, rsmd.getColumnType(col));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
            md.setColumnTypeName(col, rsmd.getColumnTypeName(col));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   496
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
    protected void checkState() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
        // If all the three i.e.  conn, ps & rs are
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
        // simultaneously null implies we are not connected
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
        // to the db, implies undesirable state so throw exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
        if (conn == null && ps == null && rs == null ) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   505
            throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.invalstate").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   508
90ce3da70b43 Initial load
duke
parents:
diff changeset
   509
    //---------------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
    // Reading and writing data
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
    //---------------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
90ce3da70b43 Initial load
duke
parents:
diff changeset
   513
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   514
     * Creates the internal {@code ResultSet} object for which this
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   515
     * {@code JdbcRowSet} object is a wrapper, effectively
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
     * making the result set a JavaBeans component.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
     * Certain properties must have been set before this method is called
90ce3da70b43 Initial load
duke
parents:
diff changeset
   519
     * so that it can establish a connection to a database and execute the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   520
     * query that will create the result set.  If a {@code DataSource}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   521
     * object will be used to create the connection, properties for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   522
     * data source name, user name, and password must be set.  If the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   523
     * {@code DriverManager} will be used, the properties for the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   524
     * URL, user name, and password must be set.  In either case, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   525
     * property for the command must be set.  If the command has placeholder
90ce3da70b43 Initial load
duke
parents:
diff changeset
   526
     * parameters, those must also be set. This method throws
90ce3da70b43 Initial load
duke
parents:
diff changeset
   527
     * an exception if the required properties are not set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   528
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   529
     * Other properties have default values that may optionally be set
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   530
     * to new values. The {@code execute} method will use the value
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   531
     * for the command property to create a {@code PreparedStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   532
     * object and set its properties (escape processing, maximum field
90ce3da70b43 Initial load
duke
parents:
diff changeset
   533
     * size, maximum number of rows, and query timeout limit) to be those
90ce3da70b43 Initial load
duke
parents:
diff changeset
   534
     * of this rowset.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   535
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   536
     * @throws SQLException if (1) a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   537
     * (2) any required JDBC properties are not set, or (3) if an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   538
     * invalid connection exists.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   539
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   540
    public void execute() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   541
        /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   542
         * To execute based on the properties:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   543
         * i) determine how to get a connection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   544
         * ii) prepare the statement
90ce3da70b43 Initial load
duke
parents:
diff changeset
   545
         * iii) set the properties of the statement
90ce3da70b43 Initial load
duke
parents:
diff changeset
   546
         * iv) parse the params. and set them
90ce3da70b43 Initial load
duke
parents:
diff changeset
   547
         * v) execute the statement
90ce3da70b43 Initial load
duke
parents:
diff changeset
   548
         *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   549
         * During all of this try to tolerate as many errors
90ce3da70b43 Initial load
duke
parents:
diff changeset
   550
         * as possible, many drivers will not support all of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   551
         * the properties and will/should throw SQLException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   552
         * at us...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   553
         *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   554
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   555
90ce3da70b43 Initial load
duke
parents:
diff changeset
   556
        prepare();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   557
90ce3da70b43 Initial load
duke
parents:
diff changeset
   558
        // set the properties of our shiny new statement
90ce3da70b43 Initial load
duke
parents:
diff changeset
   559
        setProperties(ps);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   560
90ce3da70b43 Initial load
duke
parents:
diff changeset
   561
90ce3da70b43 Initial load
duke
parents:
diff changeset
   562
        // set the parameters
90ce3da70b43 Initial load
duke
parents:
diff changeset
   563
        decodeParams(getParams(), ps);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   564
90ce3da70b43 Initial load
duke
parents:
diff changeset
   565
90ce3da70b43 Initial load
duke
parents:
diff changeset
   566
        // execute the statement
90ce3da70b43 Initial load
duke
parents:
diff changeset
   567
        rs = ps.executeQuery();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   568
90ce3da70b43 Initial load
duke
parents:
diff changeset
   569
90ce3da70b43 Initial load
duke
parents:
diff changeset
   570
        // notify listeners
90ce3da70b43 Initial load
duke
parents:
diff changeset
   571
        notifyRowSetChanged();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   572
90ce3da70b43 Initial load
duke
parents:
diff changeset
   573
90ce3da70b43 Initial load
duke
parents:
diff changeset
   574
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   575
90ce3da70b43 Initial load
duke
parents:
diff changeset
   576
    protected void setProperties(PreparedStatement ps) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   577
90ce3da70b43 Initial load
duke
parents:
diff changeset
   578
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   579
            ps.setEscapeProcessing(getEscapeProcessing());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   580
        } catch (SQLException ex) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   581
            System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setescapeprocessing").toString() +
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   582
                                ex.getLocalizedMessage());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   583
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   584
90ce3da70b43 Initial load
duke
parents:
diff changeset
   585
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   586
            ps.setMaxFieldSize(getMaxFieldSize());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   587
        } catch (SQLException ex) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   588
            System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setmaxfieldsize").toString() +
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   589
                                ex.getLocalizedMessage());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   590
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   591
90ce3da70b43 Initial load
duke
parents:
diff changeset
   592
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   593
            ps.setMaxRows(getMaxRows());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   594
        } catch (SQLException ex) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   595
           System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setmaxrows").toString() +
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   596
                                ex.getLocalizedMessage());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   597
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   598
90ce3da70b43 Initial load
duke
parents:
diff changeset
   599
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   600
            ps.setQueryTimeout(getQueryTimeout());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   601
        } catch (SQLException ex) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   602
           System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setquerytimeout").toString() +
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   603
                                ex.getLocalizedMessage());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   604
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   605
90ce3da70b43 Initial load
duke
parents:
diff changeset
   606
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   607
13785
56dc8b1e89ba 7192302: Remove JDBCRowSetImpl dependency on java.beans
lancea
parents: 11129
diff changeset
   608
    private Connection connect() throws SQLException {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   609
90ce3da70b43 Initial load
duke
parents:
diff changeset
   610
        // Get a JDBC connection.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   611
90ce3da70b43 Initial load
duke
parents:
diff changeset
   612
        // First check for Connection handle object as such if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   613
        // "this" initialized  using conn.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   614
90ce3da70b43 Initial load
duke
parents:
diff changeset
   615
        if(conn != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   616
            return conn;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   617
90ce3da70b43 Initial load
duke
parents:
diff changeset
   618
        } else if (getDataSourceName() != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   619
90ce3da70b43 Initial load
duke
parents:
diff changeset
   620
            // Connect using JNDI.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   621
            try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   622
                Context ctx = new InitialContext();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   623
                DataSource ds = (DataSource)ctx.lookup
90ce3da70b43 Initial load
duke
parents:
diff changeset
   624
                    (getDataSourceName());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   625
                //return ds.getConnection(getUsername(),getPassword());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   626
52902
e3398b2e1ab0 8214971: Replace use of string.equals("") with isEmpty()
rriggs
parents: 47216
diff changeset
   627
                if(getUsername() != null && !getUsername().isEmpty()) {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   628
                     return ds.getConnection(getUsername(),getPassword());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   629
                } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   630
                     return ds.getConnection();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   631
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   632
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   633
            catch (javax.naming.NamingException ex) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   634
                throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.connect").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   635
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   636
90ce3da70b43 Initial load
duke
parents:
diff changeset
   637
        } else if (getUrl() != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   638
            // Check only for getUrl() != null because
90ce3da70b43 Initial load
duke
parents:
diff changeset
   639
            // user, passwd can be null
90ce3da70b43 Initial load
duke
parents:
diff changeset
   640
            // Connect using the driver manager.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   641
90ce3da70b43 Initial load
duke
parents:
diff changeset
   642
            return DriverManager.getConnection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   643
                    (getUrl(), getUsername(), getPassword());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   644
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   645
        else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   646
            return null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   647
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   648
90ce3da70b43 Initial load
duke
parents:
diff changeset
   649
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   650
90ce3da70b43 Initial load
duke
parents:
diff changeset
   651
90ce3da70b43 Initial load
duke
parents:
diff changeset
   652
    protected PreparedStatement prepare() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   653
        // get a connection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   654
        conn = connect();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   655
90ce3da70b43 Initial load
duke
parents:
diff changeset
   656
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   657
9257
53e6d7bc31b0 7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents: 6697
diff changeset
   658
            Map<String, Class<?>> aMap = getTypeMap();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   659
            if( aMap != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   660
                conn.setTypeMap(aMap);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   661
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   662
            ps = conn.prepareStatement(getCommand(),ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   663
        } catch (SQLException ex) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   664
            System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.prepare").toString() +
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   665
                                ex.getLocalizedMessage());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   666
90ce3da70b43 Initial load
duke
parents:
diff changeset
   667
            if (ps != null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   668
                ps.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   669
            if (conn != null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   670
                conn.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   671
90ce3da70b43 Initial load
duke
parents:
diff changeset
   672
            throw new SQLException(ex.getMessage());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   673
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   674
90ce3da70b43 Initial load
duke
parents:
diff changeset
   675
        return ps;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   676
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   677
11129
f9ad1aadf3fa 7116445: Miscellaneous warnings in the JDBC/RowSet classes
lancea
parents: 9257
diff changeset
   678
    @SuppressWarnings("deprecation")
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   679
    private void decodeParams(Object[] params, PreparedStatement ps)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   680
    throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   681
90ce3da70b43 Initial load
duke
parents:
diff changeset
   682
    // There is a corresponding decodeParams in JdbcRowSetImpl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   683
    // which does the same as this method. This is a design flaw.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   684
    // Update the CachedRowsetReader.decodeParams when you update
90ce3da70b43 Initial load
duke
parents:
diff changeset
   685
    // this method.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   686
90ce3da70b43 Initial load
duke
parents:
diff changeset
   687
    // Adding the same comments to CachedRowsetReader.decodeParams.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   688
90ce3da70b43 Initial load
duke
parents:
diff changeset
   689
        int arraySize;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   690
        Object[] param = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   691
90ce3da70b43 Initial load
duke
parents:
diff changeset
   692
        for (int i=0; i < params.length; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   693
            if (params[i] instanceof Object[]) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   694
                param = (Object[])params[i];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   695
90ce3da70b43 Initial load
duke
parents:
diff changeset
   696
                if (param.length == 2) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   697
                    if (param[0] == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   698
                        ps.setNull(i + 1, ((Integer)param[1]).intValue());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   699
                        continue;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   700
                    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   701
90ce3da70b43 Initial load
duke
parents:
diff changeset
   702
                    if (param[0] instanceof java.sql.Date ||
90ce3da70b43 Initial load
duke
parents:
diff changeset
   703
                        param[0] instanceof java.sql.Time ||
90ce3da70b43 Initial load
duke
parents:
diff changeset
   704
                        param[0] instanceof java.sql.Timestamp) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   705
                        System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.detecteddate"));
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   706
                        if (param[1] instanceof java.util.Calendar) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   707
                            System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.detectedcalendar"));
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   708
                            ps.setDate(i + 1, (java.sql.Date)param[0],
90ce3da70b43 Initial load
duke
parents:
diff changeset
   709
                                       (java.util.Calendar)param[1]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   710
                            continue;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   711
                        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   712
                        else {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   713
                            throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.paramtype").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   714
                        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   715
                    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   716
90ce3da70b43 Initial load
duke
parents:
diff changeset
   717
                    if (param[0] instanceof Reader) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   718
                        ps.setCharacterStream(i + 1, (Reader)param[0],
90ce3da70b43 Initial load
duke
parents:
diff changeset
   719
                                              ((Integer)param[1]).intValue());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   720
                        continue;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   721
                    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   722
90ce3da70b43 Initial load
duke
parents:
diff changeset
   723
                    /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   724
                     * What's left should be setObject(int, Object, scale)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   725
                     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   726
                    if (param[1] instanceof Integer) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   727
                        ps.setObject(i + 1, param[0], ((Integer)param[1]).intValue());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   728
                        continue;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   729
                    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   730
90ce3da70b43 Initial load
duke
parents:
diff changeset
   731
                } else if (param.length == 3) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   732
90ce3da70b43 Initial load
duke
parents:
diff changeset
   733
                    if (param[0] == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   734
                        ps.setNull(i + 1, ((Integer)param[1]).intValue(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   735
                                   (String)param[2]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   736
                        continue;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   737
                    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   738
90ce3da70b43 Initial load
duke
parents:
diff changeset
   739
                    if (param[0] instanceof java.io.InputStream) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   740
                        switch (((Integer)param[2]).intValue()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   741
                        case JdbcRowSetImpl.UNICODE_STREAM_PARAM:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   742
                            ps.setUnicodeStream(i + 1,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   743
                                                (java.io.InputStream)param[0],
90ce3da70b43 Initial load
duke
parents:
diff changeset
   744
                                                ((Integer)param[1]).intValue());
11129
f9ad1aadf3fa 7116445: Miscellaneous warnings in the JDBC/RowSet classes
lancea
parents: 9257
diff changeset
   745
                            break;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   746
                        case JdbcRowSetImpl.BINARY_STREAM_PARAM:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   747
                            ps.setBinaryStream(i + 1,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   748
                                               (java.io.InputStream)param[0],
90ce3da70b43 Initial load
duke
parents:
diff changeset
   749
                                               ((Integer)param[1]).intValue());
11129
f9ad1aadf3fa 7116445: Miscellaneous warnings in the JDBC/RowSet classes
lancea
parents: 9257
diff changeset
   750
                            break;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   751
                        case JdbcRowSetImpl.ASCII_STREAM_PARAM:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   752
                            ps.setAsciiStream(i + 1,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   753
                                              (java.io.InputStream)param[0],
90ce3da70b43 Initial load
duke
parents:
diff changeset
   754
                                              ((Integer)param[1]).intValue());
11129
f9ad1aadf3fa 7116445: Miscellaneous warnings in the JDBC/RowSet classes
lancea
parents: 9257
diff changeset
   755
                            break;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   756
                        default:
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   757
                            throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.paramtype").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   758
                        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   759
                    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   760
90ce3da70b43 Initial load
duke
parents:
diff changeset
   761
                    /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   762
                     * no point at looking at the first element now;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   763
                     * what's left must be the setObject() cases.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   764
                     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   765
                    if (param[1] instanceof Integer && param[2] instanceof Integer) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   766
                        ps.setObject(i + 1, param[0], ((Integer)param[1]).intValue(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   767
                                     ((Integer)param[2]).intValue());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   768
                        continue;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   769
                    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   770
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   771
                    throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.paramtype").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   772
90ce3da70b43 Initial load
duke
parents:
diff changeset
   773
                } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   774
                    // common case - this catches all SQL92 types
90ce3da70b43 Initial load
duke
parents:
diff changeset
   775
                    ps.setObject(i + 1, params[i]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   776
                    continue;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   777
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   778
            }  else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   779
               // Try to get all the params to be set here
90ce3da70b43 Initial load
duke
parents:
diff changeset
   780
               ps.setObject(i + 1, params[i]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   781
90ce3da70b43 Initial load
duke
parents:
diff changeset
   782
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   783
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   784
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   785
90ce3da70b43 Initial load
duke
parents:
diff changeset
   786
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   787
     * Moves the cursor for this rowset's {@code ResultSet}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   788
     * object down one row from its current position.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   789
     * A {@code ResultSet} cursor is initially positioned
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   790
     * before the first row; the first call to the method
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   791
     * {@code next} makes the first row the current row; the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   792
     * second call makes the second row the current row, and so on.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   793
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   794
     * <P>If an input stream is open for the current row, a call
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   795
     * to the method {@code next} will
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   796
     * implicitly close it. A {@code ResultSet} object's
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   797
     * warning chain is cleared when a new row is read.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   798
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   799
     * @return {@code true} if the new current row is valid;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   800
     *         {@code false} if there are no more rows
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   801
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   802
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   803
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   804
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   805
    public boolean next() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   806
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   807
90ce3da70b43 Initial load
duke
parents:
diff changeset
   808
        boolean b = rs.next();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   809
        notifyCursorMoved();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   810
        return b;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   811
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   812
90ce3da70b43 Initial load
duke
parents:
diff changeset
   813
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   814
     * Releases this rowset's {@code ResultSet} object's database and
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   815
     * JDBC resources immediately instead of waiting for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   816
     * this to happen when it is automatically closed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   817
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   818
     * <P><B>Note:</B> A {@code ResultSet} object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   819
     * is automatically closed by the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   820
     * {@code Statement} object that generated it when
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   821
     * that {@code Statement} object is closed,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   822
     * re-executed, or is used to retrieve the next result from a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   823
     * sequence of multiple results. A {@code ResultSet} object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   824
     * is also automatically closed when it is garbage collected.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   825
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   826
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   827
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   828
    public void close() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   829
        if (rs != null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   830
            rs.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   831
        if (ps != null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   832
            ps.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   833
        if (conn != null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   834
            conn.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   835
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   836
90ce3da70b43 Initial load
duke
parents:
diff changeset
   837
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   838
     * Reports whether the last column read from this rowset's
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   839
     * {@code ResultSet} object had a value of SQL {@code NULL}.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   840
     * Note that you must first call one of the {@code getXXX} methods
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   841
     * on a column to try to read its value and then call
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   842
     * the method {@code wasNull} to see if the value read was
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   843
     * SQL {@code NULL}.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   844
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   845
     * @return {@code true} if the last column value read was SQL
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   846
     *         {@code NULL} and {@code false} otherwise
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   847
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   848
     *            or this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   849
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   850
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   851
    public boolean wasNull() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   852
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   853
90ce3da70b43 Initial load
duke
parents:
diff changeset
   854
        return rs.wasNull();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   855
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   856
90ce3da70b43 Initial load
duke
parents:
diff changeset
   857
    //======================================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   858
    // Methods for accessing results by column index
90ce3da70b43 Initial load
duke
parents:
diff changeset
   859
    //======================================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   860
90ce3da70b43 Initial load
duke
parents:
diff changeset
   861
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   862
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   863
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   864
     * a {@code String}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   865
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   866
     * @param columnIndex the first column is 1, the second is 2, and so on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   867
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   868
     *         value returned is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   869
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   870
     *            or (2) this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   871
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   872
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   873
    public String getString(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   874
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   875
90ce3da70b43 Initial load
duke
parents:
diff changeset
   876
        return rs.getString(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   877
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   878
90ce3da70b43 Initial load
duke
parents:
diff changeset
   879
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   880
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   881
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   882
     * a {@code boolean}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   883
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   884
     * @param columnIndex the first column is 1, the second is 2, and so on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   885
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   886
     *         value returned is {@code false}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   887
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   888
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   889
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   890
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   891
    public boolean getBoolean(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   892
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   893
90ce3da70b43 Initial load
duke
parents:
diff changeset
   894
        return rs.getBoolean(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   895
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   896
90ce3da70b43 Initial load
duke
parents:
diff changeset
   897
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   898
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   899
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   900
     * a {@code byte}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   901
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   902
     * @param columnIndex the first column is 1, the second is 2, and so on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   903
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   904
     *         value returned is {@code 0}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   905
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   906
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   907
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   908
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   909
    public byte getByte(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   910
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   911
90ce3da70b43 Initial load
duke
parents:
diff changeset
   912
        return rs.getByte(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   913
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   914
90ce3da70b43 Initial load
duke
parents:
diff changeset
   915
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   916
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   917
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   918
     * a {@code short}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   919
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   920
     * @param columnIndex the first column is 1, the second is 2, and so on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   921
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   922
     *         value returned is {@code 0}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   923
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   924
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   925
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   926
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   927
    public short getShort(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   928
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   929
90ce3da70b43 Initial load
duke
parents:
diff changeset
   930
        return rs.getShort(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   931
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   932
90ce3da70b43 Initial load
duke
parents:
diff changeset
   933
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   934
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   935
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   936
     * an {@code int}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   937
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   938
     * @param columnIndex the first column is 1, the second is 2, and so on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   939
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   940
     *         value returned is {@code 0}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   941
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   942
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   943
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   944
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   945
    public int getInt(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   946
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   947
90ce3da70b43 Initial load
duke
parents:
diff changeset
   948
        return rs.getInt(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   949
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   950
90ce3da70b43 Initial load
duke
parents:
diff changeset
   951
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   952
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   953
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   954
     * a {@code long}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   955
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   956
     * @param columnIndex the first column is 1, the second is 2, and so on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   957
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   958
     *         value returned is {@code 0}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   959
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   960
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   961
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   962
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   963
    public long getLong(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   964
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   965
90ce3da70b43 Initial load
duke
parents:
diff changeset
   966
        return rs.getLong(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   967
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   968
90ce3da70b43 Initial load
duke
parents:
diff changeset
   969
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   970
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   971
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   972
     * a {@code float}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   973
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   974
     * @param columnIndex the first column is 1, the second is 2, and so on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   975
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   976
     *         value returned is {@code 0}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   977
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   978
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   979
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   980
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   981
    public float getFloat(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   982
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   983
90ce3da70b43 Initial load
duke
parents:
diff changeset
   984
        return rs.getFloat(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   985
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   986
90ce3da70b43 Initial load
duke
parents:
diff changeset
   987
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   988
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   989
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   990
     * a {@code double}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   991
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   992
     * @param columnIndex the first column is 1, the second is 2, and so on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   993
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
   994
     *         value returned is {@code 0}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   995
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   996
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   997
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   998
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   999
    public double getDouble(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1000
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1001
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1002
        return rs.getDouble(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1003
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1004
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1005
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1006
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1007
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1008
     * a {@code java.sql.BigDecimal}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1009
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1010
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1011
     * @param scale the number of digits to the right of the decimal point
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1012
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1013
     *         value returned is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1014
     * @throws SQLException if (1) database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1015
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1016
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1017
     * @deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1018
     */
14171
94eb36844bd7 7197395: Add @Deprecated to all deprecated methods to eliminate compiler warnings in JDBC
lancea
parents: 13785
diff changeset
  1019
    @Deprecated
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1020
    public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1021
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1022
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1023
        return rs.getBigDecimal(columnIndex, scale);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1024
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1025
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1026
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1027
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1028
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1029
     * a {@code byte} array in the Java programming language.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1030
     * The bytes represent the raw values returned by the driver.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1031
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1032
     * @param columnIndex the first column is 1, the second is 2, and so on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1033
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1034
     *         value returned is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1035
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1036
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1037
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1038
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1039
    public byte[] getBytes(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1040
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1041
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1042
        return rs.getBytes(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1043
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1044
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1045
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1046
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1047
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1048
     * a {@code java.sql.Date} object in the Java programming language.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1049
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1050
     * @param columnIndex the first column is 1, the second is 2, and so on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1051
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1052
     *         value returned is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1053
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1054
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1055
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1056
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1057
    public java.sql.Date getDate(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1058
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1059
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1060
        return rs.getDate(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1061
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1062
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1063
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1064
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1065
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1066
     * a {@code java.sql.Time} object in the Java programming language.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1067
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1068
     * @param columnIndex the first column is 1, the second is 2, and so on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1069
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1070
     *         value returned is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1071
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1072
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1073
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1074
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1075
    public java.sql.Time getTime(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1076
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1077
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1078
        return rs.getTime(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1079
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1080
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1081
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1082
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1083
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1084
     * a {@code java.sql.Timestamp} object in the Java programming language.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1085
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1086
     * @param columnIndex the first column is 1, the second is 2, and so on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1087
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1088
     *         value returned is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1089
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1090
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1091
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1092
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1093
    public java.sql.Timestamp getTimestamp(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1094
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1095
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1096
        return rs.getTimestamp(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1097
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1098
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1099
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1100
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1101
     * of this rowset's {@code ResultSet} object as
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1102
     * a stream of ASCII characters. The value can then be read in chunks from the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1103
     * stream. This method is particularly
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1104
     * suitable for retrieving large {@code LONGVARCHAR} values.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1105
     * The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1106
     * do any necessary conversion from the database format into ASCII.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1107
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1108
     * <P><B>Note:</B> All the data in the returned stream must be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1109
     * read prior to getting the value of any other column. The next
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1110
     * call to a {@code getXXX} method implicitly closes the stream.  Also, a
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1111
     * stream may return {@code 0} when the method
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1112
     * {@code InputStream.available}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1113
     * is called whether there is data available or not.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1114
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1115
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1116
     * @return a Java input stream that delivers the database column value
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1117
     *         as a stream of one-byte ASCII characters;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1118
     *         if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1119
     *         value returned is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1120
     * @throws SQLException if (1) database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1121
     *            (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1122
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1123
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1124
    public java.io.InputStream getAsciiStream(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1125
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1126
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1127
        return rs.getAsciiStream(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1128
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1129
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1130
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1131
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1132
     * of this rowset's {@code ResultSet} object as
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1133
     * as a stream of Unicode characters.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1134
     * The value can then be read in chunks from the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1135
     * stream. This method is particularly
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1136
     * suitable for retrieving large{@code LONGVARCHAR}values.  The JDBC driver will
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1137
     * do any necessary conversion from the database format into Unicode.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1138
     * The byte format of the Unicode stream must be Java UTF-8,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1139
     * as specified in the Java virtual machine specification.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1140
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1141
     * <P><B>Note:</B> All the data in the returned stream must be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1142
     * read prior to getting the value of any other column. The next
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1143
     * call to a {@code getXXX} method implicitly closes the stream.  Also, a
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1144
     * stream may return {@code 0} when the method
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1145
     * {@code InputStream.available}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1146
     * is called whether there is data available or not.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1147
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1148
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1149
     * @return a Java input stream that delivers the database column value
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1150
     *         as a stream in Java UTF-8 byte format;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1151
     *         if the value is SQL {@code NULL}, the value returned is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1152
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1153
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1154
     *            prepared statement, and result set
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1155
     * @deprecated use {@code getCharacterStream} in place of
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1156
     *              {@code getUnicodeStream}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1157
     */
14171
94eb36844bd7 7197395: Add @Deprecated to all deprecated methods to eliminate compiler warnings in JDBC
lancea
parents: 13785
diff changeset
  1158
    @Deprecated
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1159
    public java.io.InputStream getUnicodeStream(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1160
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1161
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1162
        return rs.getUnicodeStream(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1163
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1164
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1165
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1166
     * Gets the value of a column in the current row as a stream of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1167
     * the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1168
     * of this rowset's {@code ResultSet} object as a binary stream of
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1169
     * uninterpreted bytes. The value can then be read in chunks from the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1170
     * stream. This method is particularly
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1171
     * suitable for retrieving large {@code LONGVARBINARY} values.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1172
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1173
     * <P><B>Note:</B> All the data in the returned stream must be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1174
     * read prior to getting the value of any other column. The next
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1175
     * call to a {@code getXXX} method implicitly closes the stream.  Also, a
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1176
     * stream may return {@code 0} when the method
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1177
     * {@code InputStream.available}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1178
     * is called whether there is data available or not.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1179
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1180
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1181
     * @return a Java input stream that delivers the database column value
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1182
     *         as a stream of uninterpreted bytes;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1183
     *         if the value is SQL {@code NULL}, the value returned is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1184
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1185
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1186
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1187
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1188
    public java.io.InputStream getBinaryStream(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1189
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1190
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1191
        return rs.getBinaryStream(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1192
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1193
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1194
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1195
    //======================================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1196
    // Methods for accessing results by column name
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1197
    //======================================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1198
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1199
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1200
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1201
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1202
     * a {@code String}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1203
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1204
     * @param columnName the SQL name of the column
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1205
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1206
     *         value returned is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1207
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1208
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1209
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1210
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1211
    public String getString(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1212
        return getString(findColumn(columnName));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1213
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1214
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1215
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1216
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1217
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1218
     * a {@code boolean}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1219
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1220
     * @param columnName the SQL name of the column
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1221
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1222
     *         value returned is {@code false}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1223
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1224
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1225
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1226
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1227
    public boolean getBoolean(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1228
        return getBoolean(findColumn(columnName));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1229
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1230
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1231
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1232
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1233
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1234
     * a {@code byte}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1235
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1236
     * @param columnName the SQL name of the column
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1237
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1238
     *         value returned is {@code 0}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1239
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1240
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1241
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1242
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1243
    public byte getByte(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1244
        return getByte(findColumn(columnName));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1245
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1246
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1247
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1248
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1249
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1250
     * a {@code short}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1251
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1252
     * @param columnName the SQL name of the column
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1253
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1254
     *         value returned is {@code 0}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1255
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1256
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1257
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1258
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1259
    public short getShort(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1260
        return getShort(findColumn(columnName));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1261
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1262
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1263
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1264
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1265
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1266
     * an {@code int}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1267
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1268
     * @param columnName the SQL name of the column
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1269
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1270
     *         value returned is {@code 0}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1271
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1272
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1273
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1274
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1275
    public int getInt(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1276
        return getInt(findColumn(columnName));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1277
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1278
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1279
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1280
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1281
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1282
     * a {@code long}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1283
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1284
     * @param columnName the SQL name of the column
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1285
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1286
     *         value returned is {@code 0}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1287
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1288
     *            or this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1289
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1290
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1291
    public long getLong(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1292
        return getLong(findColumn(columnName));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1293
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1294
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1295
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1296
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1297
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1298
     * a {@code float}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1299
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1300
     * @param columnName the SQL name of the column
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1301
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1302
     *         value returned is {@code 0}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1303
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1304
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1305
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1306
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1307
    public float getFloat(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1308
        return getFloat(findColumn(columnName));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1309
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1310
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1311
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1312
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1313
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1314
     * a {@code double}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1315
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1316
     * @param columnName the SQL name of the column
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1317
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1318
     *         value returned is {@code 0}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1319
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1320
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1321
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1322
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1323
    public double getDouble(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1324
        return getDouble(findColumn(columnName));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1325
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1326
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1327
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1328
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1329
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1330
     * a {@code java.math.BigDecimal}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1331
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1332
     * @param columnName the SQL name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1333
     * @param scale the number of digits to the right of the decimal point
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1334
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1335
     * value returned is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1336
     * @throws SQLException if (1) adatabase access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1337
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1338
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1339
     * @deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1340
     */
14171
94eb36844bd7 7197395: Add @Deprecated to all deprecated methods to eliminate compiler warnings in JDBC
lancea
parents: 13785
diff changeset
  1341
    @Deprecated
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1342
    public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1343
        return getBigDecimal(findColumn(columnName), scale);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1344
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1345
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1346
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1347
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1348
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1349
     * a {@code byte} array in the Java programming language.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1350
     * The bytes represent the raw values returned by the driver.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1351
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1352
     * @param columnName the SQL name of the column
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1353
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1354
     *         value returned is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1355
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1356
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1357
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1358
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1359
    public byte[] getBytes(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1360
        return getBytes(findColumn(columnName));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1361
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1362
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1363
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1364
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1365
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1366
     * a {@code java.sql.Date} object in the Java programming language.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1367
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1368
     * @param columnName the SQL name of the column
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1369
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1370
     *         value returned is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1371
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1372
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1373
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1374
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1375
    public java.sql.Date getDate(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1376
        return getDate(findColumn(columnName));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1377
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1378
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1379
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1380
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1381
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1382
     * a {@code java.sql.Time} object in the Java programming language.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1383
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1384
     * @param columnName the SQL name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1385
     * @return the column value;
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1386
     * if the value is SQL {@code NULL},
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1387
     * the value returned is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1388
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1389
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1390
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1391
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1392
    public java.sql.Time getTime(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1393
        return getTime(findColumn(columnName));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1394
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1395
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1396
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1397
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1398
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1399
     * a {@code java.sql.Timestamp} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1400
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1401
     * @param columnName the SQL name of the column
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1402
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1403
     * value returned is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1404
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1405
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1406
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1407
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1408
    public java.sql.Timestamp getTimestamp(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1409
        return getTimestamp(findColumn(columnName));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1410
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1411
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1412
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1413
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1414
     * of this rowset's {@code ResultSet} object as a stream of
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1415
     * ASCII characters. The value can then be read in chunks from the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1416
     * stream. This method is particularly
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1417
     * suitable for retrieving large {@code LONGVARCHAR} values.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1418
     * The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1419
     * do any necessary conversion from the database format into ASCII.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1420
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1421
     * <P><B>Note:</B> All the data in the returned stream must be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1422
     * read prior to getting the value of any other column. The next
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1423
     * call to a {@code getXXX} method implicitly closes the stream. Also, a
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1424
     * stream may return {@code 0} when the method {@code available}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1425
     * is called whether there is data available or not.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1426
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1427
     * @param columnName the SQL name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1428
     * @return a Java input stream that delivers the database column value
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1429
     *         as a stream of one-byte ASCII characters.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1430
     *         If the value is SQL {@code NULL},
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1431
     *         the value returned is {@code null}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1432
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1433
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1434
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1435
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1436
    public java.io.InputStream getAsciiStream(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1437
        return getAsciiStream(findColumn(columnName));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1438
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1439
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1440
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1441
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1442
     * of this rowset's {@code ResultSet} object as a stream of
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1443
     * Unicode characters. The value can then be read in chunks from the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1444
     * stream. This method is particularly
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1445
     * suitable for retrieving large {@code LONGVARCHAR} values.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1446
     * The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1447
     * do any necessary conversion from the database format into Unicode.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1448
     * The byte format of the Unicode stream must be Java UTF-8,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1449
     * as defined in the Java virtual machine specification.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1450
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1451
     * <P><B>Note:</B> All the data in the returned stream must be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1452
     * read prior to getting the value of any other column. The next
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1453
     * call to a {@code getXXX} method implicitly closes the stream. Also, a
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1454
     * stream may return {@code 0} when the method {@code available}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1455
     * is called whether there is data available or not.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1456
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1457
     * @param columnName the SQL name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1458
     * @return a Java input stream that delivers the database column value
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1459
     *         as a stream of two-byte Unicode characters.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1460
     *         If the value is SQL {@code NULL},
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1461
     *         the value returned is {@code null}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1462
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1463
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1464
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1465
     * @deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1466
     */
14171
94eb36844bd7 7197395: Add @Deprecated to all deprecated methods to eliminate compiler warnings in JDBC
lancea
parents: 13785
diff changeset
  1467
    @Deprecated
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1468
    public java.io.InputStream getUnicodeStream(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1469
        return getUnicodeStream(findColumn(columnName));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1470
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1471
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1472
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1473
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1474
     * of this rowset's {@code ResultSet} object as a stream of uninterpreted
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1475
     * {@code byte}s.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1476
     * The value can then be read in chunks from the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1477
     * stream. This method is particularly
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1478
     * suitable for retrieving large {@code LONGVARBINARY}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1479
     * values.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1480
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1481
     * <P><B>Note:</B> All the data in the returned stream must be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1482
     * read prior to getting the value of any other column. The next
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1483
     * call to a {@code getXXX} method implicitly closes the stream. Also, a
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1484
     * stream may return {@code 0} when the method {@code available}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1485
     * is called whether there is data available or not.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1486
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1487
     * @param columnName the SQL name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1488
     * @return a Java input stream that delivers the database column value
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1489
     *         as a stream of uninterpreted bytes;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1490
     *         if the value is SQL {@code NULL}, the result is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1491
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1492
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1493
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1494
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1495
    public java.io.InputStream getBinaryStream(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1496
        return getBinaryStream(findColumn(columnName));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1497
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1498
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1499
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1500
    //=====================================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1501
    // Advanced features:
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1502
    //=====================================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1503
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1504
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1505
     * Returns the first warning reported by calls on this rowset's
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1506
     * {@code ResultSet} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1507
     * Subsequent warnings on this rowset's {@code ResultSet} object
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1508
     * will be chained to the {@code SQLWarning} object that
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1509
     * this method returns.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1510
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1511
     * <P>The warning chain is automatically cleared each time a new
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1512
     * row is read.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1513
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1514
     * <P><B>Note:</B> This warning chain only covers warnings caused
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1515
     * by {@code ResultSet} methods.  Any warning caused by
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1516
     * {@code Statement} methods
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1517
     * (such as reading OUT parameters) will be chained on the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1518
     * {@code Statement} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1519
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1520
     * @return the first {@code SQLWarning} object reported or {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1521
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1522
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1523
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1524
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1525
    public SQLWarning getWarnings() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1526
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1527
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1528
        return rs.getWarnings();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1529
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1530
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1531
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1532
     * Clears all warnings reported on this rowset's {@code ResultSet} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1533
     * After this method is called, the method {@code getWarnings}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1534
     * returns {@code null} until a new warning is
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1535
     * reported for this rowset's {@code ResultSet} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1536
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1537
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1538
     *            or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1539
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1540
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1541
    public void clearWarnings() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1542
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1543
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1544
        rs.clearWarnings();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1545
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1546
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1547
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1548
     * Gets the name of the SQL cursor used by this rowset's {@code ResultSet}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1549
     * object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1550
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1551
     * <P>In SQL, a result table is retrieved through a cursor that is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1552
     * named. The current row of a result set can be updated or deleted
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1553
     * using a positioned update/delete statement that references the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1554
     * cursor name. To insure that the cursor has the proper isolation
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1555
     * level to support update, the cursor's {@code select} statement should be
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1556
     * of the form 'select for update'. If the 'for update' clause is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1557
     * omitted, the positioned updates may fail.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1558
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1559
     * <P>The JDBC API supports this SQL feature by providing the name of the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1560
     * SQL cursor used by a {@code ResultSet} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1561
     * The current row of a {@code ResultSet} object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1562
     * is also the current row of this SQL cursor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1563
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1564
     * <P><B>Note:</B> If positioned update is not supported, a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1565
     * {@code SQLException} is thrown.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1566
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1567
     * @return the SQL name for this rowset's {@code ResultSet} object's cursor
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1568
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1569
     *            or (2) xthis rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1570
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1571
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1572
    public String getCursorName() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1573
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1574
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1575
        return rs.getCursorName();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1576
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1577
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1578
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1579
     * Retrieves the  number, types and properties of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1580
     * this rowset's {@code ResultSet} object's columns.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1581
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1582
     * @return the description of this rowset's {@code ResultSet}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1583
     *     object's columns
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1584
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1585
     *     or (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1586
     *     prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1587
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1588
    public ResultSetMetaData getMetaData() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1589
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1590
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1591
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1592
        // It may be the case that JdbcRowSet might not have been
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1593
        // initialized with ResultSet handle and may be by PreparedStatement
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1594
        // internally when we set JdbcRowSet.setCommand().
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1595
        // We may require all the basic properties of setEscapeProcessing
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1596
        // setMaxFieldSize etc. which an application can use before we call
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1597
        // execute.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1598
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1599
             checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1600
        } catch(SQLException sqle) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1601
             prepare();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1602
             // will return ResultSetMetaData
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1603
             return ps.getMetaData();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1604
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1605
        return rs.getMetaData();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1606
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1607
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1608
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1609
     * <p>Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1610
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1611
     * an {@code Object}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1612
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1613
     * <p>This method will return the value of the given column as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1614
     * Java object.  The type of the Java object will be the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1615
     * Java object type corresponding to the column's SQL type,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1616
     * following the mapping for built-in types specified in the JDBC
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1617
     * specification.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1618
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1619
     * <p>This method may also be used to read datatabase-specific
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1620
     * abstract data types.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1621
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1622
     * In the JDBC 3.0 API, the behavior of method
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1623
     * {@code getObject} is extended to materialize
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1624
     * data of SQL user-defined types.  When a column contains
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1625
     * a structured or distinct value, the behavior of this method is as
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1626
     * if it were a call to: {@code getObject(columnIndex,
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1627
     * this.getStatement().getConnection().getTypeMap())}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1628
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1629
     * @param columnIndex the first column is 1, the second is 2, and so on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1630
     * @return a {@code java.lang.Object} holding the column value
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1631
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1632
     *            or (2) this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1633
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1634
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1635
    public Object getObject(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1636
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1637
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1638
        return rs.getObject(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1639
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1640
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1641
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1642
     * <p>Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1643
     * of this rowset's {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1644
     * an {@code Object}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1645
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1646
     * <p>This method will return the value of the given column as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1647
     * Java object.  The type of the Java object will be the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1648
     * Java object type corresponding to the column's SQL type,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1649
     * following the mapping for built-in types specified in the JDBC
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1650
     * specification.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1651
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1652
     * <p>This method may also be used to read datatabase-specific
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1653
     * abstract data types.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1654
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1655
     * In the JDBC 3.0 API, the behavior of the method
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1656
     * {@code getObject} is extended to materialize
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1657
     * data of SQL user-defined types.  When a column contains
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1658
     * a structured or distinct value, the behavior of this method is as
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1659
     * if it were a call to: {@code getObject(columnIndex,
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1660
     * this.getStatement().getConnection().getTypeMap())}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1661
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1662
     * @param columnName the SQL name of the column
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1663
     * @return a {@code java.lang.Object} holding the column value
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1664
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1665
     *            or (2) this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1666
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1667
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1668
    public Object getObject(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1669
        return getObject(findColumn(columnName));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1670
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1671
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1672
    //----------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1673
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1674
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1675
     * Maps the given {@code JdbcRowSetImpl} column name to its
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1676
     * {@code JdbcRowSetImpl} column index and reflects this on
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1677
     * the internal {@code ResultSet} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1678
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1679
     * @param columnName the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1680
     * @return the column index of the given column name
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1681
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1682
     * (2) this rowset does not have a currently valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1683
     * prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1684
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1685
    public int findColumn(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1686
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1687
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1688
        return rs.findColumn(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1689
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1690
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1691
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1692
    //--------------------------JDBC 2.0-----------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1693
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1694
    //---------------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1695
    // Getters and Setters
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1696
    //---------------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1697
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1698
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1699
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1700
     * of this rowset's {@code ResultSet} object as a
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1701
     * {@code java.io.Reader} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1702
     * @return a {@code java.io.Reader} object that contains the column
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1703
     * value; if the value is SQL {@code NULL}, the value returned is
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1704
     * {@code null}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1705
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1706
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1707
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1708
    public java.io.Reader getCharacterStream(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1709
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1710
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1711
        return rs.getCharacterStream(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1712
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1713
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1714
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1715
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1716
     * of this rowset's {@code ResultSet} object as a
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1717
     * {@code java.io.Reader} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1718
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1719
     * @return a {@code java.io.Reader} object that contains the column
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1720
     * value; if the value is SQL {@code NULL}, the value returned is
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1721
     * {@code null}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1722
     * @param columnName the name of the column
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1723
     * @return the value in the specified column as a {@code java.io.Reader}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1724
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1725
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1726
    public java.io.Reader getCharacterStream(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1727
        return getCharacterStream(findColumn(columnName));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1728
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1729
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1730
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1731
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1732
     * of this rowset's {@code ResultSet} object as a
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1733
     * {@code java.math.BigDecimal} with full precision.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1734
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1735
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1736
     * @return the column value (full precision);
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1737
     *         if the value is SQL {@code NULL}, the value returned is
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1738
     *         {@code null}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1739
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1740
     *            or this rowset does not currently have a valid
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1741
     *            connection, prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1742
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1743
    public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1744
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1745
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1746
        return rs.getBigDecimal(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1747
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1748
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1749
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1750
     * Gets the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1751
     * of this rowset's {@code ResultSet} object as a
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1752
     * {@code java.math.BigDecimal} with full precision.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1753
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1754
     * @param columnName the column name
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1755
     * @return the column value (full precision);
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1756
     *         if the value is SQL {@code NULL}, the value returned is
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1757
     *         {@code null}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1758
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1759
     *            or this rowset does not currently have a valid
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1760
     *            connection, prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1761
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1762
    public BigDecimal getBigDecimal(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1763
        return getBigDecimal(findColumn(columnName));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1764
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1765
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1766
    //---------------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1767
    // Traversal/Positioning
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1768
    //---------------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1769
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1770
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1771
     * Indicates whether the cursor is before the first row in
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1772
     * this rowset's {@code ResultSet} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1773
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1774
     * @return {@code true} if the cursor is before the first row;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1775
     *         {@code false} if the cursor is at any other position or the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1776
     *         result set contains no rows
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1777
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1778
     *            or this rowset does not currently have a valid
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1779
     *            connection, prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1780
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1781
    public boolean isBeforeFirst() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1782
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1783
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1784
        return rs.isBeforeFirst();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1785
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1786
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1787
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1788
     * Indicates whether the cursor is after the last row in
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1789
     * this rowset's {@code ResultSet} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1790
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1791
     * @return {@code true} if the cursor is after the last row;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1792
     *         {@code false} if the cursor is at any other position or the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1793
     *         result set contains no rows
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1794
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1795
     *            or this rowset does not currently have a valid
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1796
     *            connection, prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1797
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1798
    public boolean isAfterLast() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1799
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1800
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1801
        return rs.isAfterLast();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1802
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1803
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1804
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1805
     * Indicates whether the cursor is on the first row of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1806
     * this rowset's {@code ResultSet} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1807
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1808
     * @return {@code true} if the cursor is on the first row;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1809
     *         {@code false} otherwise
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1810
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1811
     *            or this rowset does not currently have a valid
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1812
     *            connection, prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1813
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1814
    public boolean isFirst() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1815
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1816
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1817
        return rs.isFirst();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1818
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1819
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1820
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1821
     * Indicates whether the cursor is on the last row of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1822
     * this rowset's {@code ResultSet} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1823
     * Note: Calling the method {@code isLast} may be expensive
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1824
     * because the JDBC driver
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1825
     * might need to fetch ahead one row in order to determine
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1826
     * whether the current row is the last row in the result set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1827
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1828
     * @return {@code true} if the cursor is on the last row;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1829
     *         {@code false} otherwise
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1830
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1831
     *            or this rowset does not currently have a valid
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1832
     *            connection, prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1833
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1834
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1835
    public boolean isLast() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1836
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1837
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1838
        return rs.isLast();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1839
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1840
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1841
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1842
     * Moves the cursor to the front of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1843
     * this rowset's {@code ResultSet} object, just before the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1844
     * first row. This method has no effect if the result set contains no rows.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1845
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1846
     * @throws SQLException if (1) a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1847
     *            (2) the result set type is {@code TYPE_FORWARD_ONLY},
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1848
     *            or (3) this rowset does not currently have a valid
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1849
     *            connection, prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1850
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1851
    public void beforeFirst() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1852
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1853
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1854
        rs.beforeFirst();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1855
        notifyCursorMoved();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1856
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1857
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1858
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1859
     * Moves the cursor to the end of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1860
     * this rowset's {@code ResultSet} object, just after the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1861
     * last row. This method has no effect if the result set contains no rows.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1862
     * @throws SQLException if (1) a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1863
     *            (2) the result set type is {@code TYPE_FORWARD_ONLY},
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1864
     *            or (3) this rowset does not currently have a valid
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1865
     *            connection, prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1866
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1867
    public void afterLast() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1868
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1869
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1870
        rs.afterLast();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1871
        notifyCursorMoved();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1872
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1873
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1874
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1875
     * Moves the cursor to the first row in
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1876
     * this rowset's {@code ResultSet} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1877
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1878
     * @return {@code true} if the cursor is on a valid row;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1879
     * {@code false} if there are no rows in the result set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1880
     * @throws SQLException if (1) a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1881
     *            (2) the result set type is {@code TYPE_FORWARD_ONLY},
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1882
     *            or (3) this rowset does not currently have a valid
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1883
     *            connection, prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1884
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1885
    public boolean first() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1886
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1887
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1888
        boolean b = rs.first();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1889
        notifyCursorMoved();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1890
        return b;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1891
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1892
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1893
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1894
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1895
     * Moves the cursor to the last row in
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1896
     * this rowset's {@code ResultSet} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1897
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1898
     * @return {@code true} if the cursor is on a valid row;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1899
     * {@code false} if there are no rows in the result set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1900
     * @throws SQLException if (1) a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1901
     *            (2) the result set type is {@code TYPE_FORWARD_ONLY},
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1902
     *            or (3) this rowset does not currently have a valid
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1903
     *            connection, prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1904
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1905
    public boolean last() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1906
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1907
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1908
        boolean b = rs.last();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1909
        notifyCursorMoved();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1910
        return b;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1911
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1912
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1913
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1914
     * Retrieves the current row number.  The first row is number 1, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1915
     * second is number 2, and so on.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1916
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1917
     * @return the current row number; {@code 0} if there is no current row
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1918
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1919
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1920
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1921
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1922
    public int getRow() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1923
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1924
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1925
        return rs.getRow();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1926
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1927
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1928
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1929
     * Moves the cursor to the given row number in
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1930
     * this rowset's internal {@code ResultSet} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1931
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1932
     * <p>If the row number is positive, the cursor moves to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1933
     * the given row number with respect to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1934
     * beginning of the result set.  The first row is row 1, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1935
     * is row 2, and so on.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1936
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1937
     * <p>If the given row number is negative, the cursor moves to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1938
     * an absolute row position with respect to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1939
     * the end of the result set.  For example, calling the method
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1940
     * {@code absolute(-1)} positions the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1941
     * cursor on the last row, calling the method {@code absolute(-2)}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1942
     * moves the cursor to the next-to-last row, and so on.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1943
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1944
     * <p>An attempt to position the cursor beyond the first/last row in
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1945
     * the result set leaves the cursor before the first row or after
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1946
     * the last row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1947
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1948
     * <p><B>Note:</B> Calling {@code absolute(1)} is the same
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1949
     * as calling {@code first()}. Calling {@code absolute(-1)}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1950
     * is the same as calling {@code last()}.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1951
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1952
     * @return {@code true} if the cursor is on the result set;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1953
     * {@code false} otherwise
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1954
     * @throws SQLException if (1) a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1955
     *            (2) the row is {@code 0}, (3) the result set
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1956
     *            type is {@code TYPE_FORWARD_ONLY}, or (4) this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1957
     *            rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1958
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1959
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1960
    public boolean absolute(int row) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1961
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1962
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1963
        boolean b = rs.absolute(row);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1964
        notifyCursorMoved();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1965
        return b;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1966
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1967
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1968
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1969
     * Moves the cursor a relative number of rows, either positive or negative.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1970
     * Attempting to move beyond the first/last row in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1971
     * result set positions the cursor before/after the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1972
     * the first/last row. Calling {@code relative(0)} is valid, but does
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1973
     * not change the cursor position.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1974
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1975
     * <p>Note: Calling the method {@code relative(1)}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1976
     * is different from calling the method {@code next()}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1977
     * because is makes sense to call {@code next()} when there
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1978
     * is no current row,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1979
     * for example, when the cursor is positioned before the first row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1980
     * or after the last row of the result set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1981
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1982
     * @return {@code true} if the cursor is on a row;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1983
     *         {@code false} otherwise
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1984
     * @throws SQLException if (1) a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1985
     *            (2) there is no current row, (3) the result set
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  1986
     *            type is {@code TYPE_FORWARD_ONLY}, or (4) this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1987
     *            rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1988
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1989
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1990
    public boolean relative(int rows) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1991
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1992
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1993
        boolean b = rs.relative(rows);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1994
        notifyCursorMoved();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1995
        return b;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1996
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1997
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1998
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1999
     * Moves the cursor to the previous row in this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2000
     * {@code ResultSet} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2001
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2002
     * <p><B>Note:</B> Calling the method {@code previous()} is not the same as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2003
     * calling the method {@code relative(-1)} because it
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2004
     * makes sense to call {@code previous()} when there is no current row.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2005
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2006
     * @return {@code true} if the cursor is on a valid row;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2007
     *         {@code false} if it is off the result set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2008
     * @throws SQLException if (1) a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2009
     *            (2) the result set type is {@code TYPE_FORWARD_ONLY},
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2010
     *            or (3) this rowset does not currently have a valid
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2011
     *            connection, prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2012
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2013
    public boolean previous() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2014
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2015
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2016
        boolean b = rs.previous();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2017
        notifyCursorMoved();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2018
        return b;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2019
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2020
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2021
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2022
     * Gives a hint as to the direction in which the rows in this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2023
     * {@code ResultSet} object will be processed.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2024
     * The initial value is determined by the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2025
     * {@code Statement} object
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2026
     * that produced this rowset's {@code ResultSet} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2027
     * The fetch direction may be changed at any time.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2028
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2029
     * @throws SQLException if (1) a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2030
     *            (2) the result set type is {@code TYPE_FORWARD_ONLY}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2031
     *            and the fetch direction is not {@code FETCH_FORWARD},
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2032
     *            or (3) this rowset does not currently have a valid
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2033
     *            connection, prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2034
     * @see java.sql.Statement#setFetchDirection
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2035
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2036
    public void setFetchDirection(int direction) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2037
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2038
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2039
        rs.setFetchDirection(direction);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2040
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2041
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2042
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2043
     * Returns the fetch direction for this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2044
     * {@code ResultSet} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2045
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2046
     * @return the current fetch direction for this rowset's
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2047
     *         {@code ResultSet} object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2048
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2049
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2050
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2051
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2052
    public int getFetchDirection() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2053
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2054
             checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2055
        } catch(SQLException sqle) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2056
             super.getFetchDirection();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2057
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2058
        return rs.getFetchDirection();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2059
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2060
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2061
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2062
     * Gives the JDBC driver a hint as to the number of rows that should
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2063
     * be fetched from the database when more rows are needed for this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2064
     * {@code ResultSet} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2065
     * If the fetch size specified is zero, the JDBC driver
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2066
     * ignores the value and is free to make its own best guess as to what
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2067
     * the fetch size should be.  The default value is set by the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2068
     * {@code Statement} object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2069
     * that created the result set.  The fetch size may be changed at any time.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2070
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2071
     * @param rows the number of rows to fetch
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2072
     * @throws SQLException if (1) a database access error occurs, (2) the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2073
     *            condition {@code 0 <= rows <= this.getMaxRows()} is not
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2074
     *            satisfied, or (3) this rowset does not currently have a valid
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2075
     *            connection, prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2076
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2077
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2078
    public void setFetchSize(int rows) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2079
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2080
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2081
        rs.setFetchSize(rows);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2082
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2083
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2084
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2085
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2086
     * Returns the fetch size for this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2087
     * {@code ResultSet} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2088
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2089
     * @return the current fetch size for this rowset's {@code ResultSet} object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2090
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2091
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2092
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2093
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2094
    public int getType() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2095
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2096
             checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2097
        } catch(SQLException sqle) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2098
            return super.getType();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2099
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2100
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2101
        // If the ResultSet has not been created, then return the default type
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2102
        // otherwise return the type from the ResultSet.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2103
        if(rs == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2104
            return super.getType();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2105
        } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2106
           int rstype = rs.getType();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2107
            return rstype;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2108
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2109
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2110
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2111
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2112
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2113
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2114
     * Returns the concurrency mode of this rowset's {@code ResultSet} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2115
     * The concurrency used is determined by the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2116
     * {@code Statement} object that created the result set.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2117
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2118
     * @return the concurrency type, either {@code CONCUR_READ_ONLY}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2119
     * or {@code CONCUR_UPDATABLE}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2120
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2121
     *            or (2) this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2122
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2123
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2124
    public int getConcurrency() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2125
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2126
             checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2127
        } catch(SQLException sqle) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2128
             super.getConcurrency();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2129
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2130
        return rs.getConcurrency();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2131
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2132
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2133
    //---------------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2134
    // Updates
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2135
    //---------------------------------------------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2136
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2137
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2138
     * Indicates whether the current row has been updated.  The value returned
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2139
     * depends on whether or not the result set can detect updates.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2140
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2141
     * @return {@code true} if the row has been visibly updated
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2142
     * by the owner or another, and updates are detected
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2143
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2144
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2145
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2146
     * @see java.sql.DatabaseMetaData#updatesAreDetected
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2147
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2148
    public boolean rowUpdated() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2149
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2150
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2151
        return rs.rowUpdated();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2152
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2153
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2154
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2155
     * Indicates whether the current row has had an insertion.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2156
     * The value returned depends on whether or not this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2157
     * {@code ResultSet} object can detect visible inserts.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2158
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2159
     * @return {@code true} if a row has had an insertion
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2160
     *         and insertions are detected; {@code false} otherwise
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2161
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2162
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2163
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2164
     * @see java.sql.DatabaseMetaData#insertsAreDetected
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2165
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2166
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2167
    public boolean rowInserted() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2168
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2169
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2170
        return rs.rowInserted();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2171
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2172
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2173
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2174
     * Indicates whether a row has been deleted.  A deleted row may leave
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2175
     * a visible "hole" in a result set.  This method can be used to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2176
     * detect holes in a result set.  The value returned depends on whether
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2177
     * or not this rowset's {@code ResultSet} object can detect deletions.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2178
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2179
     * @return {@code true} if a row was deleted and deletions are detected;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2180
     *         {@code false} otherwise
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2181
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2182
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2183
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2184
     * @see java.sql.DatabaseMetaData#deletesAreDetected
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2185
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2186
    public boolean rowDeleted() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2187
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2188
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2189
        return rs.rowDeleted();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2190
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2191
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2192
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2193
     * Gives a nullable column a null value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2194
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2195
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2196
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2197
     * update the underlying database; instead the {@code updateRow}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2198
     * or {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2199
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2200
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2201
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2202
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2203
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2204
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2205
    public void updateNull(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2206
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2207
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2208
        // To check the type and concurrency of the ResultSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2209
        // to verify whether updates are possible or not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2210
        checkTypeConcurrency();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2211
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2212
        rs.updateNull(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2213
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2214
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2215
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2216
     * Updates the designated column with a {@code boolean} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2217
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2218
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2219
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2220
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2221
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2222
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2223
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2224
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2225
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2226
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2227
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2228
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2229
    public void updateBoolean(int columnIndex, boolean x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2230
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2231
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2232
        // To check the type and concurrency of the ResultSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2233
        // to verify whether updates are possible or not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2234
        checkTypeConcurrency();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2235
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2236
        rs.updateBoolean(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2237
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2238
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2239
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2240
     * Updates the designated column with a {@code byte} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2241
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2242
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2243
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2244
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2245
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2246
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2247
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2248
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2249
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2250
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2251
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2252
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2253
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2254
    public void updateByte(int columnIndex, byte x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2255
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2256
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2257
        // To check the type and concurrency of the ResultSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2258
        // to verify whether updates are possible or not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2259
        checkTypeConcurrency();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2260
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2261
        rs.updateByte(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2262
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2263
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2264
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2265
     * Updates the designated column with a {@code short} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2266
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2267
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2268
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2269
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2270
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2271
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2272
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2273
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2274
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2275
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2276
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2277
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2278
    public void updateShort(int columnIndex, short x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2279
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2280
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2281
        // To check the type and concurrency of the ResultSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2282
        // to verify whether updates are possible or not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2283
        checkTypeConcurrency();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2284
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2285
        rs.updateShort(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2286
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2287
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2288
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2289
     * Updates the designated column with an {@code int} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2290
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2291
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2292
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2293
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2294
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2295
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2296
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2297
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2298
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2299
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2300
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2301
    public void updateInt(int columnIndex, int x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2302
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2303
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2304
        // To check the type and concurrency of the ResultSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2305
        // to verify whether updates are possible or not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2306
        checkTypeConcurrency();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2307
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2308
        rs.updateInt(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2309
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2310
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2311
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2312
     * Updates the designated column with a {@code long} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2313
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2314
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2315
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2316
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2317
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2318
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2319
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2320
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2321
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2322
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2323
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2324
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2325
    public void updateLong(int columnIndex, long x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2326
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2327
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2328
        // To check the type and concurrency of the ResultSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2329
        // to verify whether updates are possible or not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2330
        checkTypeConcurrency();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2331
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2332
        rs.updateLong(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2333
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2334
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2335
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2336
     * Updates the designated column with a {@code float} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2337
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2338
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2339
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2340
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2341
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2342
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2343
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2344
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2345
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2346
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2347
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2348
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2349
    public void updateFloat(int columnIndex, float x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2350
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2351
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2352
        // To check the type and concurrency of the ResultSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2353
        // to verify whether updates are possible or not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2354
        checkTypeConcurrency();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2355
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2356
        rs.updateFloat(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2357
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2358
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2359
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2360
     * Updates the designated column with a {@code double} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2361
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2362
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2363
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2364
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2365
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2366
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2367
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2368
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2369
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2370
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2371
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2372
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2373
    public void updateDouble(int columnIndex, double x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2374
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2375
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2376
        // To check the type and concurrency of the ResultSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2377
        // to verify whether updates are possible or not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2378
        checkTypeConcurrency();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2379
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2380
        rs.updateDouble(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2381
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2382
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2383
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2384
     * Updates the designated column with a {@code java.math.BigDecimal}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2385
     * value.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2386
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2387
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2388
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2389
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2390
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2391
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2392
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2393
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2394
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2395
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2396
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2397
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2398
    public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2399
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2400
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2401
        // To check the type and concurrency of the ResultSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2402
        // to verify whether updates are possible or not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2403
        checkTypeConcurrency();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2404
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2405
        rs.updateBigDecimal(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2406
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2407
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2408
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2409
     * Updates the designated column with a {@code String} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2410
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2411
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2412
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2413
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2414
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2415
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2416
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2417
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2418
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2419
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2420
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2421
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2422
    public void updateString(int columnIndex, String x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2423
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2424
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2425
        // To check the type and concurrency of the ResultSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2426
        // to verify whether updates are possible or not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2427
        checkTypeConcurrency();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2428
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2429
        rs.updateString(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2430
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2431
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2432
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2433
     * Updates the designated column with a {@code byte} array value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2434
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2435
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2436
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2437
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2438
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2439
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2440
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2441
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2442
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2443
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2444
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2445
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2446
    public void updateBytes(int columnIndex, byte x[]) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2447
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2448
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2449
        // To check the type and concurrency of the ResultSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2450
        // to verify whether updates are possible or not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2451
        checkTypeConcurrency();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2452
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2453
        rs.updateBytes(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2454
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2455
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2456
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2457
     * Updates the designated column with a {@code java.sql.Date} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2458
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2459
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2460
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2461
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2462
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2463
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2464
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2465
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2466
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2467
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2468
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2469
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2470
    public void updateDate(int columnIndex, java.sql.Date x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2471
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2472
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2473
        // To check the type and concurrency of the ResultSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2474
        // to verify whether updates are possible or not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2475
        checkTypeConcurrency();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2476
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2477
        rs.updateDate(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2478
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2479
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2480
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2481
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2482
     * Updates the designated column with a {@code java.sql.Time} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2483
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2484
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2485
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2486
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2487
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2488
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2489
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2490
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2491
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2492
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2493
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2494
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2495
    public void updateTime(int columnIndex, java.sql.Time x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2496
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2497
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2498
        // To check the type and concurrency of the ResultSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2499
        // to verify whether updates are possible or not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2500
        checkTypeConcurrency();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2501
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2502
        rs.updateTime(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2503
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2504
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2505
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2506
     * Updates the designated column with a {@code java.sql.Timestamp}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2507
     * value.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2508
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2509
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2510
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2511
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2512
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2513
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2514
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2515
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2516
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2517
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2518
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2519
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2520
    public void updateTimestamp(int columnIndex, java.sql.Timestamp x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2521
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2522
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2523
        // To check the type and concurrency of the ResultSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2524
        // to verify whether updates are possible or not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2525
        checkTypeConcurrency();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2526
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2527
        rs.updateTimestamp(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2528
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2529
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2530
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2531
     * Updates the designated column with an ascii stream value.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2532
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2533
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2534
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2535
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2536
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2537
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2538
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2539
     * @param length the length of the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2540
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2541
     *            (2) or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2542
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2543
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2544
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2545
    public void updateAsciiStream(int columnIndex, java.io.InputStream x, int length) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2546
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2547
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2548
        // To check the type and concurrency of the ResultSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2549
        // to verify whether updates are possible or not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2550
        checkTypeConcurrency();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2551
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2552
        rs.updateAsciiStream(columnIndex, x, length);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2553
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2554
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2555
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2556
     * Updates the designated column with a binary stream value.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2557
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2558
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2559
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2560
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2561
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2562
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2563
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2564
     * @param length the length of the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2565
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2566
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2567
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2568
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2569
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2570
    public void updateBinaryStream(int columnIndex, java.io.InputStream x, int length) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2571
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2572
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2573
        // To check the type and concurrency of the ResultSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2574
        // to verify whether updates are possible or not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2575
        checkTypeConcurrency();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2576
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2577
        rs.updateBinaryStream(columnIndex, x, length);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2578
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2579
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2580
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2581
     * Updates the designated column with a character stream value.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2582
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2583
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2584
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2585
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2586
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2587
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2588
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2589
     * @param length the length of the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2590
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2591
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2592
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2593
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2594
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2595
    public void updateCharacterStream(int columnIndex, java.io.Reader x, int length) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2596
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2597
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2598
        // To check the type and concurrency of the ResultSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2599
        // to verify whether updates are possible or not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2600
        checkTypeConcurrency();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2601
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2602
        rs.updateCharacterStream(columnIndex, x, length);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2603
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2604
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2605
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2606
     * Updates the designated column with an {@code Object} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2607
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2608
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2609
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2610
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2611
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2612
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2613
     * @param x the new column value
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2614
     * @param scale for {@code java.sql.Types.DECIMAl}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2615
     *        or {@code java.sql.Types.NUMERIC} types,
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2616
     *        this is the number of digits after the decimal point.  For all other
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2617
     *        types this value will be ignored.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2618
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2619
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2620
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2621
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2622
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2623
    public void updateObject(int columnIndex, Object x, int scale) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2624
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2625
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2626
        // To check the type and concurrency of the ResultSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2627
        // to verify whether updates are possible or not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2628
        checkTypeConcurrency();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2629
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2630
        rs.updateObject(columnIndex, x, scale);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2631
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2632
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2633
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2634
     * Updates the designated column with an {@code Object} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2635
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2636
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2637
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2638
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2639
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2640
     * @param columnIndex the first column is 1, the second is 2, and so on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2641
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2642
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2643
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2644
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2645
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2646
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2647
    public void updateObject(int columnIndex, Object x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2648
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2649
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2650
        // To check the type and concurrency of the ResultSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2651
        // to verify whether updates are possible or not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2652
        checkTypeConcurrency();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2653
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2654
        rs.updateObject(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2655
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2656
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2657
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2658
     * Updates the designated column with a {@code null} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2659
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2660
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2661
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2662
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2663
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2664
     * @param columnName the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2665
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2666
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2667
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2668
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2669
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2670
    public void updateNull(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2671
        updateNull(findColumn(columnName));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2672
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2673
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2674
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2675
     * Updates the designated column with a {@code boolean} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2676
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2677
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2678
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2679
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2680
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2681
     * @param columnName the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2682
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2683
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2684
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2685
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2686
    public void updateBoolean(String columnName, boolean x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2687
        updateBoolean(findColumn(columnName), x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2688
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2689
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2690
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2691
     * Updates the designated column with a {@code byte} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2692
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2693
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2694
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2695
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2696
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2697
     * @param columnName the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2698
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2699
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2700
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2701
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2702
    public void updateByte(String columnName, byte x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2703
        updateByte(findColumn(columnName), x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2704
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2705
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2706
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2707
     * Updates the designated column with a {@code short} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2708
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2709
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2710
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2711
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2712
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2713
     * @param columnName the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2714
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2715
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2716
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2717
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2718
    public void updateShort(String columnName, short x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2719
        updateShort(findColumn(columnName), x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2720
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2721
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2722
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2723
     * Updates the designated column with an {@code int} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2724
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2725
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2726
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2727
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2728
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2729
     * @param columnName the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2730
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2731
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2732
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2733
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2734
    public void updateInt(String columnName, int x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2735
        updateInt(findColumn(columnName), x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2736
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2737
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2738
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2739
     * Updates the designated column with a {@code long} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2740
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2741
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2742
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2743
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2744
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2745
     * @param columnName the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2746
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2747
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2748
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2749
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2750
    public void updateLong(String columnName, long x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2751
        updateLong(findColumn(columnName), x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2752
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2753
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2754
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2755
     * Updates the designated column with a {@code float } value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2756
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2757
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2758
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2759
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2760
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2761
     * @param columnName the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2762
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2763
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2764
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2765
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2766
    public void updateFloat(String columnName, float x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2767
        updateFloat(findColumn(columnName), x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2768
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2769
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2770
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2771
     * Updates the designated column with a {@code double} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2772
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2773
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2774
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2775
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2776
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2777
     * @param columnName the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2778
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2779
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2780
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2781
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2782
    public void updateDouble(String columnName, double x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2783
        updateDouble(findColumn(columnName), x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2784
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2785
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2786
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2787
     * Updates the designated column with a {@code java.sql.BigDecimal}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2788
     * value.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2789
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2790
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2791
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2792
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2793
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2794
     * @param columnName the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2795
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2796
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2797
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2798
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2799
    public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2800
        updateBigDecimal(findColumn(columnName), x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2801
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2802
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2803
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2804
     * Updates the designated column with a {@code String} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2805
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2806
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2807
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2808
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2809
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2810
     * @param columnName the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2811
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2812
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2813
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2814
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2815
    public void updateString(String columnName, String x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2816
        updateString(findColumn(columnName), x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2817
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2818
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2819
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2820
     * Updates the designated column with a {@code boolean} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2821
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2822
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2823
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2824
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2825
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2826
     * JDBC 2.0
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2827
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2828
     * Updates a column with a byte array value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2829
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2830
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2831
     * current row, or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2832
     * update the underlying database; instead the {@code updateRow} or {@code insertRow}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2833
     * methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2834
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2835
     * @param columnName the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2836
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2837
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2838
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2839
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2840
    public void updateBytes(String columnName, byte x[]) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2841
        updateBytes(findColumn(columnName), x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2842
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2843
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2844
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2845
     * Updates the designated column with a {@code java.sql.Date} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2846
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2847
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2848
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2849
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2850
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2851
     * @param columnName the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2852
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2853
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2854
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2855
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2856
    public void updateDate(String columnName, java.sql.Date x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2857
        updateDate(findColumn(columnName), x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2858
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2859
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2860
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2861
     * Updates the designated column with a {@code java.sql.Time} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2862
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2863
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2864
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2865
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2866
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2867
     * @param columnName the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2868
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2869
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2870
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2871
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2872
    public void updateTime(String columnName, java.sql.Time x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2873
        updateTime(findColumn(columnName), x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2874
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2875
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2876
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2877
     * Updates the designated column with a {@code java.sql.Timestamp}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2878
     * value.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2879
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2880
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2881
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2882
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2883
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2884
     * @param columnName the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2885
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2886
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2887
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2888
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2889
    public void updateTimestamp(String columnName, java.sql.Timestamp x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2890
        updateTimestamp(findColumn(columnName), x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2891
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2892
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2893
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2894
     * Updates the designated column with an ascii stream value.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2895
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2896
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2897
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2898
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2899
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2900
     * @param columnName the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2901
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2902
     * @param length the length of the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2903
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2904
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2905
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2906
    public void updateAsciiStream(String columnName, java.io.InputStream x, int length) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2907
        updateAsciiStream(findColumn(columnName), x, length);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2908
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2909
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2910
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2911
     * Updates the designated column with a binary stream value.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2912
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2913
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2914
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2915
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2916
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2917
     * @param columnName the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2918
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2919
     * @param length the length of the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2920
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2921
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2922
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2923
    public void updateBinaryStream(String columnName, java.io.InputStream x, int length) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2924
        updateBinaryStream(findColumn(columnName), x, length);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2925
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2926
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2927
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2928
     * Updates the designated column with a character stream value.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2929
     * The {@code updateXXX} methods are used to update column values
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2930
     * in the current row or the insert row.  The {@code updateXXX}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2931
     * methods do not update the underlying database; instead the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2932
     * {@code updateRow} or {@code insertRow} methods are called
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2933
     * to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2934
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2935
     * @param columnName the name of the column
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2936
     * @param reader the new column {@code Reader} stream value
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2937
     * @param length the length of the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2938
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2939
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2940
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2941
    public void updateCharacterStream(String columnName, java.io.Reader reader, int length) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2942
        updateCharacterStream(findColumn(columnName), reader, length);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2943
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2944
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2945
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2946
     * Updates the designated column with an {@code Object} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2947
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2948
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2949
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2950
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2951
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2952
     * @param columnName the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2953
     * @param x the new column value
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2954
     * @param scale for {@code java.sql.Types.DECIMAL}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2955
     *  or {@code java.sql.Types.NUMERIC} types,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2956
     *  this is the number of digits after the decimal point.  For all other
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2957
     *  types this value will be ignored.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2958
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2959
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2960
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2961
    public void updateObject(String columnName, Object x, int scale) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2962
        updateObject(findColumn(columnName), x, scale);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2963
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2964
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2965
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2966
     * Updates the designated column with an {@code Object} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2967
     * The {@code updateXXX} methods are used to update column values in the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2968
     * current row or the insert row.  The {@code updateXXX} methods do not
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2969
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2970
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2971
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2972
     * @param columnName the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2973
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2974
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2975
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2976
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2977
    public void updateObject(String columnName, Object x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2978
        updateObject(findColumn(columnName), x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2979
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2980
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2981
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2982
     * Inserts the contents of the insert row into this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  2983
     * {@code ResultSet} object and into the database
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2984
     * and also notifies listeners that a row has changed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2985
     * The cursor must be on the insert row when this method is called.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2986
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2987
     * @throws SQLException if (1) a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2988
     *            (2) this method is called when the cursor is not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2989
     *             on the insert row, (3) not all non-nullable columns in
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2990
     *             the insert row have been given a value, or (4) this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2991
     *             rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2992
     *             prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2993
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2994
    public void insertRow() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2995
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2996
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2997
        rs.insertRow();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2998
        notifyRowChanged();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2999
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3000
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3001
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3002
     * Updates the underlying database with the new contents of the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3003
     * current row of this rowset's {@code ResultSet} object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3004
     * and notifies listeners that a row has changed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3005
     * This method cannot be called when the cursor is on the insert row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3006
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3007
     * @throws SQLException if (1) a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3008
     *            (2) this method is called when the cursor is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3009
     *             on the insert row, (3) the concurrency of the result
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3010
     *             set is {@code ResultSet.CONCUR_READ_ONLY}, or
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3011
     *             (4) this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3012
     *             prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3013
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3014
    public void updateRow() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3015
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3016
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3017
        rs.updateRow();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3018
        notifyRowChanged();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3019
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3020
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3021
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3022
     * Deletes the current row from this rowset's {@code ResultSet} object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3023
     * and from the underlying database and also notifies listeners that a row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3024
     * has changed.  This method cannot be called when the cursor is on the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3025
     * row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3026
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3027
     * @throws SQLException if a database access error occurs
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3028
     *         or if this method is called when the cursor is on the insert row
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3029
     * @throws SQLException if (1) a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3030
     *            (2) this method is called when the cursor is before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3031
     *            first row, after the last row, or on the insert row,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3032
     *            (3) the concurrency of this rowset's result
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3033
     *            set is {@code ResultSet.CONCUR_READ_ONLY}, or
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3034
     *            (4) this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3035
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3036
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3037
    public void deleteRow() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3038
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3039
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3040
        rs.deleteRow();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3041
        notifyRowChanged();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3042
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3043
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3044
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3045
     * Refreshes the current row of this rowset's {@code ResultSet}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3046
     * object with its most recent value in the database.  This method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3047
     * cannot be called when the cursor is on the insert row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3048
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3049
     * <P>The {@code refreshRow} method provides a way for an
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3050
     * application to explicitly tell the JDBC driver to refetch
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3051
     * a row(s) from the database.  An application may want to call
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3052
     * {@code refreshRow} when caching or prefetching is being
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3053
     * done by the JDBC driver to fetch the latest value of a row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3054
     * from the database.  The JDBC driver may actually refresh multiple
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3055
     * rows at once if the fetch size is greater than one.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3056
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3057
     * <P> All values are refetched subject to the transaction isolation
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3058
     * level and cursor sensitivity.  If {@code refreshRow} is called after
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3059
     * calling an {@code updateXXX} method, but before calling
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3060
     * the method {@code updateRow}, then the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3061
     * updates made to the row are lost.  Calling the method
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3062
     * {@code refreshRow} frequently will likely slow performance.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3063
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3064
     * @throws SQLException if (1) a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3065
     *            (2) this method is called when the cursor is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3066
     *             on the insert row, or (3) this rowset does not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3067
     *             currently have a valid connection, prepared statement,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3068
     *             and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3069
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3070
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3071
    public void refreshRow() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3072
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3073
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3074
        rs.refreshRow();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3075
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3076
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3077
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3078
     * Cancels the updates made to the current row in this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3079
     * {@code ResultSet} object and notifies listeners that a row
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3080
     * has changed. This method may be called after calling an
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3081
     * {@code updateXXX} method(s) and before calling
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3082
     * the method {@code updateRow} to roll back
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3083
     * the updates made to a row.  If no updates have been made or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3084
     * {@code updateRow} has already been called, this method has no
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3085
     * effect.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3086
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3087
     * @throws SQLException if (1) a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3088
     *            (2) this method is called when the cursor is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3089
     *             on the insert row, or (3) this rowset does not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3090
     *             currently have a valid connection, prepared statement,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3091
     *             and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3092
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3093
    public void cancelRowUpdates() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3094
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3095
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3096
        rs.cancelRowUpdates();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3097
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3098
        notifyRowChanged();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3099
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3100
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3101
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3102
     * Moves the cursor to the insert row.  The current cursor position is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3103
     * remembered while the cursor is positioned on the insert row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3104
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3105
     * The insert row is a special row associated with an updatable
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3106
     * result set.  It is essentially a buffer where a new row may
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3107
     * be constructed by calling the {@code updateXXX} methods prior to
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3108
     * inserting the row into the result set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3109
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3110
     * Only the {@code updateXXX}, {@code getXXX},
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3111
     * and {@code insertRow} methods may be
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3112
     * called when the cursor is on the insert row.  All of the columns in
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3113
     * a result set must be given a value each time this method is
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3114
     * called before calling {@code insertRow}.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3115
     * An {@code updateXXX} method must be called before a
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3116
     * {@code getXXX} method can be called on a column value.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3117
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3118
     * @throws SQLException if (1) a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3119
     *            (2) this rowset's {@code ResultSet} object is
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3120
     *             not updatable, or (3) this rowset does not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3121
     *             currently have a valid connection, prepared statement,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3122
     *             and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3123
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3124
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3125
    public void moveToInsertRow() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3126
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3127
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3128
        rs.moveToInsertRow();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3129
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3130
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3131
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3132
     * Moves the cursor to the remembered cursor position, usually the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3133
     * current row.  This method has no effect if the cursor is not on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3134
     * the insert row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3135
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3136
     * @throws SQLException if (1) a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3137
     *            (2) this rowset's {@code ResultSet} object is
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3138
     *             not updatable, or (3) this rowset does not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3139
     *             currently have a valid connection, prepared statement,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3140
     *             and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3141
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3142
    public void moveToCurrentRow() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3143
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3144
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3145
        rs.moveToCurrentRow();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3146
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3147
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3148
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3149
     * Returns the {@code Statement} object that produced this
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3150
     * {@code ResultSet} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3151
     * If the result set was generated some other way, such as by a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3152
     * {@code DatabaseMetaData} method, this method returns
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3153
     * {@code null}.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3154
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3155
     * @return the {@code Statement} object that produced
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3156
     * this rowset's {@code ResultSet} object or {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3157
     * if the result set was produced some other way
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3158
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3159
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3160
    public java.sql.Statement getStatement() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3161
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3162
        if(rs != null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3163
        {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3164
           return rs.getStatement();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3165
        } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3166
           return null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3167
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3168
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3169
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3170
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3171
     * Returns the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3172
     * of this rowset's {@code ResultSet} object as an {@code Object}.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3173
     * This method uses the given {@code Map} object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3174
     * for the custom mapping of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3175
     * SQL structured or distinct type that is being retrieved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3176
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3177
     * @param i the first column is 1, the second is 2, and so on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3178
     * @param map a {@code java.util.Map} object that contains the mapping
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3179
     *        from SQL type names to classes in the Java programming language
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3180
     * @return an {@code Object} in the Java programming language
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3181
     *         representing the SQL value
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3182
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3183
     *            or (2) this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3184
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3185
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3186
    public Object getObject(int i, java.util.Map<String,Class<?>> map)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3187
        throws SQLException
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3188
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3189
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3190
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3191
        return rs.getObject(i, map);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3192
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3193
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3194
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3195
     * Returns the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3196
     * of this rowset's {@code ResultSet} object as a {@code Ref} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3197
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3198
     * @param i the first column is 1, the second is 2, and so on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3199
     * @return a {@code Ref} object representing an SQL {@code REF} value
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3200
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3201
     *            or (2) this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3202
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3203
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3204
    public Ref getRef(int i) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3205
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3206
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3207
        return rs.getRef(i);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3208
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3209
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3210
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3211
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3212
     * Returns the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3213
     * of this rowset's {@code ResultSet} object as a {@code Blob} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3214
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3215
     * @param i the first column is 1, the second is 2, and so on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3216
     * @return a {@code Blob} object representing the SQL {@code BLOB}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3217
     *         value in the specified column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3218
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3219
     *            or (2) this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3220
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3221
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3222
    public Blob getBlob(int i) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3223
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3224
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3225
        return rs.getBlob(i);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3226
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3227
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3228
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3229
     * Returns the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3230
     * of this rowset's {@code ResultSet} object as a {@code Clob} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3231
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3232
     * @param i the first column is 1, the second is 2, and so on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3233
     * @return a {@code Clob} object representing the SQL {@code CLOB}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3234
     *         value in the specified column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3235
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3236
     *            or (2) this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3237
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3238
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3239
    public Clob getClob(int i) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3240
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3241
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3242
        return rs.getClob(i);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3243
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3244
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3245
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3246
     * Returns the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3247
     * of this rowset's {@code ResultSet} object as an {@code Array} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3248
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3249
     * @param i the first column is 1, the second is 2, and so on.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3250
     * @return an {@code Array} object representing the SQL {@code ARRAY}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3251
     *         value in the specified column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3252
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3253
     *            or (2) this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3254
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3255
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3256
    public Array getArray(int i) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3257
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3258
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3259
        return rs.getArray(i);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3260
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3261
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3262
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3263
     * Returns the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3264
     * of this rowset's {@code ResultSet} object as an {@code Object}.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3265
     * This method uses the specified {@code Map} object for
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3266
     * custom mapping if appropriate.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3267
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3268
     * @param colName the name of the column from which to retrieve the value
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3269
     * @param map a {@code java.util.Map} object that contains the mapping
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3270
     * from SQL type names to classes in the Java programming language
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3271
     * @return an {@code Object} representing the SQL
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3272
     *         value in the specified column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3273
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3274
     *            or (2) this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3275
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3276
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3277
    public Object getObject(String colName, java.util.Map<String,Class<?>> map)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3278
        throws SQLException
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3279
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3280
        return getObject(findColumn(colName), map);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3281
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3282
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3283
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3284
     * Returns the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3285
     * of this rowset's {@code ResultSet} object as a {@code Ref} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3286
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3287
     * @param colName the column name
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3288
     * @return a {@code Ref} object representing the SQL {@code REF} value in
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3289
     *         the specified column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3290
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3291
     *            or (2) this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3292
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3293
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3294
    public Ref getRef(String colName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3295
        return getRef(findColumn(colName));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3296
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3297
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3298
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3299
     * Returns the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3300
     * of this rowset's {@code ResultSet} object as a {@code Blob} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3301
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3302
     * @param colName the name of the column from which to retrieve the value
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3303
     * @return a {@code Blob} object representing the SQL {@code BLOB}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3304
     *         value in the specified column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3305
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3306
     *            or (2) this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3307
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3308
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3309
    public Blob getBlob(String colName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3310
        return getBlob(findColumn(colName));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3311
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3312
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3313
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3314
     * Returns the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3315
     * of this rowset's {@code ResultSet} object as a {@code Clob} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3316
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3317
     * @param colName the name of the column from which to retrieve the value
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3318
     * @return a {@code Clob} object representing the SQL {@code CLOB}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3319
     *         value in the specified column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3320
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3321
     *            or (2) this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3322
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3323
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3324
    public Clob getClob(String colName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3325
        return getClob(findColumn(colName));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3326
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3327
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3328
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3329
     * Returns the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3330
     * of this rowset's {@code ResultSet} object as an {@code Array} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3331
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3332
     * @param colName the name of the column from which to retrieve the value
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3333
     * @return an {@code Array} object representing the SQL {@code ARRAY}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3334
     *         value in the specified column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3335
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3336
     *            or (2) this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3337
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3338
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3339
    public Array getArray(String colName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3340
        return getArray(findColumn(colName));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3341
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3342
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3343
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3344
     * Returns the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3345
     * of this rowset's {@code ResultSet} object as a {@code java.sql.Date}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3346
     * object. This method uses the given calendar to construct an appropriate
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3347
     * millisecond value for the date if the underlying database does not store
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3348
     * timezone information.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3349
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3350
     * @param columnIndex the first column is 1, the second is 2, and so on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3351
     * @param cal the {@code java.util.Calendar} object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3352
     *        to use in constructing the date
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3353
     * @return the column value as a {@code java.sql.Date} object;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3354
     *         if the value is SQL {@code NULL},
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3355
     *         the value returned is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3356
     * @throws SQLException if (1) a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3357
     *            or (2) this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3358
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3359
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3360
    public java.sql.Date getDate(int columnIndex, Calendar cal) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3361
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3362
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3363
        return rs.getDate(columnIndex, cal);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3364
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3365
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3366
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3367
     * Returns the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3368
     * of this rowset's {@code ResultSet} object as a {@code java.sql.Date}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3369
     * object. This method uses the given calendar to construct an appropriate
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3370
     * millisecond value for the date if the underlying database does not store
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3371
     * timezone information.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3372
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3373
     * @param columnName the SQL name of the column from which to retrieve the value
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3374
     * @param cal the {@code java.util.Calendar} object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3375
     *        to use in constructing the date
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3376
     * @return the column value as a {@code java.sql.Date} object;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3377
     *         if the value is SQL {@code NULL},
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3378
     *         the value returned is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3379
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3380
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3381
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3382
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3383
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3384
    public java.sql.Date getDate(String columnName, Calendar cal) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3385
        return getDate(findColumn(columnName), cal);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3386
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3387
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3388
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3389
     * Returns the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3390
     * of this rowset's {@code ResultSet} object as a {@code java.sql.Time}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3391
     * object. This method uses the given calendar to construct an appropriate
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3392
     * millisecond value for the date if the underlying database does not store
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3393
     * timezone information.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3394
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3395
     * @param columnIndex the first column is 1, the second is 2, and so on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3396
     * @param cal the {@code java.util.Calendar} object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3397
     *        to use in constructing the time
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3398
     * @return the column value as a {@code java.sql.Time} object;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3399
     *         if the value is SQL {@code NULL},
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3400
     *         the value returned is {@code null} in the Java programming language
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3401
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3402
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3403
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3404
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3405
    public java.sql.Time getTime(int columnIndex, Calendar cal) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3406
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3407
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3408
        return rs.getTime(columnIndex, cal);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3409
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3410
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3411
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3412
     * Returns the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3413
     * of this rowset's {@code ResultSet} object as a {@code java.sql.Time}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3414
     * object. This method uses the given calendar to construct an appropriate
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3415
     * millisecond value for the date if the underlying database does not store
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3416
     * timezone information.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3417
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3418
     * @param columnName the SQL name of the column
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3419
     * @param cal the {@code java.util.Calendar} object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3420
     *        to use in constructing the time
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3421
     * @return the column value as a {@code java.sql.Time} object;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3422
     *         if the value is SQL {@code NULL},
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3423
     *         the value returned is {@code null} in the Java programming language
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3424
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3425
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3426
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3427
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3428
    public java.sql.Time getTime(String columnName, Calendar cal) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3429
        return getTime(findColumn(columnName), cal);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3430
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3431
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3432
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3433
     * Returns the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3434
     * of this rowset's {@code ResultSet} object as a
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3435
     * {@code java.sql.Timestamp} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3436
     * This method uses the given calendar to construct an appropriate millisecond
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3437
     * value for the timestamp if the underlying database does not store
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3438
     * timezone information.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3439
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3440
     * @param columnIndex the first column is 1, the second is 2, and so on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3441
     * @param cal the {@code java.util.Calendar} object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3442
     *        to use in constructing the timestamp
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3443
     * @return the column value as a {@code java.sql.Timestamp} object;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3444
     *         if the value is SQL {@code NULL},
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3445
     *         the value returned is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3446
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3447
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3448
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3449
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3450
    public java.sql.Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3451
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3452
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3453
        return rs.getTimestamp(columnIndex, cal);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3454
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3455
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3456
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3457
     * Returns the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3458
     * of this rowset's {@code ResultSet} object as a
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3459
     * {@code java.sql.Timestamp} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3460
     * This method uses the given calendar to construct an appropriate millisecond
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3461
     * value for the timestamp if the underlying database does not store
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3462
     * timezone information.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3463
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3464
     * @param columnName the SQL name of the column
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3465
     * @param cal the {@code java.util.Calendar} object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3466
     *        to use in constructing the timestamp
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3467
     * @return the column value as a {@code java.sql.Timestamp} object;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3468
     *         if the value is SQL {@code NULL},
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3469
     *         the value returned is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3470
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3471
     *            or this rowset does not currently have a valid connection,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3472
     *            prepared statement, and result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3473
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3474
    public java.sql.Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3475
        return getTimestamp(findColumn(columnName), cal);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3476
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3477
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3478
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3479
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3480
     * Sets the designated column in either the current row or the insert
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3481
     * row of this {@code JdbcRowSetImpl} object with the given
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3482
     * {@code double} value.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3483
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3484
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3485
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3486
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3487
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3488
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3489
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3490
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3491
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3492
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3493
     * @param columnIndex the first column is {@code 1}, the second
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3494
     *        is {@code 2}, and so on; must be {@code 1} or larger
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3495
     *        and equal to or less than the number of columns in this rowset
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3496
     * @param ref the new {@code Ref} column value
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3497
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3498
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3499
     *            insert row, or (3) this rowset is
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3500
     *            {@code ResultSet.CONCUR_READ_ONLY}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3501
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3502
    public void updateRef(int columnIndex, java.sql.Ref ref)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3503
        throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3504
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3505
        rs.updateRef(columnIndex, ref);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3506
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3507
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3508
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3509
     * Sets the designated column in either the current row or the insert
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3510
     * row of this {@code JdbcRowSetImpl} object with the given
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3511
     * {@code double} value.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3512
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3513
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3514
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3515
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3516
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3517
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3518
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3519
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3520
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3521
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3522
     * @param columnName a {@code String} object that must match the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3523
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3524
     * @param ref the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3525
     * @throws SQLException if (1) the given column name does not match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3526
     *            name of a column in this rowset, (2) the cursor is not on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3527
     *            one of this rowset's rows or its insert row, or (3) this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3528
     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3529
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3530
    public void updateRef(String columnName, java.sql.Ref ref)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3531
        throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3532
        updateRef(findColumn(columnName), ref);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3533
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3534
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3535
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3536
     * Sets the designated column in either the current row or the insert
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3537
     * row of this {@code JdbcRowSetImpl} object with the given
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3538
     * {@code double} value.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3539
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3540
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3541
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3542
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3543
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3544
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3545
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3546
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3547
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3548
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3549
     * @param columnIndex the first column is {@code 1}, the second
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3550
     *        is {@code 2}, and so on; must be {@code 1} or larger
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3551
     *        and equal to or less than the number of columns in this rowset
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3552
     * @param c the new column {@code Clob} value
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3553
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3554
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3555
     *            insert row, or (3) this rowset is
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3556
     *            {@code ResultSet.CONCUR_READ_ONLY}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3557
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3558
    public void updateClob(int columnIndex, Clob c) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3559
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3560
        rs.updateClob(columnIndex, c);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3561
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3562
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3563
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3564
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3565
     * Sets the designated column in either the current row or the insert
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3566
     * row of this {@code JdbcRowSetImpl} object with the given
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3567
     * {@code double} value.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3568
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3569
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3570
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3571
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3572
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3573
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3574
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3575
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3576
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3577
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3578
     * @param columnName a {@code String} object that must match the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3579
     *        SQL name of a column in this rowset, ignoring case
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3580
     * @param c the new column {@code Clob} value
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3581
     * @throws SQLException if (1) the given column name does not match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3582
     *            name of a column in this rowset, (2) the cursor is not on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3583
     *            one of this rowset's rows or its insert row, or (3) this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3584
     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3585
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3586
    public void updateClob(String columnName, Clob c) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3587
        updateClob(findColumn(columnName), c);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3588
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3589
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3590
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3591
     * Sets the designated column in either the current row or the insert
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3592
     * row of this {@code JdbcRowSetImpl} object with the given
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3593
     * {@code java.sql.Blob} value.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3594
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3595
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3596
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3597
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3598
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3599
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3600
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3601
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3602
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3603
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3604
     * @param columnIndex the first column is {@code 1}, the second
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3605
     *        is {@code 2}, and so on; must be {@code 1} or larger
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3606
     *        and equal to or less than the number of columns in this rowset
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3607
     * @param b the new column {@code Blob} value
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3608
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3609
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3610
     *            insert row, or (3) this rowset is
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3611
     *            {@code ResultSet.CONCUR_READ_ONLY}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3612
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3613
    public void updateBlob(int columnIndex, Blob b) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3614
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3615
        rs.updateBlob(columnIndex, b);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3616
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3617
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3618
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3619
     * Sets the designated column in either the current row or the insert
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3620
     * row of this {@code JdbcRowSetImpl} object with the given
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3621
     * {@code java.sql.Blob } value.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3622
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3623
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3624
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3625
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3626
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3627
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3628
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3629
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3630
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3631
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3632
     * @param columnName a {@code String} object that must match the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3633
     *        SQL name of a column in this rowset, ignoring case
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3634
     * @param b the new column {@code Blob} value
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3635
     * @throws SQLException if (1) the given column name does not match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3636
     *            name of a column in this rowset, (2) the cursor is not on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3637
     *            one of this rowset's rows or its insert row, or (3) this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3638
     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3639
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3640
    public void updateBlob(String columnName, Blob b) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3641
        updateBlob(findColumn(columnName), b);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3642
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3643
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3644
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3645
     * Sets the designated column in either the current row or the insert
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3646
     * row of this {@code JdbcRowSetImpl} object with the given
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3647
     * {@code java.sql.Array} values.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3648
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3649
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3650
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3651
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3652
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3653
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3654
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3655
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3656
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3657
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3658
     * @param columnIndex the first column is {@code 1}, the second
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3659
     *        is {@code 2}, and so on; must be {@code 1} or larger
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3660
     *        and equal to or less than the number of columns in this rowset
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3661
     * @param a the new column {@code Array} value
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3662
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3663
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3664
     *            insert row, or (3) this rowset is
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3665
     *            {@code ResultSet.CONCUR_READ_ONLY}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3666
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3667
    public void updateArray(int columnIndex, Array a) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3668
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3669
        rs.updateArray(columnIndex, a);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3670
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3671
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3672
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3673
     * Sets the designated column in either the current row or the insert
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3674
     * row of this {@code JdbcRowSetImpl} object with the given
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3675
     * {@code java.sql.Array} value.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3676
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3677
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3678
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3679
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3680
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3681
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3682
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3683
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3684
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3685
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3686
     * @param columnName a {@code String} object that must match the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3687
     *        SQL name of a column in this rowset, ignoring case
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3688
     * @param a the new column {@code Array} value
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3689
     * @throws SQLException if (1) the given column name does not match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3690
     *            name of a column in this rowset, (2) the cursor is not on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3691
     *            one of this rowset's rows or its insert row, or (3) this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3692
     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3693
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3694
    public void updateArray(String columnName, Array a) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3695
        updateArray(findColumn(columnName), a);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3696
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3697
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3698
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3699
     * Provide interface coverage for getURL(int) in {@code ResultSet->RowSet}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3700
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3701
    public java.net.URL getURL(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3702
        checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3703
        return rs.getURL(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3704
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3705
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3706
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3707
     * Provide interface coverage for getURL(String) in {@code ResultSet->RowSet}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3708
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3709
    public java.net.URL getURL(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3710
        return getURL(findColumn(columnName));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3711
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3712
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3713
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3714
     * Return the RowSetWarning object for the current row of a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3715
     * {@code JdbcRowSetImpl}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3716
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3717
    public RowSetWarning getRowSetWarnings() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3718
       return null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3719
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3720
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3721
     * Unsets the designated parameter to the given int array.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3722
     * This was set using {@code setMatchColumn}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3723
     * as the column which will form the basis of the join.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3724
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3725
     * The parameter value unset by this method should be same
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3726
     * as was set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3727
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3728
     * @param columnIdxes the index into this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3729
     *        object's internal representation of parameter values
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3730
     * @throws SQLException if an error occurs or the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3731
     *         parameter index is out of bounds or if the columnIdx is
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3732
     *         not the same as set using {@code setMatchColumn(int [])}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3733
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3734
    public void unsetMatchColumn(int[] columnIdxes) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3735
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3736
         int i_val;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3737
         for( int j= 0 ;j < columnIdxes.length; j++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3738
            i_val = (Integer.parseInt(iMatchColumns.get(j).toString()));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3739
            if(columnIdxes[j] != i_val) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  3740
               throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3741
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3742
         }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3743
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3744
         for( int i = 0;i < columnIdxes.length ;i++) {
6697
39929804f9d4 6989139: Address JDBC Findbugs where Number type Constructor are used
lancea
parents: 6540
diff changeset
  3745
            iMatchColumns.set(i,Integer.valueOf(-1));
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3746
         }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3747
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3748
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3749
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3750
     * Unsets the designated parameter to the given String array.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3751
     * This was set using {@code setMatchColumn}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3752
     * as the column which will form the basis of the join.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3753
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3754
     * The parameter value unset by this method should be same
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3755
     * as was set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3756
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3757
     * @param columnIdxes the index into this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3758
     *        object's internal representation of parameter values
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3759
     * @throws SQLException if an error occurs or the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3760
     *         parameter index is out of bounds or if the columnName is
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3761
     *         not the same as set using {@code setMatchColumn(String [])}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3762
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3763
    public void unsetMatchColumn(String[] columnIdxes) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3764
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3765
        for(int j = 0 ;j < columnIdxes.length; j++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3766
           if( !columnIdxes[j].equals(strMatchColumns.get(j)) ){
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  3767
              throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3768
           }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3769
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3770
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3771
        for(int i = 0 ; i < columnIdxes.length; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3772
           strMatchColumns.set(i,null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3773
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3774
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3775
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3776
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3777
     * Retrieves the column name as {@code String} array
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3778
     * that was set using {@code setMatchColumn(String [])}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3779
     * for this rowset.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3780
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3781
     * @return a {@code String} array object that contains the column names
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3782
     *         for the rowset which has this the match columns
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3783
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3784
     * @throws SQLException if an error occurs or column name is not set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3785
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3786
    public String[] getMatchColumnNames() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3787
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3788
        String []str_temp = new String[strMatchColumns.size()];
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3789
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3790
        if( strMatchColumns.get(0) == null) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  3791
           throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.setmatchcols").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3792
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3793
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3794
        strMatchColumns.copyInto(str_temp);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3795
        return str_temp;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3796
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3797
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3798
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3799
     * Retrieves the column id as {@code int} array that was set using
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3800
     * {@code setMatchColumn(int [])} for this rowset.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3801
     *
37880
60ec48925dc6 8156661: Handful of typos in javadoc
igerasim
parents: 31061
diff changeset
  3802
     * @return an {@code int} array object that contains the column ids
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3803
     *         for the rowset which has this as the match columns.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3804
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3805
     * @throws SQLException if an error occurs or column index is not set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3806
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3807
    public int[] getMatchColumnIndexes() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3808
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3809
        Integer []int_temp = new Integer[iMatchColumns.size()];
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3810
        int [] i_temp = new int[iMatchColumns.size()];
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3811
        int i_val;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3812
11129
f9ad1aadf3fa 7116445: Miscellaneous warnings in the JDBC/RowSet classes
lancea
parents: 9257
diff changeset
  3813
        i_val = iMatchColumns.get(0);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3814
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3815
        if( i_val == -1 ) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  3816
           throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.setmatchcols").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3817
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3818
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3819
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3820
        iMatchColumns.copyInto(int_temp);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3821
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3822
        for(int i = 0; i < int_temp.length; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3823
           i_temp[i] = (int_temp[i]).intValue();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3824
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3825
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3826
        return i_temp;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3827
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3828
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3829
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3830
     * Sets the designated parameter to the given int array.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3831
     * This forms the basis of the join for the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3832
     * {@code JoinRowSet} as the column which will form the basis of the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3833
     * join.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3834
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3835
     * The parameter value set by this method is stored internally and
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3836
     * will be supplied as the appropriate parameter in this rowset's
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3837
     * command when the method {@code getMatchColumnIndexes} is called.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3838
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3839
     * @param columnIdxes the indexes into this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3840
     *        object's internal representation of parameter values; the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3841
     *        first parameter is 0, the second is 1, and so on; must be
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3842
     *        {@code 0} or greater
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3843
     * @throws SQLException if an error occurs or the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3844
     *         parameter index is out of bounds
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3845
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3846
    public void setMatchColumn(int[] columnIdxes) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3847
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3848
        for(int j = 0 ; j < columnIdxes.length; j++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3849
           if( columnIdxes[j] < 0 ) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  3850
              throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols1").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3851
           }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3852
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3853
        for(int i = 0 ;i < columnIdxes.length; i++) {
6697
39929804f9d4 6989139: Address JDBC Findbugs where Number type Constructor are used
lancea
parents: 6540
diff changeset
  3854
           iMatchColumns.add(i,Integer.valueOf(columnIdxes[i]));
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3855
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3856
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3857
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3858
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3859
     * Sets the designated parameter to the given String array.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3860
     *  This forms the basis of the join for the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3861
     * {@code JoinRowSet} as the column which will form the basis of the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3862
     * join.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3863
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3864
     * The parameter value set by this method is stored internally and
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3865
     * will be supplied as the appropriate parameter in this rowset's
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3866
     * command when the method {@code getMatchColumn} is called.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3867
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3868
     * @param columnNames the name of the column into this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3869
     *        object's internal representation of parameter values
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3870
     * @throws SQLException if an error occurs or the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3871
     *         parameter index is out of bounds
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3872
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3873
    public void setMatchColumn(String[] columnNames) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3874
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3875
        for(int j = 0; j < columnNames.length; j++) {
52902
e3398b2e1ab0 8214971: Replace use of string.equals("") with isEmpty()
rriggs
parents: 47216
diff changeset
  3876
           if( columnNames[j] == null || columnNames[j].isEmpty()) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  3877
              throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols2").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3878
           }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3879
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3880
        for( int i = 0; i < columnNames.length; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3881
           strMatchColumns.add(i,columnNames[i]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3882
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3883
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3884
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3885
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3886
    /**
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3887
     * Sets the designated parameter to the given {@code int}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3888
     * object.  This forms the basis of the join for the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3889
     * {@code JoinRowSet} as the column which will form the basis of the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3890
     * join.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3891
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3892
     * The parameter value set by this method is stored internally and
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3893
     * will be supplied as the appropriate parameter in this rowset's
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3894
     * command when the method {@code getMatchColumn} is called.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3895
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3896
     * @param columnIdx the index into this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3897
     *        object's internal representation of parameter values; the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3898
     *        first parameter is 0, the second is 1, and so on; must be
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3899
     *        {@code 0} or greater
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3900
     * @throws SQLException if an error occurs or the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3901
     *         parameter index is out of bounds
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3902
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3903
    public void setMatchColumn(int columnIdx) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3904
        // validate, if col is ok to be set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3905
        if(columnIdx < 0) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  3906
            throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols1").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3907
        } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3908
            // set iMatchColumn
6697
39929804f9d4 6989139: Address JDBC Findbugs where Number type Constructor are used
lancea
parents: 6540
diff changeset
  3909
            iMatchColumns.set(0, Integer.valueOf(columnIdx));
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3910
            //strMatchColumn = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3911
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3912
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3913
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3914
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3915
     * Sets the designated parameter to the given {@code String}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3916
     * object.  This forms the basis of the join for the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3917
     * {@code JoinRowSet} as the column which will form the basis of the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3918
     * join.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3919
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3920
     * The parameter value set by this method is stored internally and
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3921
     * will be supplied as the appropriate parameter in this rowset's
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3922
     * command when the method {@code getMatchColumn} is called.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3923
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3924
     * @param columnName the name of the column into this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3925
     *        object's internal representation of parameter values
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3926
     * @throws SQLException if an error occurs or the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3927
     *         parameter index is out of bounds
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3928
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3929
    public void setMatchColumn(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3930
        // validate, if col is ok to be set
52902
e3398b2e1ab0 8214971: Replace use of string.equals("") with isEmpty()
rriggs
parents: 47216
diff changeset
  3931
        if(columnName == null || (columnName= columnName.trim()).isEmpty()) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  3932
            throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols2").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3933
        } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3934
            // set strMatchColumn
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3935
            strMatchColumns.set(0, columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3936
            //iMatchColumn = -1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3937
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3938
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3939
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3940
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3941
     * Unsets the designated parameter to the given {@code int}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3942
     * object.  This was set using {@code setMatchColumn}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3943
     * as the column which will form the basis of the join.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3944
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3945
     * The parameter value unset by this method should be same
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3946
     * as was set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3947
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3948
     * @param columnIdx the index into this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3949
     *        object's internal representation of parameter values
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3950
     * @throws SQLException if an error occurs or the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3951
     *         parameter index is out of bounds or if the columnIdx is
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3952
     *         not the same as set using {@code setMatchColumn(int)}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3953
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3954
    public void unsetMatchColumn(int columnIdx) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3955
        // check if we are unsetting the SAME column
6697
39929804f9d4 6989139: Address JDBC Findbugs where Number type Constructor are used
lancea
parents: 6540
diff changeset
  3956
        if(! iMatchColumns.get(0).equals(Integer.valueOf(columnIdx) )  ) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  3957
            throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.unsetmatch").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3958
        } else if(strMatchColumns.get(0) != null) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  3959
            throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.usecolname").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3960
        } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3961
                // that is, we are unsetting it.
6697
39929804f9d4 6989139: Address JDBC Findbugs where Number type Constructor are used
lancea
parents: 6540
diff changeset
  3962
               iMatchColumns.set(0, Integer.valueOf(-1));
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3963
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3964
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3965
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3966
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3967
     * Unsets the designated parameter to the given {@code String}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3968
     * object.  This was set using {@code setMatchColumn}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3969
     * as the column which will form the basis of the join.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3970
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3971
     * The parameter value unset by this method should be same
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3972
     * as was set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3973
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3974
     * @param columnName the index into this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3975
     *        object's internal representation of parameter values
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3976
     * @throws SQLException if an error occurs or the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3977
     *         parameter index is out of bounds or if the columnName is
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3978
     *         not the same as set using {@code setMatchColumn(String)}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3979
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3980
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3981
    public void unsetMatchColumn(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3982
        // check if we are unsetting the same column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3983
        columnName = columnName.trim();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3984
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3985
        if(!((strMatchColumns.get(0)).equals(columnName))) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  3986
            throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.unsetmatch").toString());
11129
f9ad1aadf3fa 7116445: Miscellaneous warnings in the JDBC/RowSet classes
lancea
parents: 9257
diff changeset
  3987
        } else if(iMatchColumns.get(0) > 0) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  3988
            throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.usecolid").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3989
        } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3990
            strMatchColumns.set(0, null);   // that is, we are unsetting it.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3991
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3992
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3993
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3994
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3995
     * Retrieves the {@code DatabaseMetaData} associated with
28059
e576535359cc 8067377: My hobby: caning, then then canning, the the can-can
martin
parents: 25859
diff changeset
  3996
     * the connection handle associated with this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3997
     * {@code JdbcRowSet} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3998
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  3999
     * @return the {@code DatabaseMetadata} associated
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4000
     *         with the rowset's connection.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4001
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4002
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4003
    public DatabaseMetaData getDatabaseMetaData() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4004
        Connection con = connect();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4005
        return con.getMetaData();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4006
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4007
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4008
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4009
     * Retrieves the {@code ParameterMetaData} associated with
28059
e576535359cc 8067377: My hobby: caning, then then canning, the the can-can
martin
parents: 25859
diff changeset
  4010
     * the connection handle associated with this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4011
     * {@code JdbcRowSet} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4012
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4013
     * @return the {@code ParameterMetadata} associated
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4014
     *         with the rowset's connection.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4015
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4016
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4017
    public ParameterMetaData getParameterMetaData() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4018
        prepare();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4019
        return (ps.getParameterMetaData());
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4020
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4021
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4022
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4023
     * Commits all updates in this {@code JdbcRowSet} object by
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4024
     * wrapping the internal {@code Connection} object and calling
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4025
     * its {@code commit} method.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4026
     * This method sets this {@code JdbcRowSet} object's private field
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4027
     * {@code rs} to {@code null} after saving its value to another
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4028
     * object, but only if the {@code ResultSet}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4029
     * constant {@code HOLD_CURSORS_OVER_COMMIT} has not been set.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4030
     * (The field {@code rs} is this {@code JdbcRowSet} object's
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4031
     * {@code ResultSet} object.)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4032
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4033
     * @throws SQLException if autoCommit is set to true or if a database
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4034
     *         access error occurs
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4035
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4036
    public void commit() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4037
      conn.commit();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4038
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4039
      // Checking the holadbility value and making the result set handle null
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4040
      // Added as per Rave requirements
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4041
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4042
      if( conn.getHoldability() != HOLD_CURSORS_OVER_COMMIT) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4043
         rs = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4044
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4045
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4046
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4047
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4048
     * Sets auto-commit on the internal {@code Connection} object with this
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4049
     * {@code JdbcRowSet}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4050
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4051
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4052
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4053
    public void setAutoCommit(boolean autoCommit) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4054
        // The connection object should be there
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4055
        // in order to commit the connection handle on or off.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4056
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4057
        if(conn != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4058
           conn.setAutoCommit(autoCommit);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4059
        } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4060
           // Coming here means the connection object is null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4061
           // So generate a connection handle internally, since
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4062
           // a JdbcRowSet is always connected to a db, it is fine
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4063
           // to get a handle to the connection.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4064
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4065
           // Get hold of a connection handle
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4066
           // and change the autcommit as passesd.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4067
           conn = connect();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4068
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4069
           // After setting the below the conn.getAutoCommit()
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4070
           // should return the same value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4071
           conn.setAutoCommit(autoCommit);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4072
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4073
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4074
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4075
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4076
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4077
     * Returns the auto-commit status with this {@code JdbcRowSet}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4078
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4079
     * @return true if auto commit is true; false otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4080
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4081
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4082
    public boolean getAutoCommit() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4083
        return conn.getAutoCommit();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4084
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4085
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4086
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4087
     * Rolls back all the updates in this {@code JdbcRowSet} object by
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4088
     * wrapping the internal {@code Connection} object and calling its
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4089
     * {@code rollback} method.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4090
     * This method sets this {@code JdbcRowSet} object's private field
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4091
     * {@code rs} to {@code null} after saving its value to another object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4092
     * (The field {@code rs} is this {@code JdbcRowSet} object's
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4093
     * internal {@code ResultSet} object.)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4094
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4095
     * @throws SQLException if autoCommit is set to true or a database
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4096
     *         access error occurs
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4097
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4098
    public void rollback() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4099
        conn.rollback();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4100
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4101
        // Makes the result ste handle null after rollback
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4102
        // Added as per Rave requirements
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4103
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4104
        rs = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4105
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4106
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4107
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4108
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4109
     * Rollbacks all the updates in the {@code JdbcRowSet} back to the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4110
     * last {@code Savepoint} transaction marker. Wraps the internal
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4111
     * {@code Connection} object and call it's rollback method
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4112
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4113
     * @param s the {@code Savepoint} transaction marker to roll the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4114
     *        transaction to.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4115
     * @throws SQLException if autoCommit is set to true; or ia a database
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4116
     *         access error occurs
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4117
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4118
    public void rollback(Savepoint s) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4119
        conn.rollback(s);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4120
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4121
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4122
    // Setting the ResultSet Type and Concurrency
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4123
    protected void setParams() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4124
        if(rs == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4125
           setType(ResultSet.TYPE_SCROLL_INSENSITIVE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4126
           setConcurrency(ResultSet.CONCUR_UPDATABLE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4127
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4128
        else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4129
            setType(rs.getType());
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4130
            setConcurrency(rs.getConcurrency());
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4131
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4132
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4133
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4134
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4135
    // Checking ResultSet Type and Concurrency
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4136
    private void checkTypeConcurrency() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4137
        if(rs.getType() == TYPE_FORWARD_ONLY ||
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4138
           rs.getConcurrency() == CONCUR_READ_ONLY) {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4139
              throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.resnotupd").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4140
         }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4141
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4142
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4143
     // Returns a Connection Handle
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4144
    //  Added as per Rave requirements
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4145
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4146
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4147
     * Gets this {@code JdbcRowSet} object's Connection property
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4148
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4149
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4150
     * @return the {@code Connection} object associated with this rowset;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4151
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4152
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4153
    protected Connection getConnection() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4154
       return conn;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4155
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4156
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4157
    // Sets the connection handle with the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4158
    // Added as per rave requirements
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4159
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4160
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4161
     * Sets this {@code JdbcRowSet} object's connection property
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4162
     * to the given {@code Connection} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4163
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4164
     * @param connection the {@code Connection} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4165
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4166
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4167
    protected void setConnection(Connection connection) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4168
       conn = connection;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4169
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4170
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4171
    // Returns a PreparedStatement Handle
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4172
    // Added as per Rave requirements
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4173
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4174
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4175
     * Gets this {@code JdbcRowSet} object's PreparedStatement property
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4176
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4177
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4178
     * @return the {@code PreparedStatement} object associated with this rowset;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4179
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4180
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4181
    protected PreparedStatement getPreparedStatement() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4182
       return ps;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4183
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4184
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4185
    //Sets the prepared statement handle to the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4186
    // Added as per Rave requirements
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4187
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4188
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4189
     * Sets this {@code JdbcRowSet} object's preparedtsatement property
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4190
     * to the given {@code PreparedStatemennt} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4191
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4192
     * @param preparedStatement the {@code PreparedStatement} object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4193
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4194
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4195
    protected void setPreparedStatement(PreparedStatement preparedStatement) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4196
       ps = preparedStatement;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4197
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4198
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4199
    // Returns a ResultSet handle
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4200
    // Added as per Rave requirements
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4201
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4202
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4203
     * Gets this {@code JdbcRowSet} object's ResultSet property
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4204
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4205
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4206
     * @return the {@code ResultSet} object associated with this rowset;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4207
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4208
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4209
    protected ResultSet getResultSet() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4210
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4211
       checkState();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4212
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4213
       return rs;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4214
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4215
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4216
    // Sets the result set handle to the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4217
    // Added as per Rave requirements
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4218
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4219
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4220
     * Sets this {@code JdbcRowSet} object's resultset property
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4221
     * to the given {@code ResultSet} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4222
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4223
     * @param resultSet the {@code ResultSet} object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4224
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4225
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4226
    protected void setResultSet(ResultSet resultSet) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4227
       rs = resultSet;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4228
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4229
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4230
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4231
     * Sets this {@code JdbcRowSet} object's {@code command} property to
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4232
     * the given {@code String} object and clears the parameters, if any,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4233
     * that were set for the previous command. In addition,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4234
     * if the {@code command} property has previously been set to a
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4235
     * non-null value and it is
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4236
     * different from the {@code String} object supplied,
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4237
     * this method sets this {@code JdbcRowSet} object's private fields
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4238
     * {@code ps} and {@code rs} to {@code null}.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4239
     * (The field {@code ps} is its {@code PreparedStatement} object, and
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4240
     * the field {@code rs} is its {@code ResultSet} object.)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4241
     * <P>
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4242
     * The {@code command} property may not be needed if the {@code RowSet}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4243
     * object gets its data from a source that does not support commands,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4244
     * such as a spreadsheet or other tabular file.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4245
     * Thus, this property is optional and may be {@code null}.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4246
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4247
     * @param command a {@code String} object containing an SQL query
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4248
     *            that will be set as this {@code RowSet} object's command
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4249
     *            property; may be {@code null} but may not be an empty string
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4250
     * @throws SQLException if an empty string is provided as the command value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4251
     * @see #getCommand
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4252
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4253
    public void setCommand(String command) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4254
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4255
       if (getCommand() != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4256
          if(!getCommand().equals(command)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4257
             super.setCommand(command);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4258
             ps = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4259
             rs = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4260
          }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4261
       }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4262
       else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4263
          super.setCommand(command);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4264
       }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4265
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4266
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4267
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4268
     * Sets the {@code dataSourceName} property for this {@code JdbcRowSet}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4269
     * object to the given logical name and sets this {@code JdbcRowSet} object's
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4270
     * Url property to {@code null}. In addition, if the {@code dataSourceName}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4271
     * property has previously been set and is different from the one supplied,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4272
     * this method sets this {@code JdbcRowSet} object's private fields
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4273
     * {@code ps}, {@code rs}, and {@code conn} to {@code null}.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4274
     * (The field {@code ps} is its {@code PreparedStatement} object,
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4275
     * the field {@code rs} is its {@code ResultSet} object, and
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4276
     * the field {@code conn} is its {@code Connection} object.)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4277
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4278
     * The name supplied to this method must have been bound to a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4279
     * {@code DataSource} object in a JNDI naming service so that an
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4280
     * application can do a lookup using that name to retrieve the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4281
     * {@code DataSource} object bound to it. The {@code DataSource}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4282
     * object can then be used to establish a connection to the data source it
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4283
     * represents.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4284
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4285
     * Users should set either the Url property or the dataSourceName property.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4286
     * If both properties are set, the driver will use the property set most recently.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4287
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4288
     * @param dsName a {@code String} object with the name that can be supplied
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4289
     *        to a naming service based on JNDI technology to retrieve the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4290
     *        {@code DataSource} object that can be used to get a connection;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4291
     *        may be {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4292
     * @throws SQLException if there is a problem setting the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4293
     *          {@code dataSourceName} property
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4294
     * @see #getDataSourceName
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4295
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4296
    public void setDataSourceName(String dsName) throws SQLException{
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4297
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4298
       if(getDataSourceName() != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4299
          if(!getDataSourceName().equals(dsName)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4300
             super.setDataSourceName(dsName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4301
             conn = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4302
             ps = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4303
             rs = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4304
          }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4305
       }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4306
       else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4307
          super.setDataSourceName(dsName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4308
       }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4309
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4310
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4311
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4312
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4313
     * Sets the Url property for this {@code JdbcRowSet} object
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4314
     * to the given {@code String} object and sets the dataSource name
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4315
     * property to {@code null}. In addition, if the Url property has
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4316
     * previously been set to a non {@code null} value and its value
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4317
     * is different from the value to be set,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4318
     * this method sets this {@code JdbcRowSet} object's private fields
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4319
     * {@code ps}, {@code rs}, and {@code conn} to {@code null}.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4320
     * (The field {@code ps} is its {@code PreparedStatement} object,
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4321
     * the field {@code rs} is its {@code ResultSet} object, and
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4322
     * the field {@code conn} is its {@code Connection} object.)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4323
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4324
     * The Url property is a JDBC URL that is used when
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4325
     * the connection is created using a JDBC technology-enabled driver
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4326
     * ("JDBC driver") and the {@code DriverManager}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4327
     * The correct JDBC URL for the specific driver to be used can be found
28059
e576535359cc 8067377: My hobby: caning, then then canning, the the can-can
martin
parents: 25859
diff changeset
  4328
     * in the driver documentation.  Although there are guidelines for how
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4329
     * a JDBC URL is formed,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4330
     * a driver vendor can specify any {@code String} object except
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4331
     * one with a length of {@code 0} (an empty string).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4332
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4333
     * Setting the Url property is optional if connections are established using
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4334
     * a {@code DataSource} object instead of the {@code DriverManager}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4335
     * The driver will use either the URL property or the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4336
     * dataSourceName property to create a connection, whichever was
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4337
     * specified most recently. If an application uses a JDBC URL, it
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4338
     * must load a JDBC driver that accepts the JDBC URL before it uses the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4339
     * {@code RowSet} object to connect to a database.  The {@code RowSet}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4340
     * object will use the URL internally to create a database connection in order
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4341
     * to read or write data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4342
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4343
     * @param url a {@code String} object that contains the JDBC URL
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4344
     *            that will be used to establish the connection to a database for this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4345
     *            {@code RowSet} object; may be {@code null} but must not
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4346
     *            be an empty string
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4347
     * @throws SQLException if an error occurs setting the Url property or the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4348
     *         parameter supplied is a string with a length of {@code 0} (an
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4349
     *         empty string)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4350
     * @see #getUrl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4351
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4352
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4353
    public void setUrl(String url) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4354
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4355
       if(getUrl() != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4356
          if(!getUrl().equals(url)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4357
             super.setUrl(url);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4358
             conn = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4359
             ps = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4360
             rs = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4361
          }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4362
       }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4363
       else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4364
          super.setUrl(url);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4365
       }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4366
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4367
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4368
    /**
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4369
     * Sets the username property for this {@code JdbcRowSet} object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4370
     * to the given user name. Because it
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4371
     * is not serialized, the username property is set at run time before
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4372
     * calling the method {@code execute}. In addition,
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4373
     * if the {@code username} property is already set with a
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4374
     * non-null value and that value is different from the {@code String}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4375
     * object to be set,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4376
     * this method sets this {@code JdbcRowSet} object's private fields
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4377
     * {@code ps}, {@code rs}, and {@code conn} to {@code null}.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4378
     * (The field {@code ps} is its {@code PreparedStatement} object,
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4379
     * {@code rs} is its {@code ResultSet} object, and
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4380
     * {@code conn} is its {@code Connection} object.)
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4381
     * Setting these fields to {@code null} ensures that only current
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4382
     * values will be used.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4383
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4384
     * @param uname the {@code String} object containing the user name that
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4385
     *        is supplied to the data source to create a connection. It may be null.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4386
     * @see #getUsername
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4387
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4388
    public void setUsername(String uname) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4389
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4390
       if( getUsername() != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4391
          if(!getUsername().equals(uname)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4392
             super.setUsername(uname);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4393
             conn = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4394
             ps = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4395
             rs = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4396
          }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4397
       }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4398
       else{
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4399
          super.setUsername(uname);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4400
       }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4401
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4402
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4403
     /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4404
     * Sets the password property for this {@code JdbcRowSet} object
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4405
     * to the given {@code String} object. Because it
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4406
     * is not serialized, the password property is set at run time before
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4407
     * calling the method {@code execute}. Its default valus is
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4408
     * {@code null}. In addition,
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4409
     * if the {@code password} property is already set with a
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4410
     * non-null value and that value is different from the one being set,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4411
     * this method sets this {@code JdbcRowSet} object's private fields
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4412
     * {@code ps}, {@code rs}, and {@code conn} to {@code null}.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4413
     * (The field {@code ps} is its {@code PreparedStatement} object,
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4414
     * {@code rs} is its {@code ResultSet} object, and
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4415
     * {@code conn} is its {@code Connection} object.)
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4416
     * Setting these fields to {@code null} ensures that only current
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4417
     * values will be used.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4418
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4419
     * @param password the {@code String} object that represents the password
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4420
     *        that must be supplied to the database to create a connection
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4421
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4422
    public void setPassword(String password) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4423
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4424
       if ( getPassword() != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4425
          if(!getPassword().equals(password)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4426
             super.setPassword(password);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4427
             conn = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4428
             ps = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4429
             rs = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4430
          }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4431
       }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4432
       else{
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4433
          super.setPassword(password);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4434
       }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4435
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4436
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4437
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4438
     * Sets the type for this {@code RowSet} object to the specified type.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4439
     * The default type is {@code ResultSet.TYPE_SCROLL_INSENSITIVE}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4440
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4441
     * @param type one of the following constants:
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4442
     *             {@code ResultSet.TYPE_FORWARD_ONLY},
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4443
     *             {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4444
     *             {@code ResultSet.TYPE_SCROLL_SENSITIVE}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4445
     * @throws SQLException if the parameter supplied is not one of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4446
     *         following constants:
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4447
     *          {@code ResultSet.TYPE_FORWARD_ONLY} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4448
     *          {@code ResultSet.TYPE_SCROLL_INSENSITIVE}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4449
     *          {@code ResultSet.TYPE_SCROLL_SENSITIVE}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4450
     * @see #getConcurrency
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4451
     * @see #getType
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4452
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4453
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4454
    public void setType(int type) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4455
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4456
       int oldVal;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4457
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4458
       try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4459
          oldVal = getType();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4460
        }catch(SQLException ex) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4461
           oldVal = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4462
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4463
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4464
       if(oldVal != type) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4465
           super.setType(type);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4466
       }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4467
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4468
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4469
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4470
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4471
     * Sets the concurrency for this {@code RowSet} object to
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4472
     * the specified concurrency. The default concurrency for any {@code RowSet}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4473
     * object (connected or disconnected) is {@code ResultSet.CONCUR_UPDATABLE},
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4474
     * but this method may be called at any time to change the concurrency.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4475
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4476
     * @param concur one of the following constants:
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4477
     *                    {@code ResultSet.CONCUR_READ_ONLY} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4478
     *                    {@code ResultSet.CONCUR_UPDATABLE}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4479
     * @throws SQLException if the parameter supplied is not one of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4480
     *         following constants:
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4481
     *          {@code ResultSet.CONCUR_UPDATABLE} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4482
     *          {@code ResultSet.CONCUR_READ_ONLY}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4483
     * @see #getConcurrency
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4484
     * @see #isReadOnly
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4485
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4486
    public void setConcurrency(int concur) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4487
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4488
       int oldVal;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4489
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4490
       try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4491
          oldVal = getConcurrency();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4492
        }catch(NullPointerException ex) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4493
           oldVal = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4494
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4495
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4496
       if(oldVal != concur) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4497
           super.setConcurrency(concur);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4498
       }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4499
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4500
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4501
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4502
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4503
     * Retrieves the value of the designated {@code SQL XML} parameter as a
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4504
     * {@code SQLXML} object in the Java programming language.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4505
     * @param columnIndex the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4506
     * @return a SQLXML object that maps an SQL XML value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4507
     * @throws SQLException if a database access error occurs
24865
09b1d992ca72 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents: 23010
diff changeset
  4508
     * @since 1.6
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4509
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4510
    public SQLXML getSQLXML(int columnIndex) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4511
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4512
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4513
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4514
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4515
     * Retrieves the value of the designated {@code SQL XML} parameter as a
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4516
     * {@code SQLXML} object in the Java programming language.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4517
     * @param colName the name of the column from which to retrieve the value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4518
     * @return a SQLXML object that maps an SQL XML value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4519
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4520
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4521
    public SQLXML getSQLXML(String colName) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4522
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4523
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4524
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4525
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4526
     * Retrieves the value of the designated column in the current row of this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4527
     * {@code ResultSet} object as a java.sql.RowId object in the Java
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4528
     * programming language.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4529
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4530
     * @param columnIndex the first column is 1, the second 2, ...
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4531
     * @return the column value if the value is a SQL {@code NULL} the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4532
     *     value returned is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4533
     * @throws SQLException if a database access error occurs
24865
09b1d992ca72 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents: 23010
diff changeset
  4534
     * @since 1.6
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4535
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4536
    public RowId getRowId(int columnIndex) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4537
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4538
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4539
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4540
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4541
     * Retrieves the value of the designated column in the current row of this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4542
     * {@code ResultSet} object as a java.sql.RowId object in the Java
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4543
     * programming language.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4544
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4545
     * @param columnName the name of the column
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4546
     * @return the column value if the value is a SQL {@code NULL} the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4547
     *     value returned is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4548
     * @throws SQLException if a database access error occurs
24865
09b1d992ca72 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents: 23010
diff changeset
  4549
     * @since 1.6
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4550
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4551
    public RowId getRowId(String columnName) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4552
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4553
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4554
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4555
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4556
     * Updates the designated column with a {@code RowId} value. The updater
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4557
     * methods are used to update column values in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4558
     * row. The updater methods do not update the underlying database; instead
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4559
     * the {@code updateRow} or {@code insertRow} methods are called
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4560
     * to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4561
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4562
     * @param columnIndex the first column is 1, the second 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4563
     * @param x the column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4564
     * @throws SQLException if a database access occurs
24865
09b1d992ca72 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents: 23010
diff changeset
  4565
     * @since 1.6
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4566
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4567
    public void updateRowId(int columnIndex, RowId x) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4568
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4569
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4570
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4571
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4572
     * Updates the designated column with a {@code RowId} value. The updater
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4573
     * methods are used to update column values in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4574
     * row. The updater methods do not update the underlying database; instead
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4575
     * the {@code updateRow} or {@code insertRow} methods are called
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4576
     * to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4577
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4578
     * @param columnName the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4579
     * @param x the column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4580
     * @throws SQLException if a database access occurs
24865
09b1d992ca72 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents: 23010
diff changeset
  4581
     * @since 1.6
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4582
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4583
    public void updateRowId(String columnName, RowId x) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4584
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4585
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4586
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4587
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4588
     * Retrieves the holdability of this ResultSet object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4589
     * @return  either ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4590
     * @throws SQLException if a database error occurs
24865
09b1d992ca72 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents: 23010
diff changeset
  4591
     * @since 1.6
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4592
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4593
    public int getHoldability() throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4594
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4595
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4596
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4597
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4598
     * Retrieves whether this ResultSet object has been closed. A ResultSet is closed if the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4599
     * method close has been called on it, or if it is automatically closed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4600
     * @return true if this ResultSet object is closed; false if it is still open
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4601
     * @throws SQLException if a database access error occurs
24865
09b1d992ca72 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents: 23010
diff changeset
  4602
     * @since 1.6
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4603
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4604
    public boolean isClosed() throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4605
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4606
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4607
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4608
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4609
     * This method is used for updating columns that support National Character sets.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4610
     * It can be used for updating NCHAR,NVARCHAR and LONGNVARCHAR columns.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4611
     * @param columnIndex the first column is 1, the second 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4612
     * @param nString the value for the column to be updated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4613
     * @throws SQLException if a database access error occurs
24865
09b1d992ca72 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents: 23010
diff changeset
  4614
     * @since 1.6
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4615
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4616
    public void updateNString(int columnIndex, String nString) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4617
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4618
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4619
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4620
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4621
     * This method is used for updating columns that support National Character sets.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4622
     * It can be used for updating NCHAR,NVARCHAR and LONGNVARCHAR columns.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4623
     * @param columnName name of the Column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4624
     * @param nString the value for the column to be updated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4625
     * @throws SQLException if a database access error occurs
24865
09b1d992ca72 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents: 23010
diff changeset
  4626
     * @since 1.6
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4627
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4628
    public void updateNString(String columnName, String nString) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4629
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4630
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4631
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4632
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4633
    /*o
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4634
     * This method is used for updating SQL {@code NCLOB}  type that maps
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4635
     * to {@code java.sql.Types.NCLOB}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4636
     * @param columnIndex the first column is 1, the second 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4637
     * @param nClob the value for the column to be updated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4638
     * @throws SQLException if a database access error occurs
24865
09b1d992ca72 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents: 23010
diff changeset
  4639
     * @since 1.6
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4640
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4641
    public void updateNClob(int columnIndex, NClob nClob) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4642
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4643
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4644
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4645
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4646
     * This method is used for updating SQL {@code NCLOB}  type that maps
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4647
     * to {@code java.sql.Types.NCLOB}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4648
     * @param columnName name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4649
     * @param nClob the value for the column to be updated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4650
     * @throws SQLException if a database access error occurs
24865
09b1d992ca72 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents: 23010
diff changeset
  4651
     * @since 1.6
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4652
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4653
    public void updateNClob(String columnName, NClob nClob) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4654
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4655
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4656
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4657
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4658
     * Retrieves the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4659
     * of this {@code ResultSet} object as a {@code NClob} object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4660
     * in the Java programming language.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4661
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4662
     * @param i the first column is 1, the second is 2, ...
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4663
     * @return a {@code NClob} object representing the SQL
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4664
     *         {@code NCLOB} value in the specified column
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4665
     * @exception SQLException if a database access error occurs
24865
09b1d992ca72 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents: 23010
diff changeset
  4666
     * @since 1.6
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4667
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4668
    public NClob getNClob(int i) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4669
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4670
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4671
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4672
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4673
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4674
     * Retrieves the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4675
     * of this {@code ResultSet} object as a {@code NClob} object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4676
     * in the Java programming language.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4677
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4678
     * @param colName the name of the column from which to retrieve the value
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4679
     * @return a {@code NClob} object representing the SQL {@code NCLOB}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4680
     * value in the specified column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4681
     * @exception SQLException if a database access error occurs
24865
09b1d992ca72 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents: 23010
diff changeset
  4682
     * @since 1.6
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4683
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4684
    public NClob getNClob(String colName) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4685
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4686
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4687
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4688
    public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException{
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4689
        return null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4690
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4691
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4692
    public boolean isWrapperFor(Class<?> interfaces) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4693
        return false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4694
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4695
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4696
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4697
      * Sets the designated parameter to the given {@code java.sql.SQLXML} object. The driver converts this to an
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4698
      * SQL {@code XML} value when it sends it to the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4699
      * @param parameterIndex index of the first parameter is 1, the second is 2, ...
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4700
      * @param xmlObject a {@code SQLXML} object that maps an SQL {@code XML} value
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4701
      * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4702
      * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4703
      */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4704
     public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4705
         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4706
     }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4707
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4708
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4709
     * Sets the designated parameter to the given {@code java.sql.SQLXML} object. The driver converts this to an
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4710
     * {@code SQL XML} value when it sends it to the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4711
     * @param parameterName the name of the parameter
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4712
     * @param xmlObject a {@code SQLXML} object that maps an {@code SQL XML} value
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4713
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4714
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4715
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4716
    public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4717
         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4718
     }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4719
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4720
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4721
     * Sets the designated parameter to the given {@code java.sql.RowId} object. The
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4722
     * driver converts this to a SQL {@code ROWID} value when it sends it
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4723
     * to the database
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4724
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4725
     * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4726
     * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4727
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4728
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4729
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4730
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4731
    public void setRowId(int parameterIndex, RowId x) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4732
         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4733
     }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4734
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4735
   /**
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4736
    * Sets the designated parameter to the given {@code java.sql.RowId} object. The
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4737
    * driver converts this to a SQL {@code ROWID} when it sends it to the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4738
    * database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4739
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4740
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4741
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4742
    * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4743
    * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4744
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4745
   public void setRowId(String parameterName, RowId x) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4746
         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4747
     }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4748
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4749
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4750
   /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4751
     * Sets the designated parameter to the given {@code String} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4752
     * The driver converts this to a SQL {@code NCHAR} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4753
     * {@code NVARCHAR} or {@code LONGNVARCHAR} value
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4754
     * (depending on the argument's
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4755
     * size relative to the driver's limits on {@code NVARCHAR} values)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4756
     * when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4757
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4758
     * @param parameterIndex of the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4759
     * @param value the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4760
     * @throws SQLException if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4761
     *         character sets;  if the driver can detect that a data conversion
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4762
     *         error could occur ; or if a database access error occurs
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4763
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4764
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4765
     public void setNString(int parameterIndex, String value) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4766
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4767
     }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4768
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4769
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4770
   /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4771
    * Sets the designated parameter in this {@code RowSet} object's command
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4772
    * to a {@code Reader} object. The
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4773
    * {@code Reader} reads the data till end-of-file is reached. The
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4774
    * driver does the necessary conversion from Java character format to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4775
    * the national character set in the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4776
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4777
    * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4778
    * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4779
    * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4780
    * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4781
    * it might be more efficient to use a version of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4782
    * {@code setNCharacterStream} which takes a length parameter.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4783
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4784
    * @param parameterIndex of the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4785
    * @param value the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4786
    * @throws SQLException if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4787
    *         character sets;  if the driver can detect that a data conversion
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4788
    *         error could occur ; if a database access error occurs; or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4789
    *         this method is called on a closed {@code PreparedStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4790
    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4791
    * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4792
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4793
    public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4794
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4795
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4796
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4797
  /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4798
    * Sets the designated parameter to a {@code java.sql.NClob} object. The object
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4799
    * implements the {@code java.sql.NClob} interface. This {@code NClob}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4800
    * object maps to a SQL {@code NCLOB}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4801
    * @param parameterName the name of the column to be set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4802
    * @param value the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4803
    * @throws SQLException if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4804
    *         character sets;  if the driver can detect that a data conversion
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4805
    *         error could occur; or if a database access error occurs
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4806
    * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4807
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4808
    public void setNClob(String parameterName, NClob value) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4809
         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4810
     }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4811
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4812
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4813
    /**
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4814
     * Retrieves the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4815
     * of this {@code ResultSet} object as a
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4816
     * {@code java.io.Reader} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4817
     * It is intended for use when
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4818
     * accessing  {@code NCHAR},{@code NVARCHAR}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4819
     * and {@code LONGNVARCHAR} columns.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4820
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4821
     * @return a {@code java.io.Reader} object that contains the column
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4822
     * value; if the value is SQL {@code NULL}, the value returned is
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4823
     * {@code null} in the Java programming language.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4824
     * @param columnIndex the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4825
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4826
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4827
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4828
    public java.io.Reader getNCharacterStream(int columnIndex) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4829
       throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4830
     }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4831
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4832
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4833
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4834
     * Retrieves the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4835
     * of this {@code ResultSet} object as a
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4836
     * {@code java.io.Reader} object.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4837
     * It is intended for use when
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4838
     * accessing  {@code NCHAR},{@code NVARCHAR}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4839
     * and {@code LONGNVARCHAR} columns.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4840
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4841
     * @param columnName the name of the column
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4842
     * @return a {@code java.io.Reader} object that contains the column
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4843
     * value; if the value is SQL {@code NULL}, the value returned is
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4844
     * {@code null} in the Java programming language
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4845
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4846
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4847
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4848
    public java.io.Reader getNCharacterStream(String columnName) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4849
       throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4850
     }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4851
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4852
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4853
     * Updates the designated column with a {@code java.sql.SQLXML} value.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4854
     * The updater
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4855
     * methods are used to update column values in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4856
     * row. The updater methods do not update the underlying database; instead
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4857
     * the {@code updateRow} or {@code insertRow} methods are called
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4858
     * to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4859
     * @param columnIndex the first column is 1, the second 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4860
     * @param xmlObject the value for the column to be updated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4861
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4862
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4863
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4864
    public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4865
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4866
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4867
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4868
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4869
     * Updates the designated column with a {@code java.sql.SQLXML} value.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4870
     * The updater
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4871
     * methods are used to update column values in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4872
     * row. The updater methods do not update the underlying database; instead
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4873
     * the {@code updateRow} or {@code insertRow} methods are called
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4874
     * to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4875
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4876
     * @param columnName the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4877
     * @param xmlObject the column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4878
     * @throws SQLException if a database access occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4879
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4880
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4881
    public void updateSQLXML(String columnName, SQLXML xmlObject) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4882
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4883
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4884
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4885
     /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4886
     * Retrieves the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4887
     * of this {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4888
     * a {@code String} in the Java programming language.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4889
     * It is intended for use when
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4890
     * accessing  {@code NCHAR},{@code NVARCHAR}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4891
     * and {@code LONGNVARCHAR} columns.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4892
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4893
     * @param columnIndex the first column is 1, the second is 2, ...
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4894
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4895
     * value returned is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4896
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4897
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4898
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4899
    public String getNString(int columnIndex) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4900
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4901
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4902
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4903
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4904
     * Retrieves the value of the designated column in the current row
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4905
     * of this {@code ResultSet} object as
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4906
     * a {@code String} in the Java programming language.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4907
     * It is intended for use when
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4908
     * accessing  {@code NCHAR},{@code NVARCHAR}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4909
     * and {@code LONGNVARCHAR} columns.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4910
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4911
     * @param columnName the SQL name of the column
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4912
     * @return the column value; if the value is SQL {@code NULL}, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4913
     * value returned is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4914
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4915
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4916
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4917
    public String getNString(String columnName) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4918
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4919
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4920
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4921
     /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4922
       * Updates the designated column with a character stream value, which will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4923
       * have the specified number of bytes. The driver does the necessary conversion
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4924
       * from Java character format to the national character set in the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4925
       * It is intended for use when updating NCHAR,NVARCHAR and LONGNVARCHAR columns.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4926
       * The updater methods are used to update column values in the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4927
       * the insert row. The updater methods do not update the underlying database;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4928
       * instead the updateRow or insertRow methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4929
       *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4930
       * @param columnIndex the first column is 1, the second is 2, ...
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4931
       * @param x the new column value
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4932
       * @param length the length of the stream
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4933
       * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4934
       * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4935
       */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4936
       public void updateNCharacterStream(int columnIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4937
                            java.io.Reader x,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4938
                            long length)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4939
                            throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4940
          throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4941
       }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4942
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4943
     /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4944
       * Updates the designated column with a character stream value, which will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4945
       * have the specified number of bytes. The driver does the necessary conversion
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4946
       * from Java character format to the national character set in the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4947
       * It is intended for use when updating NCHAR,NVARCHAR and LONGNVARCHAR columns.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4948
       * The updater methods are used to update column values in the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4949
       * the insert row. The updater methods do not update the underlying database;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4950
       * instead the updateRow or insertRow methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4951
       *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4952
       * @param columnName name of the Column
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4953
       * @param x the new column value
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4954
       * @param length the length of the stream
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4955
       * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4956
       * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4957
       */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4958
       public void updateNCharacterStream(String columnName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4959
                            java.io.Reader x,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4960
                            long length)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4961
                            throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4962
          throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4963
       }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4964
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4965
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4966
     * Updates the designated column with a character stream value. The
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4967
     * driver does the necessary conversion from Java character format to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4968
     * the national character set in the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4969
     * It is intended for use when
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4970
     * updating  {@code NCHAR},{@code NVARCHAR}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4971
     * and {@code LONGNVARCHAR} columns.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4972
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4973
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4974
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4975
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4976
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4977
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4978
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4979
     * it might be more efficient to use a version of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4980
     * {@code updateNCharacterStream} which takes a length parameter.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4981
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4982
     * @param columnIndex the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4983
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4984
     * @exception SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4985
     * the result set concurrency is {@code CONCUR_READ_ONLY} or this
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  4986
     * method is called on a closed result set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4987
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4988
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4989
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4990
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4991
    public void updateNCharacterStream(int columnIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4992
                             java.io.Reader x) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4993
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4994
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4995
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4996
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4997
     * Updates the designated column with a character stream value.  The
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4998
     * driver does the necessary conversion from Java character format to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4999
     * the national character set in the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5000
     * It is intended for use when
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5001
     * updating  {@code NCHAR},{@code NVARCHAR}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5002
     * and {@code LONGNVARCHAR} columns.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5003
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5004
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5005
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5006
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5007
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5008
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5009
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5010
     * it might be more efficient to use a version of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5011
     * {@code updateNCharacterStream} which takes a length parameter.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5012
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5013
     * @param columnLabel the label for the column specified with the SQL AS clause.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5014
     *        If the SQL AS clause was not specified, then the label is the name of the column
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5015
     * @param reader the {@code java.io.Reader} object containing
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5016
     *        the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5017
     * @exception SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5018
     *        the result set concurrency is {@code CONCUR_READ_ONLY} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5019
     *        this method is called on a closed result set
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5020
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5021
     *        this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5022
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5023
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5024
    public void updateNCharacterStream(String columnLabel,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5025
                             java.io.Reader reader) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5026
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5027
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5028
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5029
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5030
     * Updates the designated column using the given input stream, which
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5031
     * will have the specified number of bytes.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5032
     * When a very large ASCII value is input to a {@code LONGVARCHAR}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5033
     * parameter, it may be more practical to send it via a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5034
     * {@code java.io.InputStream}. Data will be read from the stream
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5035
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5036
     * do any necessary conversion from ASCII to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5037
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5038
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5039
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5040
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5041
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5042
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5043
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5044
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5045
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5046
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5047
     * @param columnIndex the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5048
     * @param inputStream An object that contains the data to set the parameter
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5049
     *        value to.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5050
     * @param length the number of bytes in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5051
     * @exception SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5052
     *            the result set concurrency is {@code CONCUR_READ_ONLY}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5053
     *            or this method is called on a closed result set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5054
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5055
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5056
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5057
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5058
    public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5059
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5060
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5061
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5062
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5063
     * Updates the designated column using the given input stream, which
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5064
     * will have the specified number of bytes.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5065
     * When a very large ASCII value is input to a {@code LONGVARCHAR}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5066
     * parameter, it may be more practical to send it via a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5067
     * {@code java.io.InputStream}. Data will be read from the stream
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5068
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5069
     * do any necessary conversion from ASCII to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5070
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5071
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5072
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5073
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5074
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5075
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5076
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5077
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5078
     * {@code insertRow} methods are called to update the database.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5079
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5080
     * @param columnLabel the label for the column specified with the SQL AS clause.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5081
     *        If the SQL AS clause was not specified,
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5082
     *        then the label is the name of the column.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5083
     * @param inputStream An object that contains the data to set the parameter
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5084
     *        value to.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5085
     * @param length the number of bytes in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5086
     * @exception SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5087
     *            the result set concurrency is {@code CONCUR_READ_ONLY}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5088
     *            or this method is called on a closed result set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5089
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5090
     *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5091
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5092
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5093
    public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5094
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5095
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5096
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5097
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5098
     * Updates the designated column using the given input stream.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5099
     * When a very large ASCII value is input to a {@code LONGVARCHAR}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5100
     * parameter, it may be more practical to send it via a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5101
     * {@code java.io.InputStream}. Data will be read from the stream
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5102
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5103
     * do any necessary conversion from ASCII to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5104
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5105
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5106
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5107
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5108
     *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5109
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5110
     * it might be more efficient to use a version of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5111
     * {@code updateBlob} which takes a length parameter.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5112
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5113
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5114
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5115
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5116
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5117
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5118
     * @param columnIndex the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5119
     * @param inputStream An object that contains the data to set the parameter
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5120
     *        value to.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5121
     * @exception SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5122
     *            the result set concurrency is {@code CONCUR_READ_ONLY}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5123
     *            or this method is called on a closed result set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5124
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5125
     *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5126
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5127
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5128
    public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5129
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5130
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5131
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5132
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5133
     * Updates the designated column using the given input stream.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5134
     * When a very large ASCII value is input to a {@code LONGVARCHAR}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5135
     * parameter, it may be more practical to send it via a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5136
     * {@code java.io.InputStream}. Data will be read from the stream
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5137
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5138
     * do any necessary conversion from ASCII to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5139
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5140
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5141
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5142
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5143
     *   <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5144
     * it might be more efficient to use a version of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5145
     * {@code updateBlob} which takes a length parameter.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5146
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5147
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5148
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5149
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5150
     * {@code insertRow} methods are called to update the database.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5151
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5152
     * @param columnLabel the label for the column specified with the SQL AS clause.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5153
     *        If the SQL AS clause was not specified, then the label
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5154
     *        is the name of the column
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5155
     * @param inputStream An object that contains the data to set the parameter
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5156
     *        value to.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5157
     * @exception SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5158
     *        the result set concurrency is {@code CONCUR_READ_ONLY}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5159
     *        or this method is called on a closed result set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5160
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5161
     *        this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5162
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5163
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5164
    public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5165
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5166
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5167
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5168
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5169
     * Updates the designated column using the given {@code Reader}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5170
     * object, which is the given number of characters long.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5171
     * When a very large UNICODE value is input to a {@code LONGVARCHAR}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5172
     * parameter, it may be more practical to send it via a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5173
     * {@code java.io.Reader} object. The data will be read from the stream
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5174
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5175
     * do any necessary conversion from UNICODE to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5176
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5177
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5178
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5179
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5180
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5181
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5182
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5183
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5184
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5185
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5186
     * @param columnIndex the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5187
     * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5188
     * @param length the number of characters in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5189
     * @exception SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5190
     *            the result set concurrency is {@code CONCUR_READ_ONLY}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5191
     *            or this method is called on a closed result set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5192
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5193
     *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5194
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5195
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5196
    public void updateClob(int columnIndex,  Reader reader, long length) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5197
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5198
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5199
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5200
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5201
     * Updates the designated column using the given {@code Reader}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5202
     * object, which is the given number of characters long.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5203
     * When a very large UNICODE value is input to a {@code LONGVARCHAR}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5204
     * parameter, it may be more practical to send it via a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5205
     * {@code java.io.Reader} object. The data will be read from the stream
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5206
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5207
     * do any necessary conversion from UNICODE to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5208
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5209
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5210
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5211
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5212
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5213
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5214
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5215
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5216
     * {@code insertRow} methods are called to update the database.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5217
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5218
     * @param columnLabel the label for the column specified with the SQL AS clause.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5219
     *        If the SQL AS clause was not specified, then the label is the name of the column
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5220
     * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5221
     * @param length the number of characters in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5222
     * @exception SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5223
     *            the result set concurrency is {@code CONCUR_READ_ONLY}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5224
     *            or this method is called on a closed result set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5225
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5226
     *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5227
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5228
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5229
    public void updateClob(String columnLabel,  Reader reader, long length) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5230
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5231
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5232
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5233
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5234
     * Updates the designated column using the given {@code Reader}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5235
     * object.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5236
     * When a very large UNICODE value is input to a {@code LONGVARCHAR}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5237
     * parameter, it may be more practical to send it via a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5238
     * {@code java.io.Reader} object. The data will be read from the stream
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5239
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5240
     * do any necessary conversion from UNICODE to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5241
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5242
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5243
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5244
     * standard interface.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5245
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5246
     * it might be more efficient to use a version of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5247
     * {@code updateClob} which takes a length parameter.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5248
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5249
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5250
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5251
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5252
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5253
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5254
     * @param columnIndex the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5255
     * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5256
     * @exception SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5257
     *            the result set concurrency is {@code CONCUR_READ_ONLY}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5258
     *            or this method is called on a closed result set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5259
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5260
     *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5261
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5262
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5263
    public void updateClob(int columnIndex,  Reader reader) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5264
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5265
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5266
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5267
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5268
     * Updates the designated column using the given {@code Reader}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5269
     * object.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5270
     * When a very large UNICODE value is input to a {@code LONGVARCHAR}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5271
     * parameter, it may be more practical to send it via a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5272
     * {@code java.io.Reader} object. The data will be read from the stream
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5273
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5274
     * do any necessary conversion from UNICODE to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5275
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5276
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5277
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5278
     * standard interface.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5279
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5280
     * it might be more efficient to use a version of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5281
     * {@code updateClob} which takes a length parameter.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5282
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5283
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5284
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5285
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5286
     * {@code insertRow} methods are called to update the database.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5287
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5288
     * @param columnLabel the label for the column specified with the SQL AS clause.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5289
     *        If the SQL AS clause was not specified, then the label
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5290
     *        is the name of the column
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5291
     * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5292
     * @exception SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5293
     *            the result set concurrency is {@code CONCUR_READ_ONLY}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5294
     *            or this method is called on a closed result set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5295
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5296
     *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5297
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5298
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5299
    public void updateClob(String columnLabel,  Reader reader) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5300
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5301
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5302
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5303
   /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5304
     * Updates the designated column using the given {@code Reader}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5305
     * object, which is the given number of characters long.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5306
     * When a very large UNICODE value is input to a {@code LONGVARCHAR}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5307
     * parameter, it may be more practical to send it via a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5308
     * {@code java.io.Reader} object. The data will be read from the stream
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5309
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5310
     * do any necessary conversion from UNICODE to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5311
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5312
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5313
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5314
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5315
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5316
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5317
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5318
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5319
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5320
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5321
     * @param columnIndex the first column is 1, the second 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5322
     * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5323
     * @param length the number of characters in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5324
     * @throws SQLException if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5325
     *         character sets;  if the driver can detect that a data conversion
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5326
     *         error could occur; this method is called on a closed result set,
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5327
     *         if a database access error occurs or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5328
     *         the result set concurrency is {@code CONCUR_READ_ONLY}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5329
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5330
     *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5331
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5332
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5333
    public void updateNClob(int columnIndex,  Reader reader, long length) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5334
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5335
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5336
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5337
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5338
     * Updates the designated column using the given {@code Reader}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5339
     * object, which is the given number of characters long.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5340
     * When a very large UNICODE value is input to a {@code LONGVARCHAR}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5341
     * parameter, it may be more practical to send it via a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5342
     * {@code java.io.Reader} object. The data will be read from the stream
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5343
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5344
     * do any necessary conversion from UNICODE to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5345
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5346
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5347
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5348
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5349
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5350
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5351
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5352
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5353
     * {@code insertRow} methods are called to update the database.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5354
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5355
     * @param columnLabel the label for the column specified with the SQL AS clause.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5356
     *        If the SQL AS clause was not specified, then the label is the name of the column
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5357
     * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5358
     * @param length the number of characters in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5359
     * @throws SQLException if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5360
     *         character sets;  if the driver can detect that a data conversion
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5361
     *         error could occur; this method is called on a closed result set;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5362
     *         if a database access error occurs or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5363
     *         the result set concurrency is {@code CONCUR_READ_ONLY}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5364
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5365
     *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5366
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5367
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5368
    public void updateNClob(String columnLabel,  Reader reader, long length) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5369
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5370
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5371
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5372
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5373
     * Updates the designated column using the given {@code Reader}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5374
     * object.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5375
     * When a very large UNICODE value is input to a {@code LONGVARCHAR}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5376
     * parameter, it may be more practical to send it via a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5377
     * {@code java.io.Reader} object. The data will be read from the stream
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5378
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5379
     * do any necessary conversion from UNICODE to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5380
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5381
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5382
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5383
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5384
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5385
     * it might be more efficient to use a version of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5386
     * {@code updateNClob} which takes a length parameter.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5387
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5388
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5389
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5390
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5391
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5392
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5393
     * @param columnIndex the first column is 1, the second 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5394
     * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5395
     * @throws SQLException if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5396
     *         character sets;  if the driver can detect that a data conversion
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5397
     *         error could occur; this method is called on a closed result set,
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5398
     *         if a database access error occurs or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5399
     *         the result set concurrency is {@code CONCUR_READ_ONLY}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5400
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5401
     *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5402
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5403
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5404
    public void updateNClob(int columnIndex,  Reader reader) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5405
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5406
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5407
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5408
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5409
     * Updates the designated column using the given {@code Reader}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5410
     * object.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5411
     * When a very large UNICODE value is input to a {@code LONGVARCHAR}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5412
     * parameter, it may be more practical to send it via a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5413
     * {@code java.io.Reader} object. The data will be read from the stream
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5414
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5415
     * do any necessary conversion from UNICODE to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5416
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5417
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5418
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5419
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5420
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5421
     * it might be more efficient to use a version of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5422
     * {@code updateNClob} which takes a length parameter.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5423
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5424
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5425
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5426
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5427
     * {@code insertRow} methods are called to update the database.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5428
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5429
     * @param columnLabel the label for the column specified with the SQL AS clause.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5430
     *        If the SQL AS clause was not specified, then
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5431
     *        the label is the name of the column
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5432
     * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5433
     * @throws SQLException if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5434
     *         character sets;  if the driver can detect that a data conversion
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5435
     *         error could occur; this method is called on a closed result set;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5436
     *         if a database access error occurs or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5437
     *         the result set concurrency is {@code CONCUR_READ_ONLY}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5438
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5439
     *         this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5440
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5441
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5442
    public void updateNClob(String columnLabel,  Reader reader) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5443
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5444
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5445
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5446
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5447
    /**
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5448
     * Updates the designated column with an ascii stream value, which will have
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5449
     * the specified number of bytes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5450
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5451
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5452
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5453
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5454
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5455
     * @param columnIndex the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5456
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5457
     * @param length the length of the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5458
     * @exception SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5459
     *            the result set concurrency is {@code CONCUR_READ_ONLY}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5460
     *            or this method is called on a closed result set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5461
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5462
     *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5463
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5464
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5465
    public void updateAsciiStream(int columnIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5466
                           java.io.InputStream x,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5467
                           long length) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5468
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5469
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5470
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5471
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5472
     * Updates the designated column with a binary stream value, which will have
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5473
     * the specified number of bytes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5474
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5475
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5476
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5477
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5478
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5479
     * @param columnIndex the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5480
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5481
     * @param length the length of the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5482
     * @exception SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5483
     *            the result set concurrency is {@code CONCUR_READ_ONLY}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5484
     *            or this method is called on a closed result set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5485
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5486
     *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5487
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5488
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5489
    public void updateBinaryStream(int columnIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5490
                            java.io.InputStream x,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5491
                            long length) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5492
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5493
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5494
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5495
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5496
     * Updates the designated column with a character stream value, which will have
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5497
     * the specified number of bytes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5498
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5499
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5500
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5501
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5502
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5503
     * @param columnIndex the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5504
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5505
     * @param length the length of the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5506
     * @exception SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5507
     *            the result set concurrency is {@code CONCUR_READ_ONLY}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5508
     *            or this method is called on a closed result set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5509
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5510
     *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5511
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5512
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5513
    public void updateCharacterStream(int columnIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5514
                             java.io.Reader x,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5515
                             long length) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5516
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5517
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5518
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5519
     /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5520
     * Updates the designated column with an ascii stream value, which will have
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5521
     * the specified number of bytes..
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5522
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5523
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5524
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5525
     * {@code insertRow} methods are called to update the database.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5526
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5527
     * @param columnLabel the label for the column specified with the SQL AS clause.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5528
     *        If the SQL AS clause was not specified, then
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5529
     *        the label is the name of the column
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5530
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5531
     * @param length the length of the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5532
     * @exception SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5533
     *            the result set concurrency is {@code CONCUR_READ_ONLY}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5534
     *            or this method is called on a closed result set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5535
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5536
     *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5537
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5538
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5539
    public void updateAsciiStream(String columnLabel,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5540
                           java.io.InputStream x,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5541
                           long length) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5542
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5543
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5544
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5545
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5546
     * Updates the designated column with an ascii stream value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5547
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5548
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5549
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5550
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5551
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5552
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5553
     * it might be more efficient to use a version of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5554
     * {@code updateAsciiStream} which takes a length parameter.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5555
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5556
     * @param columnIndex the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5557
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5558
     * @exception SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5559
     *            the result set concurrency is {@code CONCUR_READ_ONLY}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5560
     *            or this method is called on a closed result set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5561
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5562
     *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5563
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5564
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5565
    public void updateAsciiStream(int columnIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5566
                           java.io.InputStream x) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5567
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5568
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5569
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5570
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5571
     * Updates the designated column with an ascii stream value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5572
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5573
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5574
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5575
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5576
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5577
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5578
     * it might be more efficient to use a version of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5579
     * {@code updateAsciiStream} which takes a length parameter.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5580
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5581
     * @param columnLabel the label for the column specified with the SQL AS clause.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5582
     *        If the SQL AS clause was not specified, then the label
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5583
     *        is the name of the column
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5584
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5585
     * @exception SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5586
     *            the result set concurrency is {@code CONCUR_READ_ONLY}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5587
     *            or this method is called on a closed result set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5588
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5589
     *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5590
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5591
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5592
    public void updateAsciiStream(String columnLabel,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5593
                           java.io.InputStream x) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5594
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5595
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5596
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5597
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5598
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5599
     * Updates the designated column with a binary stream value, which will have
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5600
     * the specified number of bytes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5601
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5602
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5603
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5604
     * {@code insertRow} methods are called to update the database.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5605
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5606
     * @param columnLabel the label for the column specified with the SQL AS clause.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5607
     *        If the SQL AS clause was not specified, then
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5608
     *        the label is the name of the column
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5609
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5610
     * @param length the length of the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5611
     * @exception SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5612
     *            the result set concurrency is {@code CONCUR_READ_ONLY}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5613
     *            or this method is called on a closed result set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5614
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5615
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5616
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5617
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5618
    public void updateBinaryStream(String columnLabel,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5619
                            java.io.InputStream x,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5620
                            long length) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5621
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5622
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5623
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5624
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5625
     * Updates the designated column with a binary stream value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5626
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5627
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5628
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5629
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5630
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5631
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5632
     * it might be more efficient to use a version of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5633
     * {@code updateBinaryStream} which takes a length parameter.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5634
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5635
     * @param columnIndex the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5636
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5637
     * @exception SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5638
     *            the result set concurrency is {@code CONCUR_READ_ONLY}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5639
     *            or this method is called on a closed result set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5640
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5641
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5642
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5643
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5644
    public void updateBinaryStream(int columnIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5645
                            java.io.InputStream x) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5646
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5647
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5648
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5649
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5650
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5651
     * Updates the designated column with a binary stream value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5652
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5653
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5654
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5655
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5656
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5657
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5658
     * it might be more efficient to use a version of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5659
     * {@code updateBinaryStream} which takes a length parameter.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5660
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5661
     * @param columnLabel the label for the column specified with the SQL AS clause.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5662
     *        If the SQL AS clause was not specified, then
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5663
     *        the label is the name of the column
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5664
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5665
     * @exception SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5666
     *            the result set concurrency is {@code CONCUR_READ_ONLY}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5667
     *            or this method is called on a closed result set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5668
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5669
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5670
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5671
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5672
    public void updateBinaryStream(String columnLabel,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5673
                            java.io.InputStream x) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5674
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5675
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5676
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5677
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5678
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5679
     * Updates the designated column with a character stream value, which will have
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5680
     * the specified number of bytes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5681
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5682
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5683
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5684
     * {@code insertRow} methods are called to update the database.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5685
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5686
     * @param columnLabel the label for the column specified with the SQL AS clause.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5687
     *        If the SQL AS clause was not specified, then
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5688
     *        the label is the name of the column
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5689
     * @param reader the {@code java.io.Reader} object containing
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5690
     *        the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5691
     * @param length the length of the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5692
     * @exception SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5693
     *            the result set concurrency is {@code CONCUR_READ_ONLY}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5694
     *            or this method is called on a closed result set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5695
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5696
     *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5697
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5698
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5699
    public void updateCharacterStream(String columnLabel,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5700
                             java.io.Reader reader,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5701
                             long length) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5702
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5703
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5704
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5705
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5706
     * Updates the designated column with a character stream value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5707
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5708
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5709
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5710
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5711
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5712
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5713
     * it might be more efficient to use a version of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5714
     * {@code updateCharacterStream} which takes a length parameter.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5715
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5716
     * @param columnIndex the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5717
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5718
     * @exception SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5719
     *            the result set concurrency is {@code CONCUR_READ_ONLY}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5720
     *            or this method is called on a closed result set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5721
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5722
     *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5723
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5724
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5725
    public void updateCharacterStream(int columnIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5726
                             java.io.Reader x) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5727
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5728
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5729
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5730
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5731
     * Updates the designated column with a character stream value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5732
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5733
     * current row or the insert row.  The updater methods do not
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5734
     * update the underlying database; instead the {@code updateRow} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5735
     * {@code insertRow} methods are called to update the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5736
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5737
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5738
     * it might be more efficient to use a version of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5739
     * {@code updateCharacterStream} which takes a length parameter.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5740
     *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5741
     * @param columnLabel the label for the column specified with the SQL AS clause.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5742
     *        If the SQL AS clause was not specified, then the label
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5743
     *        is the name of the column
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5744
     * @param reader the {@code java.io.Reader} object containing
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5745
     *        the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5746
     * @exception SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5747
     *            the result set concurrency is {@code CONCUR_READ_ONLY}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5748
     *            or this method is called on a closed result set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5749
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5750
     *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5751
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5752
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5753
    public void updateCharacterStream(String columnLabel,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5754
                             java.io.Reader reader) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5755
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5756
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5757
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5758
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5759
  /**
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5760
   * Sets the designated parameter to the given {@code java.net.URL} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5761
   * The driver converts this to an SQL {@code DATALINK} value
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5762
   * when it sends it to the database.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5763
   *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5764
   * @param parameterIndex the first parameter is 1, the second is 2, ...
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5765
   * @param x the {@code java.net.URL} object to be set
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5766
   * @exception SQLException if a database access error occurs or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5767
   *            this method is called on a closed {@code PreparedStatement}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5768
   * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5769
   * @since 1.4
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5770
   */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5771
  public void setURL(int parameterIndex, java.net.URL x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5772
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5773
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5774
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5775
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5776
  /**
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5777
   * Sets the designated parameter to a {@code Reader} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5778
   * This method differs from the {@code setCharacterStream (int, Reader)} method
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5779
   * because it informs the driver that the parameter value should be sent to
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5780
   * the server as a {@code NCLOB}.  When the {@code setCharacterStream} method is used, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5781
   * driver may have to do extra work to determine whether the parameter
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5782
   * data should be sent to the server as a {@code LONGNVARCHAR} or a {@code NCLOB}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5783
   * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5784
   * it might be more efficient to use a version of
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5785
   * {@code setNClob} which takes a length parameter.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5786
   *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5787
   * @param parameterIndex index of the first parameter is 1, the second is 2, ...
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5788
   * @param reader An object that contains the data to set the parameter value to.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5789
   * @throws SQLException if parameterIndex does not correspond to a parameter
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5790
   *         marker in the SQL statement;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5791
   *         if the driver does not support national character sets;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5792
   *         if the driver can detect that a data conversion
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5793
   *         error could occur;  if a database access error occurs or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5794
   *         this method is called on a closed {@code PreparedStatement}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5795
   * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5796
   *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5797
   * @since 1.6
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5798
   */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5799
  public void setNClob(int parameterIndex, Reader reader)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5800
    throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5801
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5802
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5803
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5804
  /**
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5805
   * Sets the designated parameter to a {@code Reader} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5806
   * The {@code reader} must contain the number
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5807
   * of characters specified by length otherwise a {@code SQLException} will be
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5808
   * generated when the {@code CallableStatement} is executed.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5809
   * This method differs from the {@code setCharacterStream (int, Reader, int)} method
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5810
   * because it informs the driver that the parameter value should be sent to
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5811
   * the server as a {@code NCLOB}.  When the {@code setCharacterStream} method is used, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5812
   * driver may have to do extra work to determine whether the parameter
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5813
   * data should be send to the server as a {@code LONGNVARCHAR} or a {@code NCLOB}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5814
   *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5815
   * @param parameterName the name of the parameter to be set
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5816
   * @param reader An object that contains the data to set the parameter value to.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5817
   * @param length the number of characters in the parameter data.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5818
   * @throws SQLException if parameterIndex does not correspond to a parameter
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5819
   * marker in the SQL statement; if the length specified is less than zero;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5820
   * if the driver does not support national
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5821
   *         character sets;  if the driver can detect that a data conversion
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5822
   *  error could occur; if a database access error occurs or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5823
   * this method is called on a closed {@code CallableStatement}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5824
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5825
   * this method
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5826
   * @since 1.6
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5827
   */
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5828
  public void setNClob(String parameterName, Reader reader, long length)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5829
    throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5830
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5831
  }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5832
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5833
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5834
 /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5835
  * Sets the designated parameter to a {@code Reader} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5836
  * This method differs from the {@code setCharacterStream (int, Reader)} method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5837
  * because it informs the driver that the parameter value should be sent to
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5838
  * the server as a {@code NCLOB}.  When the {@code setCharacterStream} method is used, the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5839
  * driver may have to do extra work to determine whether the parameter
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5840
  * data should be send to the server as a {@code LONGNVARCHAR} or a {@code NCLOB}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5841
  * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5842
  * it might be more efficient to use a version of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5843
  * {@code setNClob} which takes a length parameter.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5844
  *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5845
  * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5846
  * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5847
  * @throws SQLException if the driver does not support national character sets;
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5848
  *         if the driver can detect that a data conversion
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5849
  *         error could occur;  if a database access error occurs or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5850
  *         this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5851
  * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5852
  *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5853
  * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5854
  */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5855
  public void setNClob(String parameterName, Reader reader)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5856
    throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5857
             throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5858
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5859
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5860
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5861
    /**
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5862
     * Sets the designated parameter to a {@code Reader} object. The reader must contain the number
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5863
     * of characters specified by length otherwise a {@code SQLException} will be
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5864
     * generated when the {@code PreparedStatement} is executed.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5865
     * This method differs from the {@code setCharacterStream (int, Reader, int)} method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5866
     * because it informs the driver that the parameter value should be sent to
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5867
     * the server as a {@code NCLOB}.  When the {@code setCharacterStream} method is used, the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5868
     * driver may have to do extra work to determine whether the parameter
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5869
     * data should be sent to the server as a {@code LONGNVARCHAR} or a {@code NCLOB}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5870
     *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5871
     * @param parameterIndex index of the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5872
     * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5873
     * @param length the number of characters in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5874
     * @throws SQLException if parameterIndex does not correspond to a parameter
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5875
     *         marker in the SQL statement; if the length specified is less than zero;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5876
     *         if the driver does not support national character sets;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5877
     *         if the driver can detect that a data conversion
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5878
     *         error could occur;  if a database access error occurs or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5879
     *         this method is called on a closed {@code PreparedStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5880
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5881
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5882
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5883
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5884
     public void setNClob(int parameterIndex, Reader reader, long length)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5885
       throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5886
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5887
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5888
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5889
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5890
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5891
     * Sets the designated parameter to a {@code java.sql.NClob} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5892
     * The driver converts this to an
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5893
     * SQL {@code NCLOB} value when it sends it to the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5894
     * @param parameterIndex of the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5895
     * @param value the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5896
     * @throws SQLException if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5897
     *         character sets;  if the driver can detect that a data conversion
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5898
     *         error could occur; or if a database access error occurs
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5899
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5900
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5901
     public void setNClob(int parameterIndex, NClob value) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5902
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5903
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5904
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5905
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5906
 /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5907
  * Sets the designated parameter to the given {@code String} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5908
  * The driver converts this to a SQL {@code NCHAR} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5909
  * {@code NVARCHAR} or {@code LONGNVARCHAR}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5910
  * @param parameterName the name of the column to be set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5911
  * @param value the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5912
  * @throws SQLException if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5913
  *         character sets;  if the driver can detect that a data conversion
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5914
  *         error could occur; or if a database access error occurs
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5915
  * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5916
  */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5917
 public void setNString(String parameterName, String value)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5918
         throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5919
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5920
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5921
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5922
 /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5923
  * Sets the designated parameter to a {@code Reader} object. The
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5924
  * {@code Reader} reads the data till end-of-file is reached. The
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5925
  * driver does the necessary conversion from Java character format to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5926
  * the national character set in the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5927
  * @param parameterIndex of the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5928
  * @param value the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5929
  * @param length the number of characters in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5930
  * @throws SQLException if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5931
  *         character sets;  if the driver can detect that a data conversion
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5932
  *         error could occur ; or if a database access error occurs
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5933
  * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5934
  */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5935
  public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5936
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5937
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5938
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5939
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5940
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5941
 /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5942
  * Sets the designated parameter to a {@code Reader} object. The
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5943
  * {@code Reader} reads the data till end-of-file is reached. The
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5944
  * driver does the necessary conversion from Java character format to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5945
  * the national character set in the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5946
  * @param parameterName the name of the column to be set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5947
  * @param value the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5948
  * @param length the number of characters in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5949
  * @throws SQLException if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5950
  *         character sets;  if the driver can detect that a data conversion
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5951
  *  error could occur; or if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5952
  * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5953
  */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5954
 public void setNCharacterStream(String parameterName, Reader value, long length)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5955
         throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5956
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5957
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5958
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5959
 /**
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5960
  * Sets the designated parameter to a {@code Reader} object. The
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5961
  * {@code Reader} reads the data till end-of-file is reached. The
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5962
  * driver does the necessary conversion from Java character format to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5963
  * the national character set in the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5964
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5965
  * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5966
  * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5967
  * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5968
  * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5969
  * it might be more efficient to use a version of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5970
  * {@code setNCharacterStream} which takes a length parameter.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5971
  *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5972
  * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5973
  * @param value the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5974
  * @throws SQLException if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5975
  *         character sets;  if the driver can detect that a data conversion
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5976
  *         error could occur ; if a database access error occurs; or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5977
  *         this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5978
  * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5979
  * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5980
  */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5981
  public void setNCharacterStream(String parameterName, Reader value) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5982
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5983
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5984
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5985
  /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5986
    * Sets the designated parameter to the given {@code java.sql.Timestamp} value,
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5987
    * using the given {@code Calendar} object.  The driver uses
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5988
    * the {@code Calendar} object to construct an SQL {@code TIMESTAMP} value,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5989
    * which the driver then sends to the database.  With a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5990
    * a {@code Calendar} object, the driver can calculate the timestamp
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5991
    * taking into account a custom timezone.  If no
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5992
    * {@code Calendar} object is specified, the driver uses the default
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5993
    * timezone, which is that of the virtual machine running the application.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5994
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5995
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5996
    * @param x the parameter value
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5997
    * @param cal the {@code Calendar} object the driver will use
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  5998
    *         to construct the timestamp
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5999
    * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6000
    *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6001
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6002
    *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6003
    * @see #getTimestamp
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6004
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6005
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6006
    public void setTimestamp(String parameterName, java.sql.Timestamp x, Calendar cal)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6007
       throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6008
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6009
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6010
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6011
  /**
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6012
   * Sets the designated parameter to a {@code Reader} object.  The {@code reader} must contain  the number
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6013
   * of characters specified by length otherwise a {@code SQLException} will be
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6014
   * generated when the {@code CallableStatement} is executed.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6015
   * This method differs from the {@code setCharacterStream (int, Reader, int)} method
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6016
   * because it informs the driver that the parameter value should be sent to
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6017
   * the server as a {@code CLOB}.  When the {@code setCharacterStream} method is used, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6018
   * driver may have to do extra work to determine whether the parameter
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6019
   * data should be send to the server as a {@code LONGVARCHAR} or a {@code CLOB}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6020
   *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6021
   * @param parameterName the name of the parameter to be set
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6022
   * @param reader An object that contains the data to set the parameter value to.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6023
   * @param length the number of characters in the parameter data.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6024
   * @throws SQLException if parameterIndex does not correspond to a parameter
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6025
   *         marker in the SQL statement; if the length specified is less than zero;
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6026
   *         a database access error occurs or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6027
   *         this method is called on a closed {@code CallableStatement}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6028
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6029
   *         this method
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6030
   *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6031
   * @since 1.6
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6032
   */
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6033
   public  void setClob(String parameterName, Reader reader, long length)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6034
      throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6035
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6036
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6037
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6038
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6039
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6040
  /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6041
    * Sets the designated parameter to the given {@code java.sql.Clob} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6042
    * The driver converts this to an SQL {@code CLOB} value when it
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6043
    * sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6044
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6045
    * @param parameterName the name of the parameter
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6046
    * @param x a {@code Clob} object that maps an SQL {@code CLOB} value
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6047
    * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6048
    *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6049
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6050
    *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6051
    * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6052
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6053
    public void setClob (String parameterName, Clob x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6054
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6055
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6056
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6057
 /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6058
    * Sets the designated parameter to a {@code Reader} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6059
    * This method differs from the {@code setCharacterStream (int, Reader)} method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6060
    * because it informs the driver that the parameter value should be sent to
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6061
    * the server as a {@code CLOB}.  When the {@code setCharacterStream} method is used, the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6062
    * driver may have to do extra work to determine whether the parameter
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6063
    * data should be send to the server as a {@code LONGVARCHAR} or a {@code CLOB}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6064
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6065
    * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6066
    * it might be more efficient to use a version of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6067
    * {@code setClob} which takes a length parameter.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6068
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6069
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6070
    * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6071
    * @throws SQLException if a database access error occurs or this method is called on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6072
    *         a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6073
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6074
    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6075
    * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6076
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6077
    public void setClob(String parameterName, Reader reader)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6078
      throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6079
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6080
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6081
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6082
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6083
   /**
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6084
    * Sets the designated parameter to the given {@code java.sql.Date} value
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6085
    * using the default time zone of the virtual machine that is running
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6086
    * the application.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6087
    * The driver converts this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6088
    * to an SQL {@code DATE} value when it sends it to the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6089
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6090
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6091
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6092
    * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6093
    *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6094
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6095
    *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6096
    * @see #getDate
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6097
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6098
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6099
    public void setDate(String parameterName, java.sql.Date x)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6100
       throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6101
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6102
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6103
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6104
   /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6105
    * Sets the designated parameter to the given {@code java.sql.Date} value,
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6106
    * using the given {@code Calendar} object.  The driver uses
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6107
    * the {@code Calendar} object to construct an SQL {@code DATE} value,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6108
    * which the driver then sends to the database.  With a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6109
    * a {@code Calendar} object, the driver can calculate the date
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6110
    * taking into account a custom timezone.  If no
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6111
    * {@code Calendar} object is specified, the driver uses the default
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6112
    * timezone, which is that of the virtual machine running the application.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6113
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6114
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6115
    * @param x the parameter value
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6116
    * @param cal the {@code Calendar} object the driver will use
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6117
    *            to construct the date
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6118
    * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6119
    *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6120
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6121
    *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6122
    * @see #getDate
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6123
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6124
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6125
   public void setDate(String parameterName, java.sql.Date x, Calendar cal)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6126
       throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6127
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6128
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6129
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6130
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6131
 /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6132
    * Sets the designated parameter to the given {@code java.sql.Time} value.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6133
    * The driver converts this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6134
    * to an SQL {@code TIME} value when it sends it to the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6135
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6136
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6137
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6138
    * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6139
    *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6140
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6141
    *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6142
    * @see #getTime
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6143
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6144
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6145
   public void setTime(String parameterName, java.sql.Time x)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6146
       throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6147
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6148
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6149
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6150
 /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6151
    * Sets the designated parameter to the given {@code java.sql.Time} value,
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6152
    * using the given {@code Calendar} object.  The driver uses
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6153
    * the {@code Calendar} object to construct an SQL {@code TIME} value,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6154
    * which the driver then sends to the database.  With a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6155
    * a {@code Calendar} object, the driver can calculate the time
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6156
    * taking into account a custom timezone.  If no
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6157
    * {@code Calendar} object is specified, the driver uses the default
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6158
    * timezone, which is that of the virtual machine running the application.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6159
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6160
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6161
    * @param x the parameter value
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6162
    * @param cal the {@code Calendar} object the driver will use
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6163
    *            to construct the time
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6164
    * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6165
    *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6166
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6167
    *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6168
    * @see #getTime
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6169
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6170
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6171
   public void setTime(String parameterName, java.sql.Time x, Calendar cal)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6172
       throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6173
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6174
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6175
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6176
   /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6177
   * Sets the designated parameter to a {@code Reader} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6178
   * This method differs from the {@code setCharacterStream (int, Reader)} method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6179
   * because it informs the driver that the parameter value should be sent to
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6180
   * the server as a {@code CLOB}.  When the {@code setCharacterStream} method is used, the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6181
   * driver may have to do extra work to determine whether the parameter
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6182
   * data should be sent to the server as a {@code LONGVARCHAR} or a {@code CLOB}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6183
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6184
   * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6185
   * it might be more efficient to use a version of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6186
   * {@code setClob} which takes a length parameter.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6187
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6188
   * @param parameterIndex index of the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6189
   * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6190
   * @throws SQLException if a database access error occurs, this method is called on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6191
   *         a closed {@code PreparedStatement}or if parameterIndex does not correspond to a parameter
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6192
   *         marker in the SQL statement
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6193
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6194
   * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6195
   * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6196
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6197
   public void setClob(int parameterIndex, Reader reader)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6198
     throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6199
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6200
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6201
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6202
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6203
  /**
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6204
   * Sets the designated parameter to a {@code Reader} object.  The reader must contain  the number
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6205
   * of characters specified by length otherwise a {@code SQLException} will be
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6206
   * generated when the {@code PreparedStatement} is executed.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6207
   * This method differs from the {@code setCharacterStream (int, Reader, int)} method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6208
   * because it informs the driver that the parameter value should be sent to
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6209
   * the server as a {@code CLOB}.  When the {@code setCharacterStream} method is used, the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6210
   * driver may have to do extra work to determine whether the parameter
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6211
   * data should be sent to the server as a {@code LONGVARCHAR} or a {@code CLOB}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6212
   * @param parameterIndex index of the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6213
   * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6214
   * @param length the number of characters in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6215
   * @throws SQLException if a database access error occurs, this method is called on
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6216
   * a closed {@code PreparedStatement}, if parameterIndex does not correspond to a parameter
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6217
   * marker in the SQL statement, or if the length specified is less than zero.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6218
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6219
   * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6220
   * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6221
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6222
   public void setClob(int parameterIndex, Reader reader, long length)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6223
     throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6224
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6225
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6226
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6227
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6228
   /**
37880
60ec48925dc6 8156661: Handful of typos in javadoc
igerasim
parents: 31061
diff changeset
  6229
    * Sets the designated parameter to an {@code InputStream} object.  The inputstream must contain  the number
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6230
    * of characters specified by length otherwise a {@code SQLException} will be
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6231
    * generated when the {@code PreparedStatement} is executed.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6232
    * This method differs from the {@code setBinaryStream (int, InputStream, int)}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6233
    * method because it informs the driver that the parameter value should be
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6234
    * sent to the server as a {@code BLOB}.  When the {@code setBinaryStream} method is used,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6235
    * the driver may have to do extra work to determine whether the parameter
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6236
    * data should be sent to the server as a {@code LONGVARBINARY} or a {@code BLOB}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6237
    *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6238
    * @param parameterIndex index of the first parameter is 1,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6239
    *        the second is 2, ...
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6240
    * @param inputStream An object that contains the data to set the parameter
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6241
    *        value to.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6242
    * @param length the number of bytes in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6243
    * @throws SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6244
    *         this method is called on a closed {@code PreparedStatement},
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6245
    *         if parameterIndex does not correspond
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6246
    *         to a parameter marker in the SQL statement,  if the length specified
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6247
    *         is less than zero or if the number of bytes in the inputstream does not match
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6248
    *         the specified length.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6249
    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6250
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6251
    * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6252
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6253
    public void setBlob(int parameterIndex, InputStream inputStream, long length)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6254
       throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6255
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6256
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6257
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6258
 /**
37880
60ec48925dc6 8156661: Handful of typos in javadoc
igerasim
parents: 31061
diff changeset
  6259
    * Sets the designated parameter to an {@code InputStream} object.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6260
    * This method differs from the {@code setBinaryStream (int, InputStream)}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6261
    * This method differs from the {@code setBinaryStream (int, InputStream)}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6262
    * method because it informs the driver that the parameter value should be
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6263
    * sent to the server as a {@code BLOB}.  When the {@code setBinaryStream} method is used,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6264
    * the driver may have to do extra work to determine whether the parameter
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6265
    * data should be sent to the server as a {@code LONGVARBINARY} or a {@code BLOB}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6266
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6267
    * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6268
    * it might be more efficient to use a version of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6269
    * {@code setBlob} which takes a length parameter.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6270
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6271
    * @param parameterIndex index of the first parameter is 1,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6272
    *        the second is 2, ...
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6273
    *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6274
    * @param inputStream An object that contains the data to set the parameter
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6275
    *        value to.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6276
    * @throws SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6277
    *         this method is called on a closed {@code PreparedStatement} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6278
    *         if parameterIndex does not correspond
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6279
    *         to a parameter marker in the SQL statement,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6280
    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6281
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6282
    * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6283
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6284
    public void setBlob(int parameterIndex, InputStream inputStream)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6285
       throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6286
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6287
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6288
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6289
   /**
37880
60ec48925dc6 8156661: Handful of typos in javadoc
igerasim
parents: 31061
diff changeset
  6290
    * Sets the designated parameter to an {@code InputStream} object.  The {@code inputstream} must contain  the number
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6291
    * of characters specified by length, otherwise a {@code SQLException} will be
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6292
    * generated when the {@code CallableStatement} is executed.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6293
    * This method differs from the {@code setBinaryStream (int, InputStream, int)}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6294
    * method because it informs the driver that the parameter value should be
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6295
    * sent to the server as a {@code BLOB}.  When the {@code setBinaryStream} method is used,
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6296
    * the driver may have to do extra work to determine whether the parameter
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6297
    * data should be sent to the server as a {@code LONGVARBINARY} or a {@code BLOB}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6298
    *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6299
    * @param parameterName the name of the parameter to be set
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6300
    * the second is 2, ...
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6301
    *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6302
    * @param inputStream An object that contains the data to set the parameter
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6303
    *        value to.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6304
    * @param length the number of bytes in the parameter data.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6305
    * @throws SQLException  if parameterIndex does not correspond
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6306
    *         to a parameter marker in the SQL statement,  or if the length specified
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6307
    *         is less than zero; if the number of bytes in the inputstream does not match
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6308
    *         the specified length; if a database access error occurs or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6309
    *         this method is called on a closed {@code CallableStatement}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6310
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6311
    *         this method
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6312
    *
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6313
    * @since 1.6
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6314
    */
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6315
   public void setBlob(String parameterName, InputStream inputStream, long length)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6316
         throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6317
         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6318
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6319
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6320
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6321
   /**
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6322
    * Sets the designated parameter to the given {@code java.sql.Blob} object.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6323
    * The driver converts this to an SQL {@code BLOB} value when it
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6324
    * sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6325
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6326
    * @param parameterName the name of the parameter
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6327
    * @param x a {@code Blob} object that maps an SQL {@code BLOB} value
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6328
    * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6329
    *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6330
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6331
    *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6332
    * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6333
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6334
   public void setBlob (String parameterName, Blob x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6335
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6336
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6337
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6338
   /**
37880
60ec48925dc6 8156661: Handful of typos in javadoc
igerasim
parents: 31061
diff changeset
  6339
    * Sets the designated parameter to an {@code InputStream} object.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6340
    * This method differs from the {@code setBinaryStream (int, InputStream)}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6341
    * method because it informs the driver that the parameter value should be
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6342
    * sent to the server as a {@code BLOB}.  When the {@code setBinaryStream} method is used,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6343
    * the driver may have to do extra work to determine whether the parameter
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6344
    * data should be send to the server as a {@code LONGVARBINARY} or a {@code BLOB}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6345
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6346
    * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6347
    * it might be more efficient to use a version of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6348
    * {@code setBlob} which takes a length parameter.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6349
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6350
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6351
    * @param inputStream An object that contains the data to set the parameter
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6352
    *        value to.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6353
    * @throws SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6354
    *         this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6355
    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6356
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6357
    * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6358
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6359
    public void setBlob(String parameterName, InputStream inputStream)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6360
       throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6361
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6362
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6363
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6364
 /**
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6365
  * Sets the value of the designated parameter with the given object. The second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6366
  * argument must be an object type; for integral values, the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6367
  * {@code java.lang} equivalent objects should be used.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6368
  *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6369
  * <p>The given Java object will be converted to the given targetSqlType
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6370
  * before being sent to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6371
  *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6372
  * If the object has a custom mapping (is of a class implementing the
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6373
  * interface {@code SQLData}),
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6374
  * the JDBC driver should call the method {@code SQLData.writeSQL} to write it
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6375
  * to the SQL data stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6376
  * If, on the other hand, the object is of a class implementing
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6377
  * {@code Ref}, {@code Blob}, {@code Clob},  {@code NClob},
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6378
  *  {@code Struct}, {@code java.net.URL},
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6379
  * or {@code Array}, the driver should pass it to the database as a
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6380
  * value of the corresponding SQL type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6381
  * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6382
  * Note that this method may be used to pass datatabase-
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6383
  * specific abstract data types.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6384
  *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6385
  * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6386
  * @param x the object containing the input parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6387
  * @param targetSqlType the SQL type (as defined in java.sql.Types) to be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6388
  * sent to the database. The scale argument may further qualify this type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6389
  * @param scale for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6390
  *        this is the number of digits after the decimal point.  For all other
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6391
  *        types, this value will be ignored.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6392
  * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6393
  *        this method is called on a closed {@code CallableStatement}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6394
  * @exception SQLFeatureNotSupportedException if {@code targetSqlType} is
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6395
  *            an {@code ARRAY, BLOB, CLOB,
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6396
  *            DATALINK, JAVA_OBJECT, NCHAR,
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6397
  *            NCLOB, NVARCHAR, LONGNVARCHAR,
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6398
  *            REF, ROWID, SQLXML}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6399
  *            or {@code STRUCT} data type and the JDBC driver does not support
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6400
  *            this data type
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6401
  * @see Types
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6402
  * @see #getObject
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6403
  * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6404
  */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6405
  public void setObject(String parameterName, Object x, int targetSqlType, int scale)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6406
     throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6407
      throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6408
 }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6409
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6410
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6411
    * Sets the value of the designated parameter with the given object.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6412
    * This method is like the method {@code setObject}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6413
    * above, except that it assumes a scale of zero.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6414
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6415
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6416
    * @param x the object containing the input parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6417
    * @param targetSqlType the SQL type (as defined in java.sql.Types) to be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6418
    *                      sent to the database
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6419
    * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6420
    * this method is called on a closed {@code CallableStatement}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6421
    * @exception SQLFeatureNotSupportedException if {@code targetSqlType} is
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6422
    *            an {@code ARRAY, BLOB, CLOB,
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6423
    *            DATALINK, JAVA_OBJECT, NCHAR,
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6424
    *            NCLOB, NVARCHAR, LONGNVARCHAR,
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6425
    *            REF, ROWID, SQLXML}
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6426
    *            or {@code STRUCT} data type and the JDBC driver does not support
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6427
    *            this data type
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6428
    * @see #getObject
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6429
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6430
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6431
    public void setObject(String parameterName, Object x, int targetSqlType)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6432
       throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6433
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6434
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6435
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6436
  /**
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6437
   * Sets the value of the designated parameter with the given object.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6438
   * The second parameter must be of type {@code Object}; therefore, the
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6439
   * {@code java.lang} equivalent objects should be used for built-in types.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6440
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6441
   * <p>The JDBC specification specifies a standard mapping from
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6442
   * Java {@code Object} types to SQL types.  The given argument
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6443
   * will be converted to the corresponding SQL type before being
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6444
   * sent to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6445
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6446
   * <p>Note that this method may be used to pass datatabase-
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6447
   * specific abstract data types, by using a driver-specific Java
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6448
   * type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6449
   *
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6450
   * If the object is of a class implementing the interface {@code SQLData},
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6451
   * the JDBC driver should call the method {@code SQLData.writeSQL}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6452
   * to write it to the SQL data stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6453
   * If, on the other hand, the object is of a class implementing
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6454
   * {@code Ref}, {@code Blob}, {@code Clob},  {@code NClob},
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6455
   *  {@code Struct}, {@code java.net.URL},
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6456
   * or {@code Array}, the driver should pass it to the database as a
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6457
   * value of the corresponding SQL type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6458
   * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6459
   * This method throws an exception if there is an ambiguity, for example, if the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6460
   * object is of a class implementing more than one of the interfaces named above.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6461
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6462
   * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6463
   * @param x the object containing the input parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6464
   * @exception SQLException if a database access error occurs,
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6465
   *            this method is called on a closed {@code CallableStatement} or if the given
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6466
   *            {@code Object} parameter is ambiguous
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6467
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6468
   *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6469
   * @see #getObject
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6470
   * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6471
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6472
   public void setObject(String parameterName, Object x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6473
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6474
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6475
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6476
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6477
  * Sets the designated parameter to the given input stream, which will have
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6478
  * the specified number of bytes.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6479
  * When a very large ASCII value is input to a {@code LONGVARCHAR}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6480
  * parameter, it may be more practical to send it via a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6481
  * {@code java.io.InputStream}. Data will be read from the stream
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6482
  * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6483
  * do any necessary conversion from ASCII to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6484
  *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6485
  * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6486
  * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6487
  * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6488
  *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6489
  * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6490
  * @param x the Java input stream that contains the ASCII parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6491
  * @param length the number of bytes in the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6492
  * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6493
  *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6494
  * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6495
  *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6496
  * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6497
  */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6498
 public void setAsciiStream(String parameterName, java.io.InputStream x, int length)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6499
     throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6500
      throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6501
 }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6502
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6503
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6504
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6505
  * Sets the designated parameter to the given input stream, which will have
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6506
  * the specified number of bytes.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6507
  * When a very large binary value is input to a {@code LONGVARBINARY}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6508
  * parameter, it may be more practical to send it via a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6509
  * {@code java.io.InputStream} object. The data will be read from the stream
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6510
  * as needed until end-of-file is reached.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6511
  *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6512
  * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6513
  * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6514
  * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6515
  *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6516
  * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6517
  * @param x the java input stream which contains the binary parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6518
  * @param length the number of bytes in the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6519
  * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6520
  *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6521
  * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6522
  *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6523
  * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6524
  */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6525
 public void setBinaryStream(String parameterName, java.io.InputStream x,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6526
                      int length) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6527
      throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6528
 }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6529
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6530
 /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6531
   * Sets the designated parameter to the given {@code Reader}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6532
   * object, which is the given number of characters long.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6533
   * When a very large UNICODE value is input to a {@code LONGVARCHAR}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6534
   * parameter, it may be more practical to send it via a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6535
   * {@code java.io.Reader} object. The data will be read from the stream
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6536
   * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6537
   * do any necessary conversion from UNICODE to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6538
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6539
   * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6540
   * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6541
   * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6542
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6543
   * @param parameterName the name of the parameter
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6544
   * @param reader the {@code java.io.Reader} object that
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6545
   *        contains the UNICODE data used as the designated parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6546
   * @param length the number of characters in the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6547
   * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6548
   *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6549
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6550
   *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6551
   * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6552
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6553
  public void setCharacterStream(String parameterName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6554
                          java.io.Reader reader,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6555
                          int length) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6556
       throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6557
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6558
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6559
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6560
   * Sets the designated parameter to the given input stream.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6561
   * When a very large ASCII value is input to a {@code LONGVARCHAR}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6562
   * parameter, it may be more practical to send it via a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6563
   * {@code java.io.InputStream}. Data will be read from the stream
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6564
   * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6565
   * do any necessary conversion from ASCII to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6566
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6567
   * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6568
   * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6569
   * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6570
   * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6571
   * it might be more efficient to use a version of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6572
   * {@code setAsciiStream} which takes a length parameter.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6573
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6574
   * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6575
   * @param x the Java input stream that contains the ASCII parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6576
   * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6577
   *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6578
   * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6579
   * @since 1.6
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6580
   */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6581
  public void setAsciiStream(String parameterName, java.io.InputStream x)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6582
          throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6583
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6584
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6585
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6586
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6587
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6588
    * Sets the designated parameter to the given input stream.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6589
    * When a very large binary value is input to a {@code LONGVARBINARY}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6590
    * parameter, it may be more practical to send it via a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6591
    * {@code java.io.InputStream} object. The data will be read from the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6592
    * stream as needed until end-of-file is reached.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6593
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6594
    * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6595
    * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6596
    * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6597
    * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6598
    * it might be more efficient to use a version of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6599
    * {@code setBinaryStream} which takes a length parameter.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6600
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6601
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6602
    * @param x the java input stream which contains the binary parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6603
    * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6604
    *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6605
    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6606
    * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6607
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6608
   public void setBinaryStream(String parameterName, java.io.InputStream x)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6609
   throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6610
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6611
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6612
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6613
 /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6614
    * Sets the designated parameter to the given {@code Reader}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6615
    * object.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6616
    * When a very large UNICODE value is input to a {@code LONGVARCHAR}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6617
    * parameter, it may be more practical to send it via a
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6618
    * {@code java.io.Reader} object. The data will be read from the stream
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6619
    * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6620
    * do any necessary conversion from UNICODE to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6621
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6622
    * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6623
    * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6624
    * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6625
    * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6626
    * it might be more efficient to use a version of
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6627
    * {@code setCharacterStream} which takes a length parameter.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6628
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6629
    * @param parameterName the name of the parameter
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6630
    * @param reader the {@code java.io.Reader} object that contains the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6631
    *        Unicode data
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6632
    * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6633
    *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6634
    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6635
    * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6636
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6637
   public void setCharacterStream(String parameterName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6638
                         java.io.Reader reader) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6639
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6640
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6641
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6642
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6643
    * Sets the designated parameter to the given
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6644
    * {@code java.math.BigDecimal} value.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6645
    * The driver converts this to an SQL {@code NUMERIC} value when
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6646
    * it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6647
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6648
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6649
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6650
    * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6651
    *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6652
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6653
    *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6654
    * @see #getBigDecimal
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6655
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6656
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6657
   public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6658
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6659
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6660
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6661
   /**
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6662
    * Sets the designated parameter to the given Java {@code String} value.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6663
    * The driver converts this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6664
    * to an SQL {@code VARCHAR} or {@code LONGVARCHAR} value
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6665
    * (depending on the argument's
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6666
    * size relative to the driver's limits on {@code VARCHAR} values)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6667
    * when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6668
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6669
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6670
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6671
    * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6672
    *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6673
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6674
    *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6675
    * @see #getString
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6676
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6677
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6678
   public void setString(String parameterName, String x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6679
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6680
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6681
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6682
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6683
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6684
   /**
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6685
    * Sets the designated parameter to the given Java array of bytes.
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6686
    * The driver converts this to an SQL {@code VARBINARY} or
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6687
    * {@code LONGVARBINARY} (depending on the argument's size relative
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6688
    * to the driver's limits on {@code VARBINARY} values) when it sends
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6689
    * it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6690
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6691
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6692
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6693
    * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6694
    *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6695
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6696
    *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6697
    * @see #getBytes
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6698
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6699
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6700
   public void setBytes(String parameterName, byte x[]) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6701
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6702
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6703
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6704
 /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6705
    * Sets the designated parameter to the given {@code java.sql.Timestamp} value.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6706
    * The driver
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6707
    * converts this to an SQL {@code TIMESTAMP} value when it sends it to the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6708
    * database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6709
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6710
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6711
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6712
    * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6713
    *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6714
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6715
    *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6716
    * @see #getTimestamp
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6717
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6718
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6719
   public void setTimestamp(String parameterName, java.sql.Timestamp x)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6720
       throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6721
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6722
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6723
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6724
    /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6725
    * Sets the designated parameter to SQL {@code NULL}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6726
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6727
    * <P><B>Note:</B> You must specify the parameter's SQL type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6728
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6729
    * @param parameterName the name of the parameter
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6730
    * @param sqlType the SQL type code defined in {@code java.sql.Types}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6731
    * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6732
    *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6733
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6734
    *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6735
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6736
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6737
   public void setNull(String parameterName, int sqlType) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6738
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6739
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6740
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6741
 /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6742
    * Sets the designated parameter to SQL {@code NULL}.
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6743
    * This version of the method {@code setNull} should
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6744
    * be used for user-defined types and REF type parameters.  Examples
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6745
    * of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6746
    * named array types.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6747
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6748
    * <P><B>Note:</B> To be portable, applications must give the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6749
    * SQL type code and the fully-qualified SQL type name when specifying
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6750
    * a NULL user-defined or REF parameter.  In the case of a user-defined type
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6751
    * the name is the type name of the parameter itself.  For a REF
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6752
    * parameter, the name is the type name of the referenced type.  If
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6753
    * a JDBC driver does not need the type code or type name information,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6754
    * it may ignore it.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6755
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6756
    * Although it is intended for user-defined and Ref parameters,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6757
    * this method may be used to set a null parameter of any JDBC type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6758
    * If the parameter does not have a user-defined or REF type, the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6759
    * typeName is ignored.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6760
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6761
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6762
    * @param parameterName the name of the parameter
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6763
    * @param sqlType a value from {@code java.sql.Types}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6764
    * @param typeName the fully-qualified name of an SQL user-defined type;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6765
    *        ignored if the parameter is not a user-defined type or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6766
    *        SQL {@code REF} value
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6767
    * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6768
    *        this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6769
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6770
    *        this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6771
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6772
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6773
   public void setNull (String parameterName, int sqlType, String typeName)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6774
       throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6775
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6776
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6777
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6778
 /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6779
    * Sets the designated parameter to the given Java {@code boolean} value.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6780
    * The driver converts this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6781
    * to an SQL {@code BIT} or {@code BOOLEAN} value when it sends it to the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6782
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6783
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6784
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6785
    * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6786
    *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6787
    * @see #getBoolean
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6788
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6789
    *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6790
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6791
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6792
   public void setBoolean(String parameterName, boolean x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6793
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6794
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6795
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6796
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6797
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6798
 /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6799
    * Sets the designated parameter to the given Java {@code byte} value.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6800
    * The driver converts this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6801
    * to an SQL {@code TINYINT} value when it sends it to the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6802
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6803
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6804
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6805
    * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6806
    *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6807
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6808
    *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6809
    * @see #getByte
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6810
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6811
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6812
   public void setByte(String parameterName, byte x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6813
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6814
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6815
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6816
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6817
 /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6818
    * Sets the designated parameter to the given Java {@code short} value.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6819
    * The driver converts this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6820
    * to an SQL {@code SMALLINT} value when it sends it to the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6821
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6822
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6823
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6824
    * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6825
    *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6826
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6827
    *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6828
    * @see #getShort
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6829
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6830
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6831
   public void setShort(String parameterName, short x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6832
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6833
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6834
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6835
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6836
   /**
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6837
    * Sets the designated parameter to the given Java {@code int} value.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6838
    * The driver converts this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6839
    * to an SQL {@code INTEGER} value when it sends it to the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6840
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6841
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6842
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6843
    * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6844
    *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6845
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6846
    *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6847
    * @see #getInt
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6848
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6849
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6850
   public void setInt(String parameterName, int x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6851
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6852
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6853
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6854
   /**
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6855
    * Sets the designated parameter to the given Java {@code long} value.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6856
    * The driver converts this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6857
    * to an SQL {@code BIGINT} value when it sends it to the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6858
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6859
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6860
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6861
    * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6862
    *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6863
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6864
    *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6865
    * @see #getLong
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6866
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6867
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6868
   public void setLong(String parameterName, long x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6869
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6870
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6871
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6872
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6873
   /**
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6874
    * Sets the designated parameter to the given Java {@code float} value.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6875
    * The driver converts this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6876
    * to an SQL {@code FLOAT} value when it sends it to the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6877
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6878
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6879
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6880
    * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6881
    *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6882
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6883
    *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6884
    * @see #getFloat
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6885
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6886
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6887
   public void setFloat(String parameterName, float x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6888
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6889
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6890
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6891
   /**
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6892
    * Sets the designated parameter to the given Java {@code double} value.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6893
    * The driver converts this
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6894
    * to an SQL {@code DOUBLE} value when it sends it to the database.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6895
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6896
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6897
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6898
    * @exception SQLException if a database access error occurs or
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6899
    *            this method is called on a closed {@code CallableStatement}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6900
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
31061
fead7d86d75f 8081517: minor cleanup for docs
avstepan
parents: 28059
diff changeset
  6901
    *            this method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6902
    * @see #getDouble
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6903
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6904
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6905
   public void setDouble(String parameterName, double x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6906
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6907
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6908
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6909
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6910
     * This method re populates the resBundle
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6911
     * during the deserialization process
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6912
     */
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6913
    private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6914
        // Default state initialization happens here
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6915
        ois.defaultReadObject();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6916
        // Initialization of transient Res Bundle happens here .
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6917
        try {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6918
           resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6919
        } catch(IOException ioe) {}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6920
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6921
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6922
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6923
   static final long serialVersionUID = -3591946023893483003L;
6540
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 6530
diff changeset
  6924
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 6530
diff changeset
  6925
 //------------------------- JDBC 4.1 -----------------------------------
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 6530
diff changeset
  6926
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 6530
diff changeset
  6927
    public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 6530
diff changeset
  6928
        throw new SQLFeatureNotSupportedException("Not supported yet.");
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 6530
diff changeset
  6929
    }
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 6530
diff changeset
  6930
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 6530
diff changeset
  6931
    public <T> T getObject(String columnLabel, Class<T> type) throws SQLException {
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 6530
diff changeset
  6932
        throw new SQLFeatureNotSupportedException("Not supported yet.");
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 6530
diff changeset
  6933
    }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6934
}