src/java.sql.rowset/share/classes/javax/sql/rowset/Joinable.java
author lancea
Wed, 13 Mar 2019 14:10:18 -0400
changeset 54106 9a90236ab64c
parent 47216 71c04702a3d5
permissions -rw-r--r--
8220253: Fix Headings in java.sql.rowset Reviewed-by: darcy
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
54106
9a90236ab64c 8220253: Fix Headings in java.sql.rowset
lancea
parents: 47216
diff changeset
     2
 * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package javax.sql.rowset;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.sql.SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
/**
54106
9a90236ab64c 8220253: Fix Headings in java.sql.rowset
lancea
parents: 47216
diff changeset
    31
 * <h2>1.0 Background</h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * The <code>Joinable</code> interface provides the methods for getting and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * setting a match column, which is the basis for forming the SQL <code>JOIN</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * formed by adding <code>RowSet</code> objects to a <code>JoinRowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * Any standard <code>RowSet</code> implementation <b>may</b> implement
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 * the <code>Joinable</code> interface in order to be
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 * added to a <code>JoinRowSet</code> object. Implementing this interface gives
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 * a <code>RowSet</code> object the ability to use <code>Joinable</code> methods,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * which set, retrieve, and get information about match columns.  An
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * application may add a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * <code>RowSet</code> object that has not implemented the <code>Joinable</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * interface to a <code>JoinRowSet</code> object, but to do so it must use one
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 * of the <code>JoinRowSet.addRowSet</code> methods that takes both a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 * <code>RowSet</code> object and a match column or an array of <code>RowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 * objects and an array of match columns.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 * To get access to the methods in the <code>Joinable</code> interface, a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * <code>RowSet</code> object implements at least one of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 * five standard <code>RowSet</code> interfaces and also implements the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 * <code>Joinable</code> interface.  In addition, most <code>RowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 * objects extend the <code>BaseRowSet</code> class.  For example:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 * <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 *     class MyRowSetImpl extends BaseRowSet implements CachedRowSet, Joinable {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 *         :
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 *         :
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
 *     }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
 * </pre>
20880
1b610151b316 8026812: doclint clean up for java.sql and javax.sql
lancea
parents: 18564
diff changeset
    60
 *
54106
9a90236ab64c 8220253: Fix Headings in java.sql.rowset
lancea
parents: 47216
diff changeset
    61
 * <h2>2.0 Usage Guidelines</h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
 * The methods in the <code>Joinable</code> interface allow a <code>RowSet</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
 * to set a match column, retrieve a match column, or unset a match column, which is
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
 * the column upon which an SQL <code>JOIN</code> can be based.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
 * An instance of a class that implements these methods can be added to a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
 * <code>JoinRowSet</code> object to allow an SQL <code>JOIN</code> relationship to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
 *  be established.
20880
1b610151b316 8026812: doclint clean up for java.sql and javax.sql
lancea
parents: 18564
diff changeset
    69
 *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
 * <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
 *     CachedRowSet crs = new MyRowSetImpl();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
 *     crs.populate((ResultSet)rs);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
 *     (Joinable)crs.setMatchColumnIndex(1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
 *     JoinRowSet jrs = new JoinRowSetImpl();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
 *     jrs.addRowSet(crs);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
 * </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
 * In the previous example, <i>crs</i> is a <code>CachedRowSet</code> object that
21278
ef8a3a2a72f2 8022746: List of spelling errors in API doc
malenkov
parents: 20880
diff changeset
    79
 * has implemented the <code>Joinable</code> interface.  In the following example,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
 * <i>crs2</i> has not, so it must supply the match column as an argument to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
 * <code>addRowSet</code> method. This example assumes that column 1 is the match
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
 * column.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
 * <PRE>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
 *     CachedRowSet crs2 = new MyRowSetImpl();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
 *     crs2.populate((ResultSet)rs);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
 *     JoinRowSet jrs2 = new JoinRowSetImpl();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
 *     jrs2.addRowSet(crs2, 1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
 * </PRE>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
 * The <code>JoinRowSet</code> interface makes it possible to get data from one or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
 * more <code>RowSet</code> objects consolidated into one table without having to incur
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
 * the expense of creating a connection to a database. It is therefore ideally suited
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
 * for use by disconnected <code>RowSet</code> objects. Nevertheless, any
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
 * <code>RowSet</code> object <b>may</b> implement this interface
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
 * regardless of whether it is connected or disconnected. Note that a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
 * <code>JdbcRowSet</code> object, being always connected to its data source, can
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
 * become part of an SQL <code>JOIN</code> directly without having to become part
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
 * of a <code>JoinRowSet</code> object.
20880
1b610151b316 8026812: doclint clean up for java.sql and javax.sql
lancea
parents: 18564
diff changeset
   100
 *
54106
9a90236ab64c 8220253: Fix Headings in java.sql.rowset
lancea
parents: 47216
diff changeset
   101
 * <h2>3.0 Managing Multiple Match Columns</h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
 * The index array passed into the <code>setMatchColumn</code> methods indicates
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
 * how many match columns are being set (the length of the array) in addition to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
 * which columns will be used for the match. For example:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
 * <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
 *     int[] i = {1, 2, 4, 7}; // indicates four match columns, with column
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
 *                             // indexes 1, 2, 4, 7 participating in the JOIN.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
 *     Joinable.setMatchColumn(i);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
 * </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
 * Subsequent match columns may be added as follows to a different <code>Joinable</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
 * object (a <code>RowSet</code> object that has implemented the <code>Joinable</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
 * interface).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
 * <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
 *     int[] w = {3, 2, 5, 3};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
 *     Joinable2.setMatchColumn(w);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
 * </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
 * When an application adds two or more <code>RowSet</code> objects to a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
 * <code>JoinRowSet</code> object, the order of the indexes in the array is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
 * particularly important. Each index of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
 * the array maps directly to the corresponding index of the previously added
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
 * <code>RowSet</code> object. If overlap or underlap occurs, the match column
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
 * data is maintained in the event an additional <code>Joinable</code> RowSet is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
 * added and needs to relate to the match column data. Therefore, applications
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
 * can set multiple match columns in any order, but
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
 * this order has a direct effect on the outcome of the <code>SQL</code> JOIN.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
 * This assertion applies in exactly the same manner when column names are used
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
 * rather than column indexes to indicate match columns.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
 * @see JoinRowSet
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
 * @author  Jonathan Bruce
24968
3308660aa3f2 8046389: Add missing @since tag under javax.sql.**
henryjen
parents: 21278
diff changeset
   132
 * @since 1.5
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
public interface Joinable {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
     * Sets the designated column as the match column for this <code>RowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
     * object. A <code>JoinRowSet</code> object can now add this <code>RowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
     * object based on the match column.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
     * <p>
18564
f9db68ff2cbb 8017471: Fix JDBC -Xdoclint public errors
lancea
parents: 5506
diff changeset
   141
     * Sub-interfaces such as the <code>CachedRowSet</code>&trade;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
     * interface define the method <code>CachedRowSet.setKeyColumns</code>, which allows
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
     * primary key semantics to be enforced on specific columns.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
     * Implementations of the <code>setMatchColumn(int columnIdx)</code> method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
     * should ensure that the constraints on the key columns are maintained when
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
     * a <code>CachedRowSet</code> object sets a primary key column as a match column.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
     * @param columnIdx an <code>int</code> identifying the index of the column to be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
     *        set as the match column
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
     * @throws SQLException if an invalid column index is set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
     * @see #setMatchColumn(int[])
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
     * @see #unsetMatchColumn(int)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
    public void setMatchColumn(int columnIdx) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
     * Sets the designated columns as the match column for this <code>RowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
     * object. A <code>JoinRowSet</code> object can now add this <code>RowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
     * object based on the match column.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
     * @param columnIdxes an array of <code>int</code> identifying the indexes of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
     *      columns to be set as the match columns
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
     * @throws SQLException if an invalid column index is set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
     * @see #setMatchColumn(int[])
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
     * @see #unsetMatchColumn(int[])
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
    public void setMatchColumn(int[] columnIdxes) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
     * Sets the designated column as the match column for this <code>RowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
     * object. A <code>JoinRowSet</code> object can now add this <code>RowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
     * object based on the match column.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
     * Subinterfaces such as the <code>CachedRowSet</code> interface define
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
     * the method <code>CachedRowSet.setKeyColumns</code>, which allows
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
     * primary key semantics to be enforced on specific columns.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
     * Implementations of the <code>setMatchColumn(String columnIdx)</code> method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
     * should ensure that the constraints on the key columns are maintained when
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
     * a <code>CachedRowSet</code> object sets a primary key column as a match column.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
     * @param columnName a <code>String</code> object giving the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
     *      to be set as the match column
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
     * @throws SQLException if an invalid column name is set, the column name
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
     *      is a null, or the column name is an empty string
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
     * @see #unsetMatchColumn
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
     * @see #setMatchColumn(int[])
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
    public void setMatchColumn(String columnName) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
     * Sets the designated columns as the match column for this <code>RowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
     * object. A <code>JoinRowSet</code> object can now add this <code>RowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
     * object based on the match column.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
     * @param columnNames an array of <code>String</code> objects giving the names
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
     *     of the column to be set as the match columns
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
     * @throws SQLException if an invalid column name is set, the column name
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
     *      is a null, or the column name is an empty string
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
     * @see #unsetMatchColumn
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
     * @see #setMatchColumn(int[])
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
    public void setMatchColumn(String[] columnNames) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
     * Retrieves the indexes of the match columns that were set for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
     * <code>RowSet</code> object with the method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
     * <code>setMatchColumn(int[] columnIdxes)</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
     * @return an <code>int</code> array identifying the indexes of the columns
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
     *         that were set as the match columns for this <code>RowSet</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
     * @throws SQLException if no match column has been set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
     * @see #setMatchColumn
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
     * @see #unsetMatchColumn
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
    public int[] getMatchColumnIndexes() throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
     * Retrieves the names of the match columns that were set for this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
     * <code>RowSet</code> object with the method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
     * <code>setMatchColumn(String [] columnNames)</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
     * @return an array of <code>String</code> objects giving the names of the columns
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
     *         set as the match columns for this <code>RowSet</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
     * @throws SQLException if no match column has been set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
     * @see #setMatchColumn
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
     * @see #unsetMatchColumn
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
    public String[] getMatchColumnNames() throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
     * Unsets the designated column as the match column for this <code>RowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
     * object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
     * <code>RowSet</code> objects that implement the <code>Joinable</code> interface
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
     * must ensure that a key-like constraint continues to be enforced until the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
     * method <code>CachedRowSet.unsetKeyColumns</code> has been called on the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
     * designated column.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
     * @param columnIdx an <code>int</code> that identifies the index of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
     *          that is to be unset as a match column
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
     * @throws SQLException if an invalid column index is designated or if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
     *          the designated column was not previously set as a match
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
     *          column
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
     * @see #setMatchColumn
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
    public void unsetMatchColumn(int columnIdx) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
     * Unsets the designated columns as the match column for this <code>RowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
     * object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
     *
21278
ef8a3a2a72f2 8022746: List of spelling errors in API doc
malenkov
parents: 20880
diff changeset
   254
     * @param columnIdxes an array of <code>int</code> that identifies the indexes
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
     *     of the columns that are to be unset as match columns
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
     * @throws SQLException if an invalid column index is designated or if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
     *          the designated column was not previously set as a match
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
     *          column
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
     * @see #setMatchColumn
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
    public void unsetMatchColumn(int[] columnIdxes) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
     * Unsets the designated column as the match column for this <code>RowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
     * object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
     * <code>RowSet</code> objects that implement the <code>Joinable</code> interface
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
     * must ensure that a key-like constraint continues to be enforced until the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
     * method <code>CachedRowSet.unsetKeyColumns</code> has been called on the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
     * designated column.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
     * @param columnName a <code>String</code> object giving the name of the column
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
     *          that is to be unset as a match column
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
     * @throws SQLException if an invalid column name is designated or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
     *          the designated column was not previously set as a match
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
     *          column
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
     * @see #setMatchColumn
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
    public void unsetMatchColumn(String columnName) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
     * Unsets the designated columns as the match columns for this <code>RowSet</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
     * object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
     * @param columnName an array of <code>String</code> objects giving the names of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
     *     the columns that are to be unset as the match columns
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
     * @throws SQLException if an invalid column name is designated or the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
     *     designated column was not previously set as a match column
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
     * @see #setMatchColumn
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
    public void unsetMatchColumn(String[] columnName) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
}