1 /*
2 * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
120 * the array maps directly to the corresponding index of the previously added
121 * <code>RowSet</code> object. If overlap or underlap occurs, the match column
122 * data is maintained in the event an additional <code>Joinable</code> RowSet is
123 * added and needs to relate to the match column data. Therefore, applications
124 * can set multiple match columns in any order, but
125 * this order has a direct effect on the outcome of the <code>SQL</code> JOIN.
126 * <p>
127 * This assertion applies in exactly the same manner when column names are used
128 * rather than column indexes to indicate match columns.
129 *
130 * @see JoinRowSet
131 * @author Jonathan Bruce
132 */
133 public interface Joinable {
134
135 /**
136 * Sets the designated column as the match column for this <code>RowSet</code>
137 * object. A <code>JoinRowSet</code> object can now add this <code>RowSet</code>
138 * object based on the match column.
139 * <p>
140 * Sub-interfaces such as the <code>CachedRowSet</code><sup><font size=-2>TM</font></sup>
141 * interface define the method <code>CachedRowSet.setKeyColumns</code>, which allows
142 * primary key semantics to be enforced on specific columns.
143 * Implementations of the <code>setMatchColumn(int columnIdx)</code> method
144 * should ensure that the constraints on the key columns are maintained when
145 * a <code>CachedRowSet</code> object sets a primary key column as a match column.
146 *
147 * @param columnIdx an <code>int</code> identifying the index of the column to be
148 * set as the match column
149 * @throws SQLException if an invalid column index is set
150 * @see #setMatchColumn(int[])
151 * @see #unsetMatchColumn(int)
152 *
153 */
154 public void setMatchColumn(int columnIdx) throws SQLException;
155
156 /**
157 * Sets the designated columns as the match column for this <code>RowSet</code>
158 * object. A <code>JoinRowSet</code> object can now add this <code>RowSet</code>
159 * object based on the match column.
160 *
|
1 /*
2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
120 * the array maps directly to the corresponding index of the previously added
121 * <code>RowSet</code> object. If overlap or underlap occurs, the match column
122 * data is maintained in the event an additional <code>Joinable</code> RowSet is
123 * added and needs to relate to the match column data. Therefore, applications
124 * can set multiple match columns in any order, but
125 * this order has a direct effect on the outcome of the <code>SQL</code> JOIN.
126 * <p>
127 * This assertion applies in exactly the same manner when column names are used
128 * rather than column indexes to indicate match columns.
129 *
130 * @see JoinRowSet
131 * @author Jonathan Bruce
132 */
133 public interface Joinable {
134
135 /**
136 * Sets the designated column as the match column for this <code>RowSet</code>
137 * object. A <code>JoinRowSet</code> object can now add this <code>RowSet</code>
138 * object based on the match column.
139 * <p>
140 * Sub-interfaces such as the <code>CachedRowSet</code>™
141 * interface define the method <code>CachedRowSet.setKeyColumns</code>, which allows
142 * primary key semantics to be enforced on specific columns.
143 * Implementations of the <code>setMatchColumn(int columnIdx)</code> method
144 * should ensure that the constraints on the key columns are maintained when
145 * a <code>CachedRowSet</code> object sets a primary key column as a match column.
146 *
147 * @param columnIdx an <code>int</code> identifying the index of the column to be
148 * set as the match column
149 * @throws SQLException if an invalid column index is set
150 * @see #setMatchColumn(int[])
151 * @see #unsetMatchColumn(int)
152 *
153 */
154 public void setMatchColumn(int columnIdx) throws SQLException;
155
156 /**
157 * Sets the designated columns as the match column for this <code>RowSet</code>
158 * object. A <code>JoinRowSet</code> object can now add this <code>RowSet</code>
159 * object based on the match column.
160 *
|