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