jdk/src/share/classes/com/sun/rowset/JdbcRowSetImpl.java
author mfang
Tue, 18 Jun 2013 21:08:48 -0700
changeset 18282 61693b1882bf
parent 14171 94eb36844bd7
child 21278 ef8a3a2a72f2
permissions -rw-r--r--
8015657: jdk8 l10n resource file translation update 3 Reviewed-by: yhuang
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
13785
56dc8b1e89ba 7192302: Remove JDBCRowSetImpl dependency on java.beans
lancea
parents: 11129
diff changeset
     2
 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package 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
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 * The standard implementation of the <code>JdbcRowSet</code> interface. See the interface
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 * defintion for full behavior and implementation requirements.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
     * The <code>Connection</code> object that is this rowset's
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
     * The <code>PreparedStatement</code> object that is this rowset's
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
     * current command.  This field is set internally when the method
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
     * <code>execute</code> creates the <code>PreparedStatement</code>
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
     * The <code>ResultSet</code> object that is this rowset's
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
     * current result set.  This field is set internally when the method
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
     * <code>execute</code> executes the rowset's command and thereby
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
     * creates the rowset's <code>ResultSet</code> object.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
     * The <code>RowSetMetaDataImpl</code> object that is contructed when
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
     * a <code>ResultSet</code> object is passed to the <code>JdbcRowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
     * constructor. This helps in constructing all metadata associated
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
     * with the <code>ResultSet</code> object using the setter methods of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
     * <code>RowSetMetaDataImpl</code>.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
     * The <code>ResultSetMetaData</code> object from which this
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
     * <code>RowSetMetaDataImpl</code> is formed and which  helps in getting
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
     * Constructs a default <code>JdbcRowSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
     * The new instance of <code>JdbcRowSet</code> will serve as a proxy
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
     * for the <code>ResultSet</code> object it creates, and by so doing,
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>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
     * The following is true of a default <code>JdbcRowSet</code> instance:
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
     *   <LI>Has its connection's type map set to <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
     *   <LI>Has an empty <code>Hashtable</code> object for storing any
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
     *       parameters that are set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
     * </UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
     * A newly created <code>JdbcRowSet</code> object must have its
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
     * <code>execute</code> method invoked before other public methods
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
     * to calling the <code>execute</code> method; [2] if invalid JDBC driver
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
     * Constructs a default <code>JdbcRowSet</code> object given a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
     * valid <code>Connection</code> object. The new
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
     * instance of <code>JdbcRowSet</code> will serve as a proxy for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
     * the <code>ResultSet</code> object it creates, and by so doing,
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>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
     * The following is true of a default <code>JdbcRowSet</code> instance:
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
     *   <LI>Has its connection's type map set to <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
     *   <LI>Has an empty <code>Hashtable</code> object for storing any
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
     *       parameters that are set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
     * </UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
     * A newly created <code>JdbcRowSet</code> object must have its
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
     * <code>execute</code> method invoked before other public methods
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
     * to calling the <code>execute</code> method, [2] if invalid JDBC driver
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
     * Constructs a default <code>JdbcRowSet</code> object using the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
     * URL, username, and password arguments supplied. The new
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
     * instance of <code>JdbcRowSet</code> will serve as a proxy for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
     * the <code>ResultSet</code> object it creates, and by so doing,
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>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
     * The following is true of a default <code>JdbcRowSet</code> instance:
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
     *   <LI>Has its connection's type map set to <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
     *   <LI>Has an empty <code>Hashtable</code> object for storing any
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
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
     * @param url - a JDBC URL for the database to which this <code>JdbcRowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
     *        object will be connected. The form for a JDBC URL is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
     *        <code>jdbc:subprotocol:subname</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
     * @param user - the database user on whose behalf the connection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
     *        is being made
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
     * @param password - the user's password
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
     * Constructs a <code>JdbcRowSet</code> object using the given valid
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
     * <code>ResultSet</code> object. The new
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
     * instance of <code>JdbcRowSet</code> will serve as a proxy for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
     * the <code>ResultSet</code> object, and by so doing,
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>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
     * The following is true of a default <code>JdbcRowSet</code> instance:
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
     *   <LI>Has its connection's type map set to <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
     *   <LI>Has an empty <code>Hashtable</code> object for storing any
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
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
     * @param res a valid <code>ResultSet</code> object
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
     * Initializes the given <code>RowSetMetaData</code> object with the values
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
     * in the given <code>ResultSetMetaData</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
     * @param md the <code>RowSetMetaData</code> object for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
     *           <code>JdbcRowSetImpl</code> object, which will be set with
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
     *           values from rsmd
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
     * @param rsmd the <code>ResultSetMetaData</code> object from which new
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   514
     * Creates the internal <code>ResultSet</code> object for which this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   515
     * <code>JdbcRowSet</code> object is a wrapper, effectively
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   520
     * query that will create the result set.  If a <code>DataSource</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   523
     * <code>DriverManager</code> will be used, the properties for the
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   530
     * to new values. The <code>execute</code> method will use the value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   531
     * for the command property to create a <code>PreparedStatement</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   627
                if(getUsername() != null && !getUsername().equals("")) {
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   787
     * Moves the cursor for this rowset's <code>ResultSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   788
     * object down one row from its current position.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   789
     * A <code>ResultSet</code> cursor is initially positioned
90ce3da70b43 Initial load
duke
parents:
diff changeset
   790
     * before the first row; the first call to the method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   791
     * <code>next</code> makes the first row the current row; the
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   795
     * to the method <code>next</code> will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   796
     * implicitly close it. A <code>ResultSet</code> object's
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
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   799
     * @return <code>true</code> if the new current row is valid;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   800
     *         <code>false</code> if there are no more rows
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   814
     * Releases this rowset's <code>ResultSet</code> object's database and
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
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   818
     * <P><B>Note:</B> A <code>ResultSet</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   819
     * is automatically closed by the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   820
     * <code>Statement</code> object that generated it when
90ce3da70b43 Initial load
duke
parents:
diff changeset
   821
     * that <code>Statement</code> object is closed,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   822
     * re-executed, or is used to retrieve the next result from a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   823
     * sequence of multiple results. A <code>ResultSet</code> object
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   839
     * <code>ResultSet</code> object had a value of SQL <code>NULL</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   840
     * Note that you must first call one of the <code>getXXX</code> methods
90ce3da70b43 Initial load
duke
parents:
diff changeset
   841
     * on a column to try to read its value and then call
90ce3da70b43 Initial load
duke
parents:
diff changeset
   842
     * the method <code>wasNull</code> to see if the value read was
90ce3da70b43 Initial load
duke
parents:
diff changeset
   843
     * SQL <code>NULL</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   844
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   845
     * @return <code>true</code> if the last column value read was SQL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   846
     *         <code>NULL</code> and <code>false</code> otherwise
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   863
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
   864
     * a <code>String</code>.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   867
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   868
     * value returned is <code>null</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   881
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
   882
     * a <code>boolean</code>.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   885
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   886
     * value returned is <code>false</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   899
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
   900
     * a <code>byte</code>.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   903
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   904
     * value returned is <code>0</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   917
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
   918
     * a <code>short</code>.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   921
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   922
     * value returned is <code>0</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   935
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
   936
     * an <code>int</code>.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   939
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   940
     * value returned is <code>0</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   953
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
   954
     * a <code>long</code>.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   957
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   958
     * value returned is <code>0</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   971
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
   972
     * a <code>float</code>.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   975
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   976
     * value returned is <code>0</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   989
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
   990
     * a <code>double</code>.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   993
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   994
     * value returned is <code>0</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1007
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1008
     * a <code>java.sql.BigDecimal</code>.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1012
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1013
     * value returned is <code>null</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1028
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1029
     * a <code>byte</code> array in the Java programming language.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1033
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1034
     * value returned is <code>null</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1047
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1048
     * a <code>java.sql.Date</code> object in the Java programming language.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1051
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1052
     * value returned is <code>null</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1065
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1066
     * a <code>java.sql.Time</code> object in the Java programming language.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1069
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1070
     * value returned is <code>null</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1083
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1084
     * a <code>java.sql.Timestamp</code> object in the Java programming language.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1087
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1088
     * value returned is <code>null</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1101
     * of this rowset's <code>ResultSet</code> object as
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1104
     * suitable for retrieving large <code>LONGVARCHAR</code> values.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1110
     * call to a <code>getXXX</code> method implicitly closes the stream.  Also, a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1111
     * stream may return <code>0</code> when the method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1112
     * <code>InputStream.available</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1117
     * as a stream of one-byte ASCII characters;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1118
     * if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1119
     * value returned is <code>null</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1132
     * of this rowset's <code>ResultSet</code> object as
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1136
     * suitable for retrieving large<code>LONGVARCHAR</code>values.  The JDBC driver will
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1143
     * call to a <code>getXXX</code> method implicitly closes the stream.  Also, a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1144
     * stream may return <code>0</code> when the method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1145
     * <code>InputStream.available</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1150
     * as a stream in Java UTF-8 byte format;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1151
     * if the value is SQL <code>NULL</code>, the value returned is <code>null</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1155
     * @deprecated use <code>getCharacterStream</code> in place of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1156
     *              <code>getUnicodeStream</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1168
     * of this rowset's <code>ResultSet</code> object as a binary stream of
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1171
     * suitable for retrieving large <code>LONGVARBINARY</code> values.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1175
     * call to a <code>getXXX</code> method implicitly closes the stream.  Also, a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1176
     * stream may return <code>0</code> when the method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1177
     * <code>InputStream.available</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1182
     * as a stream of uninterpreted bytes;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1183
     * if the value is SQL <code>NULL</code>, the value returned is <code>null</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1201
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1202
     * a <code>String</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1203
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1204
     * @param columnName the SQL name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1205
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1206
     * value returned is <code>null</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1217
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1218
     * a <code>boolean</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1219
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1220
     * @param columnName the SQL name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1221
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1222
     * value returned is <code>false</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1233
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1234
     * a <code>byte</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1235
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1236
     * @param columnName the SQL name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1237
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1238
     * value returned is <code>0</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1249
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1250
     * a <code>short</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1251
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1252
     * @param columnName the SQL name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1253
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1254
     * value returned is <code>0</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1265
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1266
     * an <code>int</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1267
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1268
     * @param columnName the SQL name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1269
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1270
     * value returned is <code>0</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1281
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1282
     * a <code>long</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1283
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1284
     * @param columnName the SQL name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1285
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1286
     * value returned is <code>0</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1297
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1298
     * a <code>float</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1299
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1300
     * @param columnName the SQL name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1301
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1302
     * value returned is <code>0</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1313
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1314
     * a <code>double</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1315
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1316
     * @param columnName the SQL name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1317
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1318
     * value returned is <code>0</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1329
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1330
     * a <code>java.math.BigDecimal</code>.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1334
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1335
     * value returned is <code>null</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1348
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1349
     * a <code>byte</code> array in the Java programming language.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1353
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1354
     * value returned is <code>null</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1365
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1366
     * a <code>java.sql.Date</code> object in the Java programming language.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1367
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1368
     * @param columnName the SQL name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1369
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1370
     * value returned is <code>null</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1381
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1382
     * a <code>java.sql.Time</code> object in the Java programming language.
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;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1386
     * if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1387
     * the value returned is <code>null</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1398
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1399
     * a <code>java.sql.Timestamp</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1400
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1401
     * @param columnName the SQL name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1402
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1403
     * value returned is <code>null</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1414
     * of this rowset's <code>ResultSet</code> object as a stream of
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1417
     * suitable for retrieving large <code>LONGVARCHAR</code> values.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1423
     * call to a <code>getXXX</code> method implicitly closes the stream. Also, a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1424
     * stream may return <code>0</code> when the method <code>available</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1429
     * as a stream of one-byte ASCII characters.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1430
     * If the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1431
     * the value returned is <code>null</code>.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1442
     * of this rowset's <code>ResultSet</code> object as a stream of
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1445
     * suitable for retrieving large <code>LONGVARCHAR</code> values.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1453
     * call to a <code>getXXX</code> method implicitly closes the stream. Also, a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1454
     * stream may return <code>0</code> when the method <code>available</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1459
     * as a stream of two-byte Unicode characters.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1460
     * If the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1461
     * the value returned is <code>null</code>.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1474
     * of this rowset's <code>ResultSet</code> object as a stream of uninterpreted
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1475
     * <code>byte</code>s.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1478
     * suitable for retrieving large <code>LONGVARBINARY</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1483
     * call to a <code>getXXX</code> method implicitly closes the stream. Also, a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1484
     * stream may return <code>0</code> when the method <code>available</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1489
     * as a stream of uninterpreted bytes;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1490
     * if the value is SQL <code>NULL</code>, the result is <code>null</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1506
     * <code>ResultSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1507
     * Subsequent warnings on this rowset's <code>ResultSet</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1508
     * will be chained to the <code>SQLWarning</code> object that
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1515
     * by <code>ResultSet</code> methods.  Any warning caused by
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1516
     * <code>Statement</code> methods
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1517
     * (such as reading OUT parameters) will be chained on the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1518
     * <code>Statement</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1519
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1520
     * @return the first <code>SQLWarning</code> object reported or <code>null</code>
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1532
     * Clears all warnings reported on this rowset's <code>ResultSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1533
     * After this method is called, the method <code>getWarnings</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1534
     * returns <code>null</code> until a new warning is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1535
     * reported for this rowset's <code>ResultSet</code> object.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1548
     * Gets the name of the SQL cursor used by this rowset's <code>ResultSet</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1555
     * level to support update, the cursor's <code>select</code> statement should be
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1560
     * SQL cursor used by a <code>ResultSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1561
     * The current row of a <code>ResultSet</code> object
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1565
     * <code>SQLException</code> is thrown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1566
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1567
     * @return the SQL name for this rowset's <code>ResultSet</code> object's cursor
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1580
     * this rowset's <code>ResultSet</code> object's columns.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1581
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1582
     * @return the description of this rowset's <code>ResultSet</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1610
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1611
     * an <code>Object</code>.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1623
     * <code>getObject</code> is extended to materialize
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1626
     * if it were a call to: <code>getObject(columnIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1627
     * this.getStatement().getConnection().getTypeMap())</code>.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1630
     * @return a <code>java.lang.Object</code> holding the column value
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1643
     * of this rowset's <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1644
     * an <code>Object</code>.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1656
     * <code>getObject</code> is extended to materialize
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1659
     * if it were a call to: <code>getObject(columnIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1660
     * this.getStatement().getConnection().getTypeMap())</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1661
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1662
     * @param columnName the SQL name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1663
     * @return a <code>java.lang.Object</code> holding the column value
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1675
     * Maps the given <code>JdbcRowSetImpl</code> column name to its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1676
     * <code>JdbcRowSetImpl</code> column index and reflects this on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1677
     * the internal <code>ResultSet</code> object.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1700
     * of this rowset's <code>ResultSet</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1701
     * <code>java.io.Reader</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1702
     * @return a <code>java.io.Reader</code> object that contains the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1703
     * value; if the value is SQL <code>NULL</code>, the value returned is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1704
     * <code>null</code>.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1716
     * of this rowset's <code>ResultSet</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1717
     * <code>java.io.Reader</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1718
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1719
     * @return a <code>java.io.Reader</code> object that contains the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1720
     * value; if the value is SQL <code>NULL</code>, the value returned is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1721
     * <code>null</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1722
     * @param columnName the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1723
     * @return the value in the specified column as a <code>java.io.Reader</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1732
     * of this rowset's <code>ResultSet</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1733
     * <code>java.math.BigDecimal</code> with full precision.
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);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1737
     * if the value is SQL <code>NULL</code>, the value returned is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1738
     * <code>null</code>.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1751
     * of this rowset's <code>ResultSet</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1752
     * <code>java.math.BigDecimal</code> with full precision.
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);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1756
     * if the value is SQL <code>NULL</code>, the value returned is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1757
     * <code>null</code>.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1772
     * this rowset's <code>ResultSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1773
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1774
     * @return <code>true</code> if the cursor is before the first row;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1775
     * <code>false</code> if the cursor is at any other position or the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1776
     * result set contains no rows
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1789
     * this rowset's <code>ResultSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1790
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1791
     * @return <code>true</code> if the cursor is after the last row;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1792
     * <code>false</code> if the cursor is at any other position or the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1793
     * result set contains no rows
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1806
     * this rowset's <code>ResultSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1807
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1808
     * @return <code>true</code> if the cursor is on the first row;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1809
     * <code>false</code> otherwise
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1822
     * this rowset's <code>ResultSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1823
     * Note: Calling the method <code>isLast</code> may be expensive
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
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1828
     * @return <code>true</code> if the cursor is on the last row;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1829
     * <code>false</code> otherwise
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1843
     * this rowset's <code>ResultSet</code> object, just before the
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,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1847
     *            (2) the result set type is <code>TYPE_FORWARD_ONLY</code>,
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1860
     * this rowset's <code>ResultSet</code> object, just after the
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,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1863
     *            (2) the result set type is <code>TYPE_FORWARD_ONLY</code>,
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1876
     * this rowset's <code>ResultSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1877
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1878
     * @return <code>true</code> if the cursor is on a valid row;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1879
     * <code>false</code> if there are no rows in the result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1880
     * @throws SQLException if (1) a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1881
     *            (2) the result set type is <code>TYPE_FORWARD_ONLY</code>,
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1896
     * this rowset's <code>ResultSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1897
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1898
     * @return <code>true</code> if the cursor is on a valid row;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1899
     * <code>false</code> if there are no rows in the result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1900
     * @throws SQLException if (1) a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1901
     *            (2) the result set type is <code>TYPE_FORWARD_ONLY</code>,
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
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1917
     * @return the current row number; <code>0</code> if there is no current row
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1930
     * this rowset's internal <code>ResultSet</code> object.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1940
     * <code>absolute(-1)</code> positions the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1941
     * cursor on the last row, calling the method <code>absolute(-2)</code>
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
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1948
     * <p><B>Note:</B> Calling <code>absolute(1)</code> is the same
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1949
     * as calling <code>first()</code>. Calling <code>absolute(-1)</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1950
     * is the same as calling <code>last()</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1951
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1952
     * @return <code>true</code> if the cursor is on the result set;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1953
     * <code>false</code> otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1954
     * @throws SQLException if (1) a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1955
     *            (2) the row is <code>0</code>, (3) the result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1956
     *            type is <code>TYPE_FORWARD_ONLY</code>, or (4) this
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1972
     * the first/last row. Calling <code>relative(0)</code> is valid, but does
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1973
     * not change the cursor position.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1974
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1975
     * <p>Note: Calling the method <code>relative(1)</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1976
     * is different from calling the method <code>next()</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1977
     * because is makes sense to call <code>next()</code> when there
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
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1982
     * @return <code>true</code> if the cursor is on a row;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1983
     * <code>false</code> otherwise
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1986
     *            type is <code>TYPE_FORWARD_ONLY</code>, or (4) this
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2000
     * <code>ResultSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2001
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2002
     * <p><B>Note:</B> Calling the method <code>previous()</code> is not the same as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2003
     * calling the method <code>relative(-1)</code> because it
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2004
     * makes sense to call <code>previous()</code> when there is no current row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2005
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2006
     * @return <code>true</code> if the cursor is on a valid row;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2007
     * <code>false</code> if it is off the result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2008
     * @throws SQLException if (1) a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2009
     *            (2) the result set type is <code>TYPE_FORWARD_ONLY</code>,
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2023
     * <code>ResultSet</code> object will be processed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2024
     * The initial value is determined by the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2025
     * <code>Statement</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2026
     * that produced this rowset's <code>ResultSet</code> object.
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,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2030
     *            (2) the result set type is <code>TYPE_FORWARD_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2031
     *            and the fetch direction is not <code>FETCH_FORWARD</code>,
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2044
     * <code>ResultSet</code> object.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2047
     *         <code>ResultSet</code> object
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2064
     * <code>ResultSet</code> object.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2068
     * <code>Statement</code> object
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2073
     *            condition <code>0 <= rows <= this.getMaxRows()</code> is not
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2087
     * <code>ResultSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2088
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2089
     * @return the current fetch size for this rowset's <code>ResultSet</code> object
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2114
     * Returns the concurrency mode of this rowset's <code>ResultSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2115
     * The concurrency used is determined by the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2116
     * <code>Statement</code> object that created the result set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2117
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2118
     * @return the concurrency type, either <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2119
     * or <code>CONCUR_UPDATABLE</code>
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
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2141
     * @return <code>true</code> if the row has been visibly updated
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2157
     * <code>ResultSet</code> object can detect visible inserts.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2158
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2159
     * @return <code>true</code> if a row has had an insertion
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2160
     * and insertions are detected; <code>false</code> otherwise
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2177
     * or not this rowset's <code>ResultSet</code> object can detect deletions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2178
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2179
     * @return <code>true</code> if a row was deleted and deletions are detected;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2180
     * <code>false</code> otherwise
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
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2195
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2196
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2197
     * update the underlying database; instead the <code>updateRow</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2198
     * or <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2216
     * Updates the designated column with a <code>boolean</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2217
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2218
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2219
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2220
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2240
     * Updates the designated column with a <code>byte</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2241
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2242
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2243
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2244
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2265
     * Updates the designated column with a <code>short</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2266
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2267
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2268
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2269
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2289
     * Updates the designated column with an <code>int</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2290
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2291
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2292
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2293
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2312
     * Updates the designated column with a <code>long</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2313
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2314
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2315
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2316
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2336
     * Updates the designated column with a <code>float</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2337
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2338
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2339
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2340
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2360
     * Updates the designated column with a <code>double</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2361
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2362
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2363
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2364
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2384
     * Updates the designated column with a <code>java.math.BigDecimal</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2385
     * value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2386
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2387
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2388
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2389
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2409
     * Updates the designated column with a <code>String</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2410
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2411
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2412
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2413
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2433
     * Updates the designated column with a <code>byte</code> array value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2434
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2435
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2436
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2437
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2457
     * Updates the designated column with a <code>java.sql.Date</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2458
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2459
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2460
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2461
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2482
     * Updates the designated column with a <code>java.sql.Time</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2483
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2484
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2485
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2486
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2506
     * Updates the designated column with a <code>java.sql.Timestamp</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2507
     * value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2508
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2509
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2510
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2511
     * <code>insertRow</code> methods are called to update the database.
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.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2532
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2533
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2534
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2535
     * <code>insertRow</code> methods are called to update the database.
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.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2557
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2558
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2559
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2560
     * <code>insertRow</code> methods are called to update the database.
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.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2582
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2583
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2584
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2585
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2606
     * Updates the designated column with an <code>Object</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2607
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2608
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2609
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2610
     * <code>insertRow</code> methods are called to update the database.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2614
     * @param scale for <code>java.sql.Types.DECIMAl</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2615
     *  or <code>java.sql.Types.NUMERIC</code> types,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2616
     *  this is the number of digits after the decimal point.  For all other
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2617
     *  types this value will be ignored.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2634
     * Updates the designated column with an <code>Object</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2635
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2636
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2637
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2638
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2658
     * Updates the designated column with a <code>null</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2659
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2660
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2661
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2662
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2675
     * Updates the designated column with a <code>boolean</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2676
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2677
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2678
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2679
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2691
     * Updates the designated column with a <code>byte</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2692
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2693
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2694
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2695
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2707
     * Updates the designated column with a <code>short</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2708
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2709
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2710
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2711
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2723
     * Updates the designated column with an <code>int</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2724
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2725
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2726
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2727
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2739
     * Updates the designated column with a <code>long</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2740
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2741
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2742
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2743
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2755
     * Updates the designated column with a <code>float </code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2756
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2757
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2758
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2759
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2771
     * Updates the designated column with a <code>double</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2772
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2773
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2774
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2775
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2787
     * Updates the designated column with a <code>java.sql.BigDecimal</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2788
     * value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2789
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2790
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2791
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2792
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2804
     * Updates the designated column with a <code>String</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2805
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2806
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2807
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2808
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2820
     * Updates the designated column with a <code>boolean</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2821
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2822
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2823
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2824
     * <code>insertRow</code> methods are called to update the database.
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
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2830
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2831
     * current row, or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2832
     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2845
     * Updates the designated column with a <code>java.sql.Date</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2846
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2847
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2848
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2849
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2861
     * Updates the designated column with a <code>java.sql.Time</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2862
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2863
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2864
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2865
     * <code>insertRow</code> methods are called to update the database.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2877
     * Updates the designated column with a <code>java.sql.Timestamp</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2878
     * value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2879
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2880
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2881
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2882
     * <code>insertRow</code> methods are called to update the database.
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.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2895
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2896
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2897
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2898
     * <code>insertRow</code> methods are called to update the database.
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.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2912
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2913
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2914
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2915
     * <code>insertRow</code> methods are called to update the database.
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.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2929
     * The <code>updateXXX</code> methods are used to update column values
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2930
     * in the current row or the insert row.  The <code>updateXXX</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2931
     * methods do not update the underlying database; instead the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2932
     * <code>updateRow</code> or <code>insertRow</code> methods are called
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2936
     * @param reader the new column <code>Reader</code> stream value
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2946
     * Updates the designated column with an <code>Object</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2947
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2948
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2949
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2950
     * <code>insertRow</code> methods are called to update the database.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2954
     * @param scale for <code>java.sql.Types.DECIMAL</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2955
     *  or <code>java.sql.Types.NUMERIC</code> types,
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2966
     * Updates the designated column with an <code>Object</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2967
     * The <code>updateXXX</code> methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2968
     * current row or the insert row.  The <code>updateXXX</code> methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2969
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2970
     * <code>insertRow</code> methods are called to update the database.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2983
     * <code>ResultSet</code> object and into the database
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3003
     * current row of this rowset's <code>ResultSet</code> object
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3010
     *             set is <code>ResultSet.CONCUR_READ_ONLY</code>, or
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3022
     * Deletes the current row from this rowset's <code>ResultSet</code> object
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3028
     * or if this method is called when the cursor is on the insert row
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3033
     *            set is <code>ResultSet.CONCUR_READ_ONLY</code>, or
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3045
     * Refreshes the current row of this rowset's <code>ResultSet</code>
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
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3049
     * <P>The <code>refreshRow</code> method provides a way for an
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3052
     * <code>refreshRow</code> when caching or prefetching is being
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3058
     * level and cursor sensitivity.  If <code>refreshRow</code> is called after
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3059
     * calling an <code>updateXXX</code> method, but before calling
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3060
     * the method <code>updateRow</code>, then the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3061
     * updates made to the row are lost.  Calling the method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3062
     * <code>refreshRow</code> frequently will likely slow performance.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3079
     * <code>ResultSet</code> object and notifies listeners that a row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3080
     * has changed. This method may be called after calling an
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3081
     * <code>updateXXX</code> method(s) and before calling
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3082
     * the method <code>updateRow</code> to roll back
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3083
     * the updates made to a row.  If no updates have been made or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3084
     * <code>updateRow</code> has already been called, this method has no
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3107
     * be constructed by calling the <code>updateXXX</code> methods prior to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3108
     * inserting the row into the result set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3109
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3110
     * Only the <code>updateXXX</code>, <code>getXXX</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3111
     * and <code>insertRow</code> methods may be
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3114
     * called before calling <code>insertRow</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3115
     * An <code>updateXXX</code> method must be called before a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3116
     * <code>getXXX</code> method can be called on a column value.
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,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3119
     *            (2) this rowset's <code>ResultSet</code> object is
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,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3137
     *            (2) this rowset's <code>ResultSet</code> object is
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3149
     * Returns the <code>Statement</code> object that produced this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3150
     * <code>ResultSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3151
     * If the result set was generated some other way, such as by a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3152
     * <code>DatabaseMetaData</code> method, this method returns
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3153
     * <code>null</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3154
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3155
     * @return the <code>Statment</code> object that produced
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3156
     * this rowset's <code>ResultSet</code> object or <code>null</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3172
     * of this rowset's <code>ResultSet</code> object as an <code>Object</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3173
     * This method uses the given <code>Map</code> object
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3178
     * @param map a <code>java.util.Map</code> object that contains the mapping
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3179
     * from SQL type names to classes in the Java programming language
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3180
     * @return an <code>Object</code> in the Java programming language
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3181
     * representing the SQL value
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3196
     * of this rowset's <code>ResultSet</code> object as a <code>Ref</code> object.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3199
     * @return a <code>Ref</code> object representing an SQL <code>REF</code> value
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3213
     * of this rowset's <code>ResultSet</code> object as a <code>Blob</code> object.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3216
     * @return a <code>Blob</code> object representing the SQL <code>BLOB</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3230
     * of this rowset's <code>ResultSet</code> object as a <code>Clob</code> object.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3233
     * @return a <code>Clob</code> object representing the SQL <code>CLOB</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3247
     * of this rowset's <code>ResultSet</code> object as an <code>Array</code> object.
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.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3250
     * @return an <code>Array</code> object representing the SQL <code>ARRAY</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3264
     * of this rowset's <code>ResultSet</code> object as an <code>Object</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3265
     * This method uses the specified <code>Map</code> object for
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3269
     * @param map a <code>java.util.Map</code> object that contains the mapping
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3270
     * from SQL type names to classes in the Java programming language
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3271
     * @return an <code>Object</code> representing the SQL
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3285
     * of this rowset's <code>ResultSet</code> object as a <code>Ref</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3286
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3287
     * @param colName the column name
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3288
     * @return a <code>Ref</code> object representing the SQL <code>REF</code> value in
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3300
     * of this rowset's <code>ResultSet</code> object as a <code>Blob</code> object.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3303
     * @return a <code>Blob</code> object representing the SQL <code>BLOB</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3315
     * of this rowset's <code>ResultSet</code> object as a <code>Clob</code> object.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3318
     * @return a <code>Clob</code> object representing the SQL <code>CLOB</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3330
     * of this rowset's <code>ResultSet</code> object as an <code>Array</code> object.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3333
     * @return an <code>Array</code> object representing the SQL <code>ARRAY</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3345
     * of this rowset's <code>ResultSet</code> object as a <code>java.sql.Date</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3351
     * @param cal the <code>java.util.Calendar</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3352
     *        to use in constructing the date
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3353
     * @return the column value as a <code>java.sql.Date</code> object;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3354
     *         if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3355
     *         the value returned is <code>null</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3368
     * of this rowset's <code>ResultSet</code> object as a <code>java.sql.Date</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3374
     * @param cal the <code>java.util.Calendar</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3375
     *        to use in constructing the date
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3376
     * @return the column value as a <code>java.sql.Date</code> object;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3377
     *         if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3378
     *         the value returned is <code>null</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3390
     * of this rowset's <code>ResultSet</code> object as a <code>java.sql.Time</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3396
     * @param cal the <code>java.util.Calendar</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3397
     *        to use in constructing the time
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3398
     * @return the column value as a <code>java.sql.Time</code> object;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3399
     *         if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3400
     *         the value returned is <code>null</code> in the Java programming language
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3413
     * of this rowset's <code>ResultSet</code> object as a <code>java.sql.Time</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3419
     * @param cal the <code>java.util.Calendar</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3420
     *        to use in constructing the time
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3421
     * @return the column value as a <code>java.sql.Time</code> object;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3422
     *         if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3423
     *         the value returned is <code>null</code> in the Java programming language
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3434
     * of this rowset's <code>ResultSet</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3435
     * <code>java.sql.Timestamp</code> object.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3441
     * @param cal the <code>java.util.Calendar</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3442
     *        to use in constructing the timestamp
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3443
     * @return the column value as a <code>java.sql.Timestamp</code> object;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3444
     *         if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3445
     *         the value returned is <code>null</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3458
     * of this rowset's <code>ResultSet</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3459
     * <code>java.sql.Timestamp</code> object.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3465
     * @param cal the <code>java.util.Calendar</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3466
     *        to use in constructing the timestamp
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3467
     * @return the column value as a <code>java.sql.Timestamp</code> object;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3468
     *         if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3469
     *         the value returned is <code>null</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3481
     * row of this <code>JdbcRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3482
     * <code>double</code> value.
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
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3493
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3494
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3495
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3496
     * @param ref the new <code>Ref</code> column value
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3500
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3510
     * row of this <code>JdbcRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3511
     * <code>double</code> value.
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
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3522
     * @param columnName a <code>String</code> object that must match the
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3528
     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3537
     * row of this <code>JdbcRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3538
     * <code>double</code> value.
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
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3549
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3550
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3551
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3552
     * @param c the new column <code>Clob</code> value
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3556
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3566
     * row of this <code>JdbcRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3567
     * <code>double</code> value.
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
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3578
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3579
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3580
     * @param c the new column <code>Clob</code> value
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3584
     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3592
     * row of this <code>JdbcRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3593
     * <code>java.sql.Blob</code> value.
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
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3604
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3605
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3606
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3607
     * @param b the new column <code>Blob</code> value
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3611
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3620
     * row of this <code>JdbcRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3621
     * <code>java.sql.Blob </code> value.
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
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3632
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3633
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3634
     * @param b the new column <code>Blob</code> value
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3638
     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3646
     * row of this <code>JdbcRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3647
     * <code>java.sql.Array</code> values.
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
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3658
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3659
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3660
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3661
     * @param a the new column <code>Array</code> value
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3665
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3674
     * row of this <code>JdbcRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3675
     * <code>java.sql.Array</code> value.
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
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3686
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3687
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3688
     * @param a the new column <code>Array</code> value
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3692
     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3699
     * Provide interface coverage for getURL(int) in ResultSet->RowSet
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3707
     * Provide interface coverage for getURL(String) in ResultSet->RowSet
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3715
     * <code>JdbcRowSetImpl</code>
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.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3722
     * This was set using <code>setMatchColumn</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3731
     *  parameter index is out of bounds or if the columnIdx is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3732
     *  not the same as set using <code>setMatchColumn(int [])</code>
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.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3751
     * This was set using <code>setMatchColumn</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3760
     *  parameter index is out of bounds or if the columnName is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3761
     *  not the same as set using <code>setMatchColumn(String [])</code>
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3777
     * Retrieves the column name as <code>String</code> array
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3778
     * that was set using <code>setMatchColumn(String [])</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3779
     * for this rowset.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3780
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3781
     * @return a <code>String</code> array object that contains the column names
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3799
     * Retrieves the column id as <code>int</code> array that was set using
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3800
     * <code>setMatchColumn(int [])</code> for this rowset.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3801
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3802
     * @return a <code>int</code> array object that contains the column ids
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3832
     * <code>JoinRowSet</code> as the column which will form the basis of the
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3837
     * command when the method <code>getMatchColumnIndexes</code> is called.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3842
     *        <code>0</code> or greater
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3843
     * @throws SQLException if an error occurs or the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3844
     *                         parameter index is out of bounds
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3861
     * <code>JoinRowSet</code> as the column which will form the basis of the
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3866
     * command when the method <code>getMatchColumn</code> is called.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3871
     *  parameter index is out of bounds
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++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3876
           if( columnNames[j] == null || columnNames[j].equals("")) {
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3886
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3887
     * Sets the designated parameter to the given <code>int</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3888
     * object.  This forms the basis of the join for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3889
     * <code>JoinRowSet</code> as the column which will form the basis of the
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3894
     * command when the method <code>getMatchColumn</code> is called.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3899
     *        <code>0</code> or greater
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3900
     * @throws SQLException if an error occurs or the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3901
     *                         parameter index is out of bounds
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3915
     * Sets the designated parameter to the given <code>String</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3916
     * object.  This forms the basis of the join for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3917
     * <code>JoinRowSet</code> as the column which will form the basis of the
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3922
     * command when the method <code>getMatchColumn</code> is called.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3927
     *  parameter index is out of bounds
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
6697
39929804f9d4 6989139: Address JDBC Findbugs where Number type Constructor are used
lancea
parents: 6540
diff changeset
  3931
        if(columnName == null || (columnName= columnName.trim()).equals("")) {
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3941
     * Unsets the designated parameter to the given <code>int</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3942
     * object.  This was set using <code>setMatchColumn</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3951
     *  parameter index is out of bounds or if the columnIdx is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3952
     *  not the same as set using <code>setMatchColumn(int)</code>
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3967
     * Unsets the designated parameter to the given <code>String</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3968
     * object.  This was set using <code>setMatchColumn</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3977
     *  parameter index is out of bounds or if the columnName is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3978
     *  not the same as set using <code>setMatchColumn(String)</code>
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3995
     * Retrieves the <code>DatabaseMetaData</code> associated with
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3996
     * the connection handle associated this this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3997
     * <code>JdbcRowSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3998
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3999
     * @return the <code>DatabaseMetadata</code> associated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4000
     *  with the rowset's connection.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4009
     * Retrieves the <code>ParameterMetaData</code> associated with
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4010
     * the connection handle associated this this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4011
     * <code>JdbcRowSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4012
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4013
     * @return the <code>ParameterMetadata</code> associated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4014
     *  with the rowset's connection.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4023
     * Commits all updates in this <code>JdbcRowSet</code> object by
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4024
     * wrapping the internal <code>Connection</code> object and calling
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4025
     * its <code>commit</code> method.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4026
     * This method sets this <code>JdbcRowSet</code> object's private field
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4027
     * <code>rs</code> to <code>null</code> after saving its value to another
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4028
     * object, but only if the <code>ResultSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4029
     * constant <code>HOLD_CURSORS_OVER_COMMIT</code> has not been set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4030
     * (The field <code>rs</code> is this <code>JdbcRowSet</code> object's
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4031
     * <code>ResultSet</code> object.)
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4034
     * access error occurs
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4048
     * Sets auto-commit on the internal <code>Connection</code> object with this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4049
     * <code>JdbcRowSet</code>
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4077
     * Returns the auto-commit status with this <code>JdbcRowSet</code>.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4087
     * Rolls back all the updates in this <code>JdbcRowSet</code> object by
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4088
     * wrapping the internal <code>Connection</code> object and calling its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4089
     * <code>rollback</code> method.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4090
     * This method sets this <code>JdbcRowSet</code> object's private field
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4091
     * <code>rs</code> to <code>null</code> after saving its value to another object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4092
     * (The field <code>rs</code> is this <code>JdbcRowSet</code> object's
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4093
     * internal <code>ResultSet</code> object.)
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4096
     * access error occurs
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4109
     * Rollbacks all the updates in the <code>JdbcRowSet</code> back to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4110
     * last <code>Savepoint</code> transaction marker. Wraps the internal
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4111
     * <code>Connection</code> object and call it's rollback method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4112
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4113
     * @param s the <code>Savepoint</code> transaction marker to roll the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4114
     * transaction to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4115
     * @throws SQLException if autoCommit is set to true; or ia a database
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4116
     * access error occurs
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4147
     * Gets this <code>JdbcRowSet</code> object's Connection property
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4148
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4149
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4150
     * @return the <code>Connection</code> object associated with this rowset;
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4161
     * Sets this <code>JdbcRowSet</code> object's connection property
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4162
     * to the given <code>Connection</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4163
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4164
     * @param connection the <code>Connection</code> object.
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4175
     * Gets this <code>JdbcRowSet</code> object's PreparedStatement property
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4176
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4177
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4178
     * @return the <code>PreparedStatement</code> object associated with this rowset;
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4189
     * Sets this <code>JdbcRowSet</code> object's preparedtsatement property
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4190
     * to the given <code>PreparedStatemennt</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4191
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4192
     * @param preparedStatement the <code>PreparedStatement</code> object
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4203
     * Gets this <code>JdbcRowSet</code> object's ResultSet property
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4204
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4205
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4206
     * @return the <code>ResultSet</code> object associated with this rowset;
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4220
     * Sets this <code>JdbcRowSet</code> object's resultset property
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4221
     * to the given <code>ResultSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4222
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4223
     * @param resultSet the <code>ResultSet</code> object
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4231
     * Sets this <code>JdbcRowSet</code> object's <code>command</code> property to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4232
     * the given <code>String</code> object and clears the parameters, if any,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4233
     * that were set for the previous command. In addition,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4234
     * if the <code>command</code> property has previously been set to a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4235
     * non-null value and it is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4236
     * different from the <code>String</code> object supplied,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4237
     * this method sets this <code>JdbcRowSet</code> object's private fields
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4238
     * <code>ps</code> and <code>rs</code> to <code>null</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4239
     * (The field <code>ps</code> is its <code>PreparedStatement</code> object, and
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4240
     * the field <code>rs</code> is its <code>ResultSet</code> object.)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4241
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4242
     * The <code>command</code> property may not be needed if the <code>RowSet</code>
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.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4245
     * Thus, this property is optional and may be <code>null</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4246
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4247
     * @param command a <code>String</code> object containing an SQL query
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4248
     *            that will be set as this <code>RowSet</code> object's command
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4249
     *            property; may be <code>null</code> but may not be an empty string
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4268
     * Sets the <code>dataSourceName</code> property for this <code>JdbcRowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4269
     * object to the given logical name and sets this <code>JdbcRowSet</code> object's
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4270
     * Url property to <code>null</code>. In addition, if the <code>dataSourceName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4271
     * property has previously been set and is different from the one supplied,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4272
     * this method sets this <code>JdbcRowSet</code> object's private fields
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4273
     * <code>ps</code>, <code>rs</code>, and <code>conn</code> to <code>null</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4274
     * (The field <code>ps</code> is its <code>PreparedStatement</code> object,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4275
     * the field <code>rs</code> is its <code>ResultSet</code> object, and
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4276
     * the field <code>conn</code> is its <code>Connection</code> object.)
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4279
     * <code>DataSource</code> object in a JNDI naming service so that an
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4280
     * application can do a lookup using that name to retrieve the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4281
     * <code>DataSource</code> object bound to it. The <code>DataSource</code>
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
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4288
     * @param dsName a <code>String</code> object with the name that can be supplied
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4289
     *        to a naming service based on JNDI technology to retrieve the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4290
     *        <code>DataSource</code> object that can be used to get a connection;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4291
     *        may be <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4292
     * @throws SQLException if there is a problem setting the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4293
     *          <code>dataSourceName</code> property
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4313
     * Sets the Url property for this <code>JdbcRowSet</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4314
     * to the given <code>String</code> object and sets the dataSource name
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4315
     * property to <code>null</code>. In addition, if the Url property has
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4316
     * previously been set to a non <code>null</code> value and its value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4317
     * is different from the value to be set,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4318
     * this method sets this <code>JdbcRowSet</code> object's private fields
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4319
     * <code>ps</code>, <code>rs</code>, and <code>conn</code> to <code>null</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4320
     * (The field <code>ps</code> is its <code>PreparedStatement</code> object,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4321
     * the field <code>rs</code> is its <code>ResultSet</code> object, and
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4322
     * the field <code>conn</code> is its <code>Connection</code> object.)
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4326
     * ("JDBC driver") and the <code>DriverManager</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4327
     * The correct JDBC URL for the specific driver to be used can be found
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4328
     * in the driver documentation.  Although there are guidelines for for how
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4329
     * a JDBC URL is formed,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4330
     * a driver vendor can specify any <code>String</code> object except
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4331
     * one with a length of <code>0</code> (an empty string).
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4334
     * a <code>DataSource</code> object instead of the <code>DriverManager</code>.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4339
     * <code>RowSet</code> object to connect to a database.  The <code>RowSet</code>
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
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4343
     * @param url a <code>String</code> object that contains the JDBC URL
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4344
     *            that will be used to establish the connection to a database for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4345
     *            <code>RowSet</code> object; may be <code>null</code> but must not
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4348
     *         parameter supplied is a string with a length of <code>0</code> (an
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4368
     /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4369
     * Sets the username property for this <code>JdbcRowSet</code> object
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4372
     * calling the method <code>execute</code>. In addition,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4373
     * if the <code>username</code> property is already set with a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4374
     * non-null value and that value is different from the <code>String</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4375
     * object to be set,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4376
     * this method sets this <code>JdbcRowSet</code> object's private fields
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4377
     * <code>ps</code>, <code>rs</code>, and <code>conn</code> to <code>null</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4378
     * (The field <code>ps</code> is its <code>PreparedStatement</code> object,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4379
     * <code>rs</code> is its <code>ResultSet</code> object, and
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4380
     * <code>conn</code> is its <code>Connection</code> object.)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4381
     * Setting these fields to <code>null</code> ensures that only current
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4382
     * values will be used.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4383
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4384
     * @param uname the <code>String</code> object containing the user name that
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4385
     *     is supplied to the data source to create a connection. It may be null.
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
     /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4404
     * Sets the password property for this <code>JdbcRowSet</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4405
     * to the given <code>String</code> object. Because it
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4406
     * is not serialized, the password property is set at run time before
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4407
     * calling the method <code>execute</code>. Its default valus is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4408
     * <code>null</code>. In addition,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4409
     * if the <code>password</code> property is already set with a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4410
     * non-null value and that value is different from the one being set,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4411
     * this method sets this <code>JdbcRowSet</code> object's private fields
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4412
     * <code>ps</code>, <code>rs</code>, and <code>conn</code> to <code>null</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4413
     * (The field <code>ps</code> is its <code>PreparedStatement</code> object,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4414
     * <code>rs</code> is its <code>ResultSet</code> object, and
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4415
     * <code>conn</code> is its <code>Connection</code> object.)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4416
     * Setting these fields to <code>null</code> ensures that only current
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4417
     * values will be used.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4418
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4419
     * @param password the <code>String</code> object that represents the password
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4420
     *     that must be supplied to the database to create a connection
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4438
     * Sets the type for this <code>RowSet</code> object to the specified type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4439
     * The default type is <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4440
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4441
     * @param type one of the following constants:
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4442
     *             <code>ResultSet.TYPE_FORWARD_ONLY</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4443
     *             <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4444
     *             <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
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:
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4447
     *          <code>ResultSet.TYPE_FORWARD_ONLY</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4448
     *          <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4449
     *          <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4471
     * Sets the concurrency for this <code>RowSet</code> object to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4472
     * the specified concurrency. The default concurrency for any <code>RowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4473
     * object (connected or disconnected) is <code>ResultSet.CONCUR_UPDATABLE</code>,
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:
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4477
     *                    <code>ResultSet.CONCUR_READ_ONLY</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4478
     *                    <code>ResultSet.CONCUR_UPDATABLE</code>
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:
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4481
     *          <code>ResultSet.CONCUR_UPDATABLE</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4482
     *          <code>ResultSet.CONCUR_READ_ONLY</code>
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4503
     * Retrieves the value of the designated <code>SQL XML</code> parameter as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4504
     * <code>SQLXML</code> object in the Java programming language.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4508
     * @since 6.0
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4515
     * Retrieves the value of the designated <code>SQL XML</code> parameter as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4516
     * <code>SQLXML</code> object in the Java programming language.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4527
     * <code>ResultSet</code> object as a java.sql.RowId object in the Java
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, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4531
     * @return the column value if the value is a SQL <code>NULL</code> the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4532
     *     value returned is <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4533
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4534
     * @since 6.0
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4542
     * <code>ResultSet</code> object as a java.sql.RowId object in the Java
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4546
     * @return the column value if the value is a SQL <code>NULL</code> the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4547
     *     value returned is <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4548
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4549
     * @since 6.0
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4556
     * Updates the designated column with a <code>RowId</code> value. The updater
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4559
     * the <code>updateRow<code> or <code>insertRow</code> methods are called
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4565
     * @since 6.0
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4572
     * Updates the designated column with a <code>RowId</code> value. The updater
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4575
     * the <code>updateRow<code> or <code>insertRow</code> methods are called
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4581
     * @since 6.0
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4591
     * @since 6.0
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4602
     * @since 6.0
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4614
     * @since 6.0
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4626
     * @since 6.0
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4634
     * This method is used for updating SQL <code>NCLOB</code>  type that maps
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4635
     * to <code>java.sql.Types.NCLOB</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4639
     * @since 6.0
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4646
     * This method is used for updating SQL <code>NCLOB</code>  type that maps
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4647
     * to <code>java.sql.Types.NCLOB</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4651
     * @since 6.0
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4659
     * of this <code>ResultSet</code> object as a <code>NClob</code> object
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, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4663
     * @return a <code>NClob</code> object representing the SQL
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4664
     *         <code>NCLOB</code> value in the specified column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4665
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4666
     * @since 6.0
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4675
     * of this <code>ResultSet</code> object as a <code>NClob</code> object
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4679
     * @return a <code>NClob</code> object representing the SQL <code>NCLOB</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4682
     * @since 6.0
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4697
      * Sets the designated parameter to the given <code>java.sql.SQLXML</code> object. The driver converts this to an
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4698
      * SQL <code>XML</code> value when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4699
      * @param parameterIndex index of the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4700
      * @param xmlObject a <code>SQLXML</code> object that maps an SQL <code>XML</code> value
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4709
     * Sets the designated parameter to the given <code>java.sql.SQLXML</code> object. The driver converts this to an
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4710
     * <code>SQL XML</code> value when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4711
     * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4712
     * @param xmlObject a <code>SQLXML</code> object that maps an <code>SQL XML</code> value
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4721
     * Sets the designated parameter to the given <code>java.sql.RowId</code> object. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4722
     * driver converts this to a SQL <code>ROWID</code> value when it sends it
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4735
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4736
    * Sets the designated parameter to the given <code>java.sql.RowId</code> object. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4737
    * driver converts this to a SQL <code>ROWID</code> when it sends it to the
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
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4751
     * Sets the designated paramter to the given <code>String</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4752
     * The driver converts this to a SQL <code>NCHAR</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4753
     * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4754
     * (depending on the argument's
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4755
     * size relative to the driver's limits on <code>NVARCHAR</code> values)
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4762
     *  error could occur ; or if a database access error occurs
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
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4771
    * Sets the designated parameter in this <code>RowSet</code> object's command
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4772
    * to a <code>Reader</code> object. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4773
    * <code>Reader</code> reads the data till end-of-file is reached. The
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4782
    * <code>setNCharacterStream</code> which takes a length parameter.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4788
    *  error could occur ; if a database access error occurs; or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4789
    * this method is called on a closed <code>PreparedStatement</code>
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
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4798
    * Sets the designated parameter to a <code>java.sql.NClob</code> object. The object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4799
    * implements the <code>java.sql.NClob</code> interface. This <code>NClob</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4800
    * object maps to a SQL <code>NCLOB</code>.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4805
    *  error could occur; or if a database access error occurs
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4813
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4814
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4815
     * of this <code>ResultSet</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4816
     * <code>java.io.Reader</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4817
     * It is intended for use when
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4818
     * accessing  <code>NCHAR</code>,<code>NVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4819
     * and <code>LONGNVARCHAR</code> columns.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4820
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4821
     * @return a <code>java.io.Reader</code> object that contains the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4822
     * value; if the value is SQL <code>NULL</code>, the value returned is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4823
     * <code>null</code> in the Java programming language.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4835
     * of this <code>ResultSet</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4836
     * <code>java.io.Reader</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4837
     * It is intended for use when
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4838
     * accessing  <code>NCHAR</code>,<code>NVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4839
     * and <code>LONGNVARCHAR</code> columns.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4840
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4841
     * @param columnName the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4842
     * @return a <code>java.io.Reader</code> object that contains the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4843
     * value; if the value is SQL <code>NULL</code>, the value returned is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4844
     * <code>null</code> in the Java programming language
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4853
     * Updates the designated column with a <code>java.sql.SQLXML</code> value.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4857
     * the <code>updateRow</code> or <code>insertRow</code> methods are called
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4869
     * Updates the designated column with a <code>java.sql.SQLXML</code> value.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4873
     * the <code>updateRow</code> or <code>insertRow</code> methods are called
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4887
     * of this <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4888
     * a <code>String</code> in the Java programming language.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4889
     * It is intended for use when
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4890
     * accessing  <code>NCHAR</code>,<code>NVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4891
     * and <code>LONGNVARCHAR</code> columns.
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, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4894
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4895
     * value returned is <code>null</code>
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4905
     * of this <code>ResultSet</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4906
     * a <code>String</code> in the Java programming language.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4907
     * It is intended for use when
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4908
     * accessing  <code>NCHAR</code>,<code>NVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4909
     * and <code>LONGNVARCHAR</code> columns.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4910
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4911
     * @param columnName the SQL name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4912
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4913
     * value returned is <code>null</code>
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
       *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4930
       * @param columnIndex - the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4931
       * @param x - the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4932
       * @param length - the length of the stream
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
       *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4952
       * @param columnName - name of the Column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4953
       * @param x - the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4954
       * @param length - the length of the stream
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4966
     * Updates the designated column with a character stream value.   The
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4970
     * updating  <code>NCHAR</code>,<code>NVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4971
     * and <code>LONGNVARCHAR</code> columns.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4975
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4976
     * <code>insertRow</code> methods are called to update the database.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4980
     * <code>updateNCharacterStream</code> which takes a length parameter.
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,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4985
     * the result set concurrency is <code>CONCUR_READ_ONLY</code> or this method is called on a closed result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4986
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4987
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4988
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4989
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4990
    public void updateNCharacterStream(int columnIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4991
                             java.io.Reader x) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4992
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4993
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4994
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4995
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4996
     * Updates the designated column with a character stream value.  The
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4997
     * driver does the necessary conversion from Java character format to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4998
     * the national character set in the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4999
     * It is intended for use when
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5000
     * updating  <code>NCHAR</code>,<code>NVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5001
     * and <code>LONGNVARCHAR</code> columns.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5002
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5003
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5004
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5005
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5006
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5007
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5008
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5009
     * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5010
     * <code>updateNCharacterStream</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5011
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5012
     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the la
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5013
bel is the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5014
     * @param reader the <code>java.io.Reader</code> object containing
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5015
     *        the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5016
     * @exception SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5017
     * the result set concurrency is <code>CONCUR_READ_ONLY</code> or this method is called on a closed result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5018
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5019
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5020
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5021
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5022
    public void updateNCharacterStream(String columnLabel,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5023
                             java.io.Reader reader) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5024
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5025
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5026
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5027
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5028
     * Updates the designated column using the given input stream, which
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5029
     * will have the specified number of bytes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5030
     * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5031
     * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5032
     * <code>java.io.InputStream</code>. Data will be read from the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5033
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5034
     * do any necessary conversion from ASCII to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5035
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5036
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5037
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5038
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5039
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5040
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5041
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5042
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5043
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5044
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5045
     * @param columnIndex the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5046
     * @param inputStream An object that contains the data to set the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5047
     * value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5048
     * @param length the number of bytes in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5049
     * @exception SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5050
     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5051
     * or this method is called on a closed result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5052
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5053
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5054
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5055
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5056
    public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5057
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5058
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5059
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5060
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5061
     * Updates the designated column using the given input stream, which
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5062
     * will have the specified number of bytes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5063
     * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5064
     * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5065
     * <code>java.io.InputStream</code>. Data will be read from the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5066
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5067
     * do any necessary conversion from ASCII to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5068
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5069
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5070
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5071
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5072
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5073
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5074
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5075
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5076
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5077
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5078
     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the label is the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5079
     * @param inputStream An object that contains the data to set the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5080
     * value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5081
     * @param length the number of bytes in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5082
     * @exception SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5083
     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5084
     * or this method is called on a closed result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5085
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5086
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5087
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5088
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5089
    public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5090
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5091
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5092
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5093
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5094
     * Updates the designated column using the given input stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5095
     * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5096
     * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5097
     * <code>java.io.InputStream</code>. Data will be read from the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5098
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5099
     * do any necessary conversion from ASCII to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5100
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5101
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5102
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5103
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5104
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5105
     *  <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5106
     * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5107
     * <code>updateBlob</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5108
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5109
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5110
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5111
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5112
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5113
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5114
     * @param columnIndex the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5115
     * @param inputStream An object that contains the data to set the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5116
     * value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5117
     * @exception SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5118
     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5119
     * or this method is called on a closed result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5120
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5121
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5122
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5123
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5124
    public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5125
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5126
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5127
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5128
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5129
     * Updates the designated column using the given input stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5130
     * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5131
     * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5132
     * <code>java.io.InputStream</code>. Data will be read from the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5133
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5134
     * do any necessary conversion from ASCII to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5135
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5136
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5137
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5138
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5139
     *   <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5140
     * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5141
     * <code>updateBlob</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5142
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5143
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5144
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5145
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5146
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5147
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5148
     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the la
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5149
bel is the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5150
     * @param inputStream An object that contains the data to set the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5151
     * value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5152
     * @exception SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5153
     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5154
     * or this method is called on a closed result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5155
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5156
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5157
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5158
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5159
    public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5160
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5161
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5162
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5163
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5164
     * Updates the designated column using the given <code>Reader</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5165
     * object, which is the given number of characters long.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5166
     * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5167
     * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5168
     * <code>java.io.Reader</code> object. The data will be read from the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5169
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5170
     * do any necessary conversion from UNICODE to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5171
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5172
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5173
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5174
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5175
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5176
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5177
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5178
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5179
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5180
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5181
     * @param columnIndex the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5182
     * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5183
     * @param length the number of characters in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5184
     * @exception SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5185
     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5186
     * or this method is called on a closed result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5187
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5188
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5189
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5190
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5191
    public void updateClob(int columnIndex,  Reader reader, long length) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5192
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5193
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5194
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5195
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5196
     * Updates the designated column using the given <code>Reader</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5197
     * object, which is the given number of characters long.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5198
     * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5199
     * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5200
     * <code>java.io.Reader</code> object. The data will be read from the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5201
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5202
     * do any necessary conversion from UNICODE to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5203
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5204
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5205
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5206
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5207
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5208
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5209
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5210
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5211
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5212
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5213
     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the label is the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5214
     * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5215
     * @param length the number of characters in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5216
     * @exception SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5217
     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5218
     * or this method is called on a closed result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5219
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5220
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5221
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5222
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5223
    public void updateClob(String columnLabel,  Reader reader, long length) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5224
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5225
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5226
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5227
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5228
     * Updates the designated column using the given <code>Reader</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5229
     * object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5230
     * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5231
     * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5232
     * <code>java.io.Reader</code> object. The data will be read from the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5233
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5234
     * do any necessary conversion from UNICODE to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5235
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5236
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5237
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5238
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5239
     *   <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5240
     * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5241
     * <code>updateClob</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5242
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5243
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5244
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5245
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5246
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5247
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5248
     * @param columnIndex the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5249
     * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5250
     * @exception SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5251
     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5252
     * or this method is called on a closed result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5253
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5254
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5255
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5256
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5257
    public void updateClob(int columnIndex,  Reader reader) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5258
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5259
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5260
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5261
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5262
     * Updates the designated column using the given <code>Reader</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5263
     * object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5264
     * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5265
     * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5266
     * <code>java.io.Reader</code> object. The data will be read from the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5267
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5268
     * do any necessary conversion from UNICODE to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5269
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5270
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5271
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5272
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5273
     *  <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5274
     * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5275
     * <code>updateClob</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5276
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5277
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5278
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5279
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5280
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5281
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5282
     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the la
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5283
bel is the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5284
     * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5285
     * @exception SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5286
     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5287
     * or this method is called on a closed result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5288
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5289
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5290
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5291
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5292
    public void updateClob(String columnLabel,  Reader reader) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5293
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5294
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5295
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5296
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5297
     * Updates the designated column using the given <code>Reader</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5298
     * object, which is the given number of characters long.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5299
     * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5300
     * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5301
     * <code>java.io.Reader</code> object. The data will be read from the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5302
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5303
     * do any necessary conversion from UNICODE to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5304
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5305
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5306
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5307
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5308
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5309
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5310
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5311
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5312
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5313
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5314
     * @param columnIndex the first column is 1, the second 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5315
     * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5316
     * @param length the number of characters in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5317
     * @throws SQLException if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5318
     *         character sets;  if the driver can detect that a data conversion
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5319
     *  error could occur; this method is called on a closed result set,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5320
     * if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5321
     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5322
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5323
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5324
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5325
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5326
    public void updateNClob(int columnIndex,  Reader reader, long length) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5327
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5328
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5329
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5330
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5331
     * Updates the designated column using the given <code>Reader</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5332
     * object, which is the given number of characters long.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5333
     * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5334
     * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5335
     * <code>java.io.Reader</code> object. The data will be read from the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5336
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5337
     * do any necessary conversion from UNICODE to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5338
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5339
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5340
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5341
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5342
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5343
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5344
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5345
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5346
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5347
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5348
     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the label is the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5349
     * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5350
     * @param length the number of characters in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5351
     * @throws SQLException if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5352
     *         character sets;  if the driver can detect that a data conversion
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5353
     *  error could occur; this method is called on a closed result set;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5354
     *  if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5355
     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5356
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5357
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5358
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5359
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5360
    public void updateNClob(String columnLabel,  Reader reader, long length) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5361
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5362
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5363
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5364
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5365
     * Updates the designated column using the given <code>Reader</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5366
     * object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5367
     * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5368
     * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5369
     * <code>java.io.Reader</code> object. The data will be read from the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5370
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5371
     * do any necessary conversion from UNICODE to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5372
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5373
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5374
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5375
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5376
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5377
     * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5378
     * <code>updateNClob</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5379
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5380
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5381
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5382
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5383
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5384
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5385
     * @param columnIndex the first column is 1, the second 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5386
     * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5387
     * @throws SQLException if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5388
     *         character sets;  if the driver can detect that a data conversion
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5389
     *  error could occur; this method is called on a closed result set,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5390
     * if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5391
     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5392
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5393
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5394
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5395
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5396
    public void updateNClob(int columnIndex,  Reader reader) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5397
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5398
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5399
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5400
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5401
     * Updates the designated column using the given <code>Reader</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5402
     * object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5403
     * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5404
     * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5405
     * <code>java.io.Reader</code> object. The data will be read from the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5406
     * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5407
     * do any necessary conversion from UNICODE to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5408
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5409
     * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5410
     * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5411
     * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5412
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5413
     * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5414
     * <code>updateNClob</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5415
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5416
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5417
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5418
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5419
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5420
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5421
     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the la
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5422
bel is the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5423
     * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5424
     * @throws SQLException if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5425
     *         character sets;  if the driver can detect that a data conversion
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5426
     *  error could occur; this method is called on a closed result set;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5427
     *  if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5428
     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5429
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5430
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5431
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5432
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5433
    public void updateNClob(String columnLabel,  Reader reader) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5434
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5435
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5436
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5437
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5438
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5439
     * Updates the designated column with an ascii stream value, which will have
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5440
     * the specified number of bytes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5441
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5442
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5443
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5444
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5445
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5446
     * @param columnIndex the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5447
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5448
     * @param length the length of the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5449
     * @exception SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5450
     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5451
     * or this method is called on a closed result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5452
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5453
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5454
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5455
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5456
    public void updateAsciiStream(int columnIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5457
                           java.io.InputStream x,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5458
                           long length) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5459
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5460
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5461
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5462
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5463
     * Updates the designated column with a binary stream value, which will have
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5464
     * the specified number of bytes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5465
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5466
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5467
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5468
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5469
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5470
     * @param columnIndex the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5471
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5472
     * @param length the length of the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5473
     * @exception SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5474
     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5475
     * or this method is called on a closed result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5476
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5477
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5478
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5479
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5480
    public void updateBinaryStream(int columnIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5481
                            java.io.InputStream x,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5482
                            long length) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5483
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5484
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5485
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5486
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5487
     * Updates the designated column with a character stream value, which will have
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5488
     * the specified number of bytes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5489
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5490
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5491
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5492
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5493
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5494
     * @param columnIndex the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5495
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5496
     * @param length the length of the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5497
     * @exception SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5498
     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5499
     * or this method is called on a closed result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5500
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5501
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5502
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5503
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5504
    public void updateCharacterStream(int columnIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5505
                             java.io.Reader x,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5506
                             long length) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5507
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5508
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5509
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5510
     /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5511
     * Updates the designated column with an ascii stream value, which will have
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5512
     * the specified number of bytes..
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5513
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5514
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5515
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5516
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5517
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5518
     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the label is the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5519
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5520
     * @param length the length of the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5521
     * @exception SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5522
     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5523
     * or this method is called on a closed result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5524
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5525
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5526
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5527
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5528
    public void updateAsciiStream(String columnLabel,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5529
                           java.io.InputStream x,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5530
                           long length) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5531
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5532
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5533
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5534
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5535
     * Updates the designated column with an ascii stream value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5536
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5537
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5538
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5539
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5540
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5541
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5542
     * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5543
     * <code>updateAsciiStream</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5544
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5545
     * @param columnIndex the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5546
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5547
     * @exception SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5548
     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5549
     * or this method is called on a closed result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5550
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5551
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5552
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5553
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5554
    public void updateAsciiStream(int columnIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5555
                           java.io.InputStream x) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5556
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5557
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5558
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5559
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5560
     * Updates the designated column with an ascii stream value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5561
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5562
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5563
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5564
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5565
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5566
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5567
     * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5568
     * <code>updateAsciiStream</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5569
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5570
     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the la
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5571
bel is the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5572
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5573
     * @exception SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5574
     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5575
     * or this method is called on a closed result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5576
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5577
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5578
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5579
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5580
    public void updateAsciiStream(String columnLabel,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5581
                           java.io.InputStream x) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5582
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5583
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5584
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5585
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5586
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5587
     * Updates the designated column with a binary stream value, which will have
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5588
     * the specified number of bytes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5589
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5590
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5591
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5592
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5593
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5594
     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the label is the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5595
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5596
     * @param length the length of the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5597
     * @exception SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5598
     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5599
     * or this method is called on a closed result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5600
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5601
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5602
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5603
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5604
    public void updateBinaryStream(String columnLabel,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5605
                            java.io.InputStream x,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5606
                            long length) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5607
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5608
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5609
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5610
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5611
     * Updates the designated column with a binary stream value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5612
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5613
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5614
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5615
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5616
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5617
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5618
     * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5619
     * <code>updateBinaryStream</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5620
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5621
     * @param columnIndex the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5622
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5623
     * @exception SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5624
     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5625
     * or this method is called on a closed result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5626
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5627
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5628
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5629
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5630
    public void updateBinaryStream(int columnIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5631
                            java.io.InputStream x) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5632
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5633
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5634
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5635
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5636
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5637
     * Updates the designated column with a binary stream value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5638
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5639
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5640
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5641
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5642
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5643
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5644
     * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5645
     * <code>updateBinaryStream</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5646
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5647
     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the la
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5648
bel is the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5649
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5650
     * @exception SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5651
     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5652
     * or this method is called on a closed result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5653
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5654
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5655
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5656
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5657
    public void updateBinaryStream(String columnLabel,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5658
                            java.io.InputStream x) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5659
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5660
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5661
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5662
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5663
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5664
     * Updates the designated column with a character stream value, which will have
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5665
     * the specified number of bytes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5666
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5667
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5668
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5669
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5670
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5671
     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the label is the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5672
     * @param reader the <code>java.io.Reader</code> object containing
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5673
     *        the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5674
     * @param length the length of the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5675
     * @exception SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5676
     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5677
     * or this method is called on a closed result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5678
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5679
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5680
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5681
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5682
    public void updateCharacterStream(String columnLabel,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5683
                             java.io.Reader reader,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5684
                             long length) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5685
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5686
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5687
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5688
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5689
     * Updates the designated column with a character stream value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5690
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5691
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5692
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5693
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5694
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5695
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5696
     * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5697
     * <code>updateCharacterStream</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5698
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5699
     * @param columnIndex the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5700
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5701
     * @exception SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5702
     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5703
     * or this method is called on a closed result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5704
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5705
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5706
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5707
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5708
    public void updateCharacterStream(int columnIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5709
                             java.io.Reader x) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5710
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5711
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5712
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5713
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5714
     * Updates the designated column with a character stream value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5715
     * The updater methods are used to update column values in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5716
     * current row or the insert row.  The updater methods do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5717
     * update the underlying database; instead the <code>updateRow</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5718
     * <code>insertRow</code> methods are called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5719
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5720
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5721
     * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5722
     * <code>updateCharacterStream</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5723
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5724
     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the la
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5725
bel is the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5726
     * @param reader the <code>java.io.Reader</code> object containing
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5727
     *        the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5728
     * @exception SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5729
     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5730
     * or this method is called on a closed result set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5731
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5732
     * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5733
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5734
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5735
    public void updateCharacterStream(String columnLabel,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5736
                             java.io.Reader reader) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5737
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5738
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5739
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5740
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5741
     /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5742
  * Sets the designated parameter to the given <code>java.net.URL</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5743
  * The driver converts this to an SQL <code>DATALINK</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5744
  * when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5745
  *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5746
  * @param parameterIndex the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5747
  * @param x the <code>java.net.URL</code> object to be set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5748
  * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5749
  * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5750
  * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5751
  * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5752
  */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5753
  public void setURL(int parameterIndex, java.net.URL x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5754
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5755
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5756
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5757
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5758
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5759
  * Sets the designated parameter to a <code>Reader</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5760
  * This method differs from the <code>setCharacterStream (int, Reader)</code> method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5761
  * because it informs the driver that the parameter value should be sent to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5762
  * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5763
  * driver may have to do extra work to determine whether the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5764
  * data should be sent to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5765
  * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5766
  * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5767
  * <code>setNClob</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5768
  *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5769
  * @param parameterIndex index of the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5770
  * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5771
  * @throws SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5772
  * marker in the SQL statement;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5773
  * if the driver does not support national character sets;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5774
  * if the driver can detect that a data conversion
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5775
  *  error could occur;  if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5776
  * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5777
  * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5778
  *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5779
  * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5780
  */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5781
  public void setNClob(int parameterIndex, Reader reader)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5782
    throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5783
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5784
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5785
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5786
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5787
  * Sets the designated parameter to a <code>Reader</code> object.  The <code>reader</code> must contain the number
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5788
             * of characters specified by length otherwise a <code>SQLException</code> will be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5789
            * generated when the <code>CallableStatement</code> is executed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5790
            * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5791
            * because it informs the driver that the parameter value should be sent to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5792
            * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5793
            * driver may have to do extra work to determine whether the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5794
            * data should be send to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5795
            *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5796
            * @param parameterName the name of the parameter to be set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5797
            * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5798
            * @param length the number of characters in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5799
            * @throws SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5800
            * marker in the SQL statement; if the length specified is less than zero;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5801
            * if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5802
            *         character sets;  if the driver can detect that a data conversion
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5803
            *  error could occur; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5804
            * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5805
            * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5806
            * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5807
            * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5808
            */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5809
            public void setNClob(String parameterName, Reader reader, long length)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5810
    throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5811
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5812
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5813
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5814
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5815
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5816
  * Sets the designated parameter to a <code>Reader</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5817
  * This method differs from the <code>setCharacterStream (int, Reader)</code> method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5818
  * because it informs the driver that the parameter value should be sent to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5819
  * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5820
  * driver may have to do extra work to determine whether the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5821
  * data should be send to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5822
  * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5823
  * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5824
  * <code>setNClob</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5825
  *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5826
  * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5827
  * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5828
  * @throws SQLException if the driver does not support national character sets;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5829
  * if the driver can detect that a data conversion
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5830
  *  error could occur;  if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5831
  * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5832
  * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5833
  *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5834
  * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5835
  */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5836
  public void setNClob(String parameterName, Reader reader)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5837
    throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5838
             throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5839
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5840
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5841
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5842
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5843
     ** of characters specified by length otherwise a <code>SQLException</code> will becontain  the number
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5844
     * generated when the <code>PreparedStatement</code> is executed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5845
     * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5846
     * because it informs the driver that the parameter value should be sent to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5847
     * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5848
     * driver may have to do extra work to determine whether the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5849
     * data should be sent to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5850
     * @param parameterIndex index of the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5851
     * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5852
     * @param length the number of characters in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5853
     * @throws SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5854
     * marker in the SQL statement; if the length specified is less than zero;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5855
     * if the driver does not support national character sets;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5856
     * if the driver can detect that a data conversion
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5857
     *  error could occur;  if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5858
     * this method is called on a closed <code>PreparedStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5859
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5860
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5861
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5862
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5863
     public void setNClob(int parameterIndex, Reader reader, long length)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5864
       throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5865
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5866
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5867
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5868
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5869
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5870
     * Sets the designated parameter to a <code>java.sql.NClob</code> object. The driver converts this to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5871
a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5872
     * SQL <code>NCLOB</code> value when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5873
     * @param parameterIndex of the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5874
     * @param value the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5875
     * @throws SQLException if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5876
     *         character sets;  if the driver can detect that a data conversion
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5877
     *  error could occur ; or if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5878
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5879
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5880
     public void setNClob(int parameterIndex, NClob value) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5881
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5882
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5883
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5884
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5885
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5886
  * Sets the designated paramter to the given <code>String</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5887
  * The driver converts this to a SQL <code>NCHAR</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5888
  * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5889
  * @param parameterName the name of the column to be set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5890
  * @param value the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5891
  * @throws SQLException if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5892
  *         character sets;  if the driver can detect that a data conversion
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5893
  *  error could occur; or if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5894
  * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5895
  */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5896
 public void setNString(String parameterName, String value)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5897
         throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5898
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5899
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5900
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5901
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5902
  * Sets the designated parameter to a <code>Reader</code> object. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5903
  * <code>Reader</code> reads the data till end-of-file is reached. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5904
  * driver does the necessary conversion from Java character format to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5905
  * the national character set in the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5906
  * @param parameterIndex of the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5907
  * @param value the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5908
  * @param length the number of characters in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5909
  * @throws SQLException if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5910
  *         character sets;  if the driver can detect that a data conversion
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5911
  *  error could occur ; or if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5912
  * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5913
  */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5914
  public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5915
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5916
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5917
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5918
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5919
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5920
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5921
  * Sets the designated parameter to a <code>Reader</code> object. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5922
  * <code>Reader</code> reads the data till end-of-file is reached. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5923
  * driver does the necessary conversion from Java character format to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5924
  * the national character set in the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5925
  * @param parameterName the name of the column to be set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5926
  * @param value the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5927
  * @param length the number of characters in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5928
  * @throws SQLException if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5929
  *         character sets;  if the driver can detect that a data conversion
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5930
  *  error could occur; or if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5931
  * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5932
  */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5933
 public void setNCharacterStream(String parameterName, Reader value, long length)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5934
         throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5935
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5936
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5937
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5938
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5939
  * Sets the designated parameter to a <code>Reader</code> object. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5940
  * <code>Reader</code> reads the data till end-of-file is reached. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5941
  * driver does the necessary conversion from Java character format to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5942
  * the national character set in the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5943
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5944
  * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5945
  * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5946
  * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5947
  * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5948
  * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5949
  * <code>setNCharacterStream</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5950
  *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5951
  * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5952
  * @param value the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5953
  * @throws SQLException if the driver does not support national
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5954
  *         character sets;  if the driver can detect that a data conversion
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5955
  *  error could occur ; if a database access error occurs; or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5956
  * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5957
  * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5958
  * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5959
  */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5960
  public void setNCharacterStream(String parameterName, Reader value) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5961
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5962
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5963
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5964
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5965
    * Sets the designated parameter to the given <code>java.sql.Timestamp</code> value,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5966
    * using the given <code>Calendar</code> object.  The driver uses
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5967
    * the <code>Calendar</code> object to construct an SQL <code>TIMESTAMP</code> value,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5968
    * which the driver then sends to the database.  With a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5969
    * a <code>Calendar</code> object, the driver can calculate the timestamp
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5970
    * taking into account a custom timezone.  If no
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5971
    * <code>Calendar</code> object is specified, the driver uses the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5972
    * timezone, which is that of the virtual machine running the application.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5973
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5974
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5975
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5976
    * @param cal the <code>Calendar</code> object the driver will use
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5977
    *            to construct the timestamp
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5978
    * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5979
    * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5980
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5981
    * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5982
    * @see #getTimestamp
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5983
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5984
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5985
    public void setTimestamp(String parameterName, java.sql.Timestamp x, Calendar cal)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5986
       throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  5987
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5988
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5989
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5990
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5991
    * Sets the designated parameter to a <code>Reader</code> object.  The <code>reader</code> must contain  the number
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5992
               * of characters specified by length otherwise a <code>SQLException</code> will be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5993
               * generated when the <code>CallableStatement</code> is executed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5994
              * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5995
              * because it informs the driver that the parameter value should be sent to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5996
              * the server as a <code>CLOB</code>.  When the <code>setCharacterStream</code> method is used, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5997
               * driver may have to do extra work to determine whether the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5998
               * data should be send to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  5999
               * @param parameterName the name of the parameter to be set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6000
              * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6001
              * @param length the number of characters in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6002
              * @throws SQLException if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6003
              * marker in the SQL statement; if the length specified is less than zero;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6004
              * a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6005
              * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6006
              * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6007
              * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6008
              *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6009
              * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6010
              */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6011
      public  void setClob(String parameterName, Reader reader, long length)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6012
      throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6013
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6014
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6015
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6016
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6017
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6018
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6019
    * Sets the designated parameter to the given <code>java.sql.Clob</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6020
    * The driver converts this to an SQL <code>CLOB</code> value when it
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6021
    * sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6022
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6023
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6024
    * @param x a <code>Clob</code> object that maps an SQL <code>CLOB</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6025
    * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6026
    * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6027
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6028
    * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6029
    * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6030
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6031
    public void setClob (String parameterName, Clob x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6032
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6033
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6034
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6035
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6036
    * Sets the designated parameter to a <code>Reader</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6037
    * This method differs from the <code>setCharacterStream (int, Reader)</code> method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6038
    * because it informs the driver that the parameter value should be sent to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6039
    * the server as a <code>CLOB</code>.  When the <code>setCharacterStream</code> method is used, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6040
    * driver may have to do extra work to determine whether the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6041
    * data should be send to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6042
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6043
    * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6044
    * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6045
    * <code>setClob</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6046
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6047
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6048
    * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6049
    * @throws SQLException if a database access error occurs or this method is called on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6050
    * a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6051
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6052
    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6053
    * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6054
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6055
    public void setClob(String parameterName, Reader reader)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6056
      throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6057
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6058
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6059
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6060
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6061
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6062
    * Sets the designated parameter to the given <code>java.sql.Date</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6063
    * using the default time zone of the virtual machine that is running
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6064
    * the application.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6065
    * The driver converts this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6066
    * to an SQL <code>DATE</code> value when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6067
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6068
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6069
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6070
    * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6071
    * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6072
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6073
    * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6074
    * @see #getDate
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6075
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6076
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6077
    public void setDate(String parameterName, java.sql.Date x)
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
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6083
    * Sets the designated parameter to the given <code>java.sql.Date</code> value,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6084
    * using the given <code>Calendar</code> object.  The driver uses
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6085
    * the <code>Calendar</code> object to construct an SQL <code>DATE</code> value,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6086
    * which the driver then sends to the database.  With a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6087
    * a <code>Calendar</code> object, the driver can calculate the date
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6088
    * taking into account a custom timezone.  If no
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6089
    * <code>Calendar</code> object is specified, the driver uses the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6090
    * timezone, which is that of the virtual machine running the application.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6091
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6092
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6093
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6094
    * @param cal the <code>Calendar</code> object the driver will use
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6095
    *            to construct the date
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6096
    * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6097
    * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6098
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6099
    * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6100
    * @see #getDate
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6101
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6102
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6103
   public void setDate(String parameterName, java.sql.Date x, Calendar cal)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6104
       throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6105
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6106
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6107
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6108
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6109
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6110
    * Sets the designated parameter to the given <code>java.sql.Time</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6111
    * The driver converts this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6112
    * to an SQL <code>TIME</code> value when it sends it to the database.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6116
    * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6117
    * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6118
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6119
    * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6120
    * @see #getTime
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6121
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6122
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6123
   public void setTime(String parameterName, java.sql.Time x)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6124
       throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6125
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6126
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6127
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6128
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6129
    * Sets the designated parameter to the given <code>java.sql.Time</code> value,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6130
    * using the given <code>Calendar</code> object.  The driver uses
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6131
    * the <code>Calendar</code> object to construct an SQL <code>TIME</code> value,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6132
    * which the driver then sends to the database.  With a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6133
    * a <code>Calendar</code> object, the driver can calculate the time
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6134
    * taking into account a custom timezone.  If no
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6135
    * <code>Calendar</code> object is specified, the driver uses the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6136
    * timezone, which is that of the virtual machine running the application.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6137
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6138
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6139
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6140
    * @param cal the <code>Calendar</code> object the driver will use
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6141
    *            to construct the time
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6142
    * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6143
    * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6144
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6145
    * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6146
    * @see #getTime
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6147
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6148
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6149
   public void setTime(String parameterName, java.sql.Time x, Calendar cal)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6150
       throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6151
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6152
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6153
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6154
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6155
   * Sets the designated parameter to a <code>Reader</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6156
   * This method differs from the <code>setCharacterStream (int, Reader)</code> method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6157
   * because it informs the driver that the parameter value should be sent to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6158
   * the server as a <code>CLOB</code>.  When the <code>setCharacterStream</code> method is used, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6159
   * driver may have to do extra work to determine whether the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6160
   * data should be sent to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6161
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6162
   * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6163
   * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6164
   * <code>setClob</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6165
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6166
   * @param parameterIndex index of the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6167
   * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6168
   * @throws SQLException if a database access error occurs, this method is called on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6169
   * a closed <code>PreparedStatement</code>or if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6170
   * marker in the SQL statement
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6171
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6172
   * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6173
   * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6174
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6175
   public void setClob(int parameterIndex, Reader reader)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6176
     throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6177
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6178
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6179
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6180
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6181
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6182
   * Sets the designated parameter to a <code>Reader</code> object.  The reader must contain  the number
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6183
   * of characters specified by length otherwise a <code>SQLException</code> will be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6184
   * generated when the <code>PreparedStatement</code> is executed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6185
   *This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6186
   * because it informs the driver that the parameter value should be sent to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6187
   * the server as a <code>CLOB</code>.  When the <code>setCharacterStream</code> method is used, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6188
   * driver may have to do extra work to determine whether the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6189
   * data should be sent to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6190
   * @param parameterIndex index of the first parameter is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6191
   * @param reader An object that contains the data to set the parameter value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6192
   * @param length the number of characters in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6193
   * @throws SQLException if a database access error occurs, this method is called on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6194
   * a closed <code>PreparedStatement</code>, if parameterIndex does not correspond to a parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6195
   * marker in the SQL statement, or if the length specified is less than zero.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6196
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6197
   * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6198
   * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6199
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6200
   public void setClob(int parameterIndex, Reader reader, long length)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6201
     throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6202
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6203
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6204
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6205
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6206
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6207
    * Sets the designated parameter to a <code>InputStream</code> object.  The inputstream must contain  the number
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6208
    * of characters specified by length otherwise a <code>SQLException</code> will be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6209
    * generated when the <code>PreparedStatement</code> is executed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6210
    * This method differs from the <code>setBinaryStream (int, InputStream, int)</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6211
    * method because it informs the driver that the parameter value should be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6212
    * sent to the server as a <code>BLOB</code>.  When the <code>setBinaryStream</code> method is used,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6213
    * the driver may have to do extra work to determine whether the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6214
    * data should be sent to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6215
    * @param parameterIndex index of the first parameter is 1,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6216
    * the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6217
    * @param inputStream An object that contains the data to set the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6218
    * value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6219
    * @param length the number of bytes in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6220
    * @throws SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6221
    * this method is called on a closed <code>PreparedStatement</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6222
    * if parameterIndex does not correspond
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6223
    * to a parameter marker in the SQL statement,  if the length specified
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6224
    * is less than zero or if the number of bytes in the inputstream does not match
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6225
    * the specfied length.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6226
    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6227
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6228
    * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6229
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6230
    public void setBlob(int parameterIndex, InputStream inputStream, long length)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6231
       throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6232
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6233
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6234
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6235
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6236
    * Sets the designated parameter to a <code>InputStream</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6237
    * This method differs from the <code>setBinaryStream (int, InputStream)</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6238
    * This method differs from the <code>setBinaryStream (int, InputStream)</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6239
    * method because it informs the driver that the parameter value should be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6240
    * sent to the server as a <code>BLOB</code>.  When the <code>setBinaryStream</code> method is used,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6241
    * the driver may have to do extra work to determine whether the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6242
    * data should be sent to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6243
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6244
    * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6245
    * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6246
    * <code>setBlob</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6247
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6248
    * @param parameterIndex index of the first parameter is 1,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6249
    * the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6250
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6251
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6252
    * @param inputStream An object that contains the data to set the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6253
    * value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6254
    * @throws SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6255
    * this method is called on a closed <code>PreparedStatement</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6256
    * if parameterIndex does not correspond
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6257
    * to a parameter marker in the SQL statement,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6258
    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6259
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6260
    * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6261
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6262
    public void setBlob(int parameterIndex, InputStream inputStream)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6263
       throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6264
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6265
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6266
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6267
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6268
    * Sets the designated parameter to a <code>InputStream</code> object.  The <code>inputstream</code> must contain  the number
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6269
      * of characters specified by length, otherwise a <code>SQLException</code> will be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6270
      * generated when the <code>CallableStatement</code> is executed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6271
      * This method differs from the <code>setBinaryStream (int, InputStream, int)</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6272
      * method because it informs the driver that the parameter value should be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6273
      * sent to the server as a <code>BLOB</code>.  When the <code>setBinaryStream</code> method is used,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6274
      * the driver may have to do extra work to determine whether the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6275
      * data should be sent to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6276
      *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6277
      * @param parameterName the name of the parameter to be set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6278
      * the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6279
      *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6280
      * @param inputStream An object that contains the data to set the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6281
      * value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6282
      * @param length the number of bytes in the parameter data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6283
      * @throws SQLException  if parameterIndex does not correspond
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6284
      * to a parameter marker in the SQL statement,  or if the length specified
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6285
      * is less than zero; if the number of bytes in the inputstream does not match
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6286
      * the specfied length; if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6287
      * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6288
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6289
      * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6290
      *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6291
      * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6292
      */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6293
      public void setBlob(String parameterName, InputStream inputStream, long length)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6294
         throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6295
         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6296
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6297
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6298
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6299
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6300
    * Sets the designated parameter to the given <code>java.sql.Blob</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6301
    * The driver converts this to an SQL <code>BLOB</code> value when it
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6302
    * sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6303
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6304
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6305
    * @param x a <code>Blob</code> object that maps an SQL <code>BLOB</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6306
    * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6307
    * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6308
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6309
    * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6310
    * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6311
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6312
   public void setBlob (String parameterName, Blob x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6313
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6314
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6315
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6316
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6317
    * Sets the designated parameter to a <code>InputStream</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6318
    * This method differs from the <code>setBinaryStream (int, InputStream)</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6319
    * method because it informs the driver that the parameter value should be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6320
    * sent to the server as a <code>BLOB</code>.  When the <code>setBinaryStream</code> method is used,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6321
    * the driver may have to do extra work to determine whether the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6322
    * data should be send to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6323
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6324
    * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6325
    * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6326
    * <code>setBlob</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6327
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6328
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6329
    * @param inputStream An object that contains the data to set the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6330
    * value to.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6331
    * @throws SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6332
    * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6333
    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6334
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6335
    * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6336
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6337
    public void setBlob(String parameterName, InputStream inputStream)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6338
       throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6339
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6340
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6341
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6342
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6343
  * Sets the value of the designated parameter with the given object. The second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6344
  * argument must be an object type; for integral values, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6345
  * <code>java.lang</code> equivalent objects should be used.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6346
  *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6347
  * <p>The given Java object will be converted to the given targetSqlType
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6348
  * before being sent to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6349
  *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6350
  * If the object has a custom mapping (is of a class implementing the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6351
  * interface <code>SQLData</code>),
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6352
  * the JDBC driver should call the method <code>SQLData.writeSQL</code> to write it
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6353
  * to the SQL data stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6354
  * If, on the other hand, the object is of a class implementing
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6355
  * <code>Ref</code>, <code>Blob</code>, <code>Clob</code>,  <code>NClob</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6356
  *  <code>Struct</code>, <code>java.net.URL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6357
  * or <code>Array</code>, the driver should pass it to the database as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6358
  * value of the corresponding SQL type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6359
  * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6360
  * Note that this method may be used to pass datatabase-
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6361
  * specific abstract data types.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6362
  *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6363
  * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6364
  * @param x the object containing the input parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6365
  * @param targetSqlType the SQL type (as defined in java.sql.Types) to be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6366
  * sent to the database. The scale argument may further qualify this type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6367
  * @param scale for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6368
  *          this is the number of digits after the decimal point.  For all other
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6369
  *          types, this value will be ignored.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6370
  * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6371
  * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6372
  * @exception SQLFeatureNotSupportedException if <code>targetSqlType</code> is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6373
  * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6374
  * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6375
  * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6376
  *  <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6377
  * or  <code>STRUCT</code> data type and the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6378
  * this data type
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6379
  * @see Types
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6380
  * @see #getObject
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6381
  * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6382
  */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6383
  public void setObject(String parameterName, Object x, int targetSqlType, int scale)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6384
     throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6385
      throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6386
 }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6387
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6388
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6389
    * Sets the value of the designated parameter with the given object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6390
    * This method is like the method <code>setObject</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6391
    * above, except that it assumes a scale of zero.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6392
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6393
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6394
    * @param x the object containing the input parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6395
    * @param targetSqlType the SQL type (as defined in java.sql.Types) to be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6396
    *                      sent to the database
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6397
    * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6398
    * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6399
    * @exception SQLFeatureNotSupportedException if <code>targetSqlType</code> is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6400
    * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6401
    * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6402
    * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6403
    *  <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6404
    * or  <code>STRUCT</code> data type and the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6405
    * this data type
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6406
    * @see #getObject
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6407
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6408
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6409
    public void setObject(String parameterName, Object x, int targetSqlType)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6410
       throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6411
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6412
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6413
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6414
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6415
   * Sets the value of the designated parameter with the given object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6416
   * The second parameter must be of type <code>Object</code>; therefore, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6417
   * <code>java.lang</code> equivalent objects should be used for built-in types.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6418
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6419
   * <p>The JDBC specification specifies a standard mapping from
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6420
   * Java <code>Object</code> types to SQL types.  The given argument
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6421
   * will be converted to the corresponding SQL type before being
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6422
   * sent to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6423
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6424
   * <p>Note that this method may be used to pass datatabase-
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6425
   * specific abstract data types, by using a driver-specific Java
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6426
   * type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6427
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6428
   * If the object is of a class implementing the interface <code>SQLData</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6429
   * the JDBC driver should call the method <code>SQLData.writeSQL</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6430
   * to write it to the SQL data stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6431
   * If, on the other hand, the object is of a class implementing
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6432
   * <code>Ref</code>, <code>Blob</code>, <code>Clob</code>,  <code>NClob</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6433
   *  <code>Struct</code>, <code>java.net.URL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6434
   * or <code>Array</code>, the driver should pass it to the database as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6435
   * value of the corresponding SQL type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6436
   * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6437
   * This method throws an exception if there is an ambiguity, for example, if the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6438
   * object is of a class implementing more than one of the interfaces named above.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6439
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6440
   * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6441
   * @param x the object containing the input parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6442
   * @exception SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6443
   * this method is called on a closed <code>CallableStatement</code> or if the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6444
   *            <code>Object</code> parameter is ambiguous
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6445
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6446
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6447
   * @see #getObject
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6448
   * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6449
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6450
   public void setObject(String parameterName, Object x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6451
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6452
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6453
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6454
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6455
  * Sets the designated parameter to the given input stream, which will have
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6456
  * the specified number of bytes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6457
  * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6458
  * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6459
  * <code>java.io.InputStream</code>. Data will be read from the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6460
  * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6461
  * do any necessary conversion from ASCII to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6462
  *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6463
  * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6464
  * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6465
  * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6466
  *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6467
  * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6468
  * @param x the Java input stream that contains the ASCII parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6469
  * @param length the number of bytes in the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6470
  * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6471
  * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6472
  * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6473
  * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6474
  * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6475
  */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6476
 public void setAsciiStream(String parameterName, java.io.InputStream x, int length)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6477
     throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6478
      throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6479
 }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6480
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6481
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6482
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6483
  * Sets the designated parameter to the given input stream, which will have
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6484
  * the specified number of bytes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6485
  * When a very large binary value is input to a <code>LONGVARBINARY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6486
  * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6487
  * <code>java.io.InputStream</code> object. The data will be read from the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6488
  * as needed until end-of-file is reached.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6489
  *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6490
  * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6491
  * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6492
  * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6493
  *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6494
  * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6495
  * @param x the java input stream which contains the binary parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6496
  * @param length the number of bytes in the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6497
  * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6498
  * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6499
  * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6500
  * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6501
  * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6502
  */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6503
 public void setBinaryStream(String parameterName, java.io.InputStream x,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6504
                      int length) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6505
      throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6506
 }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6507
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6508
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6509
   * Sets the designated parameter to the given <code>Reader</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6510
   * object, which is the given number of characters long.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6511
   * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6512
   * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6513
   * <code>java.io.Reader</code> object. The data will be read from the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6514
   * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6515
   * do any necessary conversion from UNICODE to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6516
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6517
   * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6518
   * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6519
   * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6520
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6521
   * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6522
   * @param reader the <code>java.io.Reader</code> object that
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6523
   *        contains the UNICODE data used as the designated parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6524
   * @param length the number of characters in the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6525
   * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6526
   * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6527
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6528
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6529
   * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6530
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6531
  public void setCharacterStream(String parameterName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6532
                          java.io.Reader reader,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6533
                          int length) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6534
       throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6535
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6536
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6537
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6538
   * Sets the designated parameter to the given input stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6539
   * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6540
   * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6541
   * <code>java.io.InputStream</code>. Data will be read from the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6542
   * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6543
   * do any necessary conversion from ASCII to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6544
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6545
   * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6546
   * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6547
   * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6548
   * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6549
   * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6550
   * <code>setAsciiStream</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6551
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6552
   * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6553
   * @param x the Java input stream that contains the ASCII parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6554
   * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6555
   * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6556
   * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6557
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6558
  */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6559
  public void setAsciiStream(String parameterName, java.io.InputStream x)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6560
          throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6561
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6562
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6563
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6564
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6565
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6566
    * Sets the designated parameter to the given input stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6567
    * When a very large binary value is input to a <code>LONGVARBINARY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6568
    * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6569
    * <code>java.io.InputStream</code> object. The data will be read from the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6570
    * stream as needed until end-of-file is reached.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6571
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6572
    * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6573
    * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6574
    * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6575
    * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6576
    * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6577
    * <code>setBinaryStream</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6578
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6579
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6580
    * @param x the java input stream which contains the binary parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6581
    * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6582
    * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6583
    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6584
    * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6585
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6586
   public void setBinaryStream(String parameterName, java.io.InputStream x)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6587
   throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6588
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6589
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6590
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6591
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6592
    * Sets the designated parameter to the given <code>Reader</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6593
    * object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6594
    * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6595
    * parameter, it may be more practical to send it via a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6596
    * <code>java.io.Reader</code> object. The data will be read from the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6597
    * as needed until end-of-file is reached.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6598
    * do any necessary conversion from UNICODE to the database char format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6599
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6600
    * <P><B>Note:</B> This stream object can either be a standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6601
    * Java stream object or your own subclass that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6602
    * standard interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6603
    * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6604
    * it might be more efficient to use a version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6605
    * <code>setCharacterStream</code> which takes a length parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6606
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6607
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6608
    * @param reader the <code>java.io.Reader</code> object that contains the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6609
    *        Unicode data
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6610
    * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6611
    * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6612
    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6613
    * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6614
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6615
   public void setCharacterStream(String parameterName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6616
                         java.io.Reader reader) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6617
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6618
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6619
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6620
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6621
    * Sets the designated parameter to the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6622
    * <code>java.math.BigDecimal</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6623
    * The driver converts this to an SQL <code>NUMERIC</code> value when
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6624
    * it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6625
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6626
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6627
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6628
    * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6629
    * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6630
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6631
    * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6632
    * @see #getBigDecimal
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6633
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6634
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6635
   public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6636
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6637
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6638
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6639
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6640
    * Sets the designated parameter to the given Java <code>String</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6641
    * The driver converts this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6642
    * to an SQL <code>VARCHAR</code> or <code>LONGVARCHAR</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6643
    * (depending on the argument's
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6644
    * size relative to the driver's limits on <code>VARCHAR</code> values)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6645
    * when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6646
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6647
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6648
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6649
    * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6650
    * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6651
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6652
    * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6653
    * @see #getString
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6654
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6655
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6656
   public void setString(String parameterName, String x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6657
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6658
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6659
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6660
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6661
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6662
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6663
    * Sets the designated parameter to the given Java array of bytes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6664
    * The driver converts this to an SQL <code>VARBINARY</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6665
    * <code>LONGVARBINARY</code> (depending on the argument's size relative
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6666
    * to the driver's limits on <code>VARBINARY</code> values) when it sends
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6667
    * 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
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6672
    * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6673
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6674
    * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6675
    * @see #getBytes
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 setBytes(String parameterName, byte 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
    * Sets the designated parameter to the given <code>java.sql.Timestamp</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6684
    * The driver
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6685
    * converts this to an SQL <code>TIMESTAMP</code> value when it sends it to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6686
    * database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6687
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6688
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6689
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6690
    * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6691
    * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6692
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6693
    * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6694
    * @see #getTimestamp
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6695
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6696
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6697
   public void setTimestamp(String parameterName, java.sql.Timestamp x)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6698
       throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6699
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6700
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6701
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6702
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6703
    * Sets the designated parameter to SQL <code>NULL</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6704
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6705
    * <P><B>Note:</B> You must specify the parameter's SQL type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6706
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6707
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6708
    * @param sqlType the SQL type code defined in <code>java.sql.Types</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6709
    * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6710
    * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6711
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6712
    * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6713
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6714
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6715
   public void setNull(String parameterName, int sqlType) throws SQLException {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6716
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6717
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6718
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6719
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6720
    * Sets the designated parameter to SQL <code>NULL</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6721
    * This version of the method <code>setNull</code> should
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6722
    * be used for user-defined types and REF type parameters.  Examples
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6723
    * of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6724
    * named array types.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6725
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6726
    * <P><B>Note:</B> To be portable, applications must give the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6727
    * SQL type code and the fully-qualified SQL type name when specifying
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6728
    * a NULL user-defined or REF parameter.  In the case of a user-defined type
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6729
    * the name is the type name of the parameter itself.  For a REF
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6730
    * parameter, the name is the type name of the referenced type.  If
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6731
    * a JDBC driver does not need the type code or type name information,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6732
    * it may ignore it.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6733
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6734
    * Although it is intended for user-defined and Ref parameters,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6735
    * this method may be used to set a null parameter of any JDBC type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6736
    * If the parameter does not have a user-defined or REF type, the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6737
    * typeName is ignored.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6738
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6739
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6740
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6741
    * @param sqlType a value from <code>java.sql.Types</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6742
    * @param typeName the fully-qualified name of an SQL user-defined type;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6743
    *        ignored if the parameter is not a user-defined type or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6744
    *        SQL <code>REF</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6745
    * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6746
    * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6747
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6748
    * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6749
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6750
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6751
   public void setNull (String parameterName, int sqlType, String typeName)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6752
       throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6753
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6754
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6755
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6756
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6757
    * Sets the designated parameter to the given Java <code>boolean</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6758
    * The driver converts this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6759
    * to an SQL <code>BIT</code> or <code>BOOLEAN</code> value when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6760
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6761
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6762
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6763
    * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6764
    * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6765
    * @see #getBoolean
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6766
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6767
    * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6768
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6769
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6770
   public void setBoolean(String parameterName, boolean x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6771
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6772
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6773
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6774
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6775
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6776
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6777
    * Sets the designated parameter to the given Java <code>byte</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6778
    * The driver converts this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6779
    * to an SQL <code>TINYINT</code> value when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6780
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6781
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6782
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6783
    * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6784
    * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6785
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6786
    * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6787
    * @see #getByte
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6788
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6789
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6790
   public void setByte(String parameterName, byte x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6791
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6792
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6793
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6794
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6795
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6796
    * Sets the designated parameter to the given Java <code>short</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6797
    * The driver converts this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6798
    * to an SQL <code>SMALLINT</code> value when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6799
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6800
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6801
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6802
    * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6803
    * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6804
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6805
    * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6806
    * @see #getShort
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6807
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6808
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6809
   public void setShort(String parameterName, short x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6810
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6811
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6812
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6813
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6814
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6815
    * Sets the designated parameter to the given Java <code>int</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6816
    * The driver converts this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6817
    * to an SQL <code>INTEGER</code> value when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6818
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6819
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6820
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6821
    * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6822
    * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6823
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6824
    * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6825
    * @see #getInt
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6826
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6827
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6828
   public void setInt(String parameterName, int x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6829
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6830
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6831
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6832
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6833
    * Sets the designated parameter to the given Java <code>long</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6834
    * The driver converts this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6835
    * to an SQL <code>BIGINT</code> value when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6836
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6837
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6838
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6839
    * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6840
    * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6841
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6842
    * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6843
    * @see #getLong
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6844
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6845
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6846
   public void setLong(String parameterName, long x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6847
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6848
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6849
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6850
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6851
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6852
    * Sets the designated parameter to the given Java <code>float</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6853
    * The driver converts this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6854
    * to an SQL <code>FLOAT</code> value when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6855
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6856
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6857
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6858
    * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6859
    * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6860
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6861
    * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6862
    * @see #getFloat
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6863
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6864
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6865
   public void setFloat(String parameterName, float x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6866
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6867
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6868
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6869
 /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6870
    * Sets the designated parameter to the given Java <code>double</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6871
    * The driver converts this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6872
    * to an SQL <code>DOUBLE</code> value when it sends it to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6873
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6874
    * @param parameterName the name of the parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6875
    * @param x the parameter value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6876
    * @exception SQLException if a database access error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6877
    * this method is called on a closed <code>CallableStatement</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6878
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6879
    * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6880
    * @see #getDouble
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6881
    * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6882
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6883
   public void setDouble(String parameterName, double x) throws SQLException{
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6884
        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6885
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6886
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6887
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6888
     * This method re populates the resBundle
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6889
     * during the deserialization process
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6890
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6891
     */
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6892
    private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6893
        // Default state initialization happens here
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6894
        ois.defaultReadObject();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6895
        // Initialization of transient Res Bundle happens here .
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6896
        try {
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  6897
           resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6898
        } catch(IOException ioe) {}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6899
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6900
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6901
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6902
   static final long serialVersionUID = -3591946023893483003L;
6540
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 6530
diff changeset
  6903
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 6530
diff changeset
  6904
 //------------------------- JDBC 4.1 -----------------------------------
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 6530
diff changeset
  6905
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 6530
diff changeset
  6906
    public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 6530
diff changeset
  6907
        throw new SQLFeatureNotSupportedException("Not supported yet.");
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 6530
diff changeset
  6908
    }
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 6530
diff changeset
  6909
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 6530
diff changeset
  6910
    public <T> T getObject(String columnLabel, Class<T> type) throws SQLException {
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 6530
diff changeset
  6911
        throw new SQLFeatureNotSupportedException("Not supported yet.");
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents: 6530
diff changeset
  6912
    }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  6913
}