src/java.sql.rowset/share/classes/com/sun/rowset/JoinRowSetImpl.java
author stuefe
Thu, 28 Feb 2019 14:22:03 +0100
changeset 54011 21ea4076a275
parent 47216 71c04702a3d5
permissions -rw-r--r--
8219650: [Testbug] Fix potential crashes in new test hotspot gtest "test_print_hex_dump" Reviewed-by: clanger, shade
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
14342
8435a30053c1 7197491: update copyright year to match last edit in jdk8 jdk repository
alanb
parents: 14171
diff changeset
     2
 * Copyright (c) 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: 3843
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: 3843
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: 3843
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3843
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3843
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.*;
6665
dcdc89306375 6984864: Exception when running acceptChanges with custom SyncProvider
lancea
parents: 6530
diff changeset
    36
import javax.sql.rowset.spi.SyncProvider;
dcdc89306375 6984864: Exception when running acceptChanges with custom SyncProvider
lancea
parents: 6530
diff changeset
    37
import javax.sql.rowset.spi.SyncProviderException;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 * The standard implementation of the <code>JoinRowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * interface providing an SQL <code>JOIN</code> between <code>RowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * objects.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * The implementation provides an ANSI-style <code>JOIN</code> providing an
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 * inner join between two tables. Any unmatched rows in either table of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 * join are  discarded.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
 * Typically, a <code>JoinRowSet</code> implementation is leveraged by
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 * <code>RowSet</code> instances that are in a disconnected environment and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * thus do not have the luxury of an open connection to the data source to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 * establish logical relationships between themselves. In other words, it is
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 * largely <code>CachedRowSet</code> objects and implementations derived from
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 * the <code>CachedRowSet</code> interface that will use the <code>JoinRowSetImpl</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 * implementation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 * @author Amit Handa, Jonathan Bruce
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
public class JoinRowSetImpl extends WebRowSetImpl implements JoinRowSet {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
     * A <code>Vector</code> object that contains the <code>RowSet</code> objects
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
     * that have been added to this <code>JoinRowSet</code> object.
9257
53e6d7bc31b0 7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents: 6697
diff changeset
    62
     */
53e6d7bc31b0 7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents: 6697
diff changeset
    63
    private Vector<CachedRowSetImpl> vecRowSetsInJOIN;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
     * The <code>CachedRowSet</code> object that encapsulates this
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
     * <code>JoinRowSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
     * When <code>RowSet</code> objects are added to this <code>JoinRowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
     * object, they are also added to <i>crsInternal</i> to form the same kind of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
     * SQL <code>JOIN</code>.  As a result, methods for making updates to this
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
     * <code>JoinRowSet</code> object can use <i>crsInternal</i> methods in their
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
     * implementations.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
    private CachedRowSetImpl crsInternal;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
     * A <code>Vector</code> object containing the types of join that have been set
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
     * for this <code>JoinRowSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
     * The last join type set forms the basis of succeeding joins.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
     */
9257
53e6d7bc31b0 7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents: 6697
diff changeset
    81
    private Vector<Integer> vecJoinType;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
     * A <code>Vector</code> object containing the names of all the tables entering
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
     * the join.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
     */
9257
53e6d7bc31b0 7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents: 6697
diff changeset
    87
    private Vector<String> vecTableNames;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
     * An <code>int</code> that indicates the column index of the match column.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
    private int iMatchKey;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
     * A <code>String</code> object that stores the name of the match column.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
    private String strMatchKey ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
     * An array of <code>boolean</code> values indicating the types of joins supported
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
     * by this <code>JoinRowSet</code> implementation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
    boolean[] supportedJOINs;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
     * The <code>WebRowSet</code> object that encapsulates this <code>JoinRowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
     * object. This <code>WebRowSet</code> object allows this <code>JoinRowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
     * object to leverage the properties and methods of a <code>WebRowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
     * object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
    private WebRowSet wrs;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
     * Constructor for <code>JoinRowSetImpl</code> class. Configures various internal data
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
     * structures to provide mechanisms required for <code>JoinRowSet</code> interface
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
     * implementation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
     * @throws SQLException if an error occurs in instantiating an instance of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
     * <code>JoinRowSetImpl</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
    public JoinRowSetImpl() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
9257
53e6d7bc31b0 7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents: 6697
diff changeset
   124
        vecRowSetsInJOIN = new Vector<CachedRowSetImpl>();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
        crsInternal = new CachedRowSetImpl();
9257
53e6d7bc31b0 7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents: 6697
diff changeset
   126
        vecJoinType = new Vector<Integer>();
53e6d7bc31b0 7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents: 6697
diff changeset
   127
        vecTableNames = new Vector<String>();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
        iMatchKey = -1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
        strMatchKey = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
        supportedJOINs =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
              new boolean[] {false, true, false, false, false};
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   132
       try {
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   133
           resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   134
        } catch(IOException ioe) {
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   135
            throw new RuntimeException(ioe);
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
   136
        }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
     * Adds the given <code>RowSet</code> object to this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
     * <code>JoinRowSet</code> object.  If this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
     * rowset is the first to be added to the <code>JoinRowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
     * object, it forms the basis for the <code>JOIN</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
     * relationships to be formed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
     * This method should be used when the given <code>RowSet</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
     * already has a match column set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
     * @param rowset the <code>RowSet</code> object that implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
     *         <code>Joinable</code> interface and is to be added
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
     *         to this <code>JoinRowSet</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
     * @throws SQLException if an empty <code>RowSet</code> is added to the to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
     *         <code>JoinRowSet</code>; if a match column is not set; or if an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
     *         additional <code>RowSet</code> violates the active <code>JOIN</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
     * @see CachedRowSet#setMatchColumn
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
    public void addRowSet(Joinable rowset) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
        boolean boolColId, boolColName;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
        boolColId = false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
        boolColName = false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
        CachedRowSetImpl cRowset;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
        if(!(rowset instanceof RowSet)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
            throw new SQLException(resBundle.handleGetObject("joinrowsetimpl.notinstance").toString());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
        if(rowset instanceof JdbcRowSetImpl ) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
            cRowset = new CachedRowSetImpl();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
            cRowset.populate((RowSet)rowset);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
            if(cRowset.size() == 0){
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
                throw new SQLException(resBundle.handleGetObject("joinrowsetimpl.emptyrowset").toString());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
            try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
                int matchColumnCount = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
                for(int i=0; i< rowset.getMatchColumnIndexes().length; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
                    if(rowset.getMatchColumnIndexes()[i] != -1)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
                        ++ matchColumnCount;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
                    else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
                        break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
                int[] pCol = new int[matchColumnCount];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
                for(int i=0; i<matchColumnCount; i++)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
                   pCol[i] = rowset.getMatchColumnIndexes()[i];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
                cRowset.setMatchColumn(pCol);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
            } catch(SQLException sqle) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
        } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
             cRowset = (CachedRowSetImpl)rowset;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
             if(cRowset.size() == 0){
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
                 throw new SQLException(resBundle.handleGetObject("joinrowsetimpl.emptyrowset").toString());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
             }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
        // Either column id or column name will be set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
        // If both not set throw exception.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
             iMatchKey = (cRowset.getMatchColumnIndexes())[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
        } catch(SQLException sqle) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
           //if not set catch the exception but do nothing now.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
             boolColId = true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
             strMatchKey = (cRowset.getMatchColumnNames())[0];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
        } catch(SQLException sqle) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
           //if not set catch the exception but do nothing now.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
           boolColName = true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
        if(boolColId && boolColName) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
           // neither setter methods have been used to set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
           throw new SQLException(resBundle.handleGetObject("joinrowsetimpl.matchnotset").toString());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
        } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
           //if(boolColId || boolColName)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
           // either of the setter methods have been set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
           if(boolColId){
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
              //
9257
53e6d7bc31b0 7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents: 6697
diff changeset
   225
              ArrayList<Integer> indices = new ArrayList<>();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
              for(int i=0;i<cRowset.getMatchColumnNames().length;i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
                  if( (strMatchKey = (cRowset.getMatchColumnNames())[i]) != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
                      iMatchKey = cRowset.findColumn(strMatchKey);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
                      indices.add(iMatchKey);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
                  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
                  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
                      break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
              }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
              int[] indexes = new int[indices.size()];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
              for(int i=0; i<indices.size();i++)
11129
f9ad1aadf3fa 7116445: Miscellaneous warnings in the JDBC/RowSet classes
lancea
parents: 9257
diff changeset
   236
                  indexes[i] = indices.get(i);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
              cRowset.setMatchColumn(indexes);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
              // Set the match column here because join will be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
              // based on columnId,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
              // (nested for loop in initJOIN() checks for equality
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
              //  based on columnIndex)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
           } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
              //do nothing, iMatchKey is set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
           }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
           // Now both iMatchKey and strMatchKey have been set pointing
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
           // to the same column
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
        // Till first rowset setJoinType may not be set because
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
        // default type is JoinRowSet.INNER_JOIN which should
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
        // be set and for subsequent additions of rowset, if not set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
        // keep on adding join type as JoinRowSet.INNER_JOIN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
        // to vecJoinType.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
        initJOIN(cRowset);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
     * Adds the given <code>RowSet</code> object to the <code>JOIN</code> relation
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
     * and sets the designated column as the match column.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
     * If the given <code>RowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
     * object is the first to be added to this <code>JoinRowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
     * object, it forms the basis of the <code>JOIN</code> relationship to be formed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
     * when other <code>RowSet</code> objects are added .
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
     * This method should be used when the given <code>RowSet</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
     * does not already have a match column set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
     * @param rowset a <code>RowSet</code> object to be added to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
     *         the <code>JOIN</code> relation; must implement the <code>Joinable</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
     *         interface
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
     * @param columnIdx an <code>int</code> giving the index of the column to be set as
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
     *         the match column
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
     * @throws SQLException if (1) an empty <code>RowSet</code> object is added to this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
     *         <code>JoinRowSet</code> object, (2) a match column has not been set,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
     *         or (3) the <code>RowSet</code> object being added violates the active
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
     *         <code>JOIN</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
     * @see CachedRowSet#unsetMatchColumn
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
    public void addRowSet(RowSet rowset, int columnIdx) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
        //passing the rowset as well as the columnIdx to form the joinrowset.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
        ((CachedRowSetImpl)rowset).setMatchColumn(columnIdx);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
        addRowSet((Joinable)rowset);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
     * Adds the given <code>RowSet</code> object to the <code>JOIN</code> relationship
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
     * and sets the designated column as the match column. If the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
     * <code>RowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
     * object is the first to be added to this <code>JoinRowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
     * object, it forms the basis of the <code>JOIN</code> relationship to be formed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
     * when other <code>RowSet</code> objects are added .
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
     * This method should be used when the given <code>RowSet</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
     * does not already have a match column set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
     * @param rowset a <code>RowSet</code> object to be added to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
     *         the <code>JOIN</code> relation
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
     * @param columnName a <code>String</code> object giving the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
     *        to be set as the match column; must implement the <code>Joinable</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
     *        interface
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
     * @throws SQLException if (1) an empty <code>RowSet</code> object is added to this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
     *         <code>JoinRowSet</code> object, (2) a match column has not been set,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
     *         or (3) the <code>RowSet</code> object being added violates the active
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
     *         <code>JOIN</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
    public void addRowSet(RowSet rowset, String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
        //passing the rowset as well as the columnIdx to form the joinrowset.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
        ((CachedRowSetImpl)rowset).setMatchColumn(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
        addRowSet((Joinable)rowset);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
     * Adds the given <code>RowSet</code> objects to the <code>JOIN</code> relationship
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
     * and sets the designated columns as the match columns. If the first
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
     * <code>RowSet</code> object in the array of <code>RowSet</code> objects
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
     * is the first to be added to this <code>JoinRowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
     * object, it forms the basis of the <code>JOIN</code> relationship to be formed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
     * when other <code>RowSet</code> objects are added.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
     * The first <code>int</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
     * in <i>columnIdx</i> is used to set the match column for the first
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
     * <code>RowSet</code> object in <i>rowset</i>, the second <code>int</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
     * in <i>columnIdx</i> is used to set the match column for the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
     * <code>RowSet</code> object in <i>rowset</i>, and so on.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
     * This method should be used when the given <code>RowSet</code> objects
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
     * do not already have match columns set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
     * @param rowset an array of <code>RowSet</code> objects to be added to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
     *         the <code>JOIN</code> relation; each <code>RowSet</code> object must
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
     *         implement the <code>Joinable</code> interface
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
     * @param columnIdx an array of <code>int</code> values designating the columns
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
     *        to be set as the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
     *        match columns for the <code>RowSet</code> objects in <i>rowset</i>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
     * @throws SQLException if the number of <code>RowSet</code> objects in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
     *         <i>rowset</i> is not equal to the number of <code>int</code> values
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
     *         in <i>columnIdx</i>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
    public void addRowSet(RowSet[] rowset,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
                          int[] columnIdx) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
    //validate if length of rowset array is same as length of int array.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
     if(rowset.length != columnIdx.length) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
        throw new SQLException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
             (resBundle.handleGetObject("joinrowsetimpl.numnotequal").toString());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
     } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
        for(int i=0; i< rowset.length; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
           ((CachedRowSetImpl)rowset[i]).setMatchColumn(columnIdx[i]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
           addRowSet((Joinable)rowset[i]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
        } //end for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
     } //end if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
     * Adds the given <code>RowSet</code> objects to the <code>JOIN</code> relationship
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
     * and sets the designated columns as the match columns. If the first
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
     * <code>RowSet</code> object in the array of <code>RowSet</code> objects
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
     * is the first to be added to this <code>JoinRowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
     * object, it forms the basis of the <code>JOIN</code> relationship to be formed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
     * when other <code>RowSet</code> objects are added.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
     * The first <code>String</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
     * in <i>columnName</i> is used to set the match column for the first
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
     * <code>RowSet</code> object in <i>rowset</i>, the second <code>String</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
     * object in <i>columnName</i> is used to set the match column for the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
     * <code>RowSet</code> object in <i>rowset</i>, and so on.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
     * This method should be used when the given <code>RowSet</code> objects
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
     * do not already have match columns set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
     * @param rowset an array of <code>RowSet</code> objects to be added to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
     *         the <code>JOIN</code> relation; each <code>RowSet</code> object must
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
     *         implement the <code>Joinable</code> interface
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
     * @param columnName an array of <code>String</code> objects designating the columns
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
     *        to be set as the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
     *        match columns for the <code>RowSet</code> objects in <i>rowset</i>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
     * @throws SQLException if the number of <code>RowSet</code> objects in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
     *         <i>rowset</i> is not equal to the number of <code>String</code> objects
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
     *         in <i>columnName</i>, an empty <code>JdbcRowSet</code> is added to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
     *         <code>JoinRowSet</code>, if a match column is not set,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
     *         or one or the <code>RowSet</code> objects in <i>rowset</i> violates the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
     *         active <code>JOIN</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
    public void addRowSet(RowSet[] rowset,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
                          String[] columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
    //validate if length of rowset array is same as length of int array.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
     if(rowset.length != columnName.length) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
        throw new SQLException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
                 (resBundle.handleGetObject("joinrowsetimpl.numnotequal").toString());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
     } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
        for(int i=0; i< rowset.length; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
           ((CachedRowSetImpl)rowset[i]).setMatchColumn(columnName[i]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
           addRowSet((Joinable)rowset[i]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
        } //end for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
     } //end if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
     * Returns a Collection of the <code>RowSet</code> object instances
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
     * currently residing with the instance of the <code>JoinRowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
     * object instance. This should return the 'n' number of RowSet contained
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
     * within the JOIN and maintain any updates that have occoured while in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
     * this union.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
     * @return A <code>Collection</code> of the added <code>RowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
     * object instances
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
     * @throws SQLException if an error occours generating a collection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
     * of the originating RowSets contained within the JOIN.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
     */
11129
f9ad1aadf3fa 7116445: Miscellaneous warnings in the JDBC/RowSet classes
lancea
parents: 9257
diff changeset
   416
    @SuppressWarnings("rawtypes")
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
    public Collection getRowSets() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
        return vecRowSetsInJOIN;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
     * Returns a string array of the RowSet names currently residing
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
     * with the <code>JoinRowSet</code> object instance.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
     * @return a string array of the RowSet names
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
     * @throws SQLException if an error occours retrieving the RowSet names
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
     * @see CachedRowSet#setTableName
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
    public String[] getRowSetNames() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
        Object [] arr = vecTableNames.toArray();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
        String []strArr = new String[arr.length];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
        for( int i = 0;i < arr.length; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
           strArr[i] = arr[i].toString();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
        return strArr;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
     * Creates a separate <code>CachedRowSet</code> object that contains the data
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
     * in this <code>JoinRowSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
     * If any updates or modifications have been applied to this <code>JoinRowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
     * object, the <code>CachedRowSet</code> object returned by this method will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
     * not be able to persist
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
     * the changes back to the originating rows and tables in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
     * data source because the data may be from different tables. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
     * <code>CachedRowSet</code> instance returned should not
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
     * contain modification data, such as whether a row has been updated or what the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
     * original values are.  Also, the <code>CachedRowSet</code> object should clear
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
     * its  properties pertaining to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
     * its originating SQL statement. An application should reset the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
     * SQL statement using the <code>RowSet.setCommand</code> method.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
     * To persist changes back to the data source, the <code>JoinRowSet</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
     * calls the method <code>acceptChanges</code>. Implementations
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
     * can leverage the internal data and update tracking in their
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
     * implementations to interact with the <code>SyncProvider</code> to persist any
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
     * changes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
     * @return a <code>CachedRowSet</code> object containing the contents of this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
     *         <code>JoinRowSet</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
     * @throws SQLException if an error occurs assembling the <code>CachedRowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
     *         object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
     * @see javax.sql.RowSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
     * @see javax.sql.rowset.CachedRowSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
     * @see javax.sql.rowset.spi.SyncProvider
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
    public CachedRowSet toCachedRowSet() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
        return crsInternal;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
     * Returns <code>true</code> if this <code>JoinRowSet</code> object supports
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
     * an SQL <code>CROSS_JOIN</code> and <code>false</code> if it does not.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
     * @return <code>true</code> if the CROSS_JOIN is supported; <code>false</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
     *         otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
    public boolean supportsCrossJoin() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
        return supportedJOINs[JoinRowSet.CROSS_JOIN];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
     * Returns <code>true</code> if this <code>JoinRowSet</code> object supports
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
     * an SQL <code>INNER_JOIN</code> and <code>false</code> if it does not.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
     * @return true is the INNER_JOIN is supported; false otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
    public boolean supportsInnerJoin() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
        return supportedJOINs[JoinRowSet.INNER_JOIN];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   496
     * Returns <code>true</code> if this <code>JoinRowSet</code> object supports
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
     * an SQL <code>LEFT_OUTER_JOIN</code> and <code>false</code> if it does not.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
     * @return true is the LEFT_OUTER_JOIN is supported; false otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
    public boolean supportsLeftOuterJoin() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
        return supportedJOINs[JoinRowSet.LEFT_OUTER_JOIN];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
     * Returns <code>true</code> if this <code>JoinRowSet</code> object supports
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
     * an SQL <code>RIGHT_OUTER_JOIN</code> and <code>false</code> if it does not.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   508
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   509
     * @return true is the RIGHT_OUTER_JOIN is supported; false otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
    public boolean supportsRightOuterJoin() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
        return supportedJOINs[JoinRowSet.RIGHT_OUTER_JOIN];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   513
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   514
90ce3da70b43 Initial load
duke
parents:
diff changeset
   515
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
     * Returns <code>true</code> if this <code>JoinRowSet</code> object supports
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
     * an SQL <code>FULL_JOIN</code> and <code>false</code> if it does not.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   519
     * @return true is the FULL_JOIN is supported; false otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
   520
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   521
    public boolean supportsFullJoin() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   522
        return supportedJOINs[JoinRowSet.FULL_JOIN];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   523
90ce3da70b43 Initial load
duke
parents:
diff changeset
   524
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   525
90ce3da70b43 Initial load
duke
parents:
diff changeset
   526
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   527
     * Sets the type of SQL <code>JOIN</code> that this <code>JoinRowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   528
     * object will use. This method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   529
     * allows an application to adjust the type of <code>JOIN</code> imposed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   530
     * on tables contained within this <code>JoinRowSet</code> object and to do it
90ce3da70b43 Initial load
duke
parents:
diff changeset
   531
     * on the fly. The last <code>JOIN</code> type set determines the type of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   532
     * <code>JOIN</code> to be performed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   533
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   534
     * Implementations should throw an <code>SQLException</code> if they do
90ce3da70b43 Initial load
duke
parents:
diff changeset
   535
     * not support the given <code>JOIN</code> type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   536
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   537
     * @param type one of the standard <code>JoinRowSet</code> constants
90ce3da70b43 Initial load
duke
parents:
diff changeset
   538
     *        indicating the type of <code>JOIN</code>.  Must be one of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   539
     *        following:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   540
     *            <code>JoinRowSet.CROSS_JOIN</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   541
     *            <code>JoinRowSet.INNER_JOIN</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   542
     *            <code>JoinRowSet.LEFT_OUTER_JOIN</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   543
     *            <code>JoinRowSet.RIGHT_OUTER_JOIN</code>, or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   544
     *            <code>JoinRowSet.FULL_JOIN</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   545
     * @throws SQLException if an unsupported <code>JOIN</code> type is set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   546
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   547
    public void setJoinType(int type) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   548
        // The join which governs the join of two rowsets is the last
90ce3da70b43 Initial load
duke
parents:
diff changeset
   549
        // join set, using setJoinType
90ce3da70b43 Initial load
duke
parents:
diff changeset
   550
90ce3da70b43 Initial load
duke
parents:
diff changeset
   551
       if (type >= JoinRowSet.CROSS_JOIN && type <= JoinRowSet.FULL_JOIN) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   552
           if (type != JoinRowSet.INNER_JOIN) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   553
               // This 'if' will be removed after all joins are implemented.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   554
               throw new SQLException(resBundle.handleGetObject("joinrowsetimpl.notsupported").toString());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   555
           } else {
6697
39929804f9d4 6989139: Address JDBC Findbugs where Number type Constructor are used
lancea
parents: 6692
diff changeset
   556
              Integer Intgr = Integer.valueOf(JoinRowSet.INNER_JOIN);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   557
              vecJoinType.add(Intgr);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   558
           }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   559
       } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   560
          throw new SQLException(resBundle.handleGetObject("joinrowsetimpl.notdefined").toString());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   561
       }  //end if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   562
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   563
90ce3da70b43 Initial load
duke
parents:
diff changeset
   564
90ce3da70b43 Initial load
duke
parents:
diff changeset
   565
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   566
     * This checks for a match column for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   567
     * whether it exists or not.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   568
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   569
     * @param <code>CachedRowSet</code> object whose match column needs to be checked.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   570
     * @throws SQLException if MatchColumn is not set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   571
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   572
    private boolean checkforMatchColumn(Joinable rs) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   573
        int[] i = rs.getMatchColumnIndexes();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   574
        if (i.length <= 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   575
            return false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   576
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   577
        return true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   578
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   579
90ce3da70b43 Initial load
duke
parents:
diff changeset
   580
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   581
     * Internal initialization of <code>JoinRowSet</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   582
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   583
    private void initJOIN(CachedRowSet rowset) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   584
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   585
90ce3da70b43 Initial load
duke
parents:
diff changeset
   586
            CachedRowSetImpl cRowset = (CachedRowSetImpl)rowset;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   587
            // Create a new CachedRowSet object local to this function.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   588
            CachedRowSetImpl crsTemp = new CachedRowSetImpl();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   589
            RowSetMetaDataImpl rsmd = new RowSetMetaDataImpl();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   590
90ce3da70b43 Initial load
duke
parents:
diff changeset
   591
            /* The following 'if block' seems to be always going true.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   592
               commenting this out for present
90ce3da70b43 Initial load
duke
parents:
diff changeset
   593
90ce3da70b43 Initial load
duke
parents:
diff changeset
   594
            if (!supportedJOINs[1]) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   595
                throw new SQLException(resBundle.handleGetObject("joinrowsetimpl.notsupported").toString());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   596
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   597
90ce3da70b43 Initial load
duke
parents:
diff changeset
   598
            */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   599
90ce3da70b43 Initial load
duke
parents:
diff changeset
   600
            if (vecRowSetsInJOIN.isEmpty() ) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   601
90ce3da70b43 Initial load
duke
parents:
diff changeset
   602
                // implies first cRowset to be added to the Join
90ce3da70b43 Initial load
duke
parents:
diff changeset
   603
                // simply add this as a CachedRowSet.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   604
                // Also add it to the class variable of type vector
90ce3da70b43 Initial load
duke
parents:
diff changeset
   605
                // do not need to check "type" of Join but it should be set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   606
                crsInternal = (CachedRowSetImpl)rowset.createCopy();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   607
                crsInternal.setMetaData((RowSetMetaDataImpl)cRowset.getMetaData());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   608
                // metadata will also set the MatchColumn.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   609
90ce3da70b43 Initial load
duke
parents:
diff changeset
   610
                vecRowSetsInJOIN.add(cRowset);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   611
90ce3da70b43 Initial load
duke
parents:
diff changeset
   612
            } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   613
                // At this point we are ready to add another rowset to 'this' object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   614
                // Check the size of vecJoinType and vecRowSetsInJoin
90ce3da70b43 Initial load
duke
parents:
diff changeset
   615
90ce3da70b43 Initial load
duke
parents:
diff changeset
   616
                // If nothing is being set, internally call setJoinType()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   617
                // to set to JoinRowSet.INNER_JOIN.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   618
90ce3da70b43 Initial load
duke
parents:
diff changeset
   619
                // For two rowsets one (valid) entry should be there in vecJoinType
90ce3da70b43 Initial load
duke
parents:
diff changeset
   620
                // For three rowsets two (valid) entries should be there in vecJoinType
90ce3da70b43 Initial load
duke
parents:
diff changeset
   621
90ce3da70b43 Initial load
duke
parents:
diff changeset
   622
                // Maintain vecRowSetsInJoin = vecJoinType + 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   623
90ce3da70b43 Initial load
duke
parents:
diff changeset
   624
90ce3da70b43 Initial load
duke
parents:
diff changeset
   625
                if( (vecRowSetsInJOIN.size() - vecJoinType.size() ) == 2 ) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   626
                   // we are going to add next rowset and setJoinType has not been set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   627
                   // recently, so set it to setJoinType() to JoinRowSet.INNER_JOIN.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   628
                   // the default join type
90ce3da70b43 Initial load
duke
parents:
diff changeset
   629
90ce3da70b43 Initial load
duke
parents:
diff changeset
   630
                        setJoinType(JoinRowSet.INNER_JOIN);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   631
                } else if( (vecRowSetsInJOIN.size() - vecJoinType.size() ) == 1  ) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   632
                   // do nothing setjoinType() has been set by programmer
90ce3da70b43 Initial load
duke
parents:
diff changeset
   633
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   634
90ce3da70b43 Initial load
duke
parents:
diff changeset
   635
                // Add the table names to the class variable of type vector.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   636
                vecTableNames.add(crsInternal.getTableName());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   637
                vecTableNames.add(cRowset.getTableName());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   638
                // Now we have two rowsets crsInternal and cRowset which need
90ce3da70b43 Initial load
duke
parents:
diff changeset
   639
                // to be INNER JOIN'ED to form a new rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
   640
                // Compare table1.MatchColumn1.value1 == { table2.MatchColumn2.value1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   641
                //                              ... upto table2.MatchColumn2.valueN }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   642
                //     ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   643
                // Compare table1.MatchColumn1.valueM == { table2.MatchColumn2.value1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   644
                //                              ... upto table2.MatchColumn2.valueN }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   645
                //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   646
                // Assuming first rowset has M rows and second N rows.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   647
90ce3da70b43 Initial load
duke
parents:
diff changeset
   648
                int rowCount2 = cRowset.size();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   649
                int rowCount1 = crsInternal.size();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   650
90ce3da70b43 Initial load
duke
parents:
diff changeset
   651
                // total columns in the new CachedRowSet will be sum of both -1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   652
                // (common column)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   653
                int matchColumnCount = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   654
                for(int i=0; i< crsInternal.getMatchColumnIndexes().length; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   655
                    if(crsInternal.getMatchColumnIndexes()[i] != -1)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   656
                        ++ matchColumnCount;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   657
                    else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   658
                        break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   659
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   660
90ce3da70b43 Initial load
duke
parents:
diff changeset
   661
                rsmd.setColumnCount
90ce3da70b43 Initial load
duke
parents:
diff changeset
   662
                    (crsInternal.getMetaData().getColumnCount() +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   663
                     cRowset.getMetaData().getColumnCount() - matchColumnCount);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   664
90ce3da70b43 Initial load
duke
parents:
diff changeset
   665
                crsTemp.setMetaData(rsmd);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   666
                crsInternal.beforeFirst();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   667
                cRowset.beforeFirst();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   668
                for (int i = 1 ; i <= rowCount1 ; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   669
                  if(crsInternal.isAfterLast() ) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   670
                    break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   671
                  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   672
                  if(crsInternal.next()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   673
                    cRowset.beforeFirst();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   674
                    for(int j = 1 ; j <= rowCount2 ; j++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   675
                         if( cRowset.isAfterLast()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   676
                            break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   677
                         }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   678
                         if(cRowset.next()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   679
                             boolean match = true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   680
                             for(int k=0; k<matchColumnCount; k++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   681
                                 if (!crsInternal.getObject( crsInternal.getMatchColumnIndexes()[k]).equals
90ce3da70b43 Initial load
duke
parents:
diff changeset
   682
                                         (cRowset.getObject(cRowset.getMatchColumnIndexes()[k]))) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   683
                                     match = false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   684
                                     break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   685
                                 }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   686
                             }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   687
                             if (match) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   688
90ce3da70b43 Initial load
duke
parents:
diff changeset
   689
                                int p;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   690
                                int colc = 0;   // reset this variable everytime you loop
90ce3da70b43 Initial load
duke
parents:
diff changeset
   691
                                // re create a JoinRowSet in crsTemp object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   692
                                crsTemp.moveToInsertRow();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   693
90ce3da70b43 Initial load
duke
parents:
diff changeset
   694
                                // create a new rowset crsTemp with data from first rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
   695
                            for( p=1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   696
                                p<=crsInternal.getMetaData().getColumnCount();p++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   697
90ce3da70b43 Initial load
duke
parents:
diff changeset
   698
                                match = false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   699
                                for(int k=0; k<matchColumnCount; k++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   700
                                 if (p == crsInternal.getMatchColumnIndexes()[k] ) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   701
                                     match = true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   702
                                     break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   703
                                 }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   704
                                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   705
                                    if ( !match ) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   706
90ce3da70b43 Initial load
duke
parents:
diff changeset
   707
                                    crsTemp.updateObject(++colc, crsInternal.getObject(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   708
                                    // column type also needs to be passed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   709
90ce3da70b43 Initial load
duke
parents:
diff changeset
   710
                                    rsmd.setColumnName
90ce3da70b43 Initial load
duke
parents:
diff changeset
   711
                                        (colc, crsInternal.getMetaData().getColumnName(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   712
                                    rsmd.setTableName(colc, crsInternal.getTableName());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   713
90ce3da70b43 Initial load
duke
parents:
diff changeset
   714
                                    rsmd.setColumnType(p, crsInternal.getMetaData().getColumnType(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   715
                                    rsmd.setAutoIncrement(p, crsInternal.getMetaData().isAutoIncrement(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   716
                                    rsmd.setCaseSensitive(p, crsInternal.getMetaData().isCaseSensitive(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   717
                                    rsmd.setCatalogName(p, crsInternal.getMetaData().getCatalogName(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   718
                                    rsmd.setColumnDisplaySize(p, crsInternal.getMetaData().getColumnDisplaySize(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   719
                                    rsmd.setColumnLabel(p, crsInternal.getMetaData().getColumnLabel(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   720
                                    rsmd.setColumnType(p, crsInternal.getMetaData().getColumnType(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   721
                                    rsmd.setColumnTypeName(p, crsInternal.getMetaData().getColumnTypeName(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   722
                                    rsmd.setCurrency(p,crsInternal.getMetaData().isCurrency(p) );
90ce3da70b43 Initial load
duke
parents:
diff changeset
   723
                                    rsmd.setNullable(p, crsInternal.getMetaData().isNullable(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   724
                                    rsmd.setPrecision(p, crsInternal.getMetaData().getPrecision(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   725
                                    rsmd.setScale(p, crsInternal.getMetaData().getScale(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   726
                                    rsmd.setSchemaName(p, crsInternal.getMetaData().getSchemaName(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   727
                                    rsmd.setSearchable(p, crsInternal.getMetaData().isSearchable(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   728
                                    rsmd.setSigned(p, crsInternal.getMetaData().isSigned(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   729
90ce3da70b43 Initial load
duke
parents:
diff changeset
   730
                                } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   731
                                    // will happen only once, for that  merged column pass
90ce3da70b43 Initial load
duke
parents:
diff changeset
   732
                                    // the types as OBJECT, if types not equal
90ce3da70b43 Initial load
duke
parents:
diff changeset
   733
90ce3da70b43 Initial load
duke
parents:
diff changeset
   734
                                    crsTemp.updateObject(++colc, crsInternal.getObject(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   735
90ce3da70b43 Initial load
duke
parents:
diff changeset
   736
                                    rsmd.setColumnName(colc, crsInternal.getMetaData().getColumnName(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   737
                                    rsmd.setTableName
90ce3da70b43 Initial load
duke
parents:
diff changeset
   738
                                        (colc, crsInternal.getTableName()+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   739
                                         "#"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   740
                                         cRowset.getTableName());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   741
90ce3da70b43 Initial load
duke
parents:
diff changeset
   742
90ce3da70b43 Initial load
duke
parents:
diff changeset
   743
                                    rsmd.setColumnType(p, crsInternal.getMetaData().getColumnType(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   744
                                    rsmd.setAutoIncrement(p, crsInternal.getMetaData().isAutoIncrement(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   745
                                    rsmd.setCaseSensitive(p, crsInternal.getMetaData().isCaseSensitive(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   746
                                    rsmd.setCatalogName(p, crsInternal.getMetaData().getCatalogName(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   747
                                    rsmd.setColumnDisplaySize(p, crsInternal.getMetaData().getColumnDisplaySize(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   748
                                    rsmd.setColumnLabel(p, crsInternal.getMetaData().getColumnLabel(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   749
                                    rsmd.setColumnType(p, crsInternal.getMetaData().getColumnType(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   750
                                    rsmd.setColumnTypeName(p, crsInternal.getMetaData().getColumnTypeName(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   751
                                    rsmd.setCurrency(p,crsInternal.getMetaData().isCurrency(p) );
90ce3da70b43 Initial load
duke
parents:
diff changeset
   752
                                    rsmd.setNullable(p, crsInternal.getMetaData().isNullable(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   753
                                    rsmd.setPrecision(p, crsInternal.getMetaData().getPrecision(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   754
                                    rsmd.setScale(p, crsInternal.getMetaData().getScale(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   755
                                    rsmd.setSchemaName(p, crsInternal.getMetaData().getSchemaName(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   756
                                    rsmd.setSearchable(p, crsInternal.getMetaData().isSearchable(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   757
                                    rsmd.setSigned(p, crsInternal.getMetaData().isSigned(p));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   758
90ce3da70b43 Initial load
duke
parents:
diff changeset
   759
                                    //don't do ++colc in the above statement
90ce3da70b43 Initial load
duke
parents:
diff changeset
   760
                                } //end if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   761
                            } //end for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   762
90ce3da70b43 Initial load
duke
parents:
diff changeset
   763
90ce3da70b43 Initial load
duke
parents:
diff changeset
   764
                            // append the rowset crsTemp, with data from second rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
   765
                            for(int q=1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   766
                                q<= cRowset.getMetaData().getColumnCount();q++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   767
90ce3da70b43 Initial load
duke
parents:
diff changeset
   768
                                match = false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   769
                                for(int k=0; k<matchColumnCount; k++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   770
                                 if (q == cRowset.getMatchColumnIndexes()[k] ) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   771
                                     match = true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   772
                                     break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   773
                                 }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   774
                                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   775
                                    if ( !match ) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   776
90ce3da70b43 Initial load
duke
parents:
diff changeset
   777
                                    crsTemp.updateObject(++colc, cRowset.getObject(q));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   778
90ce3da70b43 Initial load
duke
parents:
diff changeset
   779
                                    rsmd.setColumnName
90ce3da70b43 Initial load
duke
parents:
diff changeset
   780
                                        (colc, cRowset.getMetaData().getColumnName(q));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   781
                                    rsmd.setTableName(colc, cRowset.getTableName());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   782
90ce3da70b43 Initial load
duke
parents:
diff changeset
   783
                                    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   784
                                      * This will happen for a special case scenario. The value of 'p'
90ce3da70b43 Initial load
duke
parents:
diff changeset
   785
                                      * will always be one more than the number of columns in the first
90ce3da70b43 Initial load
duke
parents:
diff changeset
   786
                                      * rowset in the join. So, for a value of 'q' which is the number of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   787
                                      * columns in the second rowset that participates in the join.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   788
                                      * So decrement value of 'p' by 1 else `p+q-1` will be out of range.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   789
                                      **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   790
90ce3da70b43 Initial load
duke
parents:
diff changeset
   791
                                    //if((p+q-1) > ((crsInternal.getMetaData().getColumnCount()) +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   792
                                      //            (cRowset.getMetaData().getColumnCount())     - 1)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   793
                                      // --p;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   794
                                    //}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   795
                                    rsmd.setColumnType(p+q-1, cRowset.getMetaData().getColumnType(q));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   796
                                    rsmd.setAutoIncrement(p+q-1, cRowset.getMetaData().isAutoIncrement(q));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   797
                                    rsmd.setCaseSensitive(p+q-1, cRowset.getMetaData().isCaseSensitive(q));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   798
                                    rsmd.setCatalogName(p+q-1, cRowset.getMetaData().getCatalogName(q));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   799
                                    rsmd.setColumnDisplaySize(p+q-1, cRowset.getMetaData().getColumnDisplaySize(q));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   800
                                    rsmd.setColumnLabel(p+q-1, cRowset.getMetaData().getColumnLabel(q));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   801
                                    rsmd.setColumnType(p+q-1, cRowset.getMetaData().getColumnType(q));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   802
                                    rsmd.setColumnTypeName(p+q-1, cRowset.getMetaData().getColumnTypeName(q));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   803
                                    rsmd.setCurrency(p+q-1,cRowset.getMetaData().isCurrency(q) );
90ce3da70b43 Initial load
duke
parents:
diff changeset
   804
                                    rsmd.setNullable(p+q-1, cRowset.getMetaData().isNullable(q));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   805
                                    rsmd.setPrecision(p+q-1, cRowset.getMetaData().getPrecision(q));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   806
                                    rsmd.setScale(p+q-1, cRowset.getMetaData().getScale(q));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   807
                                    rsmd.setSchemaName(p+q-1, cRowset.getMetaData().getSchemaName(q));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   808
                                    rsmd.setSearchable(p+q-1, cRowset.getMetaData().isSearchable(q));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   809
                                    rsmd.setSigned(p+q-1, cRowset.getMetaData().isSigned(q));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   810
                                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   811
                                else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   812
                                    --p;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   813
                                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   814
                            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   815
                            crsTemp.insertRow();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   816
                            crsTemp.moveToCurrentRow();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   817
90ce3da70b43 Initial load
duke
parents:
diff changeset
   818
                        } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   819
                            // since not equa12
90ce3da70b43 Initial load
duke
parents:
diff changeset
   820
                            // so do nothing
90ce3da70b43 Initial load
duke
parents:
diff changeset
   821
                        } //end if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   822
                         // bool1 = cRowset.next();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   823
                         }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   824
90ce3da70b43 Initial load
duke
parents:
diff changeset
   825
                    } // end inner for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   826
                     //bool2 = crsInternal.next();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   827
                   }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   828
90ce3da70b43 Initial load
duke
parents:
diff changeset
   829
                } //end outer for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   830
                crsTemp.setMetaData(rsmd);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   831
                crsTemp.setOriginal();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   832
90ce3da70b43 Initial load
duke
parents:
diff changeset
   833
                // Now the join is done.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   834
               // Make crsInternal = crsTemp, to be ready for next merge, if at all.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   835
90ce3da70b43 Initial load
duke
parents:
diff changeset
   836
                int[] pCol = new int[matchColumnCount];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   837
                for(int i=0; i<matchColumnCount; i++)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   838
                   pCol[i] = crsInternal.getMatchColumnIndexes()[i];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   839
90ce3da70b43 Initial load
duke
parents:
diff changeset
   840
                crsInternal = (CachedRowSetImpl)crsTemp.createCopy();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   841
90ce3da70b43 Initial load
duke
parents:
diff changeset
   842
                // Because we add the first rowset as crsInternal to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   843
                // merged rowset, so pCol will point to the Match column.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   844
                // until reset, am not sure we should set this or not(?)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   845
                // if this is not set next inner join won't happen
90ce3da70b43 Initial load
duke
parents:
diff changeset
   846
                // if we explicitly do not set a set MatchColumn of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   847
                // the new crsInternal.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   848
90ce3da70b43 Initial load
duke
parents:
diff changeset
   849
                crsInternal.setMatchColumn(pCol);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   850
                // Add the merged rowset to the class variable of type vector.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   851
                crsInternal.setMetaData(rsmd);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   852
                vecRowSetsInJOIN.add(cRowset);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   853
            } //end if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   854
        } catch(SQLException sqle) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   855
            // %%% Exception should not dump here:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   856
            sqle.printStackTrace();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   857
            throw new SQLException(resBundle.handleGetObject("joinrowsetimpl.initerror").toString() + sqle);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   858
        } catch (Exception e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   859
            e.printStackTrace();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   860
            throw new SQLException(resBundle.handleGetObject("joinrowsetimpl.genericerr").toString() + e);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   861
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   862
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   863
90ce3da70b43 Initial load
duke
parents:
diff changeset
   864
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   865
     * Return a SQL-like description of the <code>WHERE</code> clause being used
90ce3da70b43 Initial load
duke
parents:
diff changeset
   866
     * in a <code>JoinRowSet</code> object instance. An implementation can describe
90ce3da70b43 Initial load
duke
parents:
diff changeset
   867
     * the <code>WHERE</code> clause of the SQL <code>JOIN</code> by supplying a <code>SQL</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   868
     * strings description of <code>JOIN</code> or provide a textual description to assist
90ce3da70b43 Initial load
duke
parents:
diff changeset
   869
     * applications using a <code>JoinRowSet</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   870
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   871
     * @return whereClause a textual or SQL descripition of the logical
90ce3da70b43 Initial load
duke
parents:
diff changeset
   872
     * <code>WHERE</code> cluase used in the <code>JoinRowSet</code> instance
90ce3da70b43 Initial load
duke
parents:
diff changeset
   873
     * @throws SQLException if an error occurs in generating a representation
90ce3da70b43 Initial load
duke
parents:
diff changeset
   874
     * of the <code>WHERE</code> clause.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   875
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   876
    public String getWhereClause() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   877
90ce3da70b43 Initial load
duke
parents:
diff changeset
   878
       String strWhereClause = "Select ";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   879
       String whereClause;
6692
aef4e294026f 6988993: Address Findbugs warnings for the use of String Constructor
lancea
parents: 6665
diff changeset
   880
       String tabName= "";
aef4e294026f 6988993: Address Findbugs warnings for the use of String Constructor
lancea
parents: 6665
diff changeset
   881
       String strTabName = "";
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   882
       int sz,cols;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   883
       int j;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   884
       CachedRowSetImpl crs;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   885
90ce3da70b43 Initial load
duke
parents:
diff changeset
   886
       // get all the column(s) names from each rowset.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   887
       // append them with their tablenames i.e. tableName.columnName
90ce3da70b43 Initial load
duke
parents:
diff changeset
   888
       // Select tableName1.columnName1,..., tableNameX.columnNameY
90ce3da70b43 Initial load
duke
parents:
diff changeset
   889
       // from tableName1,...tableNameX where
90ce3da70b43 Initial load
duke
parents:
diff changeset
   890
       // tableName1.(rowset1.getMatchColumnName()) ==
90ce3da70b43 Initial load
duke
parents:
diff changeset
   891
       // tableName2.(rowset2.getMatchColumnName()) + "and" +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   892
       // tableNameX.(rowsetX.getMatchColumnName()) ==
90ce3da70b43 Initial load
duke
parents:
diff changeset
   893
       // tableNameZ.(rowsetZ.getMatchColumnName()));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   894
90ce3da70b43 Initial load
duke
parents:
diff changeset
   895
       sz = vecRowSetsInJOIN.size();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   896
       for(int i=0;i<sz; i++) {
11129
f9ad1aadf3fa 7116445: Miscellaneous warnings in the JDBC/RowSet classes
lancea
parents: 9257
diff changeset
   897
          crs = vecRowSetsInJOIN.get(i);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   898
          cols = crs.getMetaData().getColumnCount();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   899
          tabName = tabName.concat(crs.getTableName());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   900
          strTabName = strTabName.concat(tabName+", ");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   901
          j = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   902
          while(j<cols) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   903
90ce3da70b43 Initial load
duke
parents:
diff changeset
   904
            strWhereClause = strWhereClause.concat
90ce3da70b43 Initial load
duke
parents:
diff changeset
   905
                (tabName+"."+crs.getMetaData().getColumnName(j++));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   906
            strWhereClause = strWhereClause.concat(", ");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   907
          } //end while
90ce3da70b43 Initial load
duke
parents:
diff changeset
   908
        } //end for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   909
90ce3da70b43 Initial load
duke
parents:
diff changeset
   910
90ce3da70b43 Initial load
duke
parents:
diff changeset
   911
        // now remove the last ","
90ce3da70b43 Initial load
duke
parents:
diff changeset
   912
        strWhereClause = strWhereClause.substring
24685
215fa91e1b4c 8044461: Cleanup new Boolean and single character strings
rriggs
parents: 14342
diff changeset
   913
             (0, strWhereClause.lastIndexOf(','));
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   914
90ce3da70b43 Initial load
duke
parents:
diff changeset
   915
        // Add from clause
90ce3da70b43 Initial load
duke
parents:
diff changeset
   916
        strWhereClause = strWhereClause.concat(" from ");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   917
90ce3da70b43 Initial load
duke
parents:
diff changeset
   918
        // Add the table names.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   919
        strWhereClause = strWhereClause.concat(strTabName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   920
90ce3da70b43 Initial load
duke
parents:
diff changeset
   921
        //Remove the last ","
90ce3da70b43 Initial load
duke
parents:
diff changeset
   922
        strWhereClause = strWhereClause.substring
24685
215fa91e1b4c 8044461: Cleanup new Boolean and single character strings
rriggs
parents: 14342
diff changeset
   923
             (0, strWhereClause.lastIndexOf(','));
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   924
90ce3da70b43 Initial load
duke
parents:
diff changeset
   925
        // Add the where clause
90ce3da70b43 Initial load
duke
parents:
diff changeset
   926
        strWhereClause = strWhereClause.concat(" where ");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   927
90ce3da70b43 Initial load
duke
parents:
diff changeset
   928
        // Get the match columns
90ce3da70b43 Initial load
duke
parents:
diff changeset
   929
        // rowset1.getMatchColumnName() == rowset2.getMatchColumnName()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   930
         for(int i=0;i<sz; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   931
             strWhereClause = strWhereClause.concat(
11129
f9ad1aadf3fa 7116445: Miscellaneous warnings in the JDBC/RowSet classes
lancea
parents: 9257
diff changeset
   932
               vecRowSetsInJOIN.get(i).getMatchColumnNames()[0]);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   933
             if(i%2!=0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   934
               strWhereClause = strWhereClause.concat("=");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   935
             }  else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   936
               strWhereClause = strWhereClause.concat(" and");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   937
             }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   938
          strWhereClause = strWhereClause.concat(" ");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   939
         }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   940
90ce3da70b43 Initial load
duke
parents:
diff changeset
   941
        return strWhereClause;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   942
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   943
90ce3da70b43 Initial load
duke
parents:
diff changeset
   944
90ce3da70b43 Initial load
duke
parents:
diff changeset
   945
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   946
     * Moves the cursor down one row from its current position and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   947
     * returns <code>true</code> if the new cursor position is a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   948
     * valid row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   949
     * The cursor for a new <code>ResultSet</code> object is initially
90ce3da70b43 Initial load
duke
parents:
diff changeset
   950
     * positioned before the first row. The first call to the method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   951
     * <code>next</code> moves the cursor to the first row, making it
90ce3da70b43 Initial load
duke
parents:
diff changeset
   952
     * the current row; the second call makes the second row the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   953
     * current row, and so on.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   954
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   955
     * <P>If an input stream from the previous row is open, it is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   956
     * implicitly closed. The <code>ResultSet</code> object's warning
90ce3da70b43 Initial load
duke
parents:
diff changeset
   957
     * chain is cleared when a new row is read.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   958
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   959
     * @return <code>true</code> if the new current row is valid;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   960
     *         <code>false</code> if there are no more rows
90ce3da70b43 Initial load
duke
parents:
diff changeset
   961
     * @throws SQLException if an error occurs or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   962
     *            the cursor is not positioned in the rowset, before
90ce3da70b43 Initial load
duke
parents:
diff changeset
   963
     *            the first row, or after the last row
90ce3da70b43 Initial load
duke
parents:
diff changeset
   964
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   965
    public boolean next() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   966
        return crsInternal.next();
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
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   971
     * Releases the current contents of this rowset, discarding  outstanding
90ce3da70b43 Initial load
duke
parents:
diff changeset
   972
     * updates.  The rowset contains no rows after the method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   973
     * <code>release</code> is called. This method sends a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   974
     * <code>RowSetChangedEvent</code> object to all registered listeners prior
90ce3da70b43 Initial load
duke
parents:
diff changeset
   975
     * to returning.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   976
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   977
     * @throws SQLException if an error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   978
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   979
    public void close() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   980
        crsInternal.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   981
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   982
90ce3da70b43 Initial load
duke
parents:
diff changeset
   983
90ce3da70b43 Initial load
duke
parents:
diff changeset
   984
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   985
     * Reports whether the last column read was SQL <code>NULL</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   986
     * Note that you must first call the method <code>getXXX</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   987
     * on a column to try to read its value and then call the method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   988
     * <code>wasNull</code> to determine whether the value was
90ce3da70b43 Initial load
duke
parents:
diff changeset
   989
     * SQL <code>NULL</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   990
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   991
     * @return <code>true</code> if the value in the last column read
90ce3da70b43 Initial load
duke
parents:
diff changeset
   992
     *         was SQL <code>NULL</code>; <code>false</code> otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
   993
     * @throws SQLException if an error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   994
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   995
    public boolean wasNull() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   996
        return crsInternal.wasNull();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   997
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   998
90ce3da70b43 Initial load
duke
parents:
diff changeset
   999
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1000
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1001
     * of this <code>JoinRowSetImpl</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1002
     * <code>String</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1003
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1004
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1005
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1006
     *        and equal to or less than the number of columns in the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1007
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1008
     *         result is <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1009
     * @throws SQLException if the given column index is out of bounds or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1010
     *            the cursor is not on a valid row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1011
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1012
    public String getString(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1013
        return crsInternal.getString(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1014
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1015
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1016
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1017
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1018
     * of this <code>JoinRowSetImpl</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1019
     * <code>boolean</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1020
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1021
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1022
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1023
     *        and equal to or less than the number of columns in the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1024
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1025
     *         result is <code>false</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1026
     * @throws SQLException if the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1027
     *            the cursor is not on a valid row, or this method fails
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1028
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1029
    public boolean getBoolean(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1030
        return crsInternal.getBoolean(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1031
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1032
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1033
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1034
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1035
     * of this <code>JoinRowSetImpl</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1036
     * <code>byte</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1037
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1038
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1039
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1040
     *        and equal to or less than the number of columns in the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1041
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1042
     *         result is <code>0</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1043
     * @throws SQLException if the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1044
     *            the cursor is not on a valid row, or this method fails
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1045
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1046
    public byte getByte(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1047
        return crsInternal.getByte(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1048
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1049
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1050
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1051
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1052
     * of this <code>JoinRowSetImpl</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1053
             * <code>short</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1054
             *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1055
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1056
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1057
     *        and equal to or less than the number of columns in the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1058
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1059
     *         result is <code>0</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1060
     * @throws SQLException if the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1061
     *            the cursor is not on a valid row, or this method fails
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1062
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1063
    public short getShort(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1064
        return crsInternal.getShort(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1065
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1066
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1067
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1068
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1069
     * of this <code>JoinRowSetImpl</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1070
     * <code>short</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1071
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1072
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1073
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1074
     *        and equal to or less than the number of columns in the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1075
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1076
     *         result is <code>0</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1077
     * @throws SQLException if the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1078
     *            the cursor is not on a valid row, or this method fails
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1079
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1080
    public int getInt(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1081
        return crsInternal.getInt(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1082
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1083
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1084
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1085
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1086
     * of this <code>JoinRowSetImpl</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1087
     * <code>long</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1088
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1089
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1090
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1091
     *        and equal to or less than the number of columns in the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1092
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1093
     *         result is <code>0</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1094
     * @throws SQLException if the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1095
     *            the cursor is not on a valid row, or this method fails
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1096
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1097
    public long getLong(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1098
        return crsInternal.getLong(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1099
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1100
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1101
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1102
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1103
     * of this <code>JoinRowSetImpl</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1104
     * <code>float</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1105
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1106
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1107
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1108
     *        and equal to or less than the number of columns in the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1109
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1110
     *         result is <code>0</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1111
     * @throws SQLException if the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1112
     *            the cursor is not on a valid row, or this method fails
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1113
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1114
    public float getFloat(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1115
        return crsInternal.getFloat(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1116
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1117
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1118
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1119
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1120
     * of this <code>JoinRowSetImpl</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1121
     * <code>double</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1122
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1123
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1124
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1125
     *        and equal to or less than the number of columns in the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1126
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1127
     *         result is <code>0</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1128
     * @throws SQLException if the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1129
     *            the cursor is not on a valid row, or this method fails
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1130
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1131
    public double getDouble(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1132
        return crsInternal.getDouble(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1133
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1134
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1135
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1136
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1137
     * of this <code>JoinRowSetImpl</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1138
     * <code>java.math.BigDecimal</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1139
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1140
     * This method is deprecated; use the version of <code>getBigDecimal</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1141
     * that does not take a scale parameter and returns a value with full
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1142
     * precision.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1143
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1144
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1145
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1146
     *        and equal to or less than the number of columns in the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1147
     * @param scale the number of digits to the right of the decimal point in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1148
     *        value returned
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1149
     * @return the column value with the specified number of digits to the right
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1150
     *         of the decimal point; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1151
     *         result is <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1152
     * @throws SQLException if the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1153
     *            the cursor is not on a valid row, or this method fails
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1154
     * @deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1155
     */
14171
94eb36844bd7 7197395: Add @Deprecated to all deprecated methods to eliminate compiler warnings in JDBC
lancea
parents: 11129
diff changeset
  1156
    @Deprecated
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1157
    public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1158
        return crsInternal.getBigDecimal(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1159
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1160
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1161
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1162
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1163
     * of this <code>JoinRowSetImpl</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1164
     * <code>byte array</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1165
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1166
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1167
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1168
     *        and equal to or less than the number of columns in the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1169
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1170
     *         result is <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1171
     * @throws SQLException if the given column index is out of bounds,
28059
e576535359cc 8067377: My hobby: caning, then then canning, the the can-can
martin
parents: 25859
diff changeset
  1172
     *            the cursor is not on a valid row, or the value to be
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1173
     *            retrieved is not binary
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1174
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1175
    public byte[] getBytes(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1176
        return crsInternal.getBytes(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1177
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1178
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1179
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1180
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1181
     * of this <code>JoinRowSetImpl</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1182
     * <code>java.sql.Date</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1183
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1184
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1185
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1186
     *        and equal to or less than the number of columns in the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1187
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1188
     *         result is <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1189
     * @throws SQLException if the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1190
     *            the cursor is not on a valid row, or this method fails
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1191
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1192
    public java.sql.Date getDate(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1193
        return crsInternal.getDate(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1194
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1195
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1196
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1197
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1198
     * of this <code>JoinRowSetImpl</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1199
     * <code>java.sql.Time</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1200
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1201
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1202
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1203
     *        and equal to or less than the number of columns in the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1204
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1205
     *         result is <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1206
     * @throws SQLException if the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1207
     *            the cursor is not on a valid row, or this method fails
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1208
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1209
    public java.sql.Time getTime(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1210
        return crsInternal.getTime(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1211
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1212
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1213
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1214
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1215
     * of this <code>JoinRowSetImpl</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1216
     * <code>java.sql.Timestamp</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1217
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1218
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1219
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1220
     *        and equal to or less than the number of columns in the rowset
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
     *         result is <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1223
     * @throws SQLException if the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1224
     *            the cursor is not on a valid row, or this method fails
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1225
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1226
    public java.sql.Timestamp getTimestamp(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1227
        return crsInternal.getTimestamp(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1228
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1229
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1230
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1231
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1232
     * of this <code>JoinRowSetImpl</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1233
     * <code>java.sql.Timestamp</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1234
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1235
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1236
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1237
     *        and equal to or less than the number of columns in the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1238
     * @return the column value; if the value is SQL <code>NULL</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1239
     *         result is <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1240
     * @throws SQLException if the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1241
     *            the cursor is not on a valid row, or this method fails
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1242
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1243
    public java.io.InputStream getAsciiStream(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1244
        return crsInternal.getAsciiStream(columnIndex);
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
     * A column value can be retrieved as a stream of Unicode characters
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1249
     * and then read in chunks from the stream.  This method is particularly
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1250
     * suitable for retrieving large LONGVARCHAR values.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1251
     * do any necessary conversion from the database format into Unicode.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1252
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1253
     * <P><B>Note:</B> All the data in the returned stream must be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1254
     * read prior to getting the value of any other column. The next
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1255
     * call to a get method implicitly closes the stream. . Also, a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1256
     * stream may return 0 for available() whether there is data
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1257
     * available or not.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1258
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1259
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1260
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1261
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1262
     * @return a Java input stream that delivers the database column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1263
     * as a stream of two byte Unicode characters.  If the value is SQL NULL
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1264
     * then the result is null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1265
     * @throws SQLException if an error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1266
     * @deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1267
     */
14171
94eb36844bd7 7197395: Add @Deprecated to all deprecated methods to eliminate compiler warnings in JDBC
lancea
parents: 11129
diff changeset
  1268
    @Deprecated
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1269
    public java.io.InputStream getUnicodeStream(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1270
        return crsInternal.getUnicodeStream(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1271
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1272
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1273
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1274
     * A column value can be retrieved as a stream of uninterpreted bytes
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1275
     * and then read in chunks from the stream.  This method is particularly
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1276
     * suitable for retrieving large LONGVARBINARY values.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1277
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1278
     * <P><B>Note:</B> All the data in the returned stream must be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1279
     * read prior to getting the value of any other column. The next
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1280
     * call to a get method implicitly closes the stream. Also, a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1281
     * stream may return 0 for available() whether there is data
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1282
     * available or not.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1283
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1284
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1285
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1286
     *        and equal to or less than the number of columns in the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1287
     * @return a Java input stream that delivers the database column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1288
     * as a stream of uninterpreted bytes.  If the value is SQL NULL
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1289
     * then the result is null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1290
     * @throws SQLException if an error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1291
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1292
    public java.io.InputStream getBinaryStream(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1293
        return crsInternal.getBinaryStream(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1294
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1295
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1296
    // ColumnName methods
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1297
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1298
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1299
     * Retrieves the value stored in the designated column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1300
     * of the current row as a <code>String</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1301
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1302
     * @param columnName a <code>String</code> object giving the SQL name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1303
     *        a column in this <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1304
     * @return the column value; if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1305
     *         the result is <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1306
     * @throws SQLException if the given column name does not match one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1307
     *            this rowset's column names or the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1308
     *            this rowset's rows or its insert row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1309
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1310
    public String getString(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1311
        return crsInternal.getString(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1312
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1313
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1314
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1315
     * Retrieves the value stored in the designated column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1316
     * of the current row as a <code>boolean</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1317
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1318
     * @param columnName a <code>String</code> object giving the SQL name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1319
     *        a column in this <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1320
     * @return the column value; if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1321
     *         the result is <code>false</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1322
     * @throws SQLException if the given column name does not match one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1323
     *            this rowset's column names or the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1324
     *            this rowset's rows or its insert row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1325
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1326
    public boolean getBoolean(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1327
        return crsInternal.getBoolean(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1328
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1329
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1330
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1331
     * Retrieves the value stored in the designated column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1332
     * of the current row as a <code>byte</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1333
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1334
     * @param columnName a <code>String</code> object giving the SQL name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1335
     *        a column in this <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1336
     * @return the column value; if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1337
     *         the result is <code>0</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1338
     * @throws SQLException if the given column name does not match one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1339
     *            this rowset's column names or the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1340
     *            this rowset's rows or its insert row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1341
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1342
    public byte getByte(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1343
        return crsInternal.getByte(columnName);
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
     * Retrieves the value stored in the designated column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1348
     * of the current row as a <code>short</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1349
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1350
     * @param columnName a <code>String</code> object giving the SQL name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1351
     *        a column in this <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1352
     * @return the column value; if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1353
     *         the result is <code>0</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1354
     * @throws SQLException if the given column name does not match one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1355
     *            this rowset's column names or the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1356
     *            this rowset's rows or its insert row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1357
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1358
    public short getShort(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1359
        return crsInternal.getShort(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1360
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1361
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1362
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1363
     * Retrieves the value stored in the designated column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1364
     * of the current row as an <code>int</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1365
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1366
     * @param columnName a <code>String</code> object giving the SQL name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1367
     *        a column in this <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1368
     * @return the column value; if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1369
     *         the result is <code>0</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1370
     * @throws SQLException if the given column name does not match one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1371
     *            this rowset's column names or the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1372
     *            this rowset's rows or its insert row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1373
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1374
    public int getInt(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1375
        return crsInternal.getInt(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1376
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1377
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1378
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1379
     * Retrieves the value stored in the designated column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1380
     * of the current row as a <code>long</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1381
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1382
     * @param columnName a <code>String</code> object giving the SQL name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1383
     *        a column in this <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1384
     * @return the column value; if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1385
     *         the result is <code>0</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1386
     * @throws SQLException if the given column name does not match one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1387
     *            this rowset's column names or the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1388
     *            this rowset's rows or its insert row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1389
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1390
    public long getLong(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1391
        return crsInternal.getLong(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1392
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1393
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1394
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1395
     * Retrieves the value stored in the designated column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1396
     * of the current row as a <code>float</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1397
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1398
     * @param columnName a <code>String</code> object giving the SQL name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1399
     *        a column in this <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1400
     * @return the column value; if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1401
     *         the result is <code>0</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1402
     * @throws SQLException if the given column name does not match one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1403
     *            this rowset's column names or the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1404
     *            this rowset's rows or its insert row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1405
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1406
    public float getFloat(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1407
        return crsInternal.getFloat(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1408
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1409
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1410
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1411
     * Retrieves the value stored in the designated column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1412
     * of the current row as a <code>double</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1413
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1414
     * @param columnName a <code>String</code> object giving the SQL name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1415
     *        a column in this <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1416
     * @return the column value; if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1417
     *         the result is <code>0</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1418
     * @throws SQLException if the given column name does not match one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1419
     *            this rowset's column names or the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1420
     *            this rowset's rows or its insert row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1421
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1422
    public double getDouble(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1423
        return crsInternal.getDouble(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1424
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1425
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1426
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1427
     * Retrieves the value stored in the designated column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1428
     * of the current row as a <code>java.math.BigDecimal</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1429
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1430
     * @param columnName a <code>String</code> object giving the SQL name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1431
     *        a column in this <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1432
     * @param scale the number of digits to the right of the decimal point
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1433
     * @return the column value; if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1434
     *         the result is <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1435
     * @throws SQLException if the given column name does not match one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1436
     *            this rowset's column names or the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1437
     *            this rowset's rows or its insert row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1438
     * @deprecated use the method <code>getBigDecimal(String columnName)</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1439
     *             instead
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1440
     */
14171
94eb36844bd7 7197395: Add @Deprecated to all deprecated methods to eliminate compiler warnings in JDBC
lancea
parents: 11129
diff changeset
  1441
    @Deprecated
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1442
    public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1443
        return crsInternal.getBigDecimal(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1444
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1445
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1446
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1447
     * Retrieves the value stored in the designated column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1448
     * of the current row as a byte array.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1449
     * The bytes represent the raw values returned by the driver.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1450
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1451
     * @param columnName a <code>String</code> object giving the SQL name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1452
     *        a column in this <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1453
     * @return the column value; if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1454
     *         the result is <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1455
     * @throws SQLException if the given column name does not match one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1456
     *            this rowset's column names or the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1457
     *            this rowset's rows or its insert row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1458
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1459
    public byte[] getBytes(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1460
        return crsInternal.getBytes(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1461
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1462
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1463
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1464
     * Retrieves the value stored in the designated column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1465
     * of the current row as a <code>java.sql.Date</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1466
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1467
     * @param columnName a <code>String</code> object giving the SQL name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1468
     *        a column in this <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1469
     * @return the column value; if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1470
     *         the result is <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1471
     * @throws SQLException if the given column name does not match one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1472
     *            this rowset's column names or the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1473
     *            this rowset's rows or its insert row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1474
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1475
    public java.sql.Date getDate(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1476
        return crsInternal.getDate(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1477
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1478
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1479
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1480
     * Retrieves the value stored in the designated column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1481
     * of the current row as a <code>java.sql.Time</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1482
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1483
     * @param columnName a <code>String</code> object giving the SQL name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1484
     *        a column in this <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1485
     * @return the column value; if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1486
     *         the result is <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1487
     * @throws SQLException if the given column name does not match one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1488
     *            this rowset's column names or the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1489
     *            this rowset's rows or its insert row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1490
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1491
    public java.sql.Time getTime(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1492
        return crsInternal.getTime(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1493
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1494
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1495
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1496
     * Retrieves the value stored in the designated column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1497
     * of the current row as a <code>java.sql.Timestamp</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1498
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1499
     * @param columnName a <code>String</code> object giving the SQL name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1500
     *        a column in this <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1501
     * @return the column value; if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1502
     *         the result is <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1503
     * @throws SQLException if the given column name does not match one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1504
     *            this rowset's column names or the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1505
     *            this rowset's rows or its insert row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1506
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1507
    public java.sql.Timestamp getTimestamp(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1508
        return crsInternal.getTimestamp(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1509
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1510
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1511
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1512
     * This method is not supported, and it will throw an
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1513
     * <code>UnsupportedOperationException</code> if it is called.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1514
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1515
     * A column value can be retrieved as a stream of ASCII characters
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1516
     * and then read in chunks from the stream.  This method is particularly
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1517
     * suitable for retrieving large LONGVARCHAR values.  The JDBC driver will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1518
     * do any necessary conversion from the database format into ASCII format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1519
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1520
     * <P><B>Note:</B> All the data in the returned stream must
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1521
     * be read prior to getting the value of any other column. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1522
     * next call to a <code>getXXX</code> method implicitly closes the stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1523
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1524
     * @param columnName a <code>String</code> object giving the SQL name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1525
     *        a column in this <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1526
     * @return a Java input stream that delivers the database column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1527
     *         as a stream of one-byte ASCII characters.  If the value is SQL
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1528
     *         <code>NULL</code>, the result is <code>null</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1529
     * @throws UnsupportedOperationException if this method is called
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1530
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1531
    public java.io.InputStream getAsciiStream(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1532
        return crsInternal.getAsciiStream(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1533
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1534
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1535
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1536
     * Retrieves the value stored in the designated column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1537
     * of the current row as a <code>java.io.InputStream</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1538
     * A column value can be retrieved as a stream of Unicode characters
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1539
     * and then read in chunks from the stream.  This method is particularly
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1540
     * suitable for retrieving large <code>LONGVARCHAR</code> values.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1541
     * The JDBC driver will do any necessary conversion from the database
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1542
     * format into Unicode.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1543
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1544
     * <P><B>Note:</B> All the data in the returned stream must
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1545
     * be read prior to getting the value of any other column. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1546
     * next call to a <code>getXXX</code> method implicitly closes the stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1547
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1548
     * @param columnName a <code>String</code> object giving the SQL name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1549
     *        a column in this <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1550
     * @return a Java input stream that delivers the database column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1551
     *         as a stream of two-byte Unicode characters.  If the value is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1552
     *         SQL <code>NULL</code>, the result is <code>null</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1553
     * @throws SQLException if the given column name does not match one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1554
     *            this rowset's column names or the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1555
     *            this rowset's rows or its insert row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1556
     * @deprecated use the method <code>getCharacterStream</code> instead
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1557
     */
14171
94eb36844bd7 7197395: Add @Deprecated to all deprecated methods to eliminate compiler warnings in JDBC
lancea
parents: 11129
diff changeset
  1558
    @Deprecated
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1559
    public java.io.InputStream getUnicodeStream(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1560
        return crsInternal.getUnicodeStream(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1561
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1562
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1563
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1564
     * Retrieves the value stored in the designated column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1565
     * of the current row as a <code>java.io.InputStream</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1566
     * A column value can be retrieved as a stream of uninterpreted bytes
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1567
     * and then read in chunks from the stream.  This method is particularly
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1568
     * suitable for retrieving large <code>LONGVARBINARY</code> values.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1569
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1570
     * <P><B>Note:</B> All the data in the returned stream must
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1571
     * be read prior to getting the value of any other column. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1572
     * next call to a get method implicitly closes the stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1573
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1574
     * @param columnName a <code>String</code> object giving the SQL name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1575
     *        a column in this <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1576
     * @return a Java input stream that delivers the database column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1577
     *         as a stream of uninterpreted bytes.  If the value is SQL
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1578
     *         <code>NULL</code>, the result is <code>null</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1579
     * @throws SQLException if the given column name does not match one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1580
     *            this rowset's column names or the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1581
     *            this rowset's rows or its insert row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1582
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1583
    public java.io.InputStream getBinaryStream(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1584
        return crsInternal.getBinaryStream(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1585
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1586
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1587
    /* The first warning reported by calls on this <code>JoinRowSetImpl</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1588
     * object is returned. Subsequent <code>JoinRowSetImpl</code> warnings will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1589
     * be chained to this <code>SQLWarning</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1590
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1591
     * <P>The warning chain is automatically cleared each time a new
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1592
     * row is read.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1593
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1594
     * <P><B>Note:</B> This warning chain only covers warnings caused
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1595
     * by <code>ResultSet</code> methods.  Any warning caused by statement
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1596
     * methods (such as reading OUT parameters) will be chained on the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1597
     * <code>Statement</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1598
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1599
     * @return the first SQLWarning or null
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1600
     * @throws UnsupportedOperationException if this method is called
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1601
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1602
    public SQLWarning getWarnings() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1603
        return crsInternal.getWarnings();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1604
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1605
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1606
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1607
     * Throws an <code>UnsupportedOperationException</code> if called.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1608
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1609
     * After a call to this method, the <code>getWarnings</code> method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1610
     * returns <code>null</code> until a new warning is reported for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1611
     * <code>JoinRowSetImpl</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1612
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1613
     * @throws UnsupportedOperationException if this method is called
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1614
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1615
     public void clearWarnings() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1616
        crsInternal.clearWarnings();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1617
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1618
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1619
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1620
     * Retrieves the name of the SQL cursor used by this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1621
     * <code>JoinRowSetImpl</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1622
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1623
     * <P>In SQL, a result table is retrieved through a cursor that is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1624
     * named. The current row of a result can be updated or deleted
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1625
     * using a positioned update/delete statement that references the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1626
     * cursor name. To insure that the cursor has the proper isolation
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1627
     * level to support an update operation, the cursor's <code>SELECT</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1628
     * statement should be of the form 'select for update'. If the 'for update'
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1629
     * clause is omitted, positioned updates may fail.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1630
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1631
     * <P>JDBC supports this SQL feature by providing the name of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1632
     * SQL cursor used by a <code>ResultSet</code> object. The current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1633
     * of a result set is also the current row of this SQL cursor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1634
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1635
     * <P><B>Note:</B> If positioned updates are not supported, an
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1636
     * <code>SQLException</code> is thrown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1637
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1638
     * @return the SQL cursor name for this <code>JoinRowSetImpl</code> object's
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1639
     *         cursor
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1640
     * @throws SQLException if an error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1641
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1642
    public String getCursorName() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1643
        return crsInternal.getCursorName();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1644
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1645
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1646
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1647
     * Retrieves the <code>ResultSetMetaData</code> object that contains
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1648
     * information about this <code>CachedRowsSet</code> object. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1649
     * information includes the number of columns, the data type for each
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1650
     * column, and other properties for each column.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1651
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1652
     * @return the <code>ResultSetMetaData</code> object that describes this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1653
     *         <code>JoinRowSetImpl</code> object's columns
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1654
     * @throws SQLException if an error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1655
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1656
    public ResultSetMetaData getMetaData() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1657
        return crsInternal.getMetaData();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1658
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1659
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1660
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1661
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1662
     * of this <code>JoinRowSetImpl</code> object as an
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1663
     * <code>Object</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1664
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1665
     * The type of the <code>Object</code> will be the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1666
     * Java object type corresponding to the column's SQL type,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1667
     * following the mapping for built-in types specified in the JDBC
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1668
     * specification.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1669
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1670
     * This method may also be used to read datatabase-specific
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1671
     * abstract data types.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1672
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1673
     * This implementation of the method <code>getObject</code> extends its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1674
     * behavior so that it gets the attributes of an SQL structured type as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1675
     * as an array of <code>Object</code> values.  This method also custom
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1676
     * maps SQL user-defined types to classes in the Java programming language.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1677
     * When the specified column contains
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1678
     * a structured or distinct value, the behavior of this method is as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1679
     * if it were a call to the method <code>getObject(columnIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1680
     * this.getStatement().getConnection().getTypeMap())</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1681
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1682
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1683
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1684
     *        and equal to or less than the number of columns in the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1685
     * @return a <code>java.lang.Object</code> holding the column value;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1686
     *         if the value is SQL <code>NULL</code>, the result is <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1687
     * @throws SQLException if the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1688
     *            the cursor is not on a valid row, or there is a problem getting
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1689
     *            the <code>Class</code> object for a custom mapping
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1690
     * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1691
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1692
    public Object getObject(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1693
        return crsInternal.getObject(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1694
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1695
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1696
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1697
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1698
     * of this <code>JoinRowSetImpl</code> object as an
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1699
     * <code>Object</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1700
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1701
     * The type of the <code>Object</code> will be the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1702
     * Java object type corresponding to the column's SQL type,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1703
     * following the mapping for built-in types specified in the JDBC
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1704
     * specification.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1705
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1706
     * This method may also be used to read datatabase-specific
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1707
     * abstract data types.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1708
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1709
     * This implementation of the method <code>getObject</code> extends its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1710
     * behavior so that it gets the attributes of an SQL structured type as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1711
     * as an array of <code>Object</code> values.  This method also custom
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1712
     * maps SQL user-defined types to classes
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1713
     * in the Java programming language. When the specified column contains
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1714
     * a structured or distinct value, the behavior of this method is as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1715
     * if it were a call to the method <code>getObject(columnIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1716
     * this.getStatement().getConnection().getTypeMap())</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1717
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1718
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1719
     *         is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1720
     *         and equal to or less than the number of columns in the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1721
     * @param map a <code>java.util.Map</code> object showing the mapping
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1722
     *         from SQL type names to classes in the Java programming
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1723
     *         language
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1724
     * @return a <code>java.lang.Object</code> holding the column value;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1725
     *         if the value is SQL <code>NULL</code>, the result is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1726
     *         <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1727
     * @throws SQLException if (1) the given column name does not match
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1728
     *         one of this rowset's column names, (2) the cursor is not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1729
     *         on a valid row, or (3) there is a problem getting
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1730
     *         the <code>Class</code> object for a custom mapping
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1731
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1732
    public Object getObject(int columnIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1733
                            java.util.Map<String,Class<?>> map)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1734
    throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1735
        return crsInternal.getObject(columnIndex, map);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1736
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1737
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1738
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1739
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1740
     * of this <code>JoinRowSetImpl</code> object as an
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1741
     * <code>Object</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1742
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1743
     * The type of the <code>Object</code> will be the default
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1744
     * Java object type corresponding to the column's SQL type,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1745
     * following the mapping for built-in types specified in the JDBC
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1746
     * specification.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1747
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1748
     * This method may also be used to read datatabase-specific
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1749
     * abstract data types.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1750
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1751
     * This implementation of the method <code>getObject</code> extends its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1752
     * behavior so that it gets the attributes of an SQL structured type as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1753
     * as an array of <code>Object</code> values.  This method also custom
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1754
     * maps SQL user-defined types to classes
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1755
     * in the Java programming language. When the specified column contains
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1756
     * a structured or distinct value, the behavior of this method is as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1757
     * if it were a call to the method <code>getObject(columnIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1758
     * this.getStatement().getConnection().getTypeMap())</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1759
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1760
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1761
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1762
     * @return a <code>java.lang.Object</code> holding the column value;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1763
     *        if the value is SQL <code>NULL</code>, the result is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1764
     *        <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1765
     * @throws SQLException if (1) the given column name does not match
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1766
     *        one of this rowset's column names, (2) the cursor is not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1767
     *        on a valid row, or (3) there is a problem getting
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1768
     *        the <code>Class</code> object for a custom mapping
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1769
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1770
    public Object getObject(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1771
        return crsInternal.getObject(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1772
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1773
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1774
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1775
     * Retrieves the value of the designated column in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1776
     * <code>JoinRowSetImpl</code> object as an <code>Object</code> in
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1777
     * the Java programming lanugage, using the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1778
     * <code>java.util.Map</code> object to custom map the value if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1779
     * appropriate.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1780
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1781
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1782
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1783
     * @param map a <code>java.util.Map</code> object showing the mapping
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1784
     *            from SQL type names to classes in the Java programming
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1785
     *            language
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1786
     * @return an <code>Object</code> representing the SQL value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1787
     * @throws SQLException if the given column index is out of bounds or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1788
     *            the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1789
     *            insert row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1790
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1791
    public Object getObject(String columnName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1792
                            java.util.Map<String,Class<?>> map)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1793
        throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1794
        return crsInternal.getObject(columnName, map);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1795
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1796
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1797
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1798
     * Retrieves the value stored in the designated column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1799
     * of the current row as a <code>java.io.Reader</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1800
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1801
     * <P><B>Note:</B> All the data in the returned stream must
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1802
     * be read prior to getting the value of any other column. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1803
     * next call to a <code>getXXX</code> method implicitly closes the stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1804
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1805
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1806
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1807
     *        and equal to or less than the number of columns in the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1808
     * @return a Java character stream that delivers the database column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1809
     *         as a <code>java.io.Reader</code> object.  If the value is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1810
     *         SQL <code>NULL</code>, the result is <code>null</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1811
     * @throws SQLException if the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1812
     *            the cursor is not on a valid row, or there is a type mismatch
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1813
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1814
    public java.io.Reader getCharacterStream(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1815
        return crsInternal.getCharacterStream(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1816
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1817
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1818
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1819
     * Retrieves the value stored in the designated column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1820
     * of the current row as a <code>java.io.Reader</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1821
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1822
     * <P><B>Note:</B> All the data in the returned stream must
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1823
     * be read prior to getting the value of any other column. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1824
     * next call to a <code>getXXX</code> method implicitly closes the stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1825
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1826
     * @param columnName a <code>String</code> object giving the SQL name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1827
     *        a column in this <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1828
     * @return a Java input stream that delivers the database column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1829
     *         as a stream of two-byte Unicode characters.  If the value is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1830
     *         SQL <code>NULL</code>, the result is <code>null</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1831
     * @throws SQLException if the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1832
     *            the cursor is not on a valid row, or there is a type mismatch
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1833
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1834
    public java.io.Reader getCharacterStream(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1835
        return crsInternal.getCharacterStream(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1836
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1837
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1838
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1839
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1840
     * of this <code>JoinRowSetImpl</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1841
     * <code>java.math.BigDecimal</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1842
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1843
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1844
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1845
     *        and equal to or less than the number of columns in the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1846
     * @return a <code>java.math.BigDecimal</code> value with full precision;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1847
     *         if the value is SQL <code>NULL</code>, the result is <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1848
     * @throws SQLException if the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1849
     *            the cursor is not on a valid row, or this method fails
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1850
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1851
    public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1852
       return crsInternal.getBigDecimal(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1853
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1854
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1855
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1856
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1857
     * of this <code>JoinRowSetImpl</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1858
     * <code>java.math.BigDecimal</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1859
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1860
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1861
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1862
     * @return a <code>java.math.BigDecimal</code> value with full precision;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1863
     *         if the value is SQL <code>NULL</code>, the result is <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1864
     * @throws SQLException if the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1865
     *            the cursor is not on a valid row, or this method fails
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1866
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1867
    public BigDecimal getBigDecimal(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1868
       return crsInternal.getBigDecimal(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1869
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1870
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1871
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1872
     * Returns the number of rows in this <code>JoinRowSetImpl</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1873
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1874
     * @return number of rows in the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1875
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1876
    public int size() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1877
        return crsInternal.size();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1878
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1879
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1880
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1881
     * Indicates whether the cursor is before the first row in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1882
     * <code>JoinRowSetImpl</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1883
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1884
     * @return <code>true</code> if the cursor is before the first row;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1885
     *         <code>false</code> otherwise or if the rowset contains no rows
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1886
     * @throws SQLException if an error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1887
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1888
    public boolean isBeforeFirst() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1889
        return crsInternal.isBeforeFirst();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1890
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1891
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1892
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1893
     * Indicates whether the cursor is after the last row in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1894
     * <code>JoinRowSetImpl</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1895
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1896
     * @return <code>true</code> if the cursor is after the last row;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1897
     *         <code>false</code> otherwise or if the rowset contains no rows
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1898
     * @throws SQLException if an error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1899
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1900
    public boolean isAfterLast() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1901
        return crsInternal.isAfterLast();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1902
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1903
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1904
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1905
     * Indicates whether the cursor is on the first row in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1906
     * <code>JoinRowSetImpl</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1907
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1908
     * @return <code>true</code> if the cursor is on the first row;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1909
     *         <code>false</code> otherwise or if the rowset contains no rows
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1910
     * @throws SQLException if an error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1911
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1912
    public boolean isFirst() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1913
        return crsInternal.isFirst();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1914
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1915
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1916
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1917
     * Indicates whether the cursor is on the last row in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1918
     * <code>JoinRowSetImpl</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1919
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1920
     * Note: Calling the method <code>isLast</code> may be expensive
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1921
     * because the JDBC driver might need to fetch ahead one row in order
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1922
     * to determine whether the current row is the last row in this rowset.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1923
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1924
     * @return <code>true</code> if the cursor is on the last row;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1925
     *         <code>false</code> otherwise or if this rowset contains no rows
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1926
     * @throws SQLException if an error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1927
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1928
    public boolean isLast() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1929
        return crsInternal.isLast();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1930
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1931
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1932
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1933
     * Moves this <code>JoinRowSetImpl</code> object's cursor to the front of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1934
     * the rowset, just before the first row. This method has no effect if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1935
     * this rowset contains no rows.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1936
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1937
     * @throws SQLException if an error occurs or the type of this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1938
     *            is <code>ResultSet.TYPE_FORWARD_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1939
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1940
    public void beforeFirst() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1941
        crsInternal.beforeFirst();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1942
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1943
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1944
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1945
     * Moves this <code>JoinRowSetImpl</code> object's cursor to the end of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1946
     * the rowset, just after the last row. This method has no effect if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1947
     * this rowset contains no rows.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1948
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1949
     * @throws SQLException if an error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1950
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1951
    public void afterLast() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1952
        crsInternal.afterLast();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1953
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1954
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1955
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1956
     * Moves this <code>JoinRowSetImpl</code> object's cursor to the first row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1957
     * and returns <code>true</code> if the operation was successful.  This
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1958
     * method also notifies registered listeners that the cursor has moved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1959
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1960
     * @return <code>true</code> if the cursor is on a valid row;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1961
     *         <code>false</code> otherwise or if there are no rows in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1962
     *         <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1963
     * @throws SQLException if the type of this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1964
     *            is <code>ResultSet.TYPE_FORWARD_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1965
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1966
    public boolean first() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1967
        return crsInternal.first();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1968
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1969
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1970
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1971
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1972
     * Moves this <code>JoinRowSetImpl</code> object's cursor to the last row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1973
     * and returns <code>true</code> if the operation was successful.  This
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1974
     * method also notifies registered listeners that the cursor has moved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1975
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1976
     * @return <code>true</code> if the cursor is on a valid row;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1977
     *         <code>false</code> otherwise or if there are no rows in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1978
     *         <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1979
     * @throws SQLException if the type of this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1980
     *            is <code>ResultSet.TYPE_FORWARD_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1981
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1982
    public boolean last() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1983
        return crsInternal.last();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1984
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1985
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1986
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1987
     * Returns the number of the current row in this <code>JoinRowSetImpl</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1988
     * object. The first row is number 1, the second number 2, and so on.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1989
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1990
     * @return the number of the current row;  <code>0</code> if there is no
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1991
     *         current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1992
     * @throws SQLException if an error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1993
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1994
    public int getRow() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1995
        return crsInternal.getRow();
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 this <code>JoinRowSetImpl</code> object's cursor to the row number
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2000
     * specified.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2001
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2002
     * <p>If the number is positive, the cursor moves to an absolute row with
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2003
     * respect to the beginning of the rowset.  The first row is row 1, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2004
     * is row 2, and so on.  For example, the following command, in which
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2005
     * <code>crs</code> is a <code>JoinRowSetImpl</code> object, moves the cursor
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2006
     * to the fourth row, starting from the beginning of the rowset.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2007
     * <PRE><code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2008
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2009
     *    crs.absolute(4);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2010
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2011
     * </code> </PRE>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2012
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2013
     * If the number is negative, the cursor moves to an absolute row position
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2014
     * with respect to the end of the rowset.  For example, calling
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2015
     * <code>absolute(-1)</code> positions the cursor on the last row,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2016
     * <code>absolute(-2)</code> moves it on the next-to-last row, and so on.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2017
     * If the <code>JoinRowSetImpl</code> object <code>crs</code> has five rows,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2018
     * the following command moves the cursor to the fourth-to-last row, which
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2019
     * in the case of a  rowset with five rows, is also the second row, counting
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2020
     * from the beginning.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2021
     * <PRE><code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2022
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2023
     *    crs.absolute(-4);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2024
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2025
     * </code> </PRE>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2026
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2027
     * If the number specified is larger than the number of rows, the cursor
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2028
     * will move to the position after the last row. If the number specified
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2029
     * would move the cursor one or more rows before the first row, the cursor
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2030
     * moves to the position before the first row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2031
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2032
     * Note: Calling <code>absolute(1)</code> is the same as calling the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2033
     * method <code>first()</code>.  Calling <code>absolute(-1)</code> is the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2034
     * same as calling <code>last()</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2035
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2036
     * @param row a positive number to indicate the row, starting row numbering from
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2037
     *        the first row, which is <code>1</code>; a negative number to indicate
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2038
     *        the row, starting row numbering from the last row, which is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2039
     *        <code>-1</code>; must not be <code>0</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2040
     * @return <code>true</code> if the cursor is on the rowset; <code>false</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2041
     *         otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2042
     * @throws SQLException if the given cursor position is <code>0</code> or the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2043
     *            type of this rowset is <code>ResultSet.TYPE_FORWARD_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2044
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2045
    public boolean absolute(int row) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2046
        return crsInternal.absolute(row);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2047
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2048
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2049
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2050
     * Moves the cursor the specified number of rows from the current
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2051
     * position, with a positive number moving it forward and a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2052
     * negative number moving it backward.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2053
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2054
     * If the number is positive, the cursor moves the specified number of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2055
     * rows toward the end of the rowset, starting at the current row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2056
     * For example, the following command, in which
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2057
     * <code>crs</code> is a <code>JoinRowSetImpl</code> object with 100 rows,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2058
     * moves the cursor forward four rows from the current row.  If the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2059
     * current row is 50, the cursor would move to row 54.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2060
     * <PRE><code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2061
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2062
     *    crs.relative(4);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2063
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2064
     * </code> </PRE>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2065
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2066
     * If the number is negative, the cursor moves back toward the beginning
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2067
     * the specified number of rows, starting at the current row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2068
     * For example, calling the method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2069
     * <code>absolute(-1)</code> positions the cursor on the last row,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2070
     * <code>absolute(-2)</code> moves it on the next-to-last row, and so on.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2071
     * If the <code>JoinRowSetImpl</code> object <code>crs</code> has five rows,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2072
     * the following command moves the cursor to the fourth-to-last row, which
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2073
     * in the case of a  rowset with five rows, is also the second row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2074
     * from the beginning.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2075
     * <PRE><code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2076
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2077
     *    crs.absolute(-4);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2078
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2079
     * </code> </PRE>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2080
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2081
     * If the number specified is larger than the number of rows, the cursor
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2082
     * will move to the position after the last row. If the number specified
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2083
     * would move the cursor one or more rows before the first row, the cursor
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2084
     * moves to the position before the first row. In both cases, this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2085
     * throws an <code>SQLException</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2086
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2087
     * Note: Calling <code>absolute(1)</code> is the same as calling the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2088
     * method <code>first()</code>.  Calling <code>absolute(-1)</code> is the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2089
     * same as calling <code>last()</code>.  Calling <code>relative(0)</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2090
     * is valid, but it does not change the cursor position.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2091
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2092
     * @param rows an <code>int</code> indicating the number of rows to move
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2093
     *             the cursor, starting at the current row; a positive number
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2094
     *             moves the cursor forward; a negative number moves the cursor
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2095
     *             backward; must not move the cursor past the valid
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2096
     *             rows
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2097
     * @return <code>true</code> if the cursor is on a row in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2098
     *         <code>JoinRowSetImpl</code> object; <code>false</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2099
     *         otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2100
     * @throws SQLException if there are no rows in this rowset, the cursor is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2101
     *         positioned either before the first row or after the last row, or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2102
     *         the rowset is type <code>ResultSet.TYPE_FORWARD_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2103
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2104
    public boolean relative(int rows) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2105
        return crsInternal.relative(rows);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2106
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2107
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2108
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2109
     * Moves this <code>JoinRowSetImpl</code> object's cursor to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2110
     * previous row and returns <code>true</code> if the cursor is on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2111
     * a valid row or <code>false</code> if it is not.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2112
     * This method also notifies all listeners registered with this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2113
     * <code>JoinRowSetImpl</code> object that its cursor has moved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2114
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2115
     * Note: calling the method <code>previous()</code> is not the same
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2116
     * as calling the method <code>relative(-1)</code>.  This is true
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2117
     * because it is possible to call <code>previous()</code> from the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2118
     * row, from after the last row, or from the current row, whereas
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2119
     * <code>relative</code> may only be called from the current row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2120
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2121
     * The method <code>previous</code> may used in a <code>while</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2122
     * loop to iterate through a rowset starting after the last row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2123
     * and moving toward the beginning. The loop ends when <code>previous</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2124
     * returns <code>false</code>, meaning that there are no more rows.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2125
     * For example, the following code fragment retrieves all the data in
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2126
     * the <code>JoinRowSetImpl</code> object <code>crs</code>, which has
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2127
     * three columns.  Note that the cursor must initially be positioned
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2128
     * after the last row so that the first call to the method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2129
     * <code>previous</code> places the cursor on the last line.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2130
     * <PRE> <code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2131
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2132
     *     crs.afterLast();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2133
     *     while (previous()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2134
     *         String name = crs.getString(1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2135
     *         int age = crs.getInt(2);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2136
     *         short ssn = crs.getShort(3);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2137
     *         System.out.println(name + "   " + age + "   " + ssn);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2138
     *     }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2139
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2140
     * </code> </PRE>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2141
     * This method throws an <code>SQLException</code> if the cursor is not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2142
     * on a row in the rowset, before the first row, or after the last row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2143
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2144
     * @return <code>true</code> if the cursor is on a valid row;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2145
     *         <code>false</code> if it is before the first row or after the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2146
     *         last row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2147
     * @throws SQLException if the cursor is not on a valid position or the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2148
     *           type of this rowset is <code>ResultSet.TYPE_FORWARD_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2149
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2150
    public boolean previous() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2151
        return crsInternal.previous();
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
     * Returns the index of the column whose name is <i>columnName</i>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2156
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2157
     * @param columnName a <code>String</code> object giving the name of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2158
     *        column for which the index will be returned; the name must
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2159
     *        match the SQL name of a column in this <code>JoinRowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2160
     *        object, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2161
     * @throws SQLException if the given column name does not match one of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2162
     *         column names for this <code>JoinRowSet</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2163
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2164
    public int findColumn(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2165
        return crsInternal.findColumn(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2166
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2167
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2168
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2169
     * Indicates whether the current row of this <code>JoinRowSetImpl</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2170
     * object has been updated.  The value returned
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2171
     * depends on whether this rowset can detect updates: <code>false</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2172
     * will always be returned if it does not detect updates.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2173
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2174
     * @return <code>true</code> if the row has been visibly updated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2175
     *         by the owner or another and updates are detected;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2176
     *         <code>false</code> otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2177
     * @throws SQLException if the cursor is on the insert row or not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2178
     *            on a valid row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2179
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2180
     * @see DatabaseMetaData#updatesAreDetected
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2181
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2182
    public boolean rowUpdated() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2183
        return crsInternal.rowUpdated();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2184
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2185
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2186
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2187
     * Indicates whether the designated column of the current row of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2188
     * this <code>JoinRowSetImpl</code> object has been updated. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2189
     * value returned depends on whether this rowset can detcted updates:
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2190
     * <code>false</code> will always be returned if it does not detect updates.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2191
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2192
     * @return <code>true</code> if the column updated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2193
     *          <code>false</code> otherwse
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2194
     * @throws SQLException if the cursor is on the insert row or not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2195
     *          on a valid row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2196
     * @see DatabaseMetaData#updatesAreDetected
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2197
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2198
    public boolean columnUpdated(int indexColumn) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2199
        return crsInternal.columnUpdated(indexColumn);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2200
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2201
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2202
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2203
     * Indicates whether the current row has been inserted.  The value returned
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2204
     * depends on whether or not the rowset can detect visible inserts.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2205
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2206
     * @return <code>true</code> if a row has been inserted and inserts are detected;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2207
     *         <code>false</code> otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2208
     * @throws SQLException if the cursor is on the insert row or not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2209
     *            not on a valid row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2210
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2211
     * @see DatabaseMetaData#insertsAreDetected
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2212
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2213
    public boolean rowInserted() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2214
        return crsInternal.rowInserted();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2215
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2216
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2217
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2218
     * Indicates whether the current row has been deleted.  A deleted row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2219
     * may leave a visible "hole" in a rowset.  This method can be used to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2220
     * detect such holes if the rowset can detect deletions. This method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2221
     * will always return <code>false</code> if this rowset cannot detect
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2222
     * deletions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2223
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2224
     * @return <code>true</code> if (1)the current row is blank, indicating that
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2225
     *         the row has been deleted, and (2)deletions are detected;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2226
     *         <code>false</code> otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2227
     * @throws SQLException if the cursor is on a valid row in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2228
     * @see DatabaseMetaData#deletesAreDetected
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2229
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2230
    public boolean rowDeleted() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2231
        return crsInternal.rowDeleted();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2232
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2233
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2234
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2235
     * Sets the designated nullable column in the current row or the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2236
     * insert row of this <code>JoinRowSetImpl</code> object with
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2237
     * <code>null</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2238
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2239
     * This method updates a column value in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2240
     * row of this rowset; however, another method must be called to complete
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2241
     * the update process. If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2242
     * method {@link #updateRow} must be called to mark the row as updated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2243
     * and to notify listeners that the row has changed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2244
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2245
     * must be called to insert the new row into this rowset and to notify
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2246
     * listeners that a row has changed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2247
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2248
     * In order to propagate updates in this rowset to the underlying
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2249
     * data source, an application must call the method acceptChanges
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2250
     * after it calls either <code>updateRow</code> or <code>insertRow</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2251
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2252
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2253
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2254
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2255
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2256
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2257
     *            insert row, or (3) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2258
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2259
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2260
    public void updateNull(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2261
        crsInternal.updateNull(columnIndex);
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
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2266
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2267
     * <code>boolean</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2268
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2269
     * This method updates a column value in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2270
     * row of this rowset, but it does not update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2271
     * If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2272
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2273
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2274
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2275
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2276
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2277
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2278
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2279
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2280
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2281
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2282
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2283
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2284
     *            insert row, or (3) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2285
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2286
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2287
    public void updateBoolean(int columnIndex, boolean x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2288
        crsInternal.updateBoolean(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2289
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2290
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2291
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2292
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2293
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2294
     * <code>byte</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2295
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2296
     * This method updates a column value in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2297
     * row of this rowset, but it does not update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2298
     * If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2299
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2300
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2301
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2302
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2303
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2304
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2305
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2306
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2307
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2308
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2309
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2310
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2311
     *            insert row, or (3) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2312
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2313
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2314
    public void updateByte(int columnIndex, byte x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2315
        crsInternal.updateByte(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2316
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2317
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2318
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2319
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2320
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2321
     * <code>short</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2322
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2323
     * This method updates a column value in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2324
     * row of this rowset, but it does not update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2325
     * If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2326
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2327
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2328
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2329
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2330
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2331
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2332
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2333
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2334
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2335
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2336
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2337
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2338
     *            insert row, or (3) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2339
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2340
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2341
    public void updateShort(int columnIndex, short x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2342
        crsInternal.updateShort(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2343
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2344
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2345
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2346
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2347
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2348
     * <code>int</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2349
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2350
     * This method updates a column value in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2351
     * row of this rowset, but it does not update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2352
     * If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2353
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2354
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2355
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2356
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2357
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2358
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2359
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2360
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2361
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2362
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2363
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2364
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2365
     *            insert row, or (3) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2366
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2367
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2368
    public void updateInt(int columnIndex, int x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2369
        crsInternal.updateInt(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2370
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2371
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2372
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2373
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2374
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2375
     * <code>long</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2376
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2377
     * This method updates a column value in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2378
     * row of this rowset, but it does not update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2379
     * If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2380
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2381
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2382
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2383
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2384
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2385
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2386
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2387
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2388
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2389
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2390
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2391
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2392
     *            insert row, or (3) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2393
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2394
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2395
    public void updateLong(int columnIndex, long x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2396
        crsInternal.updateLong(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2397
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2398
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2399
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2400
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2401
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2402
     * <code>float</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2403
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2404
     * This method updates a column value in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2405
     * row of this rowset, but it does not update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2406
     * If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2407
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2408
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2409
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2410
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2411
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2412
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2413
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2414
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2415
     *        and equal to or less than the number of columns in this rowset
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 (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2418
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2419
     *            insert row, or (3) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2420
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2421
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2422
    public void updateFloat(int columnIndex, float x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2423
        crsInternal.updateFloat(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2424
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2425
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2426
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2427
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2428
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2429
     * <code>double</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2430
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2431
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2432
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2433
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2434
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2435
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2436
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2437
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2438
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2439
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2440
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2441
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2442
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2443
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2444
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2445
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2446
     *            insert row, or (3) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2447
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2448
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2449
    public void updateDouble(int columnIndex, double x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2450
        crsInternal.updateDouble(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2451
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2452
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2453
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2454
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2455
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2456
     * <code>java.math.BigDecimal</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2457
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2458
     * This method updates a column value in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2459
     * row of this rowset, but it does not update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2460
     * If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2461
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2462
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2463
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2464
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2465
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2466
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2467
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2468
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2469
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2470
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2471
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2472
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2473
     *            insert row, or (3) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2474
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2475
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2476
    public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2477
        crsInternal.updateBigDecimal(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
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2482
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2483
     * <code>String</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2484
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2485
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2486
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2487
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2488
     * method {@link #updateRow} must be called to mark the row as updated.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2489
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2490
     * must be called to insert the new row into this rowset and mark it
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2491
     * as inserted. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2492
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2493
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2494
     * The method <code>acceptChanges</code> must be called if the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2495
     * updated values are to be written back to the underlying database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2496
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2497
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2498
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2499
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2500
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2501
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2502
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2503
     *            insert row, or (3) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2504
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2505
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2506
    public void updateString(int columnIndex, String x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2507
        crsInternal.updateString(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2508
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2509
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2510
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2511
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2512
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2513
     * <code>byte</code> array.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2514
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2515
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2516
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2517
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2518
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2519
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2520
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2521
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2522
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2523
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2524
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2525
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2526
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2527
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2528
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2529
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2530
     *            insert row, or (3) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2531
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2532
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2533
    public void updateBytes(int columnIndex, byte x[]) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2534
        crsInternal.updateBytes(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2535
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2536
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2537
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2538
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2539
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2540
     * <code>Date</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2541
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2542
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2543
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2544
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2545
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2546
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2547
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2548
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2549
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2550
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2551
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2552
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2553
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2554
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2555
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2556
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2557
     *            insert row, (3) the type of the designated column is not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2558
     *            an SQL <code>DATE</code> or <code>TIMESTAMP</code>, or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2559
     *            (4) this rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2560
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2561
    public void updateDate(int columnIndex, java.sql.Date x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2562
        crsInternal.updateDate(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2563
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2564
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2565
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2566
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2567
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2568
     * <code>Time</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2569
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2570
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2571
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2572
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2573
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2574
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2575
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2576
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2577
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2578
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2579
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2580
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2581
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2582
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2583
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2584
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2585
     *            insert row, (3) the type of the designated column is not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2586
     *            an SQL <code>TIME</code> or <code>TIMESTAMP</code>, or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2587
     *            (4) this rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2588
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2589
    public void updateTime(int columnIndex, java.sql.Time x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2590
        crsInternal.updateTime(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2591
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2592
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2593
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2594
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2595
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2596
     * <code>Timestamp</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2597
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2598
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2599
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2600
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2601
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2602
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2603
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2604
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2605
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2606
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2607
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2608
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2609
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2610
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2611
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2612
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2613
     *            insert row, (3) the type of the designated column is not
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2614
     *            an SQL <code>DATE</code>, <code>TIME</code>, or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2615
     *            <code>TIMESTAMP</code>, or (4) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2616
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2617
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2618
    public void updateTimestamp(int columnIndex, java.sql.Timestamp x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2619
        crsInternal.updateTimestamp(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2620
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2621
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2622
    /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2623
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2624
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2625
     * ASCII stream value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2626
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2627
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2628
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2629
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2630
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2631
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2632
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2633
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2634
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2635
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2636
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2637
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2638
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2639
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2640
     * @param length the number of one-byte ASCII characters in the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2641
     * @throws UnsupportedOperationException if this method is invoked
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2642
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2643
    public void updateAsciiStream(int columnIndex, java.io.InputStream x, int length) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2644
        crsInternal.updateAsciiStream(columnIndex, x, length);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2645
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2646
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2647
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2648
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2649
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2650
     * <code>java.io.InputStream</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2651
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2652
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2653
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2654
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2655
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2656
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2657
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2658
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2659
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2660
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2661
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2662
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2663
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2664
     * @param x the new column value; must be a <code>java.io.InputStream</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2665
     *          containing <code>BINARY</code>, <code>VARBINARY</code>, or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2666
     *          <code>LONGVARBINARY</code> data
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2667
     * @param length the length of the stream in bytes
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2668
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2669
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2670
     *            insert row, (3) the data in the stream is not binary, or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2671
     *            (4) this rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2672
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2673
    public void updateBinaryStream(int columnIndex, java.io.InputStream x, int length) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2674
        crsInternal.updateBinaryStream(columnIndex, x, length);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2675
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2676
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2677
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2678
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2679
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2680
     * <code>java.io.Reader</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2681
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2682
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2683
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2684
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2685
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2686
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2687
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2688
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2689
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2690
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2691
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2692
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2693
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2694
     * @param x the new column value; must be a <code>java.io.Reader</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2695
     *          containing <code>BINARY</code>, <code>VARBINARY</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2696
     *          <code>LONGVARBINARY</code>, <code>CHAR</code>, <code>VARCHAR</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2697
     *          or <code>LONGVARCHAR</code> data
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2698
     * @param length the length of the stream in characters
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2699
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2700
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2701
     *            insert row, (3) the data in the stream is not a binary or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2702
     *            character type, or (4) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2703
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2704
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2705
    public void updateCharacterStream(int columnIndex, java.io.Reader x, int length) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2706
        crsInternal.updateCharacterStream(columnIndex, x, length);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2707
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2708
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2709
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2710
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2711
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2712
     * <code>Object</code> value.  The <code>scale</code> parameter indicates
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2713
     * the number of digits to the right of the decimal point and is ignored
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2714
     * if the new column value is not a type that will be mapped to an SQL
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2715
     * <code>DECIMAL</code> or <code>NUMERIC</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2716
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2717
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2718
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2719
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2720
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2721
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2722
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2723
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2724
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2725
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2726
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2727
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2728
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2729
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2730
     * @param scale the number of digits to the right of the decimal point (for
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2731
     *              <code>DECIMAL</code> and <code>NUMERIC</code> types only)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2732
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2733
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2734
     *            insert row, or (3) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2735
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2736
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2737
    public void updateObject(int columnIndex, Object x, int scale) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2738
        crsInternal.updateObject(columnIndex, x, scale);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2739
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2740
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2741
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2742
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2743
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2744
     * <code>Object</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2745
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2746
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2747
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2748
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2749
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2750
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2751
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2752
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2753
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2754
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2755
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2756
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2757
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2758
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2759
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2760
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2761
     *            insert row, or (3) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2762
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2763
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2764
    public void updateObject(int columnIndex, Object x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2765
        crsInternal.updateObject(columnIndex, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2766
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2767
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2768
    // columnName updates
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2769
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2770
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2771
     * Sets the designated nullable column in the current row or the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2772
     * insert row of this <code>JoinRowSetImpl</code> object with
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2773
     * <code>null</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2774
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2775
     * This method updates a column value in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2776
     * row of this rowset, but it does not update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2777
     * If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2778
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2779
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2780
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2781
     * and the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2782
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2783
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2784
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2785
     * @throws SQLException if (1) the given column name does not match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2786
     *            name of a column in this rowset, (2) the cursor is not on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2787
     *            one of this rowset's rows or its insert row, or (3) this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2788
     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2789
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2790
    public void updateNull(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2791
        crsInternal.updateNull(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2792
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2793
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2794
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2795
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2796
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2797
     * <code>boolean</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2798
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2799
     * This method updates a column value in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2800
     * row of this rowset, but it does not update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2801
     * If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2802
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2803
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2804
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2805
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2806
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2807
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2808
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2809
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2810
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2811
     * @throws SQLException if (1) the given column name does not match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2812
     *            name of a column in this rowset, (2) the cursor is not on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2813
     *            one of this rowset's rows or its insert row, or (3) this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2814
     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2815
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2816
    public void updateBoolean(String columnName, boolean x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2817
        crsInternal.updateBoolean(columnName, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2818
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2819
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2820
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2821
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2822
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2823
     * <code>byte</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2824
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2825
     * This method updates a column value in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2826
     * row of this rowset, but it does not update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2827
     * If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2828
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2829
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2830
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2831
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2832
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2833
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2834
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2835
     *        SQL name of a column in this rowset, ignoring case
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 (1) the given column name does not match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2838
     *            name of a column in this rowset, (2) the cursor is not on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2839
     *            one of this rowset's rows or its insert row, or (3) this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2840
     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2841
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2842
    public void updateByte(String columnName, byte x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2843
        crsInternal.updateByte(columnName, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2844
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2845
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2846
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2847
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2848
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2849
     * <code>short</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2850
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2851
     * This method updates a column value in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2852
     * row of this rowset, but it does not update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2853
     * If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2854
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2855
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2856
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2857
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2858
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2859
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2860
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2861
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2862
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2863
     * @throws SQLException if (1) the given column name does not match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2864
     *            name of a column in this rowset, (2) the cursor is not on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2865
     *            one of this rowset's rows or its insert row, or (3) this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2866
     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2867
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2868
    public void updateShort(String columnName, short x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2869
        crsInternal.updateShort(columnName, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2870
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2871
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2872
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2873
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2874
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2875
     * <code>int</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2876
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2877
     * This method updates a column value in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2878
     * row of this rowset, but it does not update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2879
     * If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2880
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2881
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2882
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2883
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2884
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2885
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2886
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2887
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2888
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2889
     * @throws SQLException if (1) the given column name does not match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2890
     *            name of a column in this rowset, (2) the cursor is not on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2891
     *            one of this rowset's rows or its insert row, or (3) this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2892
     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2893
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2894
    public void updateInt(String columnName, int x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2895
        crsInternal.updateInt(columnName, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2896
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2897
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2898
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2899
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2900
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2901
     * <code>long</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2902
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2903
     * This method updates a column value in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2904
     * row of this rowset, but it does not update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2905
     * If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2906
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2907
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2908
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2909
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2910
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2911
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2912
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2913
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2914
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2915
     * @throws SQLException if (1) the given column name does not match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2916
     *            name of a column in this rowset, (2) the cursor is not on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2917
     *            one of this rowset's rows or its insert row, or (3) this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2918
     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2919
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2920
    public void updateLong(String columnName, long x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2921
        crsInternal.updateLong(columnName, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2922
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2923
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2924
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2925
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2926
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2927
     * <code>float</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2928
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2929
     * This method updates a column value in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2930
     * row of this rowset, but it does not update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2931
     * If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2932
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2933
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2934
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2935
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2936
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2937
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2938
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2939
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2940
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2941
     * @throws SQLException if (1) the given column name does not match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2942
     *            name of a column in this rowset, (2) the cursor is not on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2943
     *            one of this rowset's rows or its insert row, or (3) this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2944
     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2945
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2946
    public void updateFloat(String columnName, float x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2947
        crsInternal.updateFloat(columnName, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2948
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2949
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2950
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2951
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2952
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2953
     * <code>double</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2954
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2955
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2956
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2957
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2958
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2959
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2960
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2961
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2962
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2963
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2964
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2965
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2966
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2967
     * @throws SQLException if (1) the given column name does not match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2968
     *            name of a column in this rowset, (2) the cursor is not on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2969
     *            one of this rowset's rows or its insert row, or (3) this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2970
     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2971
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2972
    public void updateDouble(String columnName, double x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2973
        crsInternal.updateDouble(columnName, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2974
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2975
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2976
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2977
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2978
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2979
     * <code>java.math.BigDecimal</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2980
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2981
     * This method updates a column value in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2982
     * row of this rowset, but it does not update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2983
     * If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2984
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2985
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2986
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2987
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2988
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2989
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2990
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2991
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2992
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2993
     * @throws SQLException if (1) the given column name does not match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2994
     *            name of a column in this rowset, (2) the cursor is not on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2995
     *            one of this rowset's rows or its insert row, or (3) this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2996
     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2997
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2998
    public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  2999
        crsInternal.updateBigDecimal(columnName, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3000
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3001
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3002
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3003
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3004
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3005
     * <code>String</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3006
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3007
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3008
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3009
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3010
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3011
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3012
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3013
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3014
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3015
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3016
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3017
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3018
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3019
     * @throws SQLException if (1) the given column name does not match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3020
     *            name of a column in this rowset, (2) the cursor is not on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3021
     *            one of this rowset's rows or its insert row, or (3) this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3022
     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3023
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3024
    public void updateString(String columnName, String x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3025
        crsInternal.updateString(columnName, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3026
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3027
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3028
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3029
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3030
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3031
     * <code>byte</code> array.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3032
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3033
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3034
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3035
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3036
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3037
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3038
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3039
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3040
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3041
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3042
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3043
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3044
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3045
     * @throws SQLException if (1) the given column name does not match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3046
     *            name of a column in this rowset, (2) the cursor is not on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3047
     *            one of this rowset's rows or its insert row, or (3) this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3048
     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3049
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3050
    public void updateBytes(String columnName, byte x[]) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3051
        crsInternal.updateBytes(columnName, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3052
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3053
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3054
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3055
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3056
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3057
     * <code>Date</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3058
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3059
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3060
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3061
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3062
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3063
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3064
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3065
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3066
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3067
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3068
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3069
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3070
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3071
     * @throws SQLException if (1) the given column name does not match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3072
     *            name of a column in this rowset, (2) the cursor is not on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3073
     *            one of this rowset's rows or its insert row, (3) the type
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3074
     *            of the designated column is not an SQL <code>DATE</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3075
     *            <code>TIMESTAMP</code>, or (4) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3076
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3077
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3078
    public void updateDate(String columnName, java.sql.Date x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3079
        crsInternal.updateDate(columnName, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3080
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3081
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3082
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3083
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3084
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3085
     * <code>Time</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3086
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3087
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3088
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3089
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3090
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3091
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3092
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3093
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3094
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3095
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3096
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3097
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3098
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3099
     * @throws SQLException if (1) the given column name does not match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3100
     *            name of a column in this rowset, (2) the cursor is not on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3101
     *            one of this rowset's rows or its insert row, (3) the type
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3102
     *            of the designated column is not an SQL <code>TIME</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3103
     *            <code>TIMESTAMP</code>, or (4) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3104
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3105
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3106
    public void updateTime(String columnName, java.sql.Time x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3107
        crsInternal.updateTime(columnName, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3108
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3109
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3110
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3111
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3112
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3113
     * <code>Timestamp</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3114
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3115
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3116
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3117
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3118
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3119
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3120
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3121
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3122
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3123
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3124
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3125
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3126
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3127
     * @throws SQLException if the given column index is out of bounds or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3128
     *            the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3129
     *            insert row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3130
     * @throws SQLException if (1) the given column name does not match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3131
     *            name of a column in this rowset, (2) the cursor is not on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3132
     *            one of this rowset's rows or its insert row, (3) the type
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3133
     *            of the designated column is not an SQL <code>DATE</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3134
     *            <code>TIME</code>, or <code>TIMESTAMP</code>, or (4) this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3135
     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3136
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3137
    public void updateTimestamp(String columnName, java.sql.Timestamp x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3138
        crsInternal.updateTimestamp(columnName, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3139
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3140
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3141
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3142
     * Unsupported; throws an <code>UnsupportedOperationException</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3143
     * if called.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3144
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3145
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3146
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3147
     * ASCII stream value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3148
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3149
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3150
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3151
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3152
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3153
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3154
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3155
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3156
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3157
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3158
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3159
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3160
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3161
     * @param length the number of one-byte ASCII characters in the stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3162
     * @throws UnsupportedOperationException if this method is invoked
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3163
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3164
    public void updateAsciiStream(String columnName, java.io.InputStream x, int length) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3165
        crsInternal.updateAsciiStream(columnName, x, length);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3166
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3167
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3168
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3169
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3170
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3171
     * <code>java.io.InputStream</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3172
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3173
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3174
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3175
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3176
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3177
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3178
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3179
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3180
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3181
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3182
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3183
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3184
     * @param x the new column value; must be a <code>java.io.InputStream</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3185
     *          containing <code>BINARY</code>, <code>VARBINARY</code>, or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3186
     *          <code>LONGVARBINARY</code> data
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3187
     * @param length the length of the stream in bytes
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3188
     * @throws SQLException if (1) the given column name does not match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3189
     *            name of a column in this rowset, (2) the cursor is not on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3190
     *            one of this rowset's rows or its insert row, (3) the data
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3191
     *            in the stream is not binary, or (4) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3192
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3193
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3194
    public void updateBinaryStream(String columnName, java.io.InputStream x, int length) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3195
        crsInternal.updateBinaryStream(columnName, x, length);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3196
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3197
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3198
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3199
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3200
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3201
     * <code>java.io.Reader</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3202
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3203
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3204
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3205
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3206
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3207
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3208
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3209
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3210
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3211
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3212
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3213
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3214
     * @param x the new column value; must be a <code>java.io.Reader</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3215
     *          containing <code>BINARY</code>, <code>VARBINARY</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3216
     *          <code>LONGVARBINARY</code>, <code>CHAR</code>, <code>VARCHAR</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3217
     *          or <code>LONGVARCHAR</code> data
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3218
     * @param length the length of the stream in characters
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3219
     * @throws SQLException if (1) the given column name does not match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3220
     *            name of a column in this rowset, (2) the cursor is not on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3221
     *            one of this rowset's rows or its insert row, (3) the data
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3222
     *            in the stream is not a binary or character type, or (4) this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3223
     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3224
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3225
    public void updateCharacterStream(String columnName, java.io.Reader x, int length) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3226
        crsInternal.updateCharacterStream(columnName, x, length);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3227
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3228
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3229
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3230
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3231
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3232
     * <code>Object</code> value.  The <code>scale</code> parameter
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3233
     * indicates the number of digits to the right of the decimal point
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3234
     * and is ignored if the new column value is not a type that will be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3235
     *  mapped to an SQL <code>DECIMAL</code> or <code>NUMERIC</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3236
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3237
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3238
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3239
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3240
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3241
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3242
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3243
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3244
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3245
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3246
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3247
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3248
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3249
     * @param scale the number of digits to the right of the decimal point (for
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3250
     *              <code>DECIMAL</code> and <code>NUMERIC</code> types only)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3251
     * @throws SQLException if the given column index is out of bounds or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3252
     *            the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3253
     *            insert row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3254
     * @throws SQLException if (1) the given column name does not match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3255
     *            name of a column in this rowset, (2) the cursor is not on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3256
     *            one of this rowset's rows or its insert row, or (3) this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3257
     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3258
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3259
    public void updateObject(String columnName, Object x, int scale) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3260
        crsInternal.updateObject(columnName, x, scale);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3261
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3262
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3263
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3264
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3265
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3266
     * <code>Object</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3267
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3268
     * This method updates a column value in either the current row or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3269
     * the insert row of this rowset, but it does not update the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3270
     * database.  If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3271
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3272
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3273
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3274
     * and the database. Both of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3275
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3276
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3277
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3278
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3279
     * @param x the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3280
     * @throws SQLException if (1) the given column name does not match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3281
     *            name of a column in this rowset, (2) the cursor is not on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3282
     *            one of this rowset's rows or its insert row, or (3) this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3283
     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3284
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3285
    public void updateObject(String columnName, Object x) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3286
        crsInternal.updateObject(columnName, x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3287
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3288
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3289
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3290
     * Inserts the contents of this <code>JoinRowSetImpl</code> object's insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3291
     * row into this rowset immediately following the current row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3292
     * If the current row is the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3293
     * position after the last row or before the first row, the new row will
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3294
     * be inserted at the end of the rowset.  This method also notifies
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3295
     * listeners registered with this rowset that the row has changed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3296
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3297
     * The cursor must be on the insert row when this method is called.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3298
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3299
     * @throws SQLException if (1) the cursor is not on the insert row,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3300
     *            (2) one or more of the non-nullable columns in the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3301
     *            row has not been given a value, or (3) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3302
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3303
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3304
    public void insertRow() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3305
        crsInternal.insertRow();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3306
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3307
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3308
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3309
     * Marks the current row of this <code>JoinRowSetImpl</code> object as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3310
     * updated and notifies listeners registered with this rowset that the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3311
     * row has changed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3312
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3313
     * This method  cannot be called when the cursor is on the insert row, and
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3314
     * it should be called before the cursor moves to another row.  If it is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3315
     * called after the cursor moves to another row, this method has no effect,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3316
     * and the updates made before the cursor moved will be lost.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3317
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3318
     * @throws SQLException if the cursor is on the insert row or this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3319
     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3320
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3321
    public void updateRow() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3322
        crsInternal.updateRow();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3323
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3324
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3325
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3326
     * Deletes the current row from this <code>JoinRowSetImpl</code> object and
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3327
     * notifies listeners registered with this rowset that a row has changed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3328
     * This method cannot be called when the cursor is on the insert row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3329
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3330
     * This method marks the current row as deleted, but it does not delete
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3331
     * the row from the underlying data source.  The method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3332
     * <code>acceptChanges</code> must be called to delete the row in
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3333
     * the data source.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3334
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3335
     * @throws SQLException if (1) this method is called when the cursor
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3336
     *            is on the insert row, before the first row, or after the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3337
     *            last row or (2) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3338
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3339
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3340
    public void deleteRow() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3341
        crsInternal.deleteRow();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3342
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3343
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3344
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3345
     * Sets the current row with its original value and marks the row as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3346
     * not updated, thus undoing any changes made to the row since the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3347
     * last call to the methods <code>updateRow</code> or <code>deleteRow</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3348
     * This method should be called only when the cursor is on a row in
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3349
     * this rowset.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3350
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3351
     * @throws SQLException if the cursor is on the insert row, before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3352
     *            first row, or after the last row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3353
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3354
    public void refreshRow() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3355
        crsInternal.refreshRow();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3356
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3357
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3358
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3359
     * Rolls back any updates made to the current row of this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3360
     * <code>JoinRowSetImpl</code> object and notifies listeners that
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3361
     * a row has changed.  To have an effect, this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3362
     * must be called after an <code>updateXXX</code> method has been
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3363
     * called and before the method <code>updateRow</code> has been called.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3364
     * If no updates have been made or the method <code>updateRow</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3365
     * has already been called, this method has no effect.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3366
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3367
     * After <code>updateRow</code> is called it is the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3368
     * <code>cancelRowUpdates</code> has no affect on the newly
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3369
     * inserted values. The method <code>cancelRowInsert</code> can
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3370
     * be used to remove any rows inserted into the RowSet.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3371
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3372
     * @throws SQLException if the cursor is on the insert row, before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3373
     *            first row, or after the last row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3374
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3375
    public void cancelRowUpdates() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3376
        crsInternal.cancelRowUpdates();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3377
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3378
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3379
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3380
     * Moves the cursor for this <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3381
     * to the insert row.  The current row in the rowset is remembered
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3382
     * while the cursor is on the insert row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3383
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3384
     * The insert row is a special row associated with an updatable
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3385
     * rowset.  It is essentially a buffer where a new row may
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3386
     * be constructed by calling the appropriate <code>updateXXX</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3387
     * methods to assign a value to each column in the row.  A complete
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3388
     * row must be constructed; that is, every column that is not nullable
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3389
     * must be assigned a value.  In order for the new row to become part
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3390
     * of this rowset, the method <code>insertRow</code> must be called
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3391
     * before the cursor is moved back to the rowset.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3392
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3393
     * Only certain methods may be invoked while the cursor is on the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3394
     * row; many methods throw an exception if they are called while the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3395
     * cursor is there.  In addition to the <code>updateXXX</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3396
     * and <code>insertRow</code> methods, only the <code>getXXX</code> methods
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3397
     * may be called when the cursor is on the insert row.  A <code>getXXX</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3398
     * method should be called on a column only after an <code>updateXXX</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3399
     * method has been called on that column; otherwise, the value returned is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3400
     * undetermined.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3401
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3402
     * @throws SQLException if this <code>JoinRowSetImpl</code> object is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3403
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3404
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3405
    public void moveToInsertRow() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3406
        crsInternal.moveToInsertRow();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3407
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3408
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3409
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3410
     * Moves the cursor for this <code>JoinRowSetImpl</code> object to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3411
     * the current row.  The current row is the row the cursor was on
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3412
     * when the method <code>moveToInsertRow</code> was called.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3413
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3414
     * Calling this method has no effect unless it is called while the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3415
     * cursor is on the insert row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3416
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3417
     * @throws SQLException if an error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3418
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3419
    public void moveToCurrentRow() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3420
        crsInternal.moveToCurrentRow();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3421
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3422
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3423
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3424
     * Returns <code>null</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3425
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3426
     * @return <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3427
     * @throws SQLException if an error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3428
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3429
    public Statement getStatement() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3430
        return crsInternal.getStatement();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3431
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3432
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3433
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3434
     * Retrieves the value of the designated column in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3435
     * <code>JoinRowSetImpl</code> object as a <code>Ref</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3436
     * in the Java programming lanugage.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3437
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3438
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3439
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3440
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3441
     * @return a <code>Ref</code> object representing an SQL<code> REF</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3442
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3443
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3444
     *            insert row, or (3) the designated column does not store an
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3445
     *            SQL <code>REF</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3446
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3447
    public Ref getRef(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3448
        return crsInternal.getRef(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3449
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3450
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3451
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3452
     * Retrieves the value of the designated column in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3453
     * <code>JoinRowSetImpl</code> object as a <code>Blob</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3454
     * in the Java programming lanugage.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3455
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3456
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3457
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3458
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3459
     * @return a <code>Blob</code> object representing an SQL <code>BLOB</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3460
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3461
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3462
     *            insert row, or (3) the designated column does not store an
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3463
     *            SQL <code>BLOB</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3464
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3465
    public Blob getBlob(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3466
        return crsInternal.getBlob(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3467
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3468
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3469
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3470
     * Retrieves the value of the designated column in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3471
     * <code>JoinRowSetImpl</code> object as a <code>Clob</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3472
     * in the Java programming lanugage.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3473
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3474
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3475
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3476
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3477
     * @return a <code>Clob</code> object representing an SQL <code>CLOB</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3478
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3479
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3480
     *            insert row, or (3) the designated column does not store an
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3481
     *            SQL <code>CLOB</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3482
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3483
    public Clob getClob(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3484
        return crsInternal.getClob(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3485
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3486
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3487
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3488
     * Retrieves the value of the designated column in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3489
     * <code>JoinRowSetImpl</code> object as an <code>Array</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3490
     * in the Java programming lanugage.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3491
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3492
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3493
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3494
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3495
     * @return an <code>Array</code> object representing an SQL
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3496
     *         <code>ARRAY</code> 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) the designated column does not store an
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3500
     *            SQL <code>ARRAY</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3501
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3502
     public Array getArray(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3503
        return crsInternal.getArray(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3504
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3505
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3506
    // ColumnName
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3507
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3508
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3509
     * Retrieves the value of the designated column in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3510
     * <code>JoinRowSetImpl</code> object as a <code>Ref</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3511
     * in the Java programming lanugage.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3512
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3513
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3514
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3515
     * @return a <code>Ref</code> object representing an SQL<code> REF</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3516
     * @throws SQLException  if (1) the given column name is not the name
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3517
     *         of a column in this rowset, (2) the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3518
     *         this rowset's rows or its insert row, or (3) the column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3519
     *         is not an SQL <code>REF</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3520
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3521
    public Ref getRef(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3522
        return crsInternal.getRef(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3523
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3524
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3525
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3526
     * Retrieves the value of the designated column in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3527
     * <code>JoinRowSetImpl</code> object as a <code>Blob</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3528
     * in the Java programming lanugage.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3529
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3530
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3531
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3532
     * @return a <code>Blob</code> object representing an SQL
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3533
     *        <code>BLOB</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3534
     * @throws SQLException if (1) the given column name is not the name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3535
     *        a column in this rowset, (2) the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3536
     *        this rowset's rows or its insert row, or (3) the designated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3537
     *        column does not store an SQL <code>BLOB</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3538
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3539
    public Blob getBlob(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3540
        return crsInternal.getBlob(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3541
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3542
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3543
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3544
     * Retrieves the value of the designated column in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3545
     * <code>JoinRowSetImpl</code> object as a <code>Clob</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3546
     * in the Java programming lanugage.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3547
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3548
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3549
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3550
     * @return a <code>Clob</code> object representing an SQL
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3551
     *         <code>CLOB</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3552
     * @throws SQLException if (1) the given column name is not the name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3553
     *            a column in this rowset, (2) the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3554
     *            this rowset's rows or its insert row, or (3) the designated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3555
     *            column does not store an SQL <code>CLOB</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3556
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3557
    public Clob getClob(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3558
        return crsInternal.getClob(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3559
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3560
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3561
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3562
     * Retrieves the value of the designated column in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3563
     * <code>JoinRowSetImpl</code> object as an <code>Array</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3564
     * in the Java programming lanugage.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3565
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3566
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3567
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3568
     * @return an <code>Array</code> object representing an SQL
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3569
     *        <code>ARRAY</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3570
     * @throws SQLException if (1) the given column name is not the name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3571
     *        a column in this rowset, (2) the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3572
     *        this rowset's rows or its insert row, or (3) the designated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3573
     *        column does not store an SQL <code>ARRAY</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3574
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3575
    public Array getArray(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3576
        return crsInternal.getArray(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3577
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3578
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3579
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3580
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3581
     * of this <code>JoinRowSetImpl</code> object as a <code>java.sql.Date</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3582
     * object, using the given <code>Calendar</code> object to construct an
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3583
     * appropriate millisecond value for the date.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3584
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3585
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3586
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3587
     *        and equal to or less than the number of columns in the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3588
     * @param cal the <code>java.util.Calendar</code> object to use in
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3589
     *            constructing the date
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3590
     * @return the column value; if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3591
     *         the result is <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3592
     * @throws SQLException if (1) the given column name is not the name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3593
     *            a column in this rowset, (2) the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3594
     *            this rowset's rows or its insert row, or (3) the designated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3595
     *            column does not store an SQL <code>DATE</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3596
     *            <code>TIMESTAMP</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3597
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3598
    public java.sql.Date getDate(int columnIndex, Calendar cal) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3599
        return crsInternal.getDate(columnIndex, cal);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3600
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3601
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3602
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3603
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3604
     * of this <code>JoinRowSetImpl</code> object as a <code>java.sql.Date</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3605
     * object, using the given <code>Calendar</code> object to construct an
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3606
     * appropriate millisecond value for the date.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3607
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3608
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3609
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3610
     * @param cal the <code>java.util.Calendar</code> object to use in
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3611
     *            constructing the date
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3612
     * @return the column value; if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3613
     *         the result is <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3614
     * @throws SQLException if (1) the given column name is not the name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3615
     *            a column in this rowset, (2) the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3616
     *            this rowset's rows or its insert row, or (3) the designated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3617
     *            column does not store an SQL <code>DATE</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3618
     *            <code>TIMESTAMP</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3619
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3620
    public java.sql.Date getDate(String columnName, Calendar cal) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3621
        return crsInternal.getDate(columnName, cal);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3622
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3623
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3624
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3625
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3626
     * of this <code>JoinRowSetImpl</code> object as a <code>java.sql.Time</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3627
     * object, using the given <code>Calendar</code> object to construct an
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3628
     * appropriate millisecond value for the date.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3629
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3630
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3631
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3632
     *        and equal to or less than the number of columns in the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3633
     * @param cal the <code>java.util.Calendar</code> object to use in
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3634
     *            constructing the date
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3635
     * @return the column value; if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3636
     *         the result is <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3637
     * @throws SQLException if (1) the given column name is not the name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3638
     *            a column in this rowset, (2) the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3639
     *            this rowset's rows or its insert row, or (3) the designated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3640
     *            column does not store an SQL <code>TIME</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3641
     *            <code>TIMESTAMP</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3642
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3643
    public java.sql.Time getTime(int columnIndex, Calendar cal) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3644
        return crsInternal.getTime(columnIndex, cal);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3645
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3646
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3647
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3648
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3649
     * of this <code>JoinRowSetImpl</code> object as a <code>java.sql.Time</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3650
     * object, using the given <code>Calendar</code> object to construct an
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3651
     * appropriate millisecond value for the date.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3652
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3653
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3654
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3655
     * @param cal the <code>java.util.Calendar</code> object to use in
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3656
     *            constructing the date
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3657
     * @return the column value; if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3658
     *         the result is <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3659
     * @throws SQLException if (1) the given column name is not the name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3660
     *            a column in this rowset, (2) the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3661
     *            this rowset's rows or its insert row, or (3) the designated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3662
     *            column does not store an SQL <code>TIME</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3663
     *            <code>TIMESTAMP</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3664
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3665
    public java.sql.Time getTime(String columnName, Calendar cal) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3666
        return crsInternal.getTime(columnName, cal);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3667
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3668
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3669
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3670
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3671
     * of this <code>JoinRowSetImpl</code> object as a <code>java.sql.Timestamp</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3672
     * object, using the given <code>Calendar</code> object to construct an
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3673
     * appropriate millisecond value for the date.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3674
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3675
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3676
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3677
     *        and equal to or less than the number of columns in the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3678
     * @param cal the <code>java.util.Calendar</code> object to use in
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3679
     *            constructing the date
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3680
     * @return the column value; if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3681
     *         the result is <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3682
     * @throws SQLException if (1) the given column name is not the name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3683
     *            a column in this rowset, (2) the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3684
     *            this rowset's rows or its insert row, or (3) the designated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3685
     *            column does not store an SQL <code>TIME</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3686
     *            <code>TIMESTAMP</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3687
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3688
    public java.sql.Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3689
        return crsInternal.getTimestamp(columnIndex, cal);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3690
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3691
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3692
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3693
     * Retrieves the value of the designated column in the current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3694
     * of this <code>JoinRowSetImpl</code> object as a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3695
     * <code>java.sql.Timestamp</code> object, using the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3696
     * <code>Calendar</code> object to construct an appropriate
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3697
     * millisecond value for the date.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3698
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3699
     * @param columnName a <code>String</code> object that must match the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3700
     *        SQL name of a column in this rowset, ignoring case
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3701
     * @param cal the <code>java.util.Calendar</code> object to use in
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3702
     *            constructing the date
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3703
     * @return the column value; if the value is SQL <code>NULL</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3704
     *         the result is <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3705
     * @throws SQLException if (1) the given column name is not the name of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3706
     *            a column in this rowset, (2) the cursor is not on one of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3707
     *            this rowset's rows or its insert row, or (3) the designated
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3708
     *            column does not store an SQL <code>DATE</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3709
     *            <code>TIME</code>, or <code>TIMESTAMP</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3710
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3711
    public java.sql.Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3712
        return crsInternal.getTimestamp(columnName, cal);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3713
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3714
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3715
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3716
    * Sets the metadata for this <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3717
    * with the given <code>RowSetMetaData</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3718
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3719
    * @param md a <code>RowSetMetaData</code> object instance containing
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3720
    *            metadata about the columsn in the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3721
    * @throws SQLException if invalid meta data is supplied to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3722
    *            rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3723
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3724
    public void setMetaData(RowSetMetaData md) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3725
        crsInternal.setMetaData(md);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3726
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3727
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3728
    public ResultSet getOriginal() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3729
        return crsInternal.getOriginal();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3730
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3731
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3732
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3733
    * Returns a result set containing the original value of the rowset.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3734
    * The cursor is positioned before the first row in the result set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3735
    * Only rows contained in the result set returned by getOriginal()
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3736
    * are said to have an original value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3737
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3738
    * @return the original result set of the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3739
    * @throws SQLException if an error occurs produce the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3740
    *           <code>ResultSet</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3741
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3742
    public ResultSet getOriginalRow() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3743
        return crsInternal.getOriginalRow();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3744
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3745
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3746
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3747
    * Returns a result set containing the original value of the current
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3748
    * row only.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3749
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3750
    * @throws SQLException if there is no current row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3751
    * @see #setOriginalRow
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3752
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3753
    public void setOriginalRow() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3754
        crsInternal.setOriginalRow();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3755
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3756
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3757
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3758
    * Returns the columns that make a key to uniquely identify a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3759
    * row in this <code>JoinRowSetImpl</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3760
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3761
    * @return an array of column number that constites a primary
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3762
    *           key for this rowset. This array should be empty
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3763
    *           if no columns is representitive of a primary key
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3764
    * @throws SQLException if the rowset is empty or no columns
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3765
    *           are designated as primary keys
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3766
    * @see #setKeyColumns
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3767
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3768
    public int[] getKeyColumns() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3769
        return crsInternal.getKeyColumns();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3770
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3771
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3772
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3773
     * Sets this <code>JoinRowSetImpl</code> object's
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3774
     * <code>keyCols</code> field with the given array of column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3775
     * numbers, which forms a key for uniquely identifying a row
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3776
     * in this rowset.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3777
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3778
     * @param cols an array of <code>int</code> indicating the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3779
     *        columns that form a primary key for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3780
     *        <code>JoinRowSetImpl</code> object; every
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3781
     *        element in the array must be greater than
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3782
     *        <code>0</code> and less than or equal to the number
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3783
     *        of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3784
     * @throws SQLException if any of the numbers in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3785
     *            given array is not valid for this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3786
     * @see #getKeyColumns
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3787
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3788
    public void setKeyColumns(int[] cols) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3789
        crsInternal.setKeyColumns(cols);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3790
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3791
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3792
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3793
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3794
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3795
     * <code>Ref</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3796
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3797
     * This method updates a column value in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3798
     * row of this rowset, but it does not update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3799
     * If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3800
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3801
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3802
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3803
     * and the database. Either of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3804
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3805
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3806
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3807
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3808
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3809
     * @param ref the <code>java.sql.Ref</code> object that will be set as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3810
     *         the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3811
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3812
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3813
     *            insert row, or (3) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3814
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3815
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3816
    public void updateRef(int columnIndex, java.sql.Ref ref) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3817
        crsInternal.updateRef(columnIndex, ref);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3818
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3819
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3820
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3821
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3822
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3823
     * <code>Ref</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3824
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3825
     * This method updates a column value in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3826
     * row of this rowset, but it does not update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3827
     * If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3828
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3829
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3830
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3831
     * and the database. Either of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3832
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3833
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3834
     * @param columnName a <code>String</code> object giving the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3835
     *        to be updated; must match one of the column names in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3836
     *        <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3837
     * @param ref the <code>java.sql.Ref</code> object that will be set as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3838
     *         the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3839
     * @throws SQLException if (1) the given column name is not valid,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3840
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3841
     *            insert row, or (3) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3842
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3843
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3844
    public void updateRef(String columnName, java.sql.Ref ref) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3845
        crsInternal.updateRef(columnName, ref);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3846
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3847
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3848
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3849
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3850
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3851
     * <code>Clob</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3852
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3853
     * This method updates a column value in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3854
     * row of this rowset, but it does not update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3855
     * If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3856
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3857
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3858
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3859
     * and the database. Either of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3860
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3861
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3862
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3863
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3864
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3865
     * @param c the <code>java.sql.Clob</code> object that will be set as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3866
     *         the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3867
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3868
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3869
     *            insert row, or (3) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3870
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3871
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3872
    public void updateClob(int columnIndex, Clob c) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3873
        crsInternal.updateClob(columnIndex, c);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3874
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3875
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3876
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3877
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3878
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3879
     * <code>Clob</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3880
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3881
     * This method updates a column value in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3882
     * row of this rowset, but it does not update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3883
     * If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3884
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3885
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3886
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3887
     * and the database. Either of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3888
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3889
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3890
     * @param columnName a <code>String</code> object giving the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3891
     *        to be updated; must match one of the column names in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3892
     *        <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3893
     * @param c the <code>java.sql.Clob</code> object that will be set as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3894
     *         the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3895
     * @throws SQLException if (1) the given column name is not valid,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3896
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3897
     *            insert row, or (3) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3898
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3899
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3900
    public void updateClob(String columnName, Clob c) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3901
        crsInternal.updateClob(columnName, c);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3902
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3903
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3904
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3905
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3906
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3907
     * <code>Blob</code> value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3908
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3909
     * This method updates a column value in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3910
     * row of this rowset, but it does not update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3911
     * If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3912
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3913
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3914
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3915
     * and the database. Either of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3916
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3917
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3918
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3919
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3920
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3921
     * @param b the <code>java.sql.Blob</code> object that will be set as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3922
     *         the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3923
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3924
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3925
     *            insert row, or (3) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3926
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3927
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3928
    public void updateBlob(int columnIndex, Blob b) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3929
         crsInternal.updateBlob(columnIndex, b);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3930
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3931
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3932
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3933
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3934
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3935
     * <code>Blob</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3936
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3937
     * This method updates a column value in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3938
     * row of this rowset, but it does not update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3939
     * If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3940
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3941
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3942
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3943
     * and the database. Either of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3944
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3945
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3946
     * @param columnName a <code>String</code> object giving the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3947
     *        to be updated; must match one of the column names in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3948
     *        <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3949
     * @param b the <code>java.sql.Blob</code> object that will be set as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3950
     *         the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3951
     * @throws SQLException if (1) the given column name is not valid,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3952
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3953
     *            insert row, or (3) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3954
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3955
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3956
    public void updateBlob(String columnName, Blob b) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3957
         crsInternal.updateBlob(columnName, b);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3958
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3959
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3960
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3961
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3962
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3963
     * <code>Array</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3964
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3965
     * This method updates a column value in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3966
     * row of this rowset, but it does not update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3967
     * If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3968
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3969
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3970
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3971
     * and the database. Either of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3972
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3973
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3974
     * @param columnIndex the first column is <code>1</code>, the second
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3975
     *        is <code>2</code>, and so on; must be <code>1</code> or larger
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3976
     *        and equal to or less than the number of columns in this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3977
     * @param a the <code>java.sql.Array</code> object that will be set as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3978
     *         the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3979
     * @throws SQLException if (1) the given column index is out of bounds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3980
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3981
     *            insert row, or (3) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3982
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3983
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3984
    public void updateArray(int columnIndex, Array a) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3985
         crsInternal.updateArray(columnIndex, a);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3986
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3987
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3988
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3989
     * Sets the designated column in either the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3990
     * row of this <code>JoinRowSetImpl</code> object with the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3991
     * <code>Array</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3992
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3993
     * This method updates a column value in the current row or the insert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3994
     * row of this rowset, but it does not update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3995
     * If the cursor is on a row in the rowset, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3996
     * method {@link #updateRow} must be called to update the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3997
     * If the cursor is on the insert row, the method {@link #insertRow}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3998
     * must be called, which will insert the new row into both this rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  3999
     * and the database. Either of these methods must be called before the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4000
     * cursor moves to another row.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4001
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4002
     * @param columnName a <code>String</code> object giving the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4003
     *        to be updated; must match one of the column names in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4004
     *        <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4005
     * @param a the <code>java.sql.Array</code> object that will be set as
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4006
     *         the new column value
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4007
     * @throws SQLException if (1) the given column name is not valid,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4008
     *            (2) the cursor is not on one of this rowset's rows or its
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4009
     *            insert row, or (3) this rowset is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4010
     *            <code>ResultSet.CONCUR_READ_ONLY</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4011
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4012
    public void updateArray(String columnName, Array a) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4013
         crsInternal.updateArray(columnName, a);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4014
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4015
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4016
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4017
     * Populates this <code>JoinRowSetImpl</code> object with data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4018
     * This form of the method uses the rowset's user, password, and url or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4019
     * data source name properties to create a database
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4020
     * connection.  If properties that are needed
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4021
     * have not been set, this method will throw an exception.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4022
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4023
     * Another form of this method uses an existing JDBC <code>Connection</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4024
     * object instead of creating a new one; therefore, it ignores the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4025
     * properties used for establishing a new connection.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4026
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4027
     * The query specified by the command property is executed to create a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4028
     * <code>ResultSet</code> object from which to retrieve data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4029
     * The current contents of the rowset are discarded, and the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4030
     * rowset's metadata is also (re)set.  If there are outstanding updates,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4031
     * they are also ignored.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4032
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4033
     * The method <code>execute</code> closes any database connections that it
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4034
     * creates.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4035
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4036
     * @throws SQLException if an error occurs or the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4037
     *                         necessary properties have not been set
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4038
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4039
    public void execute() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4040
        crsInternal.execute();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4041
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4042
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4043
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4044
     * Populates this <code>JoinRowSetImpl</code> object with data,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4045
     * using the given connection to produce the result set from
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4046
     * which data will be read.  A second form of this method,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4047
     * which takes no arguments, uses the values from this rowset's
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4048
     * user, password, and either url or data source properties to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4049
     * create a new database connection. The form of <code>execute</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4050
     * that is given a connection ignores these properties.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4051
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4052
     *  @param conn A standard JDBC <code>Connection</code> object with valid
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4053
     *           properties that the <code>JoinRowSet</code> implementation
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4054
     *           can pass to a synchronization provider to establish a
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4055
     *           connection to the datasource
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4056
     * @throws SQLException if an invalid <code>Connection</code> is supplied
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4057
     *           or an error occurs in establishing the connection to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4058
     *           data soure
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4059
     * @see java.sql.Connection
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4060
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4061
    public void execute(Connection conn) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4062
        crsInternal.execute(conn);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4063
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4064
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4065
    /**
30655
d83f50188ca9 8080422: some docs cleanup for core libs
avstepan
parents: 28059
diff changeset
  4066
     * Provide interface coverage for getURL(int) in
d83f50188ca9 8080422: some docs cleanup for core libs
avstepan
parents: 28059
diff changeset
  4067
     * ResultSet{@literal ->}RowSet
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4068
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4069
    public java.net.URL getURL(int columnIndex) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4070
        return crsInternal.getURL(columnIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4071
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4072
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4073
    /**
30655
d83f50188ca9 8080422: some docs cleanup for core libs
avstepan
parents: 28059
diff changeset
  4074
     * Provide interface coverage for getURL(String) in
d83f50188ca9 8080422: some docs cleanup for core libs
avstepan
parents: 28059
diff changeset
  4075
     * ResultSet{@literal ->}RowSet
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4076
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4077
    public java.net.URL getURL(String columnName) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4078
        return crsInternal.getURL(columnName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4079
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4080
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4081
   /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4082
    * Creates a new <code>WebRowSet</code> object, populates it with the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4083
    * data in the given <code>ResultSet</code> object, and writes it
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4084
    * to the given <code>java.io.Writer</code> object in XML format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4085
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4086
    * @throws SQLException if an error occurs writing out the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4087
    *          contents to XML
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4088
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4089
    public void writeXml(ResultSet rs, java.io.Writer writer)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4090
        throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4091
             wrs = new WebRowSetImpl();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4092
             wrs.populate(rs);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4093
             wrs.writeXml(writer);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4094
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4095
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4096
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4097
     * Writes this <code>JoinRowSet</code> object to the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4098
     * <code>java.io.Writer</code> object in XML format. In
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4099
     * addition to the rowset's data, its properties and metadata
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4100
     * are also included.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4101
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4102
     * @throws SQLException if an error occurs writing out the rowset
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4103
     *          contents to XML
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4104
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4105
    public void writeXml(java.io.Writer writer) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4106
        createWebRowSet().writeXml(writer);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4107
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4108
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4109
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4110
     * Reads this <code>JoinRowSet</code> object in its XML format.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4111
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4112
     * @throws SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4113
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4114
    public void readXml(java.io.Reader reader) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4115
        wrs = new WebRowSetImpl();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4116
        wrs.readXml(reader);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4117
        crsInternal = (CachedRowSetImpl)wrs;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4118
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4119
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4120
    // Stream based methods
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4121
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4122
     * Reads a stream based XML input to populate an <code>WebRowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4123
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4124
     * @throws SQLException if a data source access occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4125
     * @throws IOException if a IO exception occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4126
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4127
    public void readXml(java.io.InputStream iStream) throws SQLException, IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4128
         wrs = new WebRowSetImpl();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4129
         wrs.readXml(iStream);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4130
         crsInternal = (CachedRowSetImpl)wrs;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4131
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4132
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4133
    /**
28059
e576535359cc 8067377: My hobby: caning, then then canning, the the can-can
martin
parents: 25859
diff changeset
  4134
     * Creates an output stream of the internal state and contents of a
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4135
     * <code>WebRowSet</code> for XML proceessing
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4136
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4137
     * @throws SQLException if a datasource access occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4138
     * @throws IOException if an IO exception occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4139
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4140
    public void writeXml(java.io.OutputStream oStream) throws SQLException, IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4141
         createWebRowSet().writeXml(oStream);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4142
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4143
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4144
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4145
     * Creates a new <code>WebRowSet</code> object, populates it with
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4146
     * the contents of the <code>ResultSet</code> and creates an output
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4147
     * streams the internal state and contents of the rowset for XML processing.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4148
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4149
     * @throws SQLException if a datasource access occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4150
     * @throws IOException if an IO exception occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4151
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4152
    public void writeXml(ResultSet rs, java.io.OutputStream oStream) throws SQLException, IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4153
             wrs = new WebRowSetImpl();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4154
             wrs.populate(rs);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4155
             wrs.writeXml(oStream);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4156
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4157
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4158
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4159
     * %%% Javadoc comments to be added here
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4160
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4161
    private WebRowSet createWebRowSet() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4162
       if(wrs != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4163
           // check if it has already been initialized.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4164
           return wrs;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4165
       } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4166
         wrs = new WebRowSetImpl();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4167
          crsInternal.beforeFirst();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4168
          wrs.populate(crsInternal);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4169
          return wrs;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4170
       }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4171
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4172
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4173
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4174
     * Returns the last set SQL <code>JOIN</code> type in this JoinRowSetImpl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4175
     * object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4176
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4177
     * @return joinType One of the standard JoinRowSet static field JOIN types
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4178
     * @throws SQLException if an error occurs determining the current join type
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4179
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4180
    public int getJoinType() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4181
        if (vecJoinType == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4182
            // Default JoinRowSet type
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4183
            this.setJoinType(JoinRowSet.INNER_JOIN);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4184
        }
11129
f9ad1aadf3fa 7116445: Miscellaneous warnings in the JDBC/RowSet classes
lancea
parents: 9257
diff changeset
  4185
        Integer i = vecJoinType.get(vecJoinType.size()-1);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4186
        return i.intValue();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4187
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4188
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4189
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4190
    * The listener will be notified whenever an event occurs on this <code>JoinRowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4191
    * object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4192
    * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4193
    * A listener might, for example, be a table or graph that needs to
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4194
    * be updated in order to accurately reflect the current state of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4195
    * the <code>RowSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4196
    * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4197
    * <b>Note</b>: if the <code>RowSetListener</code> object is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4198
    * <code>null</code>, this method silently discards the <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4199
    * value and does not add a null reference to the set of listeners.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4200
    * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4201
    * <b>Note</b>: if the listener is already set, and the new <code>RowSetListerner</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4202
    * instance is added to the set of listeners already registered to receive
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4203
    * event notifications from this <code>RowSet</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4204
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4205
    * @param listener an object that has implemented the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4206
    *     <code>javax.sql.RowSetListener</code> interface and wants to be notified
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4207
    *     of any events that occur on this <code>JoinRowSet</code> object; May be
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4208
    *     null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4209
    * @see #removeRowSetListener
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4210
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4211
    public void addRowSetListener(RowSetListener listener) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4212
        crsInternal.addRowSetListener(listener);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4213
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4214
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4215
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4216
    * Removes the designated object from this <code>JoinRowSet</code> object's list of listeners.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4217
    * If the given argument is not a registered listener, this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4218
    * does nothing.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4219
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4220
    *  <b>Note</b>: if the <code>RowSetListener</code> object is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4221
    * <code>null</code>, this method silently discards the <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4222
    * value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4223
    *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4224
    * @param listener a <code>RowSetListener</code> object that is on the list
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4225
    *        of listeners for this <code>JoinRowSet</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4226
    * @see #addRowSetListener
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4227
    */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4228
     public void removeRowSetListener(RowSetListener listener) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4229
        crsInternal.removeRowSetListener(listener);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4230
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4231
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4232
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4233
     * Converts this <code>JoinRowSetImpl</code> object to a collection
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4234
     * of tables. The sample implementation utilitizes the <code>TreeMap</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4235
     * collection type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4236
     * This class guarantees that the map will be in ascending key order,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4237
     * sorted according to the natural order for the key's class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4238
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4239
     * @return a <code>Collection</code> object consisting of tables,
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4240
     *         each of which is a copy of a row in this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4241
     *         <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4242
     * @throws SQLException if an error occurs in generating the collection
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4243
     * @see #toCollection(int)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4244
     * @see #toCollection(String)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4245
     * @see java.util.TreeMap
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4246
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4247
     public Collection<?> toCollection() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4248
        return crsInternal.toCollection();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4249
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4250
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4251
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4252
     * Returns the specified column of this <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4253
     * as a <code>Collection</code> object.  This method makes a copy of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4254
     * column's data and utilitizes the <code>Vector</code> to establish the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4255
     * collection. The <code>Vector</code> class implements a growable array
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4256
     * objects allowing the individual components to be accessed using an
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4257
     * an integer index similar to that of an array.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4258
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4259
     * @return a <code>Collection</code> object that contains the value(s)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4260
     *         stored in the specified column of this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4261
     *         <code>JoinRowSetImpl</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4262
     *         object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4263
     * @throws SQLException if an error occurs generated the collection; or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4264
     *          an invalid column is provided.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4265
     * @see #toCollection()
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4266
     * @see #toCollection(String)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4267
     * @see java.util.Vector
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4268
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4269
    public Collection<?> toCollection(int column) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4270
        return crsInternal.toCollection(column);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4271
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4272
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4273
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4274
     * Returns the specified column of this <code>JoinRowSetImpl</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4275
     * as a <code>Collection</code> object.  This method makes a copy of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4276
     * column's data and utilitizes the <code>Vector</code> to establish the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4277
     * collection. The <code>Vector</code> class implements a growable array
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4278
     * objects allowing the individual components to be accessed using an
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4279
     * an integer index similar to that of an array.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4280
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4281
     * @return a <code>Collection</code> object that contains the value(s)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4282
     *         stored in the specified column of this
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4283
     *         <code>JoinRowSetImpl</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4284
     *         object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4285
     * @throws SQLException if an error occurs generated the collection; or
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4286
     *          an invalid column is provided.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4287
     * @see #toCollection()
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4288
     * @see #toCollection(int)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4289
     * @see java.util.Vector
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4290
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4291
    public Collection<?> toCollection(String column) throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4292
        return crsInternal.toCollection(column);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4293
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4294
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4295
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4296
     * Creates a <code>RowSet</code> object that is a copy of
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4297
     * this <code>JoinRowSetImpl</code> object's table structure
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4298
     * and the constraints only.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4299
     * There will be no data in the object being returned.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4300
     * Updates made on a copy are not visible to the original rowset.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4301
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4302
     * This helps in getting the underlying XML schema which can
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4303
     * be used as the basis for populating a <code>WebRowSet</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4304
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4305
     * @return a new <code>CachedRowSet</code> object that is a copy
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4306
     * of this <code>JoinRowSetImpl</code> object's schema and
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4307
     * retains all the constraints on the original rowset but contains
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4308
     * no data
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4309
     * @throws SQLException if an error occurs in generating the copy
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4310
     * of the <code>CachedRowSet</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4311
     * @see #createShared
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4312
     * @see #createCopy
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4313
     * @see #createCopyNoConstraints
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4314
     * @see javax.sql.RowSetEvent
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4315
     * @see javax.sql.RowSetListener
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4316
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4317
     public CachedRowSet createCopySchema() throws SQLException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4318
         return crsInternal.createCopySchema();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4319
     }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4320
6665
dcdc89306375 6984864: Exception when running acceptChanges with custom SyncProvider
lancea
parents: 6530
diff changeset
  4321
     /**
dcdc89306375 6984864: Exception when running acceptChanges with custom SyncProvider
lancea
parents: 6530
diff changeset
  4322
      * {@inheritDoc}
dcdc89306375 6984864: Exception when running acceptChanges with custom SyncProvider
lancea
parents: 6530
diff changeset
  4323
      */
dcdc89306375 6984864: Exception when running acceptChanges with custom SyncProvider
lancea
parents: 6530
diff changeset
  4324
     public void setSyncProvider(String providerStr) throws SQLException {
dcdc89306375 6984864: Exception when running acceptChanges with custom SyncProvider
lancea
parents: 6530
diff changeset
  4325
         crsInternal.setSyncProvider(providerStr);
dcdc89306375 6984864: Exception when running acceptChanges with custom SyncProvider
lancea
parents: 6530
diff changeset
  4326
     }
dcdc89306375 6984864: Exception when running acceptChanges with custom SyncProvider
lancea
parents: 6530
diff changeset
  4327
dcdc89306375 6984864: Exception when running acceptChanges with custom SyncProvider
lancea
parents: 6530
diff changeset
  4328
     /**
dcdc89306375 6984864: Exception when running acceptChanges with custom SyncProvider
lancea
parents: 6530
diff changeset
  4329
      * {@inheritDoc}
dcdc89306375 6984864: Exception when running acceptChanges with custom SyncProvider
lancea
parents: 6530
diff changeset
  4330
      */
dcdc89306375 6984864: Exception when running acceptChanges with custom SyncProvider
lancea
parents: 6530
diff changeset
  4331
     public void acceptChanges() throws SyncProviderException {
dcdc89306375 6984864: Exception when running acceptChanges with custom SyncProvider
lancea
parents: 6530
diff changeset
  4332
         crsInternal.acceptChanges();
dcdc89306375 6984864: Exception when running acceptChanges with custom SyncProvider
lancea
parents: 6530
diff changeset
  4333
     }
dcdc89306375 6984864: Exception when running acceptChanges with custom SyncProvider
lancea
parents: 6530
diff changeset
  4334
dcdc89306375 6984864: Exception when running acceptChanges with custom SyncProvider
lancea
parents: 6530
diff changeset
  4335
     /**
dcdc89306375 6984864: Exception when running acceptChanges with custom SyncProvider
lancea
parents: 6530
diff changeset
  4336
      * {@inheritDoc}
dcdc89306375 6984864: Exception when running acceptChanges with custom SyncProvider
lancea
parents: 6530
diff changeset
  4337
      */
dcdc89306375 6984864: Exception when running acceptChanges with custom SyncProvider
lancea
parents: 6530
diff changeset
  4338
     public SyncProvider getSyncProvider() throws SQLException {
dcdc89306375 6984864: Exception when running acceptChanges with custom SyncProvider
lancea
parents: 6530
diff changeset
  4339
        return crsInternal.getSyncProvider();
dcdc89306375 6984864: Exception when running acceptChanges with custom SyncProvider
lancea
parents: 6530
diff changeset
  4340
     }
dcdc89306375 6984864: Exception when running acceptChanges with custom SyncProvider
lancea
parents: 6530
diff changeset
  4341
6530
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4342
    /**
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4343
     * This method re populates the resBundle
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4344
     * during the deserialization process
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4345
     *
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4346
     */
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4347
     private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4348
        // Default state initialization happens here
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4349
        ois.defaultReadObject();
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4350
        // Initialization of transient Res Bundle happens here .
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4351
        try {
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4352
           resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4353
        } catch(IOException ioe) {
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4354
            throw new RuntimeException(ioe);
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4355
        }
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4356
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4357
     }
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4358
bfb7b294dd14 6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents: 5506
diff changeset
  4359
     static final long serialVersionUID = -5590501621560008453L;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  4360
}