author | avstepan |
Mon, 08 Jun 2015 16:37:53 +0400 | |
changeset 31061 | fead7d86d75f |
parent 28059 | e576535359cc |
child 37880 | 60ec48925dc6 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
23010
6dadb192ad81
8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents:
21278
diff
changeset
|
2 |
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. |
2 | 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 |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 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 |
* |
|
5506 | 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 |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
||
26 |
package com.sun.rowset; |
|
27 |
||
28 |
import java.sql.*; |
|
29 |
import javax.sql.*; |
|
30 |
import javax.naming.*; |
|
31 |
import java.io.*; |
|
32 |
import java.math.*; |
|
33 |
import java.util.*; |
|
34 |
||
35 |
import javax.sql.rowset.*; |
|
36 |
||
37 |
/** |
|
31061 | 38 |
* The standard implementation of the {@code JdbcRowSet} interface. See the interface |
21278 | 39 |
* definition for full behavior and implementation requirements. |
2 | 40 |
* |
41 |
* @author Jonathan Bruce, Amit Handa |
|
42 |
*/ |
|
43 |
||
44 |
public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable { |
|
45 |
||
46 |
/** |
|
31061 | 47 |
* The {@code Connection} object that is this rowset's |
2 | 48 |
* current connection to the database. This field is set |
49 |
* internally when the connection is established. |
|
50 |
*/ |
|
51 |
private Connection conn; |
|
52 |
||
53 |
/** |
|
31061 | 54 |
* The {@code PreparedStatement} object that is this rowset's |
2 | 55 |
* current command. This field is set internally when the method |
31061 | 56 |
* {@code execute} creates the {@code PreparedStatement} |
2 | 57 |
* object. |
58 |
*/ |
|
59 |
private PreparedStatement ps; |
|
60 |
||
61 |
/** |
|
31061 | 62 |
* The {@code ResultSet} object that is this rowset's |
2 | 63 |
* current result set. This field is set internally when the method |
31061 | 64 |
* {@code execute} executes the rowset's command and thereby |
65 |
* creates the rowset's {@code ResultSet} object. |
|
2 | 66 |
*/ |
67 |
private ResultSet rs; |
|
68 |
||
69 |
/** |
|
31061 | 70 |
* The {@code RowSetMetaDataImpl} object that is constructed when |
71 |
* a {@code ResultSet} object is passed to the {@code JdbcRowSet} |
|
2 | 72 |
* constructor. This helps in constructing all metadata associated |
31061 | 73 |
* with the {@code ResultSet} object using the setter methods of |
74 |
* {@code RowSetMetaDataImpl}. |
|
2 | 75 |
*/ |
76 |
private RowSetMetaDataImpl rowsMD; |
|
77 |
||
78 |
/** |
|
31061 | 79 |
* The {@code ResultSetMetaData} object from which this |
80 |
* {@code RowSetMetaDataImpl} is formed and which helps in getting |
|
2 | 81 |
* the metadata information. |
82 |
*/ |
|
83 |
private ResultSetMetaData resMD; |
|
84 |
||
85 |
||
86 |
/** |
|
87 |
* The Vector holding the Match Columns |
|
88 |
*/ |
|
9257
53e6d7bc31b0
7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents:
6697
diff
changeset
|
89 |
private Vector<Integer> iMatchColumns; |
2 | 90 |
|
91 |
/** |
|
92 |
* The Vector that will hold the Match Column names. |
|
93 |
*/ |
|
9257
53e6d7bc31b0
7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents:
6697
diff
changeset
|
94 |
private Vector<String> strMatchColumns; |
2 | 95 |
|
96 |
||
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
97 |
protected transient JdbcRowSetResourceBundle resBundle; |
2 | 98 |
|
99 |
/** |
|
31061 | 100 |
* Constructs a default {@code JdbcRowSet} object. |
101 |
* The new instance of {@code JdbcRowSet} will serve as a proxy |
|
102 |
* for the {@code ResultSet} object it creates, and by so doing, |
|
2 | 103 |
* it will make it possible to use the result set as a JavaBeans |
104 |
* component. |
|
105 |
* <P> |
|
31061 | 106 |
* The following is true of a default {@code JdbcRowSet} instance: |
2 | 107 |
* <UL> |
108 |
* <LI>Does not show deleted rows |
|
109 |
* <LI>Has no time limit for how long a driver may take to |
|
110 |
* execute the rowset's command |
|
111 |
* <LI>Has no limit for the number of rows it may contain |
|
112 |
* <LI>Has no limit for the number of bytes a column may contain |
|
113 |
* <LI>Has a scrollable cursor and does not show changes |
|
114 |
* made by others |
|
115 |
* <LI>Will not see uncommitted data (make "dirty" reads) |
|
116 |
* <LI>Has escape processing turned on |
|
31061 | 117 |
* <LI>Has its connection's type map set to {@code null} |
118 |
* <LI>Has an empty {@code Hashtable} object for storing any |
|
2 | 119 |
* parameters that are set |
120 |
* </UL> |
|
31061 | 121 |
* A newly created {@code JdbcRowSet} object must have its |
122 |
* {@code execute} method invoked before other public methods |
|
2 | 123 |
* are called on it; otherwise, such method calls will cause an |
124 |
* exception to be thrown. |
|
125 |
* |
|
126 |
* @throws SQLException [1] if any of its public methods are called prior |
|
31061 | 127 |
* to calling the {@code execute} method; [2] if invalid JDBC driver |
2 | 128 |
* properties are set or [3] if no connection to a data source exists. |
129 |
*/ |
|
130 |
public JdbcRowSetImpl() { |
|
131 |
conn = null; |
|
132 |
ps = null; |
|
133 |
rs = null; |
|
134 |
||
135 |
try { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
136 |
resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle(); |
2 | 137 |
} catch(IOException ioe) { |
138 |
throw new RuntimeException(ioe); |
|
139 |
} |
|
140 |
||
141 |
||
142 |
initParams(); |
|
143 |
||
144 |
// set the defaults |
|
145 |
||
146 |
try { |
|
147 |
setShowDeleted(false); |
|
148 |
} catch(SQLException sqle) { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
149 |
System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setshowdeleted").toString() + |
2 | 150 |
sqle.getLocalizedMessage()); |
151 |
} |
|
152 |
||
153 |
try { |
|
154 |
setQueryTimeout(0); |
|
155 |
} catch(SQLException sqle) { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
156 |
System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setquerytimeout").toString() + |
2 | 157 |
sqle.getLocalizedMessage()); |
158 |
} |
|
159 |
||
160 |
try { |
|
161 |
setMaxRows(0); |
|
162 |
} catch(SQLException sqle) { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
163 |
System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setmaxrows").toString() + |
2 | 164 |
sqle.getLocalizedMessage()); |
165 |
} |
|
166 |
||
167 |
try { |
|
168 |
setMaxFieldSize(0); |
|
169 |
} catch(SQLException sqle) { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
170 |
System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setmaxfieldsize").toString() + |
2 | 171 |
sqle.getLocalizedMessage()); |
172 |
} |
|
173 |
||
174 |
try { |
|
175 |
setEscapeProcessing(true); |
|
176 |
} catch(SQLException sqle) { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
177 |
System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setescapeprocessing").toString() + |
2 | 178 |
sqle.getLocalizedMessage()); |
179 |
} |
|
180 |
||
181 |
try { |
|
182 |
setConcurrency(ResultSet.CONCUR_UPDATABLE); |
|
183 |
} catch (SQLException sqle) { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
184 |
System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setconcurrency").toString() + |
2 | 185 |
sqle.getLocalizedMessage()); |
186 |
} |
|
187 |
||
188 |
setTypeMap(null); |
|
189 |
||
190 |
try { |
|
191 |
setType(ResultSet.TYPE_SCROLL_INSENSITIVE); |
|
192 |
} catch(SQLException sqle){ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
193 |
System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.settype").toString() + |
2 | 194 |
sqle.getLocalizedMessage()); |
195 |
} |
|
196 |
||
197 |
setReadOnly(true); |
|
198 |
||
199 |
try { |
|
200 |
setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED); |
|
201 |
} catch(SQLException sqle){ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
202 |
System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.settransactionisolation").toString() + |
2 | 203 |
sqle.getLocalizedMessage()); |
204 |
} |
|
205 |
||
206 |
//Instantiating the vector for MatchColumns |
|
207 |
||
9257
53e6d7bc31b0
7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents:
6697
diff
changeset
|
208 |
iMatchColumns = new Vector<Integer>(10); |
2 | 209 |
for(int i = 0; i < 10 ; i++) { |
6697
39929804f9d4
6989139: Address JDBC Findbugs where Number type Constructor are used
lancea
parents:
6540
diff
changeset
|
210 |
iMatchColumns.add(i,Integer.valueOf(-1)); |
2 | 211 |
} |
212 |
||
9257
53e6d7bc31b0
7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents:
6697
diff
changeset
|
213 |
strMatchColumns = new Vector<String>(10); |
2 | 214 |
for(int j = 0; j < 10; j++) { |
215 |
strMatchColumns.add(j,null); |
|
216 |
} |
|
217 |
} |
|
218 |
||
219 |
/** |
|
31061 | 220 |
* Constructs a default {@code JdbcRowSet} object given a |
221 |
* valid {@code Connection} object. The new |
|
222 |
* instance of {@code JdbcRowSet} will serve as a proxy for |
|
223 |
* the {@code ResultSet} object it creates, and by so doing, |
|
2 | 224 |
* it will make it possible to use the result set as a JavaBeans |
225 |
* component. |
|
226 |
* <P> |
|
31061 | 227 |
* The following is true of a default {@code JdbcRowSet} instance: |
2 | 228 |
* <UL> |
229 |
* <LI>Does not show deleted rows |
|
230 |
* <LI>Has no time limit for how long a driver may take to |
|
231 |
* execute the rowset's command |
|
232 |
* <LI>Has no limit for the number of rows it may contain |
|
233 |
* <LI>Has no limit for the number of bytes a column may contain |
|
234 |
* <LI>Has a scrollable cursor and does not show changes |
|
235 |
* made by others |
|
236 |
* <LI>Will not see uncommitted data (make "dirty" reads) |
|
237 |
* <LI>Has escape processing turned on |
|
31061 | 238 |
* <LI>Has its connection's type map set to {@code null} |
239 |
* <LI>Has an empty {@code Hashtable} object for storing any |
|
2 | 240 |
* parameters that are set |
241 |
* </UL> |
|
31061 | 242 |
* A newly created {@code JdbcRowSet} object must have its |
243 |
* {@code execute} method invoked before other public methods |
|
2 | 244 |
* are called on it; otherwise, such method calls will cause an |
245 |
* exception to be thrown. |
|
246 |
* |
|
247 |
* @throws SQLException [1] if any of its public methods are called prior |
|
31061 | 248 |
* to calling the {@code execute} method, [2] if invalid JDBC driver |
2 | 249 |
* properties are set, or [3] if no connection to a data source exists. |
250 |
*/ |
|
251 |
public JdbcRowSetImpl(Connection con) throws SQLException { |
|
252 |
||
253 |
conn = con; |
|
254 |
ps = null; |
|
255 |
rs = null; |
|
256 |
||
257 |
try { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
258 |
resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle(); |
2 | 259 |
} catch(IOException ioe) { |
260 |
throw new RuntimeException(ioe); |
|
261 |
} |
|
262 |
||
263 |
||
264 |
initParams(); |
|
265 |
// set the defaults |
|
266 |
setShowDeleted(false); |
|
267 |
setQueryTimeout(0); |
|
268 |
setMaxRows(0); |
|
269 |
setMaxFieldSize(0); |
|
270 |
||
271 |
setParams(); |
|
272 |
||
273 |
setReadOnly(true); |
|
274 |
setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED); |
|
275 |
setEscapeProcessing(true); |
|
276 |
setTypeMap(null); |
|
277 |
||
278 |
//Instantiating the vector for MatchColumns |
|
279 |
||
9257
53e6d7bc31b0
7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents:
6697
diff
changeset
|
280 |
iMatchColumns = new Vector<Integer>(10); |
2 | 281 |
for(int i = 0; i < 10 ; i++) { |
6697
39929804f9d4
6989139: Address JDBC Findbugs where Number type Constructor are used
lancea
parents:
6540
diff
changeset
|
282 |
iMatchColumns.add(i,Integer.valueOf(-1)); |
2 | 283 |
} |
284 |
||
9257
53e6d7bc31b0
7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents:
6697
diff
changeset
|
285 |
strMatchColumns = new Vector<String>(10); |
2 | 286 |
for(int j = 0; j < 10; j++) { |
287 |
strMatchColumns.add(j,null); |
|
288 |
} |
|
289 |
} |
|
290 |
||
291 |
/** |
|
31061 | 292 |
* Constructs a default {@code JdbcRowSet} object using the |
2 | 293 |
* URL, username, and password arguments supplied. The new |
31061 | 294 |
* instance of {@code JdbcRowSet} will serve as a proxy for |
295 |
* the {@code ResultSet} object it creates, and by so doing, |
|
2 | 296 |
* it will make it possible to use the result set as a JavaBeans |
297 |
* component. |
|
298 |
* |
|
299 |
* <P> |
|
31061 | 300 |
* The following is true of a default {@code JdbcRowSet} instance: |
2 | 301 |
* <UL> |
302 |
* <LI>Does not show deleted rows |
|
303 |
* <LI>Has no time limit for how long a driver may take to |
|
304 |
* execute the rowset's command |
|
305 |
* <LI>Has no limit for the number of rows it may contain |
|
306 |
* <LI>Has no limit for the number of bytes a column may contain |
|
307 |
* <LI>Has a scrollable cursor and does not show changes |
|
308 |
* made by others |
|
309 |
* <LI>Will not see uncommitted data (make "dirty" reads) |
|
310 |
* <LI>Has escape processing turned on |
|
31061 | 311 |
* <LI>Has its connection's type map set to {@code null} |
312 |
* <LI>Has an empty {@code Hashtable} object for storing any |
|
2 | 313 |
* parameters that are set |
314 |
* </UL> |
|
315 |
* |
|
31061 | 316 |
* @param url a JDBC URL for the database to which this {@code JdbcRowSet} |
2 | 317 |
* object will be connected. The form for a JDBC URL is |
31061 | 318 |
* {@code jdbc:subprotocol:subname}. |
319 |
* @param user the database user on whose behalf the connection |
|
2 | 320 |
* is being made |
31061 | 321 |
* @param password the user's password |
2 | 322 |
* |
323 |
* @throws SQLException if a database access error occurs |
|
324 |
* |
|
325 |
*/ |
|
326 |
public JdbcRowSetImpl(String url, String user, String password) throws SQLException { |
|
327 |
conn = null; |
|
328 |
ps = null; |
|
329 |
rs = null; |
|
330 |
||
331 |
try { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
332 |
resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle(); |
2 | 333 |
} catch(IOException ioe) { |
334 |
throw new RuntimeException(ioe); |
|
335 |
} |
|
336 |
||
337 |
||
338 |
initParams(); |
|
339 |
||
340 |
// Pass the arguments to BaseRowSet |
|
341 |
// setter methods now. |
|
342 |
||
343 |
setUsername(user); |
|
344 |
setPassword(password); |
|
345 |
setUrl(url); |
|
346 |
||
347 |
// set the defaults |
|
348 |
setShowDeleted(false); |
|
349 |
setQueryTimeout(0); |
|
350 |
setMaxRows(0); |
|
351 |
setMaxFieldSize(0); |
|
352 |
||
353 |
setParams(); |
|
354 |
||
355 |
setReadOnly(true); |
|
356 |
setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED); |
|
357 |
setEscapeProcessing(true); |
|
358 |
setTypeMap(null); |
|
359 |
||
360 |
//Instantiating the vector for MatchColumns |
|
361 |
||
9257
53e6d7bc31b0
7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents:
6697
diff
changeset
|
362 |
iMatchColumns = new Vector<Integer>(10); |
2 | 363 |
for(int i = 0; i < 10 ; i++) { |
6697
39929804f9d4
6989139: Address JDBC Findbugs where Number type Constructor are used
lancea
parents:
6540
diff
changeset
|
364 |
iMatchColumns.add(i,Integer.valueOf(-1)); |
2 | 365 |
} |
366 |
||
9257
53e6d7bc31b0
7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents:
6697
diff
changeset
|
367 |
strMatchColumns = new Vector<String>(10); |
2 | 368 |
for(int j = 0; j < 10; j++) { |
369 |
strMatchColumns.add(j,null); |
|
370 |
} |
|
371 |
} |
|
372 |
||
373 |
||
374 |
/** |
|
31061 | 375 |
* Constructs a {@code JdbcRowSet} object using the given valid |
376 |
* {@code ResultSet} object. The new |
|
377 |
* instance of {@code JdbcRowSet} will serve as a proxy for |
|
378 |
* the {@code ResultSet} object, and by so doing, |
|
2 | 379 |
* it will make it possible to use the result set as a JavaBeans |
380 |
* component. |
|
381 |
* |
|
382 |
* <P> |
|
31061 | 383 |
* The following is true of a default {@code JdbcRowSet} instance: |
2 | 384 |
* <UL> |
385 |
* <LI>Does not show deleted rows |
|
386 |
* <LI>Has no time limit for how long a driver may take to |
|
387 |
* execute the rowset's command |
|
388 |
* <LI>Has no limit for the number of rows it may contain |
|
389 |
* <LI>Has no limit for the number of bytes a column may contain |
|
390 |
* <LI>Has a scrollable cursor and does not show changes |
|
391 |
* made by others |
|
392 |
* <LI>Will not see uncommitted data (make "dirty" reads) |
|
393 |
* <LI>Has escape processing turned on |
|
31061 | 394 |
* <LI>Has its connection's type map set to {@code null} |
395 |
* <LI>Has an empty {@code Hashtable} object for storing any |
|
2 | 396 |
* parameters that are set |
397 |
* </UL> |
|
398 |
* |
|
31061 | 399 |
* @param res a valid {@code ResultSet} object |
2 | 400 |
* |
401 |
* @throws SQLException if a database access occurs due to a non |
|
402 |
* valid ResultSet handle. |
|
403 |
*/ |
|
404 |
public JdbcRowSetImpl(ResultSet res) throws SQLException { |
|
405 |
||
406 |
// A ResultSet handle encapsulates a connection handle. |
|
407 |
// But there is no way we can retrieve a Connection handle |
|
408 |
// from a ResultSet object. |
|
409 |
// So to avoid any anomalies we keep the conn = null |
|
410 |
// The passed rs handle will be a wrapper around for |
|
411 |
// "this" object's all operations. |
|
412 |
conn = null; |
|
413 |
||
414 |
ps = null; |
|
415 |
||
416 |
rs = res; |
|
417 |
||
418 |
try { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
419 |
resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle(); |
2 | 420 |
} catch(IOException ioe) { |
421 |
throw new RuntimeException(ioe); |
|
422 |
} |
|
423 |
||
424 |
||
425 |
initParams(); |
|
426 |
||
427 |
// get the values from the resultset handle. |
|
428 |
setShowDeleted(false); |
|
429 |
setQueryTimeout(0); |
|
430 |
setMaxRows(0); |
|
431 |
setMaxFieldSize(0); |
|
432 |
||
433 |
setParams(); |
|
434 |
||
435 |
setReadOnly(true); |
|
436 |
setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED); |
|
437 |
setEscapeProcessing(true); |
|
438 |
setTypeMap(null); |
|
439 |
||
440 |
// Get a handle to ResultSetMetaData |
|
441 |
// Construct RowSetMetaData out of it. |
|
442 |
||
443 |
resMD = rs.getMetaData(); |
|
444 |
||
445 |
rowsMD = new RowSetMetaDataImpl(); |
|
446 |
||
447 |
initMetaData(rowsMD, resMD); |
|
448 |
||
449 |
//Instantiating the vector for MatchColumns |
|
450 |
||
9257
53e6d7bc31b0
7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents:
6697
diff
changeset
|
451 |
iMatchColumns = new Vector<Integer>(10); |
2 | 452 |
for(int i = 0; i < 10 ; i++) { |
6697
39929804f9d4
6989139: Address JDBC Findbugs where Number type Constructor are used
lancea
parents:
6540
diff
changeset
|
453 |
iMatchColumns.add(i,Integer.valueOf(-1)); |
2 | 454 |
} |
455 |
||
9257
53e6d7bc31b0
7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents:
6697
diff
changeset
|
456 |
strMatchColumns = new Vector<String>(10); |
2 | 457 |
for(int j = 0; j < 10; j++) { |
458 |
strMatchColumns.add(j,null); |
|
459 |
} |
|
460 |
} |
|
461 |
||
462 |
/** |
|
31061 | 463 |
* Initializes the given {@code RowSetMetaData} object with the values |
464 |
* in the given {@code ResultSetMetaData} object. |
|
465 |
* |
|
466 |
* @param md the {@code RowSetMetaData} object for this |
|
467 |
* {@code JdbcRowSetImpl} object, which will be set with |
|
2 | 468 |
* values from rsmd |
31061 | 469 |
* @param rsmd the {@code ResultSetMetaData} object from which new |
2 | 470 |
* values for md will be read |
471 |
* @throws SQLException if an error occurs |
|
472 |
*/ |
|
473 |
protected void initMetaData(RowSetMetaData md, ResultSetMetaData rsmd) throws SQLException { |
|
474 |
int numCols = rsmd.getColumnCount(); |
|
475 |
||
476 |
md.setColumnCount(numCols); |
|
477 |
for (int col=1; col <= numCols; col++) { |
|
478 |
md.setAutoIncrement(col, rsmd.isAutoIncrement(col)); |
|
479 |
md.setCaseSensitive(col, rsmd.isCaseSensitive(col)); |
|
480 |
md.setCurrency(col, rsmd.isCurrency(col)); |
|
481 |
md.setNullable(col, rsmd.isNullable(col)); |
|
482 |
md.setSigned(col, rsmd.isSigned(col)); |
|
483 |
md.setSearchable(col, rsmd.isSearchable(col)); |
|
484 |
md.setColumnDisplaySize(col, rsmd.getColumnDisplaySize(col)); |
|
485 |
md.setColumnLabel(col, rsmd.getColumnLabel(col)); |
|
486 |
md.setColumnName(col, rsmd.getColumnName(col)); |
|
487 |
md.setSchemaName(col, rsmd.getSchemaName(col)); |
|
488 |
md.setPrecision(col, rsmd.getPrecision(col)); |
|
489 |
md.setScale(col, rsmd.getScale(col)); |
|
490 |
md.setTableName(col, rsmd.getTableName(col)); |
|
491 |
md.setCatalogName(col, rsmd.getCatalogName(col)); |
|
492 |
md.setColumnType(col, rsmd.getColumnType(col)); |
|
493 |
md.setColumnTypeName(col, rsmd.getColumnTypeName(col)); |
|
494 |
} |
|
495 |
} |
|
496 |
||
497 |
||
498 |
protected void checkState() throws SQLException { |
|
499 |
||
500 |
// If all the three i.e. conn, ps & rs are |
|
501 |
// simultaneously null implies we are not connected |
|
502 |
// to the db, implies undesirable state so throw exception |
|
503 |
||
504 |
if (conn == null && ps == null && rs == null ) { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
505 |
throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.invalstate").toString()); |
2 | 506 |
} |
507 |
} |
|
508 |
||
509 |
//--------------------------------------------------------------------- |
|
510 |
// Reading and writing data |
|
511 |
//--------------------------------------------------------------------- |
|
512 |
||
513 |
/** |
|
31061 | 514 |
* Creates the internal {@code ResultSet} object for which this |
515 |
* {@code JdbcRowSet} object is a wrapper, effectively |
|
2 | 516 |
* making the result set a JavaBeans component. |
517 |
* <P> |
|
518 |
* Certain properties must have been set before this method is called |
|
519 |
* so that it can establish a connection to a database and execute the |
|
31061 | 520 |
* query that will create the result set. If a {@code DataSource} |
2 | 521 |
* object will be used to create the connection, properties for the |
522 |
* data source name, user name, and password must be set. If the |
|
31061 | 523 |
* {@code DriverManager} will be used, the properties for the |
2 | 524 |
* URL, user name, and password must be set. In either case, the |
525 |
* property for the command must be set. If the command has placeholder |
|
526 |
* parameters, those must also be set. This method throws |
|
527 |
* an exception if the required properties are not set. |
|
528 |
* <P> |
|
529 |
* Other properties have default values that may optionally be set |
|
31061 | 530 |
* to new values. The {@code execute} method will use the value |
531 |
* for the command property to create a {@code PreparedStatement} |
|
2 | 532 |
* object and set its properties (escape processing, maximum field |
533 |
* size, maximum number of rows, and query timeout limit) to be those |
|
534 |
* of this rowset. |
|
535 |
* |
|
536 |
* @throws SQLException if (1) a database access error occurs, |
|
537 |
* (2) any required JDBC properties are not set, or (3) if an |
|
538 |
* invalid connection exists. |
|
539 |
*/ |
|
540 |
public void execute() throws SQLException { |
|
541 |
/* |
|
542 |
* To execute based on the properties: |
|
543 |
* i) determine how to get a connection |
|
544 |
* ii) prepare the statement |
|
545 |
* iii) set the properties of the statement |
|
546 |
* iv) parse the params. and set them |
|
547 |
* v) execute the statement |
|
548 |
* |
|
549 |
* During all of this try to tolerate as many errors |
|
550 |
* as possible, many drivers will not support all of |
|
551 |
* the properties and will/should throw SQLException |
|
552 |
* at us... |
|
553 |
* |
|
554 |
*/ |
|
555 |
||
556 |
prepare(); |
|
557 |
||
558 |
// set the properties of our shiny new statement |
|
559 |
setProperties(ps); |
|
560 |
||
561 |
||
562 |
// set the parameters |
|
563 |
decodeParams(getParams(), ps); |
|
564 |
||
565 |
||
566 |
// execute the statement |
|
567 |
rs = ps.executeQuery(); |
|
568 |
||
569 |
||
570 |
// notify listeners |
|
571 |
notifyRowSetChanged(); |
|
572 |
||
573 |
||
574 |
} |
|
575 |
||
576 |
protected void setProperties(PreparedStatement ps) throws SQLException { |
|
577 |
||
578 |
try { |
|
579 |
ps.setEscapeProcessing(getEscapeProcessing()); |
|
580 |
} catch (SQLException ex) { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
581 |
System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setescapeprocessing").toString() + |
2 | 582 |
ex.getLocalizedMessage()); |
583 |
} |
|
584 |
||
585 |
try { |
|
586 |
ps.setMaxFieldSize(getMaxFieldSize()); |
|
587 |
} catch (SQLException ex) { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
588 |
System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setmaxfieldsize").toString() + |
2 | 589 |
ex.getLocalizedMessage()); |
590 |
} |
|
591 |
||
592 |
try { |
|
593 |
ps.setMaxRows(getMaxRows()); |
|
594 |
} catch (SQLException ex) { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
595 |
System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setmaxrows").toString() + |
2 | 596 |
ex.getLocalizedMessage()); |
597 |
} |
|
598 |
||
599 |
try { |
|
600 |
ps.setQueryTimeout(getQueryTimeout()); |
|
601 |
} catch (SQLException ex) { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
602 |
System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setquerytimeout").toString() + |
2 | 603 |
ex.getLocalizedMessage()); |
604 |
} |
|
605 |
||
606 |
} |
|
607 |
||
13785
56dc8b1e89ba
7192302: Remove JDBCRowSetImpl dependency on java.beans
lancea
parents:
11129
diff
changeset
|
608 |
private Connection connect() throws SQLException { |
2 | 609 |
|
610 |
// Get a JDBC connection. |
|
611 |
||
612 |
// First check for Connection handle object as such if |
|
613 |
// "this" initialized using conn. |
|
614 |
||
615 |
if(conn != null) { |
|
616 |
return conn; |
|
617 |
||
618 |
} else if (getDataSourceName() != null) { |
|
619 |
||
620 |
// Connect using JNDI. |
|
621 |
try { |
|
622 |
Context ctx = new InitialContext(); |
|
623 |
DataSource ds = (DataSource)ctx.lookup |
|
624 |
(getDataSourceName()); |
|
625 |
//return ds.getConnection(getUsername(),getPassword()); |
|
626 |
||
627 |
if(getUsername() != null && !getUsername().equals("")) { |
|
628 |
return ds.getConnection(getUsername(),getPassword()); |
|
629 |
} else { |
|
630 |
return ds.getConnection(); |
|
631 |
} |
|
632 |
} |
|
633 |
catch (javax.naming.NamingException ex) { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
634 |
throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.connect").toString()); |
2 | 635 |
} |
636 |
||
637 |
} else if (getUrl() != null) { |
|
638 |
// Check only for getUrl() != null because |
|
639 |
// user, passwd can be null |
|
640 |
// Connect using the driver manager. |
|
641 |
||
642 |
return DriverManager.getConnection |
|
643 |
(getUrl(), getUsername(), getPassword()); |
|
644 |
} |
|
645 |
else { |
|
646 |
return null; |
|
647 |
} |
|
648 |
||
649 |
} |
|
650 |
||
651 |
||
652 |
protected PreparedStatement prepare() throws SQLException { |
|
653 |
// get a connection |
|
654 |
conn = connect(); |
|
655 |
||
656 |
try { |
|
657 |
||
9257
53e6d7bc31b0
7035615: Address lint warnings for javax.sql.rowset & com.sun.rowset
lancea
parents:
6697
diff
changeset
|
658 |
Map<String, Class<?>> aMap = getTypeMap(); |
2 | 659 |
if( aMap != null) { |
660 |
conn.setTypeMap(aMap); |
|
661 |
} |
|
662 |
ps = conn.prepareStatement(getCommand(),ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE); |
|
663 |
} catch (SQLException ex) { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
664 |
System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.prepare").toString() + |
2 | 665 |
ex.getLocalizedMessage()); |
666 |
||
667 |
if (ps != null) |
|
668 |
ps.close(); |
|
669 |
if (conn != null) |
|
670 |
conn.close(); |
|
671 |
||
672 |
throw new SQLException(ex.getMessage()); |
|
673 |
} |
|
674 |
||
675 |
return ps; |
|
676 |
} |
|
677 |
||
11129
f9ad1aadf3fa
7116445: Miscellaneous warnings in the JDBC/RowSet classes
lancea
parents:
9257
diff
changeset
|
678 |
@SuppressWarnings("deprecation") |
2 | 679 |
private void decodeParams(Object[] params, PreparedStatement ps) |
680 |
throws SQLException { |
|
681 |
||
682 |
// There is a corresponding decodeParams in JdbcRowSetImpl |
|
683 |
// which does the same as this method. This is a design flaw. |
|
684 |
// Update the CachedRowsetReader.decodeParams when you update |
|
685 |
// this method. |
|
686 |
||
687 |
// Adding the same comments to CachedRowsetReader.decodeParams. |
|
688 |
||
689 |
int arraySize; |
|
690 |
Object[] param = null; |
|
691 |
||
692 |
for (int i=0; i < params.length; i++) { |
|
693 |
if (params[i] instanceof Object[]) { |
|
694 |
param = (Object[])params[i]; |
|
695 |
||
696 |
if (param.length == 2) { |
|
697 |
if (param[0] == null) { |
|
698 |
ps.setNull(i + 1, ((Integer)param[1]).intValue()); |
|
699 |
continue; |
|
700 |
} |
|
701 |
||
702 |
if (param[0] instanceof java.sql.Date || |
|
703 |
param[0] instanceof java.sql.Time || |
|
704 |
param[0] instanceof java.sql.Timestamp) { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
705 |
System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.detecteddate")); |
2 | 706 |
if (param[1] instanceof java.util.Calendar) { |
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
707 |
System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.detectedcalendar")); |
2 | 708 |
ps.setDate(i + 1, (java.sql.Date)param[0], |
709 |
(java.util.Calendar)param[1]); |
|
710 |
continue; |
|
711 |
} |
|
712 |
else { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
713 |
throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.paramtype").toString()); |
2 | 714 |
} |
715 |
} |
|
716 |
||
717 |
if (param[0] instanceof Reader) { |
|
718 |
ps.setCharacterStream(i + 1, (Reader)param[0], |
|
719 |
((Integer)param[1]).intValue()); |
|
720 |
continue; |
|
721 |
} |
|
722 |
||
723 |
/* |
|
724 |
* What's left should be setObject(int, Object, scale) |
|
725 |
*/ |
|
726 |
if (param[1] instanceof Integer) { |
|
727 |
ps.setObject(i + 1, param[0], ((Integer)param[1]).intValue()); |
|
728 |
continue; |
|
729 |
} |
|
730 |
||
731 |
} else if (param.length == 3) { |
|
732 |
||
733 |
if (param[0] == null) { |
|
734 |
ps.setNull(i + 1, ((Integer)param[1]).intValue(), |
|
735 |
(String)param[2]); |
|
736 |
continue; |
|
737 |
} |
|
738 |
||
739 |
if (param[0] instanceof java.io.InputStream) { |
|
740 |
switch (((Integer)param[2]).intValue()) { |
|
741 |
case JdbcRowSetImpl.UNICODE_STREAM_PARAM: |
|
742 |
ps.setUnicodeStream(i + 1, |
|
743 |
(java.io.InputStream)param[0], |
|
744 |
((Integer)param[1]).intValue()); |
|
11129
f9ad1aadf3fa
7116445: Miscellaneous warnings in the JDBC/RowSet classes
lancea
parents:
9257
diff
changeset
|
745 |
break; |
2 | 746 |
case JdbcRowSetImpl.BINARY_STREAM_PARAM: |
747 |
ps.setBinaryStream(i + 1, |
|
748 |
(java.io.InputStream)param[0], |
|
749 |
((Integer)param[1]).intValue()); |
|
11129
f9ad1aadf3fa
7116445: Miscellaneous warnings in the JDBC/RowSet classes
lancea
parents:
9257
diff
changeset
|
750 |
break; |
2 | 751 |
case JdbcRowSetImpl.ASCII_STREAM_PARAM: |
752 |
ps.setAsciiStream(i + 1, |
|
753 |
(java.io.InputStream)param[0], |
|
754 |
((Integer)param[1]).intValue()); |
|
11129
f9ad1aadf3fa
7116445: Miscellaneous warnings in the JDBC/RowSet classes
lancea
parents:
9257
diff
changeset
|
755 |
break; |
2 | 756 |
default: |
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
757 |
throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.paramtype").toString()); |
2 | 758 |
} |
759 |
} |
|
760 |
||
761 |
/* |
|
762 |
* no point at looking at the first element now; |
|
763 |
* what's left must be the setObject() cases. |
|
764 |
*/ |
|
765 |
if (param[1] instanceof Integer && param[2] instanceof Integer) { |
|
766 |
ps.setObject(i + 1, param[0], ((Integer)param[1]).intValue(), |
|
767 |
((Integer)param[2]).intValue()); |
|
768 |
continue; |
|
769 |
} |
|
770 |
||
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
771 |
throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.paramtype").toString()); |
2 | 772 |
|
773 |
} else { |
|
774 |
// common case - this catches all SQL92 types |
|
775 |
ps.setObject(i + 1, params[i]); |
|
776 |
continue; |
|
777 |
} |
|
778 |
} else { |
|
779 |
// Try to get all the params to be set here |
|
780 |
ps.setObject(i + 1, params[i]); |
|
781 |
||
782 |
} |
|
783 |
} |
|
784 |
} |
|
785 |
||
786 |
/** |
|
31061 | 787 |
* Moves the cursor for this rowset's {@code ResultSet} |
2 | 788 |
* object down one row from its current position. |
31061 | 789 |
* A {@code ResultSet} cursor is initially positioned |
2 | 790 |
* before the first row; the first call to the method |
31061 | 791 |
* {@code next} makes the first row the current row; the |
2 | 792 |
* second call makes the second row the current row, and so on. |
793 |
* |
|
794 |
* <P>If an input stream is open for the current row, a call |
|
31061 | 795 |
* to the method {@code next} will |
796 |
* implicitly close it. A {@code ResultSet} object's |
|
2 | 797 |
* warning chain is cleared when a new row is read. |
798 |
* |
|
31061 | 799 |
* @return {@code true} if the new current row is valid; |
800 |
* {@code false} if there are no more rows |
|
2 | 801 |
* @throws SQLException if a database access error occurs |
802 |
* or this rowset does not currently have a valid connection, |
|
803 |
* prepared statement, and result set |
|
804 |
*/ |
|
805 |
public boolean next() throws SQLException { |
|
806 |
checkState(); |
|
807 |
||
808 |
boolean b = rs.next(); |
|
809 |
notifyCursorMoved(); |
|
810 |
return b; |
|
811 |
} |
|
812 |
||
813 |
/** |
|
31061 | 814 |
* Releases this rowset's {@code ResultSet} object's database and |
2 | 815 |
* JDBC resources immediately instead of waiting for |
816 |
* this to happen when it is automatically closed. |
|
817 |
* |
|
31061 | 818 |
* <P><B>Note:</B> A {@code ResultSet} object |
2 | 819 |
* is automatically closed by the |
31061 | 820 |
* {@code Statement} object that generated it when |
821 |
* that {@code Statement} object is closed, |
|
2 | 822 |
* re-executed, or is used to retrieve the next result from a |
31061 | 823 |
* sequence of multiple results. A {@code ResultSet} object |
2 | 824 |
* is also automatically closed when it is garbage collected. |
825 |
* |
|
826 |
* @throws SQLException if a database access error occurs |
|
827 |
*/ |
|
828 |
public void close() throws SQLException { |
|
829 |
if (rs != null) |
|
830 |
rs.close(); |
|
831 |
if (ps != null) |
|
832 |
ps.close(); |
|
833 |
if (conn != null) |
|
834 |
conn.close(); |
|
835 |
} |
|
836 |
||
837 |
/** |
|
838 |
* Reports whether the last column read from this rowset's |
|
31061 | 839 |
* {@code ResultSet} object had a value of SQL {@code NULL}. |
840 |
* Note that you must first call one of the {@code getXXX} methods |
|
2 | 841 |
* on a column to try to read its value and then call |
31061 | 842 |
* the method {@code wasNull} to see if the value read was |
843 |
* SQL {@code NULL}. |
|
844 |
* |
|
845 |
* @return {@code true} if the last column value read was SQL |
|
846 |
* {@code NULL} and {@code false} otherwise |
|
2 | 847 |
* @throws SQLException if a database access error occurs |
848 |
* or this rowset does not have a currently valid connection, |
|
849 |
* prepared statement, and result set |
|
850 |
*/ |
|
851 |
public boolean wasNull() throws SQLException { |
|
852 |
checkState(); |
|
853 |
||
854 |
return rs.wasNull(); |
|
855 |
} |
|
856 |
||
857 |
//====================================================================== |
|
858 |
// Methods for accessing results by column index |
|
859 |
//====================================================================== |
|
860 |
||
861 |
/** |
|
862 |
* Gets the value of the designated column in the current row |
|
31061 | 863 |
* of this rowset's {@code ResultSet} object as |
864 |
* a {@code String}. |
|
2 | 865 |
* |
866 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
31061 | 867 |
* @return the column value; if the value is SQL {@code NULL}, the |
868 |
* value returned is {@code null} |
|
2 | 869 |
* @throws SQLException if (1) a database access error occurs |
870 |
* or (2) this rowset does not currently have a valid connection, |
|
871 |
* prepared statement, and result set |
|
872 |
*/ |
|
873 |
public String getString(int columnIndex) throws SQLException { |
|
874 |
checkState(); |
|
875 |
||
876 |
return rs.getString(columnIndex); |
|
877 |
} |
|
878 |
||
879 |
/** |
|
880 |
* Gets the value of the designated column in the current row |
|
31061 | 881 |
* of this rowset's {@code ResultSet} object as |
882 |
* a {@code boolean}. |
|
2 | 883 |
* |
884 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
31061 | 885 |
* @return the column value; if the value is SQL {@code NULL}, the |
886 |
* value returned is {@code false} |
|
2 | 887 |
* @throws SQLException if (1) a database access error occurs |
888 |
* or (2) this rowset does not have a currently valid connection, |
|
889 |
* prepared statement, and result set |
|
890 |
*/ |
|
891 |
public boolean getBoolean(int columnIndex) throws SQLException { |
|
892 |
checkState(); |
|
893 |
||
894 |
return rs.getBoolean(columnIndex); |
|
895 |
} |
|
896 |
||
897 |
/** |
|
898 |
* Gets the value of the designated column in the current row |
|
31061 | 899 |
* of this rowset's {@code ResultSet} object as |
900 |
* a {@code byte}. |
|
2 | 901 |
* |
902 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
31061 | 903 |
* @return the column value; if the value is SQL {@code NULL}, the |
904 |
* value returned is {@code 0} |
|
2 | 905 |
* @throws SQLException if (1) a database access error occurs |
906 |
* or (2) this rowset does not have a currently valid connection, |
|
907 |
* prepared statement, and result set |
|
908 |
*/ |
|
909 |
public byte getByte(int columnIndex) throws SQLException { |
|
910 |
checkState(); |
|
911 |
||
912 |
return rs.getByte(columnIndex); |
|
913 |
} |
|
914 |
||
915 |
/** |
|
916 |
* Gets the value of the designated column in the current row |
|
31061 | 917 |
* of this rowset's {@code ResultSet} object as |
918 |
* a {@code short}. |
|
2 | 919 |
* |
920 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
31061 | 921 |
* @return the column value; if the value is SQL {@code NULL}, the |
922 |
* value returned is {@code 0} |
|
2 | 923 |
* @throws SQLException if (1) a database access error occurs |
924 |
* or (2) this rowset does not have a currently valid connection, |
|
925 |
* prepared statement, and result set |
|
926 |
*/ |
|
927 |
public short getShort(int columnIndex) throws SQLException { |
|
928 |
checkState(); |
|
929 |
||
930 |
return rs.getShort(columnIndex); |
|
931 |
} |
|
932 |
||
933 |
/** |
|
934 |
* Gets the value of the designated column in the current row |
|
31061 | 935 |
* of this rowset's {@code ResultSet} object as |
936 |
* an {@code int}. |
|
2 | 937 |
* |
938 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
31061 | 939 |
* @return the column value; if the value is SQL {@code NULL}, the |
940 |
* value returned is {@code 0} |
|
2 | 941 |
* @throws SQLException if (1) a database access error occurs |
942 |
* or (2) this rowset does not have a currently valid connection, |
|
943 |
* prepared statement, and result set |
|
944 |
*/ |
|
945 |
public int getInt(int columnIndex) throws SQLException { |
|
946 |
checkState(); |
|
947 |
||
948 |
return rs.getInt(columnIndex); |
|
949 |
} |
|
950 |
||
951 |
/** |
|
952 |
* Gets the value of the designated column in the current row |
|
31061 | 953 |
* of this rowset's {@code ResultSet} object as |
954 |
* a {@code long}. |
|
2 | 955 |
* |
956 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
31061 | 957 |
* @return the column value; if the value is SQL {@code NULL}, the |
958 |
* value returned is {@code 0} |
|
2 | 959 |
* @throws SQLException if (1) a database access error occurs |
960 |
* or (2) this rowset does not have a currently valid connection, |
|
961 |
* prepared statement, and result set |
|
962 |
*/ |
|
963 |
public long getLong(int columnIndex) throws SQLException { |
|
964 |
checkState(); |
|
965 |
||
966 |
return rs.getLong(columnIndex); |
|
967 |
} |
|
968 |
||
969 |
/** |
|
970 |
* Gets the value of the designated column in the current row |
|
31061 | 971 |
* of this rowset's {@code ResultSet} object as |
972 |
* a {@code float}. |
|
2 | 973 |
* |
974 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
31061 | 975 |
* @return the column value; if the value is SQL {@code NULL}, the |
976 |
* value returned is {@code 0} |
|
2 | 977 |
* @throws SQLException if (1) a database access error occurs |
978 |
* or (2) this rowset does not have a currently valid connection, |
|
979 |
* prepared statement, and result set |
|
980 |
*/ |
|
981 |
public float getFloat(int columnIndex) throws SQLException { |
|
982 |
checkState(); |
|
983 |
||
984 |
return rs.getFloat(columnIndex); |
|
985 |
} |
|
986 |
||
987 |
/** |
|
988 |
* Gets the value of the designated column in the current row |
|
31061 | 989 |
* of this rowset's {@code ResultSet} object as |
990 |
* a {@code double}. |
|
2 | 991 |
* |
992 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
31061 | 993 |
* @return the column value; if the value is SQL {@code NULL}, the |
994 |
* value returned is {@code 0} |
|
2 | 995 |
* @throws SQLException if (1) a database access error occurs |
996 |
* or (2) this rowset does not have a currently valid connection, |
|
997 |
* prepared statement, and result set |
|
998 |
*/ |
|
999 |
public double getDouble(int columnIndex) throws SQLException { |
|
1000 |
checkState(); |
|
1001 |
||
1002 |
return rs.getDouble(columnIndex); |
|
1003 |
} |
|
1004 |
||
1005 |
/** |
|
1006 |
* Gets the value of the designated column in the current row |
|
31061 | 1007 |
* of this rowset's {@code ResultSet} object as |
1008 |
* a {@code java.sql.BigDecimal}. |
|
2 | 1009 |
* |
1010 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
1011 |
* @param scale the number of digits to the right of the decimal point |
|
31061 | 1012 |
* @return the column value; if the value is SQL {@code NULL}, the |
1013 |
* value returned is {@code null} |
|
2 | 1014 |
* @throws SQLException if (1) database access error occurs |
1015 |
* or (2) this rowset does not have a currently valid connection, |
|
1016 |
* prepared statement, and result set |
|
1017 |
* @deprecated |
|
1018 |
*/ |
|
14171
94eb36844bd7
7197395: Add @Deprecated to all deprecated methods to eliminate compiler warnings in JDBC
lancea
parents:
13785
diff
changeset
|
1019 |
@Deprecated |
2 | 1020 |
public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException { |
1021 |
checkState(); |
|
1022 |
||
1023 |
return rs.getBigDecimal(columnIndex, scale); |
|
1024 |
} |
|
1025 |
||
1026 |
/** |
|
1027 |
* Gets the value of the designated column in the current row |
|
31061 | 1028 |
* of this rowset's {@code ResultSet} object as |
1029 |
* a {@code byte} array in the Java programming language. |
|
2 | 1030 |
* The bytes represent the raw values returned by the driver. |
1031 |
* |
|
1032 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
31061 | 1033 |
* @return the column value; if the value is SQL {@code NULL}, the |
1034 |
* value returned is {@code null} |
|
2 | 1035 |
* @throws SQLException if (1) a database access error occurs |
1036 |
* or (2) this rowset does not have a currently valid connection, |
|
1037 |
* prepared statement, and result set |
|
1038 |
*/ |
|
1039 |
public byte[] getBytes(int columnIndex) throws SQLException { |
|
1040 |
checkState(); |
|
1041 |
||
1042 |
return rs.getBytes(columnIndex); |
|
1043 |
} |
|
1044 |
||
1045 |
/** |
|
1046 |
* Gets the value of the designated column in the current row |
|
31061 | 1047 |
* of this rowset's {@code ResultSet} object as |
1048 |
* a {@code java.sql.Date} object in the Java programming language. |
|
2 | 1049 |
* |
1050 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
31061 | 1051 |
* @return the column value; if the value is SQL {@code NULL}, the |
1052 |
* value returned is {@code null} |
|
2 | 1053 |
* @throws SQLException if (1) a database access error occurs |
1054 |
* or (2) this rowset does not have a currently valid connection, |
|
1055 |
* prepared statement, and result set |
|
1056 |
*/ |
|
1057 |
public java.sql.Date getDate(int columnIndex) throws SQLException { |
|
1058 |
checkState(); |
|
1059 |
||
1060 |
return rs.getDate(columnIndex); |
|
1061 |
} |
|
1062 |
||
1063 |
/** |
|
1064 |
* Gets the value of the designated column in the current row |
|
31061 | 1065 |
* of this rowset's {@code ResultSet} object as |
1066 |
* a {@code java.sql.Time} object in the Java programming language. |
|
2 | 1067 |
* |
1068 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
31061 | 1069 |
* @return the column value; if the value is SQL {@code NULL}, the |
1070 |
* value returned is {@code null} |
|
2 | 1071 |
* @throws SQLException if (1) a database access error occurs |
1072 |
* or (2) this rowset does not have a currently valid connection, |
|
1073 |
* prepared statement, and result set |
|
1074 |
*/ |
|
1075 |
public java.sql.Time getTime(int columnIndex) throws SQLException { |
|
1076 |
checkState(); |
|
1077 |
||
1078 |
return rs.getTime(columnIndex); |
|
1079 |
} |
|
1080 |
||
1081 |
/** |
|
1082 |
* Gets the value of the designated column in the current row |
|
31061 | 1083 |
* of this rowset's {@code ResultSet} object as |
1084 |
* a {@code java.sql.Timestamp} object in the Java programming language. |
|
2 | 1085 |
* |
1086 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
31061 | 1087 |
* @return the column value; if the value is SQL {@code NULL}, the |
1088 |
* value returned is {@code null} |
|
2 | 1089 |
* @throws SQLException if (1) a database access error occurs |
1090 |
* or (2) this rowset does not have a currently valid connection, |
|
1091 |
* prepared statement, and result set |
|
1092 |
*/ |
|
1093 |
public java.sql.Timestamp getTimestamp(int columnIndex) throws SQLException { |
|
1094 |
checkState(); |
|
1095 |
||
1096 |
return rs.getTimestamp(columnIndex); |
|
1097 |
} |
|
1098 |
||
1099 |
/** |
|
1100 |
* Gets the value of the designated column in the current row |
|
31061 | 1101 |
* of this rowset's {@code ResultSet} object as |
2 | 1102 |
* a stream of ASCII characters. The value can then be read in chunks from the |
1103 |
* stream. This method is particularly |
|
31061 | 1104 |
* suitable for retrieving large {@code LONGVARCHAR} values. |
2 | 1105 |
* The JDBC driver will |
1106 |
* do any necessary conversion from the database format into ASCII. |
|
1107 |
* |
|
1108 |
* <P><B>Note:</B> All the data in the returned stream must be |
|
1109 |
* read prior to getting the value of any other column. The next |
|
31061 | 1110 |
* call to a {@code getXXX} method implicitly closes the stream. Also, a |
1111 |
* stream may return {@code 0} when the method |
|
1112 |
* {@code InputStream.available} |
|
2 | 1113 |
* is called whether there is data available or not. |
1114 |
* |
|
1115 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
1116 |
* @return a Java input stream that delivers the database column value |
|
31061 | 1117 |
* as a stream of one-byte ASCII characters; |
1118 |
* if the value is SQL {@code NULL}, the |
|
1119 |
* value returned is {@code null} |
|
2 | 1120 |
* @throws SQLException if (1) database access error occurs |
1121 |
* (2) this rowset does not have a currently valid connection, |
|
1122 |
* prepared statement, and result set |
|
1123 |
*/ |
|
1124 |
public java.io.InputStream getAsciiStream(int columnIndex) throws SQLException { |
|
1125 |
checkState(); |
|
1126 |
||
1127 |
return rs.getAsciiStream(columnIndex); |
|
1128 |
} |
|
1129 |
||
1130 |
/** |
|
1131 |
* Gets the value of the designated column in the current row |
|
31061 | 1132 |
* of this rowset's {@code ResultSet} object as |
2 | 1133 |
* as a stream of Unicode characters. |
1134 |
* The value can then be read in chunks from the |
|
1135 |
* stream. This method is particularly |
|
31061 | 1136 |
* suitable for retrieving large{@code LONGVARCHAR}values. The JDBC driver will |
2 | 1137 |
* do any necessary conversion from the database format into Unicode. |
1138 |
* The byte format of the Unicode stream must be Java UTF-8, |
|
1139 |
* as specified in the Java virtual machine specification. |
|
1140 |
* |
|
1141 |
* <P><B>Note:</B> All the data in the returned stream must be |
|
1142 |
* read prior to getting the value of any other column. The next |
|
31061 | 1143 |
* call to a {@code getXXX} method implicitly closes the stream. Also, a |
1144 |
* stream may return {@code 0} when the method |
|
1145 |
* {@code InputStream.available} |
|
2 | 1146 |
* is called whether there is data available or not. |
1147 |
* |
|
1148 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
1149 |
* @return a Java input stream that delivers the database column value |
|
31061 | 1150 |
* as a stream in Java UTF-8 byte format; |
1151 |
* if the value is SQL {@code NULL}, the value returned is {@code null} |
|
2 | 1152 |
* @throws SQLException if (1) a database access error occurs |
1153 |
* or (2) this rowset does not have a currently valid connection, |
|
1154 |
* prepared statement, and result set |
|
31061 | 1155 |
* @deprecated use {@code getCharacterStream} in place of |
1156 |
* {@code getUnicodeStream} |
|
2 | 1157 |
*/ |
14171
94eb36844bd7
7197395: Add @Deprecated to all deprecated methods to eliminate compiler warnings in JDBC
lancea
parents:
13785
diff
changeset
|
1158 |
@Deprecated |
2 | 1159 |
public java.io.InputStream getUnicodeStream(int columnIndex) throws SQLException { |
1160 |
checkState(); |
|
1161 |
||
1162 |
return rs.getUnicodeStream(columnIndex); |
|
1163 |
} |
|
1164 |
||
1165 |
/** |
|
1166 |
* Gets the value of a column in the current row as a stream of |
|
1167 |
* the value of the designated column in the current row |
|
31061 | 1168 |
* of this rowset's {@code ResultSet} object as a binary stream of |
2 | 1169 |
* uninterpreted bytes. The value can then be read in chunks from the |
1170 |
* stream. This method is particularly |
|
31061 | 1171 |
* suitable for retrieving large {@code LONGVARBINARY} values. |
2 | 1172 |
* |
1173 |
* <P><B>Note:</B> All the data in the returned stream must be |
|
1174 |
* read prior to getting the value of any other column. The next |
|
31061 | 1175 |
* call to a {@code getXXX} method implicitly closes the stream. Also, a |
1176 |
* stream may return {@code 0} when the method |
|
1177 |
* {@code InputStream.available} |
|
2 | 1178 |
* is called whether there is data available or not. |
1179 |
* |
|
1180 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
1181 |
* @return a Java input stream that delivers the database column value |
|
31061 | 1182 |
* as a stream of uninterpreted bytes; |
1183 |
* if the value is SQL {@code NULL}, the value returned is {@code null} |
|
2 | 1184 |
* @throws SQLException if (1) a database access error occurs |
1185 |
* or (2) this rowset does not have a currently valid connection, |
|
1186 |
* prepared statement, and result set |
|
1187 |
*/ |
|
1188 |
public java.io.InputStream getBinaryStream(int columnIndex) throws SQLException { |
|
1189 |
checkState(); |
|
1190 |
||
1191 |
return rs.getBinaryStream(columnIndex); |
|
1192 |
} |
|
1193 |
||
1194 |
||
1195 |
//====================================================================== |
|
1196 |
// Methods for accessing results by column name |
|
1197 |
//====================================================================== |
|
1198 |
||
1199 |
/** |
|
1200 |
* Gets the value of the designated column in the current row |
|
31061 | 1201 |
* of this rowset's {@code ResultSet} object as |
1202 |
* a {@code String}. |
|
2 | 1203 |
* |
1204 |
* @param columnName the SQL name of the column |
|
31061 | 1205 |
* @return the column value; if the value is SQL {@code NULL}, the |
1206 |
* value returned is {@code null} |
|
2 | 1207 |
* @throws SQLException if (1) a database access error occurs |
1208 |
* or (2) this rowset does not have a currently valid connection, |
|
1209 |
* prepared statement, and result set |
|
1210 |
*/ |
|
1211 |
public String getString(String columnName) throws SQLException { |
|
1212 |
return getString(findColumn(columnName)); |
|
1213 |
} |
|
1214 |
||
1215 |
/** |
|
1216 |
* Gets the value of the designated column in the current row |
|
31061 | 1217 |
* of this rowset's {@code ResultSet} object as |
1218 |
* a {@code boolean}. |
|
2 | 1219 |
* |
1220 |
* @param columnName the SQL name of the column |
|
31061 | 1221 |
* @return the column value; if the value is SQL {@code NULL}, the |
1222 |
* value returned is {@code false} |
|
2 | 1223 |
* @throws SQLException if (1) a database access error occurs |
1224 |
* or (2) this rowset does not have a currently valid connection, |
|
1225 |
* prepared statement, and result set |
|
1226 |
*/ |
|
1227 |
public boolean getBoolean(String columnName) throws SQLException { |
|
1228 |
return getBoolean(findColumn(columnName)); |
|
1229 |
} |
|
1230 |
||
1231 |
/** |
|
1232 |
* Gets the value of the designated column in the current row |
|
31061 | 1233 |
* of this rowset's {@code ResultSet} object as |
1234 |
* a {@code byte}. |
|
2 | 1235 |
* |
1236 |
* @param columnName the SQL name of the column |
|
31061 | 1237 |
* @return the column value; if the value is SQL {@code NULL}, the |
1238 |
* value returned is {@code 0} |
|
2 | 1239 |
* @throws SQLException if (1) a database access error occurs |
1240 |
* or (2) this rowset does not have a currently valid connection, |
|
1241 |
* prepared statement, and result set |
|
1242 |
*/ |
|
1243 |
public byte getByte(String columnName) throws SQLException { |
|
1244 |
return getByte(findColumn(columnName)); |
|
1245 |
} |
|
1246 |
||
1247 |
/** |
|
1248 |
* Gets the value of the designated column in the current row |
|
31061 | 1249 |
* of this rowset's {@code ResultSet} object as |
1250 |
* a {@code short}. |
|
2 | 1251 |
* |
1252 |
* @param columnName the SQL name of the column |
|
31061 | 1253 |
* @return the column value; if the value is SQL {@code NULL}, the |
1254 |
* value returned is {@code 0} |
|
2 | 1255 |
* @throws SQLException if (1) a database access error occurs |
1256 |
* or (2) this rowset does not have a currently valid connection, |
|
1257 |
* prepared statement, and result set |
|
1258 |
*/ |
|
1259 |
public short getShort(String columnName) throws SQLException { |
|
1260 |
return getShort(findColumn(columnName)); |
|
1261 |
} |
|
1262 |
||
1263 |
/** |
|
1264 |
* Gets the value of the designated column in the current row |
|
31061 | 1265 |
* of this rowset's {@code ResultSet} object as |
1266 |
* an {@code int}. |
|
2 | 1267 |
* |
1268 |
* @param columnName the SQL name of the column |
|
31061 | 1269 |
* @return the column value; if the value is SQL {@code NULL}, the |
1270 |
* value returned is {@code 0} |
|
2 | 1271 |
* @throws SQLException if (1) a database access error occurs |
1272 |
* or (2) this rowset does not have a currently valid connection, |
|
1273 |
* prepared statement, and result set |
|
1274 |
*/ |
|
1275 |
public int getInt(String columnName) throws SQLException { |
|
1276 |
return getInt(findColumn(columnName)); |
|
1277 |
} |
|
1278 |
||
1279 |
/** |
|
1280 |
* Gets the value of the designated column in the current row |
|
31061 | 1281 |
* of this rowset's {@code ResultSet} object as |
1282 |
* a {@code long}. |
|
2 | 1283 |
* |
1284 |
* @param columnName the SQL name of the column |
|
31061 | 1285 |
* @return the column value; if the value is SQL {@code NULL}, the |
1286 |
* value returned is {@code 0} |
|
2 | 1287 |
* @throws SQLException if a database access error occurs |
1288 |
* or this rowset does not have a currently valid connection, |
|
1289 |
* prepared statement, and result set |
|
1290 |
*/ |
|
1291 |
public long getLong(String columnName) throws SQLException { |
|
1292 |
return getLong(findColumn(columnName)); |
|
1293 |
} |
|
1294 |
||
1295 |
/** |
|
1296 |
* Gets the value of the designated column in the current row |
|
31061 | 1297 |
* of this rowset's {@code ResultSet} object as |
1298 |
* a {@code float}. |
|
2 | 1299 |
* |
1300 |
* @param columnName the SQL name of the column |
|
31061 | 1301 |
* @return the column value; if the value is SQL {@code NULL}, the |
1302 |
* value returned is {@code 0} |
|
2 | 1303 |
* @throws SQLException if (1) a database access error occurs |
1304 |
* or (2) this rowset does not have a currently valid connection, |
|
1305 |
* prepared statement, and result set |
|
1306 |
*/ |
|
1307 |
public float getFloat(String columnName) throws SQLException { |
|
1308 |
return getFloat(findColumn(columnName)); |
|
1309 |
} |
|
1310 |
||
1311 |
/** |
|
1312 |
* Gets the value of the designated column in the current row |
|
31061 | 1313 |
* of this rowset's {@code ResultSet} object as |
1314 |
* a {@code double}. |
|
2 | 1315 |
* |
1316 |
* @param columnName the SQL name of the column |
|
31061 | 1317 |
* @return the column value; if the value is SQL {@code NULL}, the |
1318 |
* value returned is {@code 0} |
|
2 | 1319 |
* @throws SQLException if (1) a database access error occurs |
1320 |
* or (2) this rowset does not have a currently valid connection, |
|
1321 |
* prepared statement, and result set |
|
1322 |
*/ |
|
1323 |
public double getDouble(String columnName) throws SQLException { |
|
1324 |
return getDouble(findColumn(columnName)); |
|
1325 |
} |
|
1326 |
||
1327 |
/** |
|
1328 |
* Gets the value of the designated column in the current row |
|
31061 | 1329 |
* of this rowset's {@code ResultSet} object as |
1330 |
* a {@code java.math.BigDecimal}. |
|
2 | 1331 |
* |
1332 |
* @param columnName the SQL name of the column |
|
1333 |
* @param scale the number of digits to the right of the decimal point |
|
31061 | 1334 |
* @return the column value; if the value is SQL {@code NULL}, the |
1335 |
* value returned is {@code null} |
|
2 | 1336 |
* @throws SQLException if (1) adatabase access error occurs |
1337 |
* or (2) this rowset does not have a currently valid connection, |
|
1338 |
* prepared statement, and result set |
|
1339 |
* @deprecated |
|
1340 |
*/ |
|
14171
94eb36844bd7
7197395: Add @Deprecated to all deprecated methods to eliminate compiler warnings in JDBC
lancea
parents:
13785
diff
changeset
|
1341 |
@Deprecated |
2 | 1342 |
public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException { |
1343 |
return getBigDecimal(findColumn(columnName), scale); |
|
1344 |
} |
|
1345 |
||
1346 |
/** |
|
1347 |
* Gets the value of the designated column in the current row |
|
31061 | 1348 |
* of this rowset's {@code ResultSet} object as |
1349 |
* a {@code byte} array in the Java programming language. |
|
2 | 1350 |
* The bytes represent the raw values returned by the driver. |
1351 |
* |
|
1352 |
* @param columnName the SQL name of the column |
|
31061 | 1353 |
* @return the column value; if the value is SQL {@code NULL}, the |
1354 |
* value returned is {@code null} |
|
2 | 1355 |
* @throws SQLException if (1) a database access error occurs |
1356 |
* or (2) this rowset does not have a currently valid connection, |
|
1357 |
* prepared statement, and result set |
|
1358 |
*/ |
|
1359 |
public byte[] getBytes(String columnName) throws SQLException { |
|
1360 |
return getBytes(findColumn(columnName)); |
|
1361 |
} |
|
1362 |
||
1363 |
/** |
|
1364 |
* Gets the value of the designated column in the current row |
|
31061 | 1365 |
* of this rowset's {@code ResultSet} object as |
1366 |
* a {@code java.sql.Date} object in the Java programming language. |
|
2 | 1367 |
* |
1368 |
* @param columnName the SQL name of the column |
|
31061 | 1369 |
* @return the column value; if the value is SQL {@code NULL}, the |
1370 |
* value returned is {@code null} |
|
2 | 1371 |
* @throws SQLException if (1) a database access error occurs |
1372 |
* or (2) this rowset does not have a currently valid connection, |
|
1373 |
* prepared statement, and result set |
|
1374 |
*/ |
|
1375 |
public java.sql.Date getDate(String columnName) throws SQLException { |
|
1376 |
return getDate(findColumn(columnName)); |
|
1377 |
} |
|
1378 |
||
1379 |
/** |
|
1380 |
* Gets the value of the designated column in the current row |
|
31061 | 1381 |
* of this rowset's {@code ResultSet} object as |
1382 |
* a {@code java.sql.Time} object in the Java programming language. |
|
2 | 1383 |
* |
1384 |
* @param columnName the SQL name of the column |
|
1385 |
* @return the column value; |
|
31061 | 1386 |
* if the value is SQL {@code NULL}, |
1387 |
* the value returned is {@code null} |
|
2 | 1388 |
* @throws SQLException if (1) a database access error occurs |
1389 |
* or (2) this rowset does not have a currently valid connection, |
|
1390 |
* prepared statement, and result set |
|
1391 |
*/ |
|
1392 |
public java.sql.Time getTime(String columnName) throws SQLException { |
|
1393 |
return getTime(findColumn(columnName)); |
|
1394 |
} |
|
1395 |
||
1396 |
/** |
|
1397 |
* Gets the value of the designated column in the current row |
|
31061 | 1398 |
* of this rowset's {@code ResultSet} object as |
1399 |
* a {@code java.sql.Timestamp} object. |
|
2 | 1400 |
* |
1401 |
* @param columnName the SQL name of the column |
|
31061 | 1402 |
* @return the column value; if the value is SQL {@code NULL}, the |
1403 |
* value returned is {@code null} |
|
2 | 1404 |
* @throws SQLException if (1) a database access error occurs |
1405 |
* or (2) this rowset does not have a currently valid connection, |
|
1406 |
* prepared statement, and result set |
|
1407 |
*/ |
|
1408 |
public java.sql.Timestamp getTimestamp(String columnName) throws SQLException { |
|
1409 |
return getTimestamp(findColumn(columnName)); |
|
1410 |
} |
|
1411 |
||
1412 |
/** |
|
1413 |
* Gets the value of the designated column in the current row |
|
31061 | 1414 |
* of this rowset's {@code ResultSet} object as a stream of |
2 | 1415 |
* ASCII characters. The value can then be read in chunks from the |
1416 |
* stream. This method is particularly |
|
31061 | 1417 |
* suitable for retrieving large {@code LONGVARCHAR} values. |
2 | 1418 |
* The JDBC driver will |
1419 |
* do any necessary conversion from the database format into ASCII. |
|
1420 |
* |
|
1421 |
* <P><B>Note:</B> All the data in the returned stream must be |
|
1422 |
* read prior to getting the value of any other column. The next |
|
31061 | 1423 |
* call to a {@code getXXX} method implicitly closes the stream. Also, a |
1424 |
* stream may return {@code 0} when the method {@code available} |
|
2 | 1425 |
* is called whether there is data available or not. |
1426 |
* |
|
1427 |
* @param columnName the SQL name of the column |
|
1428 |
* @return a Java input stream that delivers the database column value |
|
31061 | 1429 |
* as a stream of one-byte ASCII characters. |
1430 |
* If the value is SQL {@code NULL}, |
|
1431 |
* the value returned is {@code null}. |
|
2 | 1432 |
* @throws SQLException if (1) a database access error occurs |
1433 |
* or (2) this rowset does not have a currently valid connection, |
|
1434 |
* prepared statement, and result set |
|
1435 |
*/ |
|
1436 |
public java.io.InputStream getAsciiStream(String columnName) throws SQLException { |
|
1437 |
return getAsciiStream(findColumn(columnName)); |
|
1438 |
} |
|
1439 |
||
1440 |
/** |
|
1441 |
* Gets the value of the designated column in the current row |
|
31061 | 1442 |
* of this rowset's {@code ResultSet} object as a stream of |
2 | 1443 |
* Unicode characters. The value can then be read in chunks from the |
1444 |
* stream. This method is particularly |
|
31061 | 1445 |
* suitable for retrieving large {@code LONGVARCHAR} values. |
2 | 1446 |
* The JDBC driver will |
1447 |
* do any necessary conversion from the database format into Unicode. |
|
1448 |
* The byte format of the Unicode stream must be Java UTF-8, |
|
1449 |
* as defined in the Java virtual machine specification. |
|
1450 |
* |
|
1451 |
* <P><B>Note:</B> All the data in the returned stream must be |
|
1452 |
* read prior to getting the value of any other column. The next |
|
31061 | 1453 |
* call to a {@code getXXX} method implicitly closes the stream. Also, a |
1454 |
* stream may return {@code 0} when the method {@code available} |
|
2 | 1455 |
* is called whether there is data available or not. |
1456 |
* |
|
1457 |
* @param columnName the SQL name of the column |
|
1458 |
* @return a Java input stream that delivers the database column value |
|
31061 | 1459 |
* as a stream of two-byte Unicode characters. |
1460 |
* If the value is SQL {@code NULL}, |
|
1461 |
* the value returned is {@code null}. |
|
2 | 1462 |
* @throws SQLException if (1) a database access error occurs |
1463 |
* or (2) this rowset does not have a currently valid connection, |
|
1464 |
* prepared statement, and result set |
|
1465 |
* @deprecated |
|
1466 |
*/ |
|
14171
94eb36844bd7
7197395: Add @Deprecated to all deprecated methods to eliminate compiler warnings in JDBC
lancea
parents:
13785
diff
changeset
|
1467 |
@Deprecated |
2 | 1468 |
public java.io.InputStream getUnicodeStream(String columnName) throws SQLException { |
1469 |
return getUnicodeStream(findColumn(columnName)); |
|
1470 |
} |
|
1471 |
||
1472 |
/** |
|
1473 |
* Gets the value of the designated column in the current row |
|
31061 | 1474 |
* of this rowset's {@code ResultSet} object as a stream of uninterpreted |
1475 |
* {@code byte}s. |
|
2 | 1476 |
* The value can then be read in chunks from the |
1477 |
* stream. This method is particularly |
|
31061 | 1478 |
* suitable for retrieving large {@code LONGVARBINARY} |
2 | 1479 |
* values. |
1480 |
* |
|
1481 |
* <P><B>Note:</B> All the data in the returned stream must be |
|
1482 |
* read prior to getting the value of any other column. The next |
|
31061 | 1483 |
* call to a {@code getXXX} method implicitly closes the stream. Also, a |
1484 |
* stream may return {@code 0} when the method {@code available} |
|
2 | 1485 |
* is called whether there is data available or not. |
1486 |
* |
|
1487 |
* @param columnName the SQL name of the column |
|
1488 |
* @return a Java input stream that delivers the database column value |
|
31061 | 1489 |
* as a stream of uninterpreted bytes; |
1490 |
* if the value is SQL {@code NULL}, the result is {@code null} |
|
2 | 1491 |
* @throws SQLException if (1) a database access error occurs |
1492 |
* or (2) this rowset does not have a currently valid connection, |
|
1493 |
* prepared statement, and result set |
|
1494 |
*/ |
|
1495 |
public java.io.InputStream getBinaryStream(String columnName) throws SQLException { |
|
1496 |
return getBinaryStream(findColumn(columnName)); |
|
1497 |
} |
|
1498 |
||
1499 |
||
1500 |
//===================================================================== |
|
1501 |
// Advanced features: |
|
1502 |
//===================================================================== |
|
1503 |
||
1504 |
/** |
|
1505 |
* Returns the first warning reported by calls on this rowset's |
|
31061 | 1506 |
* {@code ResultSet} object. |
1507 |
* Subsequent warnings on this rowset's {@code ResultSet} object |
|
1508 |
* will be chained to the {@code SQLWarning} object that |
|
2 | 1509 |
* this method returns. |
1510 |
* |
|
1511 |
* <P>The warning chain is automatically cleared each time a new |
|
1512 |
* row is read. |
|
1513 |
* |
|
1514 |
* <P><B>Note:</B> This warning chain only covers warnings caused |
|
31061 | 1515 |
* by {@code ResultSet} methods. Any warning caused by |
1516 |
* {@code Statement} methods |
|
2 | 1517 |
* (such as reading OUT parameters) will be chained on the |
31061 | 1518 |
* {@code Statement} object. |
1519 |
* |
|
1520 |
* @return the first {@code SQLWarning} object reported or {@code null} |
|
2 | 1521 |
* @throws SQLException if (1) a database access error occurs |
1522 |
* or (2) this rowset does not have a currently valid connection, |
|
1523 |
* prepared statement, and result set |
|
1524 |
*/ |
|
1525 |
public SQLWarning getWarnings() throws SQLException { |
|
1526 |
checkState(); |
|
1527 |
||
1528 |
return rs.getWarnings(); |
|
1529 |
} |
|
1530 |
||
1531 |
/** |
|
31061 | 1532 |
* Clears all warnings reported on this rowset's {@code ResultSet} object. |
1533 |
* After this method is called, the method {@code getWarnings} |
|
1534 |
* returns {@code null} until a new warning is |
|
1535 |
* reported for this rowset's {@code ResultSet} object. |
|
2 | 1536 |
* |
1537 |
* @throws SQLException if (1) a database access error occurs |
|
1538 |
* or (2) this rowset does not have a currently valid connection, |
|
1539 |
* prepared statement, and result set |
|
1540 |
*/ |
|
1541 |
public void clearWarnings() throws SQLException { |
|
1542 |
checkState(); |
|
1543 |
||
1544 |
rs.clearWarnings(); |
|
1545 |
} |
|
1546 |
||
1547 |
/** |
|
31061 | 1548 |
* Gets the name of the SQL cursor used by this rowset's {@code ResultSet} |
2 | 1549 |
* object. |
1550 |
* |
|
1551 |
* <P>In SQL, a result table is retrieved through a cursor that is |
|
1552 |
* named. The current row of a result set can be updated or deleted |
|
1553 |
* using a positioned update/delete statement that references the |
|
1554 |
* cursor name. To insure that the cursor has the proper isolation |
|
31061 | 1555 |
* level to support update, the cursor's {@code select} statement should be |
2 | 1556 |
* of the form 'select for update'. If the 'for update' clause is |
1557 |
* omitted, the positioned updates may fail. |
|
1558 |
* |
|
1559 |
* <P>The JDBC API supports this SQL feature by providing the name of the |
|
31061 | 1560 |
* SQL cursor used by a {@code ResultSet} object. |
1561 |
* The current row of a {@code ResultSet} object |
|
2 | 1562 |
* is also the current row of this SQL cursor. |
1563 |
* |
|
1564 |
* <P><B>Note:</B> If positioned update is not supported, a |
|
31061 | 1565 |
* {@code SQLException} is thrown. |
1566 |
* |
|
1567 |
* @return the SQL name for this rowset's {@code ResultSet} object's cursor |
|
2 | 1568 |
* @throws SQLException if (1) a database access error occurs |
1569 |
* or (2) xthis rowset does not have a currently valid connection, |
|
1570 |
* prepared statement, and result set |
|
1571 |
*/ |
|
1572 |
public String getCursorName() throws SQLException { |
|
1573 |
checkState(); |
|
1574 |
||
1575 |
return rs.getCursorName(); |
|
1576 |
} |
|
1577 |
||
1578 |
/** |
|
1579 |
* Retrieves the number, types and properties of |
|
31061 | 1580 |
* this rowset's {@code ResultSet} object's columns. |
1581 |
* |
|
1582 |
* @return the description of this rowset's {@code ResultSet} |
|
2 | 1583 |
* object's columns |
1584 |
* @throws SQLException if (1) a database access error occurs |
|
1585 |
* or (2) this rowset does not have a currently valid connection, |
|
1586 |
* prepared statement, and result set |
|
1587 |
*/ |
|
1588 |
public ResultSetMetaData getMetaData() throws SQLException { |
|
1589 |
||
1590 |
checkState(); |
|
1591 |
||
1592 |
// It may be the case that JdbcRowSet might not have been |
|
1593 |
// initialized with ResultSet handle and may be by PreparedStatement |
|
1594 |
// internally when we set JdbcRowSet.setCommand(). |
|
1595 |
// We may require all the basic properties of setEscapeProcessing |
|
1596 |
// setMaxFieldSize etc. which an application can use before we call |
|
1597 |
// execute. |
|
1598 |
try { |
|
1599 |
checkState(); |
|
1600 |
} catch(SQLException sqle) { |
|
1601 |
prepare(); |
|
1602 |
// will return ResultSetMetaData |
|
1603 |
return ps.getMetaData(); |
|
1604 |
} |
|
1605 |
return rs.getMetaData(); |
|
1606 |
} |
|
1607 |
||
1608 |
/** |
|
1609 |
* <p>Gets the value of the designated column in the current row |
|
31061 | 1610 |
* of this rowset's {@code ResultSet} object as |
1611 |
* an {@code Object}. |
|
2 | 1612 |
* |
1613 |
* <p>This method will return the value of the given column as a |
|
1614 |
* Java object. The type of the Java object will be the default |
|
1615 |
* Java object type corresponding to the column's SQL type, |
|
1616 |
* following the mapping for built-in types specified in the JDBC |
|
1617 |
* specification. |
|
1618 |
* |
|
1619 |
* <p>This method may also be used to read datatabase-specific |
|
1620 |
* abstract data types. |
|
1621 |
* |
|
1622 |
* In the JDBC 3.0 API, the behavior of method |
|
31061 | 1623 |
* {@code getObject} is extended to materialize |
2 | 1624 |
* data of SQL user-defined types. When a column contains |
1625 |
* a structured or distinct value, the behavior of this method is as |
|
31061 | 1626 |
* if it were a call to: {@code getObject(columnIndex, |
1627 |
* this.getStatement().getConnection().getTypeMap())}. |
|
2 | 1628 |
* |
1629 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
31061 | 1630 |
* @return a {@code java.lang.Object} holding the column value |
2 | 1631 |
* @throws SQLException if (1) a database access error occurs |
1632 |
* or (2) this rowset does not currently have a valid connection, |
|
1633 |
* prepared statement, and result set |
|
1634 |
*/ |
|
1635 |
public Object getObject(int columnIndex) throws SQLException { |
|
1636 |
checkState(); |
|
1637 |
||
1638 |
return rs.getObject(columnIndex); |
|
1639 |
} |
|
1640 |
||
1641 |
/** |
|
1642 |
* <p>Gets the value of the designated column in the current row |
|
31061 | 1643 |
* of this rowset's {@code ResultSet} object as |
1644 |
* an {@code Object}. |
|
2 | 1645 |
* |
1646 |
* <p>This method will return the value of the given column as a |
|
1647 |
* Java object. The type of the Java object will be the default |
|
1648 |
* Java object type corresponding to the column's SQL type, |
|
1649 |
* following the mapping for built-in types specified in the JDBC |
|
1650 |
* specification. |
|
1651 |
* |
|
1652 |
* <p>This method may also be used to read datatabase-specific |
|
1653 |
* abstract data types. |
|
1654 |
* |
|
1655 |
* In the JDBC 3.0 API, the behavior of the method |
|
31061 | 1656 |
* {@code getObject} is extended to materialize |
2 | 1657 |
* data of SQL user-defined types. When a column contains |
1658 |
* a structured or distinct value, the behavior of this method is as |
|
31061 | 1659 |
* if it were a call to: {@code getObject(columnIndex, |
1660 |
* this.getStatement().getConnection().getTypeMap())}. |
|
2 | 1661 |
* |
1662 |
* @param columnName the SQL name of the column |
|
31061 | 1663 |
* @return a {@code java.lang.Object} holding the column value |
2 | 1664 |
* @throws SQLException if (1) a database access error occurs |
1665 |
* or (2) this rowset does not currently have a valid connection, |
|
1666 |
* prepared statement, and result set |
|
1667 |
*/ |
|
1668 |
public Object getObject(String columnName) throws SQLException { |
|
1669 |
return getObject(findColumn(columnName)); |
|
1670 |
} |
|
1671 |
||
1672 |
//---------------------------------------------------------------- |
|
1673 |
||
1674 |
/** |
|
31061 | 1675 |
* Maps the given {@code JdbcRowSetImpl} column name to its |
1676 |
* {@code JdbcRowSetImpl} column index and reflects this on |
|
1677 |
* the internal {@code ResultSet} object. |
|
2 | 1678 |
* |
1679 |
* @param columnName the name of the column |
|
1680 |
* @return the column index of the given column name |
|
1681 |
* @throws SQLException if (1) a database access error occurs |
|
1682 |
* (2) this rowset does not have a currently valid connection, |
|
1683 |
* prepared statement, and result set |
|
1684 |
*/ |
|
1685 |
public int findColumn(String columnName) throws SQLException { |
|
1686 |
checkState(); |
|
1687 |
||
1688 |
return rs.findColumn(columnName); |
|
1689 |
} |
|
1690 |
||
1691 |
||
1692 |
//--------------------------JDBC 2.0----------------------------------- |
|
1693 |
||
1694 |
//--------------------------------------------------------------------- |
|
1695 |
// Getters and Setters |
|
1696 |
//--------------------------------------------------------------------- |
|
1697 |
||
1698 |
/** |
|
1699 |
* Gets the value of the designated column in the current row |
|
31061 | 1700 |
* of this rowset's {@code ResultSet} object as a |
1701 |
* {@code java.io.Reader} object. |
|
1702 |
* @return a {@code java.io.Reader} object that contains the column |
|
1703 |
* value; if the value is SQL {@code NULL}, the value returned is |
|
1704 |
* {@code null}. |
|
2 | 1705 |
* @param columnIndex the first column is 1, the second is 2, and so on |
1706 |
* |
|
1707 |
*/ |
|
1708 |
public java.io.Reader getCharacterStream(int columnIndex) throws SQLException { |
|
1709 |
checkState(); |
|
1710 |
||
1711 |
return rs.getCharacterStream(columnIndex); |
|
1712 |
} |
|
1713 |
||
1714 |
/** |
|
1715 |
* Gets the value of the designated column in the current row |
|
31061 | 1716 |
* of this rowset's {@code ResultSet} object as a |
1717 |
* {@code java.io.Reader} object. |
|
1718 |
* |
|
1719 |
* @return a {@code java.io.Reader} object that contains the column |
|
1720 |
* value; if the value is SQL {@code NULL}, the value returned is |
|
1721 |
* {@code null}. |
|
2 | 1722 |
* @param columnName the name of the column |
31061 | 1723 |
* @return the value in the specified column as a {@code java.io.Reader} |
2 | 1724 |
* |
1725 |
*/ |
|
1726 |
public java.io.Reader getCharacterStream(String columnName) throws SQLException { |
|
1727 |
return getCharacterStream(findColumn(columnName)); |
|
1728 |
} |
|
1729 |
||
1730 |
/** |
|
1731 |
* Gets the value of the designated column in the current row |
|
31061 | 1732 |
* of this rowset's {@code ResultSet} object as a |
1733 |
* {@code java.math.BigDecimal} with full precision. |
|
2 | 1734 |
* |
1735 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
1736 |
* @return the column value (full precision); |
|
31061 | 1737 |
* if the value is SQL {@code NULL}, the value returned is |
1738 |
* {@code null}. |
|
2 | 1739 |
* @throws SQLException if a database access error occurs |
1740 |
* or this rowset does not currently have a valid |
|
1741 |
* connection, prepared statement, and result set |
|
1742 |
*/ |
|
1743 |
public BigDecimal getBigDecimal(int columnIndex) throws SQLException { |
|
1744 |
checkState(); |
|
1745 |
||
1746 |
return rs.getBigDecimal(columnIndex); |
|
1747 |
} |
|
1748 |
||
1749 |
/** |
|
1750 |
* Gets the value of the designated column in the current row |
|
31061 | 1751 |
* of this rowset's {@code ResultSet} object as a |
1752 |
* {@code java.math.BigDecimal} with full precision. |
|
2 | 1753 |
* |
1754 |
* @param columnName the column name |
|
1755 |
* @return the column value (full precision); |
|
31061 | 1756 |
* if the value is SQL {@code NULL}, the value returned is |
1757 |
* {@code null}. |
|
2 | 1758 |
* @throws SQLException if a database access error occurs |
1759 |
* or this rowset does not currently have a valid |
|
1760 |
* connection, prepared statement, and result set |
|
1761 |
*/ |
|
1762 |
public BigDecimal getBigDecimal(String columnName) throws SQLException { |
|
1763 |
return getBigDecimal(findColumn(columnName)); |
|
1764 |
} |
|
1765 |
||
1766 |
//--------------------------------------------------------------------- |
|
1767 |
// Traversal/Positioning |
|
1768 |
//--------------------------------------------------------------------- |
|
1769 |
||
1770 |
/** |
|
1771 |
* Indicates whether the cursor is before the first row in |
|
31061 | 1772 |
* this rowset's {@code ResultSet} object. |
1773 |
* |
|
1774 |
* @return {@code true} if the cursor is before the first row; |
|
1775 |
* {@code false} if the cursor is at any other position or the |
|
1776 |
* result set contains no rows |
|
2 | 1777 |
* @throws SQLException if a database access error occurs |
1778 |
* or this rowset does not currently have a valid |
|
1779 |
* connection, prepared statement, and result set |
|
1780 |
*/ |
|
1781 |
public boolean isBeforeFirst() throws SQLException { |
|
1782 |
checkState(); |
|
1783 |
||
1784 |
return rs.isBeforeFirst(); |
|
1785 |
} |
|
1786 |
||
1787 |
/** |
|
1788 |
* Indicates whether the cursor is after the last row in |
|
31061 | 1789 |
* this rowset's {@code ResultSet} object. |
1790 |
* |
|
1791 |
* @return {@code true} if the cursor is after the last row; |
|
1792 |
* {@code false} if the cursor is at any other position or the |
|
1793 |
* result set contains no rows |
|
2 | 1794 |
* @throws SQLException if a database access error occurs |
1795 |
* or this rowset does not currently have a valid |
|
1796 |
* connection, prepared statement, and result set |
|
1797 |
*/ |
|
1798 |
public boolean isAfterLast() throws SQLException { |
|
1799 |
checkState(); |
|
1800 |
||
1801 |
return rs.isAfterLast(); |
|
1802 |
} |
|
1803 |
||
1804 |
/** |
|
1805 |
* Indicates whether the cursor is on the first row of |
|
31061 | 1806 |
* this rowset's {@code ResultSet} object. |
1807 |
* |
|
1808 |
* @return {@code true} if the cursor is on the first row; |
|
1809 |
* {@code false} otherwise |
|
2 | 1810 |
* @throws SQLException if a database access error occurs |
1811 |
* or this rowset does not currently have a valid |
|
1812 |
* connection, prepared statement, and result set |
|
1813 |
*/ |
|
1814 |
public boolean isFirst() throws SQLException { |
|
1815 |
checkState(); |
|
1816 |
||
1817 |
return rs.isFirst(); |
|
1818 |
} |
|
1819 |
||
1820 |
/** |
|
1821 |
* Indicates whether the cursor is on the last row of |
|
31061 | 1822 |
* this rowset's {@code ResultSet} object. |
1823 |
* Note: Calling the method {@code isLast} may be expensive |
|
2 | 1824 |
* because the JDBC driver |
1825 |
* might need to fetch ahead one row in order to determine |
|
1826 |
* whether the current row is the last row in the result set. |
|
1827 |
* |
|
31061 | 1828 |
* @return {@code true} if the cursor is on the last row; |
1829 |
* {@code false} otherwise |
|
2 | 1830 |
* @throws SQLException if a database access error occurs |
1831 |
* or this rowset does not currently have a valid |
|
1832 |
* connection, prepared statement, and result set |
|
1833 |
* |
|
1834 |
*/ |
|
1835 |
public boolean isLast() throws SQLException { |
|
1836 |
checkState(); |
|
1837 |
||
1838 |
return rs.isLast(); |
|
1839 |
} |
|
1840 |
||
1841 |
/** |
|
1842 |
* Moves the cursor to the front of |
|
31061 | 1843 |
* this rowset's {@code ResultSet} object, just before the |
2 | 1844 |
* first row. This method has no effect if the result set contains no rows. |
1845 |
* |
|
1846 |
* @throws SQLException if (1) a database access error occurs, |
|
31061 | 1847 |
* (2) the result set type is {@code TYPE_FORWARD_ONLY}, |
2 | 1848 |
* or (3) this rowset does not currently have a valid |
1849 |
* connection, prepared statement, and result set |
|
1850 |
*/ |
|
1851 |
public void beforeFirst() throws SQLException { |
|
1852 |
checkState(); |
|
1853 |
||
1854 |
rs.beforeFirst(); |
|
1855 |
notifyCursorMoved(); |
|
1856 |
} |
|
1857 |
||
1858 |
/** |
|
1859 |
* Moves the cursor to the end of |
|
31061 | 1860 |
* this rowset's {@code ResultSet} object, just after the |
2 | 1861 |
* last row. This method has no effect if the result set contains no rows. |
1862 |
* @throws SQLException if (1) a database access error occurs, |
|
31061 | 1863 |
* (2) the result set type is {@code TYPE_FORWARD_ONLY}, |
2 | 1864 |
* or (3) this rowset does not currently have a valid |
1865 |
* connection, prepared statement, and result set |
|
1866 |
*/ |
|
1867 |
public void afterLast() throws SQLException { |
|
1868 |
checkState(); |
|
1869 |
||
1870 |
rs.afterLast(); |
|
1871 |
notifyCursorMoved(); |
|
1872 |
} |
|
1873 |
||
1874 |
/** |
|
1875 |
* Moves the cursor to the first row in |
|
31061 | 1876 |
* this rowset's {@code ResultSet} object. |
1877 |
* |
|
1878 |
* @return {@code true} if the cursor is on a valid row; |
|
1879 |
* {@code false} if there are no rows in the result set |
|
2 | 1880 |
* @throws SQLException if (1) a database access error occurs, |
31061 | 1881 |
* (2) the result set type is {@code TYPE_FORWARD_ONLY}, |
2 | 1882 |
* or (3) this rowset does not currently have a valid |
1883 |
* connection, prepared statement, and result set |
|
1884 |
*/ |
|
1885 |
public boolean first() throws SQLException { |
|
1886 |
checkState(); |
|
1887 |
||
1888 |
boolean b = rs.first(); |
|
1889 |
notifyCursorMoved(); |
|
1890 |
return b; |
|
1891 |
||
1892 |
} |
|
1893 |
||
1894 |
/** |
|
1895 |
* Moves the cursor to the last row in |
|
31061 | 1896 |
* this rowset's {@code ResultSet} object. |
1897 |
* |
|
1898 |
* @return {@code true} if the cursor is on a valid row; |
|
1899 |
* {@code false} if there are no rows in the result set |
|
2 | 1900 |
* @throws SQLException if (1) a database access error occurs, |
31061 | 1901 |
* (2) the result set type is {@code TYPE_FORWARD_ONLY}, |
2 | 1902 |
* or (3) this rowset does not currently have a valid |
1903 |
* connection, prepared statement, and result set |
|
1904 |
*/ |
|
1905 |
public boolean last() throws SQLException { |
|
1906 |
checkState(); |
|
1907 |
||
1908 |
boolean b = rs.last(); |
|
1909 |
notifyCursorMoved(); |
|
1910 |
return b; |
|
1911 |
} |
|
1912 |
||
1913 |
/** |
|
1914 |
* Retrieves the current row number. The first row is number 1, the |
|
1915 |
* second is number 2, and so on. |
|
1916 |
* |
|
31061 | 1917 |
* @return the current row number; {@code 0} if there is no current row |
2 | 1918 |
* @throws SQLException if a database access error occurs |
1919 |
* or this rowset does not currently have a valid connection, |
|
1920 |
* prepared statement, and result set |
|
1921 |
*/ |
|
1922 |
public int getRow() throws SQLException { |
|
1923 |
checkState(); |
|
1924 |
||
1925 |
return rs.getRow(); |
|
1926 |
} |
|
1927 |
||
1928 |
/** |
|
1929 |
* Moves the cursor to the given row number in |
|
31061 | 1930 |
* this rowset's internal {@code ResultSet} object. |
2 | 1931 |
* |
1932 |
* <p>If the row number is positive, the cursor moves to |
|
1933 |
* the given row number with respect to the |
|
1934 |
* beginning of the result set. The first row is row 1, the second |
|
1935 |
* is row 2, and so on. |
|
1936 |
* |
|
1937 |
* <p>If the given row number is negative, the cursor moves to |
|
1938 |
* an absolute row position with respect to |
|
1939 |
* the end of the result set. For example, calling the method |
|
31061 | 1940 |
* {@code absolute(-1)} positions the |
1941 |
* cursor on the last row, calling the method {@code absolute(-2)} |
|
2 | 1942 |
* moves the cursor to the next-to-last row, and so on. |
1943 |
* |
|
1944 |
* <p>An attempt to position the cursor beyond the first/last row in |
|
1945 |
* the result set leaves the cursor before the first row or after |
|
1946 |
* the last row. |
|
1947 |
* |
|
31061 | 1948 |
* <p><B>Note:</B> Calling {@code absolute(1)} is the same |
1949 |
* as calling {@code first()}. Calling {@code absolute(-1)} |
|
1950 |
* is the same as calling {@code last()}. |
|
1951 |
* |
|
1952 |
* @return {@code true} if the cursor is on the result set; |
|
1953 |
* {@code false} otherwise |
|
2 | 1954 |
* @throws SQLException if (1) a database access error occurs, |
31061 | 1955 |
* (2) the row is {@code 0}, (3) the result set |
1956 |
* type is {@code TYPE_FORWARD_ONLY}, or (4) this |
|
2 | 1957 |
* rowset does not currently have a valid connection, |
1958 |
* prepared statement, and result set |
|
1959 |
*/ |
|
1960 |
public boolean absolute(int row) throws SQLException { |
|
1961 |
checkState(); |
|
1962 |
||
1963 |
boolean b = rs.absolute(row); |
|
1964 |
notifyCursorMoved(); |
|
1965 |
return b; |
|
1966 |
} |
|
1967 |
||
1968 |
/** |
|
1969 |
* Moves the cursor a relative number of rows, either positive or negative. |
|
1970 |
* Attempting to move beyond the first/last row in the |
|
1971 |
* result set positions the cursor before/after the |
|
31061 | 1972 |
* the first/last row. Calling {@code relative(0)} is valid, but does |
2 | 1973 |
* not change the cursor position. |
1974 |
* |
|
31061 | 1975 |
* <p>Note: Calling the method {@code relative(1)} |
1976 |
* is different from calling the method {@code next()} |
|
1977 |
* because is makes sense to call {@code next()} when there |
|
2 | 1978 |
* is no current row, |
1979 |
* for example, when the cursor is positioned before the first row |
|
1980 |
* or after the last row of the result set. |
|
1981 |
* |
|
31061 | 1982 |
* @return {@code true} if the cursor is on a row; |
1983 |
* {@code false} otherwise |
|
2 | 1984 |
* @throws SQLException if (1) a database access error occurs, |
1985 |
* (2) there is no current row, (3) the result set |
|
31061 | 1986 |
* type is {@code TYPE_FORWARD_ONLY}, or (4) this |
2 | 1987 |
* rowset does not currently have a valid connection, |
1988 |
* prepared statement, and result set |
|
1989 |
*/ |
|
1990 |
public boolean relative(int rows) throws SQLException { |
|
1991 |
checkState(); |
|
1992 |
||
1993 |
boolean b = rs.relative(rows); |
|
1994 |
notifyCursorMoved(); |
|
1995 |
return b; |
|
1996 |
} |
|
1997 |
||
1998 |
/** |
|
1999 |
* Moves the cursor to the previous row in this |
|
31061 | 2000 |
* {@code ResultSet} object. |
2001 |
* |
|
2002 |
* <p><B>Note:</B> Calling the method {@code previous()} is not the same as |
|
2003 |
* calling the method {@code relative(-1)} because it |
|
2004 |
* makes sense to call {@code previous()} when there is no current row. |
|
2005 |
* |
|
2006 |
* @return {@code true} if the cursor is on a valid row; |
|
2007 |
* {@code false} if it is off the result set |
|
2 | 2008 |
* @throws SQLException if (1) a database access error occurs, |
31061 | 2009 |
* (2) the result set type is {@code TYPE_FORWARD_ONLY}, |
2 | 2010 |
* or (3) this rowset does not currently have a valid |
2011 |
* connection, prepared statement, and result set |
|
2012 |
*/ |
|
2013 |
public boolean previous() throws SQLException { |
|
2014 |
checkState(); |
|
2015 |
||
2016 |
boolean b = rs.previous(); |
|
2017 |
notifyCursorMoved(); |
|
2018 |
return b; |
|
2019 |
} |
|
2020 |
||
2021 |
/** |
|
2022 |
* Gives a hint as to the direction in which the rows in this |
|
31061 | 2023 |
* {@code ResultSet} object will be processed. |
2 | 2024 |
* The initial value is determined by the |
31061 | 2025 |
* {@code Statement} object |
2026 |
* that produced this rowset's {@code ResultSet} object. |
|
2 | 2027 |
* The fetch direction may be changed at any time. |
2028 |
* |
|
2029 |
* @throws SQLException if (1) a database access error occurs, |
|
31061 | 2030 |
* (2) the result set type is {@code TYPE_FORWARD_ONLY} |
2031 |
* and the fetch direction is not {@code FETCH_FORWARD}, |
|
2 | 2032 |
* or (3) this rowset does not currently have a valid |
2033 |
* connection, prepared statement, and result set |
|
2034 |
* @see java.sql.Statement#setFetchDirection |
|
2035 |
*/ |
|
2036 |
public void setFetchDirection(int direction) throws SQLException { |
|
2037 |
checkState(); |
|
2038 |
||
2039 |
rs.setFetchDirection(direction); |
|
2040 |
} |
|
2041 |
||
2042 |
/** |
|
2043 |
* Returns the fetch direction for this |
|
31061 | 2044 |
* {@code ResultSet} object. |
2 | 2045 |
* |
2046 |
* @return the current fetch direction for this rowset's |
|
31061 | 2047 |
* {@code ResultSet} object |
2 | 2048 |
* @throws SQLException if a database access error occurs |
2049 |
* or this rowset does not currently have a valid connection, |
|
2050 |
* prepared statement, and result set |
|
2051 |
*/ |
|
2052 |
public int getFetchDirection() throws SQLException { |
|
2053 |
try { |
|
2054 |
checkState(); |
|
2055 |
} catch(SQLException sqle) { |
|
2056 |
super.getFetchDirection(); |
|
2057 |
} |
|
2058 |
return rs.getFetchDirection(); |
|
2059 |
} |
|
2060 |
||
2061 |
/** |
|
2062 |
* Gives the JDBC driver a hint as to the number of rows that should |
|
2063 |
* be fetched from the database when more rows are needed for this |
|
31061 | 2064 |
* {@code ResultSet} object. |
2 | 2065 |
* If the fetch size specified is zero, the JDBC driver |
2066 |
* ignores the value and is free to make its own best guess as to what |
|
2067 |
* the fetch size should be. The default value is set by the |
|
31061 | 2068 |
* {@code Statement} object |
2 | 2069 |
* that created the result set. The fetch size may be changed at any time. |
2070 |
* |
|
2071 |
* @param rows the number of rows to fetch |
|
2072 |
* @throws SQLException if (1) a database access error occurs, (2) the |
|
31061 | 2073 |
* condition {@code 0 <= rows <= this.getMaxRows()} is not |
2 | 2074 |
* satisfied, or (3) this rowset does not currently have a valid |
2075 |
* connection, prepared statement, and result set |
|
2076 |
* |
|
2077 |
*/ |
|
2078 |
public void setFetchSize(int rows) throws SQLException { |
|
2079 |
checkState(); |
|
2080 |
||
2081 |
rs.setFetchSize(rows); |
|
2082 |
} |
|
2083 |
||
2084 |
/** |
|
2085 |
* |
|
2086 |
* Returns the fetch size for this |
|
31061 | 2087 |
* {@code ResultSet} object. |
2088 |
* |
|
2089 |
* @return the current fetch size for this rowset's {@code ResultSet} object |
|
2 | 2090 |
* @throws SQLException if a database access error occurs |
2091 |
* or this rowset does not currently have a valid connection, |
|
2092 |
* prepared statement, and result set |
|
2093 |
*/ |
|
2094 |
public int getType() throws SQLException { |
|
2095 |
try { |
|
2096 |
checkState(); |
|
2097 |
} catch(SQLException sqle) { |
|
2098 |
return super.getType(); |
|
2099 |
} |
|
2100 |
||
2101 |
// If the ResultSet has not been created, then return the default type |
|
2102 |
// otherwise return the type from the ResultSet. |
|
2103 |
if(rs == null) { |
|
2104 |
return super.getType(); |
|
2105 |
} else { |
|
2106 |
int rstype = rs.getType(); |
|
2107 |
return rstype; |
|
2108 |
} |
|
2109 |
||
2110 |
||
2111 |
} |
|
2112 |
||
2113 |
/** |
|
31061 | 2114 |
* Returns the concurrency mode of this rowset's {@code ResultSet} object. |
2 | 2115 |
* The concurrency used is determined by the |
31061 | 2116 |
* {@code Statement} object that created the result set. |
2117 |
* |
|
2118 |
* @return the concurrency type, either {@code CONCUR_READ_ONLY} |
|
2119 |
* or {@code CONCUR_UPDATABLE} |
|
2 | 2120 |
* @throws SQLException if (1) a database access error occurs |
2121 |
* or (2) this rowset does not currently have a valid connection, |
|
2122 |
* prepared statement, and result set |
|
2123 |
*/ |
|
2124 |
public int getConcurrency() throws SQLException { |
|
2125 |
try { |
|
2126 |
checkState(); |
|
2127 |
} catch(SQLException sqle) { |
|
2128 |
super.getConcurrency(); |
|
2129 |
} |
|
2130 |
return rs.getConcurrency(); |
|
2131 |
} |
|
2132 |
||
2133 |
//--------------------------------------------------------------------- |
|
2134 |
// Updates |
|
2135 |
//--------------------------------------------------------------------- |
|
2136 |
||
2137 |
/** |
|
2138 |
* Indicates whether the current row has been updated. The value returned |
|
2139 |
* depends on whether or not the result set can detect updates. |
|
2140 |
* |
|
31061 | 2141 |
* @return {@code true} if the row has been visibly updated |
2 | 2142 |
* by the owner or another, and updates are detected |
2143 |
* @throws SQLException if a database access error occurs |
|
2144 |
* or this rowset does not currently have a valid connection, |
|
2145 |
* prepared statement, and result set |
|
2146 |
* @see java.sql.DatabaseMetaData#updatesAreDetected |
|
2147 |
*/ |
|
2148 |
public boolean rowUpdated() throws SQLException { |
|
2149 |
checkState(); |
|
2150 |
||
2151 |
return rs.rowUpdated(); |
|
2152 |
} |
|
2153 |
||
2154 |
/** |
|
2155 |
* Indicates whether the current row has had an insertion. |
|
2156 |
* The value returned depends on whether or not this |
|
31061 | 2157 |
* {@code ResultSet} object can detect visible inserts. |
2158 |
* |
|
2159 |
* @return {@code true} if a row has had an insertion |
|
2160 |
* and insertions are detected; {@code false} otherwise |
|
2 | 2161 |
* @throws SQLException if a database access error occurs |
2162 |
* or this rowset does not currently have a valid connection, |
|
2163 |
* prepared statement, and result set |
|
2164 |
* @see java.sql.DatabaseMetaData#insertsAreDetected |
|
2165 |
* |
|
2166 |
*/ |
|
2167 |
public boolean rowInserted() throws SQLException { |
|
2168 |
checkState(); |
|
2169 |
||
2170 |
return rs.rowInserted(); |
|
2171 |
} |
|
2172 |
||
2173 |
/** |
|
2174 |
* Indicates whether a row has been deleted. A deleted row may leave |
|
2175 |
* a visible "hole" in a result set. This method can be used to |
|
2176 |
* detect holes in a result set. The value returned depends on whether |
|
31061 | 2177 |
* or not this rowset's {@code ResultSet} object can detect deletions. |
2178 |
* |
|
2179 |
* @return {@code true} if a row was deleted and deletions are detected; |
|
2180 |
* {@code false} otherwise |
|
2 | 2181 |
* @throws SQLException if a database access error occurs |
2182 |
* or this rowset does not currently have a valid connection, |
|
2183 |
* prepared statement, and result set |
|
2184 |
* @see java.sql.DatabaseMetaData#deletesAreDetected |
|
2185 |
*/ |
|
2186 |
public boolean rowDeleted() throws SQLException { |
|
2187 |
checkState(); |
|
2188 |
||
2189 |
return rs.rowDeleted(); |
|
2190 |
} |
|
2191 |
||
2192 |
/** |
|
2193 |
* Gives a nullable column a null value. |
|
2194 |
* |
|
31061 | 2195 |
* The {@code updateXXX} methods are used to update column values in the |
2196 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2197 |
* update the underlying database; instead the {@code updateRow} |
|
2198 |
* or {@code insertRow} methods are called to update the database. |
|
2 | 2199 |
* |
2200 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
2201 |
* @throws SQLException if a database access error occurs |
|
2202 |
* or this rowset does not currently have a valid connection, |
|
2203 |
* prepared statement, and result set |
|
2204 |
*/ |
|
2205 |
public void updateNull(int columnIndex) throws SQLException { |
|
2206 |
checkState(); |
|
2207 |
||
2208 |
// To check the type and concurrency of the ResultSet |
|
2209 |
// to verify whether updates are possible or not |
|
2210 |
checkTypeConcurrency(); |
|
2211 |
||
2212 |
rs.updateNull(columnIndex); |
|
2213 |
} |
|
2214 |
||
2215 |
/** |
|
31061 | 2216 |
* Updates the designated column with a {@code boolean} value. |
2217 |
* The {@code updateXXX} methods are used to update column values in the |
|
2218 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2219 |
* update the underlying database; instead the {@code updateRow} or |
|
2220 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2221 |
* |
2222 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
2223 |
* @param x the new column value |
|
2224 |
* @throws SQLException if a database access error occurs |
|
2225 |
* or this rowset does not currently have a valid connection, |
|
2226 |
* prepared statement, and result set |
|
2227 |
* |
|
2228 |
*/ |
|
2229 |
public void updateBoolean(int columnIndex, boolean x) throws SQLException { |
|
2230 |
checkState(); |
|
2231 |
||
2232 |
// To check the type and concurrency of the ResultSet |
|
2233 |
// to verify whether updates are possible or not |
|
2234 |
checkTypeConcurrency(); |
|
2235 |
||
2236 |
rs.updateBoolean(columnIndex, x); |
|
2237 |
} |
|
2238 |
||
2239 |
/** |
|
31061 | 2240 |
* Updates the designated column with a {@code byte} value. |
2241 |
* The {@code updateXXX} methods are used to update column values in the |
|
2242 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2243 |
* update the underlying database; instead the {@code updateRow} or |
|
2244 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2245 |
* |
2246 |
* |
|
2247 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
2248 |
* @param x the new column value |
|
2249 |
* @throws SQLException if a database access error occurs |
|
2250 |
* or this rowset does not currently have a valid connection, |
|
2251 |
* prepared statement, and result set |
|
2252 |
* |
|
2253 |
*/ |
|
2254 |
public void updateByte(int columnIndex, byte x) throws SQLException { |
|
2255 |
checkState(); |
|
2256 |
||
2257 |
// To check the type and concurrency of the ResultSet |
|
2258 |
// to verify whether updates are possible or not |
|
2259 |
checkTypeConcurrency(); |
|
2260 |
||
2261 |
rs.updateByte(columnIndex, x); |
|
2262 |
} |
|
2263 |
||
2264 |
/** |
|
31061 | 2265 |
* Updates the designated column with a {@code short} value. |
2266 |
* The {@code updateXXX} methods are used to update column values in the |
|
2267 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2268 |
* update the underlying database; instead the {@code updateRow} or |
|
2269 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2270 |
* |
2271 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
2272 |
* @param x the new column value |
|
2273 |
* @throws SQLException if a database access error occurs |
|
2274 |
* or this rowset does not currently have a valid connection, |
|
2275 |
* prepared statement, and result set |
|
2276 |
* |
|
2277 |
*/ |
|
2278 |
public void updateShort(int columnIndex, short x) throws SQLException { |
|
2279 |
checkState(); |
|
2280 |
||
2281 |
// To check the type and concurrency of the ResultSet |
|
2282 |
// to verify whether updates are possible or not |
|
2283 |
checkTypeConcurrency(); |
|
2284 |
||
2285 |
rs.updateShort(columnIndex, x); |
|
2286 |
} |
|
2287 |
||
2288 |
/** |
|
31061 | 2289 |
* Updates the designated column with an {@code int} value. |
2290 |
* The {@code updateXXX} methods are used to update column values in the |
|
2291 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2292 |
* update the underlying database; instead the {@code updateRow} or |
|
2293 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2294 |
* |
2295 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
2296 |
* @param x the new column value |
|
2297 |
* @throws SQLException if a database access error occurs |
|
2298 |
* or this rowset does not currently have a valid connection, |
|
2299 |
* prepared statement, and result set |
|
2300 |
*/ |
|
2301 |
public void updateInt(int columnIndex, int x) throws SQLException { |
|
2302 |
checkState(); |
|
2303 |
||
2304 |
// To check the type and concurrency of the ResultSet |
|
2305 |
// to verify whether updates are possible or not |
|
2306 |
checkTypeConcurrency(); |
|
2307 |
||
2308 |
rs.updateInt(columnIndex, x); |
|
2309 |
} |
|
2310 |
||
2311 |
/** |
|
31061 | 2312 |
* Updates the designated column with a {@code long} value. |
2313 |
* The {@code updateXXX} methods are used to update column values in the |
|
2314 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2315 |
* update the underlying database; instead the {@code updateRow} or |
|
2316 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2317 |
* |
2318 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
2319 |
* @param x the new column value |
|
2320 |
* @throws SQLException if a database access error occurs |
|
2321 |
* or this rowset does not currently have a valid connection, |
|
2322 |
* prepared statement, and result set |
|
2323 |
* |
|
2324 |
*/ |
|
2325 |
public void updateLong(int columnIndex, long x) throws SQLException { |
|
2326 |
checkState(); |
|
2327 |
||
2328 |
// To check the type and concurrency of the ResultSet |
|
2329 |
// to verify whether updates are possible or not |
|
2330 |
checkTypeConcurrency(); |
|
2331 |
||
2332 |
rs.updateLong(columnIndex, x); |
|
2333 |
} |
|
2334 |
||
2335 |
/** |
|
31061 | 2336 |
* Updates the designated column with a {@code float} value. |
2337 |
* The {@code updateXXX} methods are used to update column values in the |
|
2338 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2339 |
* update the underlying database; instead the {@code updateRow} or |
|
2340 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2341 |
* |
2342 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
2343 |
* @param x the new column value |
|
2344 |
* @throws SQLException if a database access error occurs |
|
2345 |
* or this rowset does not currently have a valid connection, |
|
2346 |
* prepared statement, and result set |
|
2347 |
* |
|
2348 |
*/ |
|
2349 |
public void updateFloat(int columnIndex, float x) throws SQLException { |
|
2350 |
checkState(); |
|
2351 |
||
2352 |
// To check the type and concurrency of the ResultSet |
|
2353 |
// to verify whether updates are possible or not |
|
2354 |
checkTypeConcurrency(); |
|
2355 |
||
2356 |
rs.updateFloat(columnIndex, x); |
|
2357 |
} |
|
2358 |
||
2359 |
/** |
|
31061 | 2360 |
* Updates the designated column with a {@code double} value. |
2361 |
* The {@code updateXXX} methods are used to update column values in the |
|
2362 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2363 |
* update the underlying database; instead the {@code updateRow} or |
|
2364 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2365 |
* |
2366 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
2367 |
* @param x the new column value |
|
2368 |
* @throws SQLException if a database access error occurs |
|
2369 |
* or this rowset does not currently have a valid connection, |
|
2370 |
* prepared statement, and result set |
|
2371 |
* |
|
2372 |
*/ |
|
2373 |
public void updateDouble(int columnIndex, double x) throws SQLException { |
|
2374 |
checkState(); |
|
2375 |
||
2376 |
// To check the type and concurrency of the ResultSet |
|
2377 |
// to verify whether updates are possible or not |
|
2378 |
checkTypeConcurrency(); |
|
2379 |
||
2380 |
rs.updateDouble(columnIndex, x); |
|
2381 |
} |
|
2382 |
||
2383 |
/** |
|
31061 | 2384 |
* Updates the designated column with a {@code java.math.BigDecimal} |
2 | 2385 |
* value. |
31061 | 2386 |
* The {@code updateXXX} methods are used to update column values in the |
2387 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2388 |
* update the underlying database; instead the {@code updateRow} or |
|
2389 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2390 |
* |
2391 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
2392 |
* @param x the new column value |
|
2393 |
* @throws SQLException if a database access error occurs |
|
2394 |
* or this rowset does not currently have a valid connection, |
|
2395 |
* prepared statement, and result set |
|
2396 |
* |
|
2397 |
*/ |
|
2398 |
public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException { |
|
2399 |
checkState(); |
|
2400 |
||
2401 |
// To check the type and concurrency of the ResultSet |
|
2402 |
// to verify whether updates are possible or not |
|
2403 |
checkTypeConcurrency(); |
|
2404 |
||
2405 |
rs.updateBigDecimal(columnIndex, x); |
|
2406 |
} |
|
2407 |
||
2408 |
/** |
|
31061 | 2409 |
* Updates the designated column with a {@code String} value. |
2410 |
* The {@code updateXXX} methods are used to update column values in the |
|
2411 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2412 |
* update the underlying database; instead the {@code updateRow} or |
|
2413 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2414 |
* |
2415 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
2416 |
* @param x the new column value |
|
2417 |
* @throws SQLException if a database access error occurs |
|
2418 |
* or this rowset does not currently have a valid connection, |
|
2419 |
* prepared statement, and result set |
|
2420 |
* |
|
2421 |
*/ |
|
2422 |
public void updateString(int columnIndex, String x) throws SQLException { |
|
2423 |
checkState(); |
|
2424 |
||
2425 |
// To check the type and concurrency of the ResultSet |
|
2426 |
// to verify whether updates are possible or not |
|
2427 |
checkTypeConcurrency(); |
|
2428 |
||
2429 |
rs.updateString(columnIndex, x); |
|
2430 |
} |
|
2431 |
||
2432 |
/** |
|
31061 | 2433 |
* Updates the designated column with a {@code byte} array value. |
2434 |
* The {@code updateXXX} methods are used to update column values in the |
|
2435 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2436 |
* update the underlying database; instead the {@code updateRow} or |
|
2437 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2438 |
* |
2439 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
2440 |
* @param x the new column value |
|
2441 |
* @throws SQLException if a database access error occurs |
|
2442 |
* or this rowset does not currently have a valid connection, |
|
2443 |
* prepared statement, and result set |
|
2444 |
* |
|
2445 |
*/ |
|
2446 |
public void updateBytes(int columnIndex, byte x[]) throws SQLException { |
|
2447 |
checkState(); |
|
2448 |
||
2449 |
// To check the type and concurrency of the ResultSet |
|
2450 |
// to verify whether updates are possible or not |
|
2451 |
checkTypeConcurrency(); |
|
2452 |
||
2453 |
rs.updateBytes(columnIndex, x); |
|
2454 |
} |
|
2455 |
||
2456 |
/** |
|
31061 | 2457 |
* Updates the designated column with a {@code java.sql.Date} value. |
2458 |
* The {@code updateXXX} methods are used to update column values in the |
|
2459 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2460 |
* update the underlying database; instead the {@code updateRow} or |
|
2461 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2462 |
* |
2463 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
2464 |
* @param x the new column value |
|
2465 |
* @throws SQLException if a database access error occurs |
|
2466 |
* or this rowset does not currently have a valid connection, |
|
2467 |
* prepared statement, and result set |
|
2468 |
* |
|
2469 |
*/ |
|
2470 |
public void updateDate(int columnIndex, java.sql.Date x) throws SQLException { |
|
2471 |
checkState(); |
|
2472 |
||
2473 |
// To check the type and concurrency of the ResultSet |
|
2474 |
// to verify whether updates are possible or not |
|
2475 |
checkTypeConcurrency(); |
|
2476 |
||
2477 |
rs.updateDate(columnIndex, x); |
|
2478 |
} |
|
2479 |
||
2480 |
||
2481 |
/** |
|
31061 | 2482 |
* Updates the designated column with a {@code java.sql.Time} value. |
2483 |
* The {@code updateXXX} methods are used to update column values in the |
|
2484 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2485 |
* update the underlying database; instead the {@code updateRow} or |
|
2486 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2487 |
* |
2488 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
2489 |
* @param x the new column value |
|
2490 |
* @throws SQLException if a database access error occurs |
|
2491 |
* or this rowset does not currently have a valid connection, |
|
2492 |
* prepared statement, and result set |
|
2493 |
* |
|
2494 |
*/ |
|
2495 |
public void updateTime(int columnIndex, java.sql.Time x) throws SQLException { |
|
2496 |
checkState(); |
|
2497 |
||
2498 |
// To check the type and concurrency of the ResultSet |
|
2499 |
// to verify whether updates are possible or not |
|
2500 |
checkTypeConcurrency(); |
|
2501 |
||
2502 |
rs.updateTime(columnIndex, x); |
|
2503 |
} |
|
2504 |
||
2505 |
/** |
|
31061 | 2506 |
* Updates the designated column with a {@code java.sql.Timestamp} |
2 | 2507 |
* value. |
31061 | 2508 |
* The {@code updateXXX} methods are used to update column values in the |
2509 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2510 |
* update the underlying database; instead the {@code updateRow} or |
|
2511 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2512 |
* |
2513 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
2514 |
* @param x the new column value |
|
2515 |
* @throws SQLException if a database access error occurs |
|
2516 |
* or this rowset does not currently have a valid connection, |
|
2517 |
* prepared statement, and result set |
|
2518 |
* |
|
2519 |
*/ |
|
2520 |
public void updateTimestamp(int columnIndex, java.sql.Timestamp x) throws SQLException { |
|
2521 |
checkState(); |
|
2522 |
||
2523 |
// To check the type and concurrency of the ResultSet |
|
2524 |
// to verify whether updates are possible or not |
|
2525 |
checkTypeConcurrency(); |
|
2526 |
||
2527 |
rs.updateTimestamp(columnIndex, x); |
|
2528 |
} |
|
2529 |
||
2530 |
/** |
|
2531 |
* Updates the designated column with an ascii stream value. |
|
31061 | 2532 |
* The {@code updateXXX} methods are used to update column values in the |
2533 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2534 |
* update the underlying database; instead the {@code updateRow} or |
|
2535 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2536 |
* |
2537 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
2538 |
* @param x the new column value |
|
2539 |
* @param length the length of the stream |
|
2540 |
* @throws SQLException if (1) a database access error occurs |
|
2541 |
* (2) or this rowset does not currently have a valid connection, |
|
2542 |
* prepared statement, and result set |
|
2543 |
* |
|
2544 |
*/ |
|
2545 |
public void updateAsciiStream(int columnIndex, java.io.InputStream x, int length) throws SQLException { |
|
2546 |
checkState(); |
|
2547 |
||
2548 |
// To check the type and concurrency of the ResultSet |
|
2549 |
// to verify whether updates are possible or not |
|
2550 |
checkTypeConcurrency(); |
|
2551 |
||
2552 |
rs.updateAsciiStream(columnIndex, x, length); |
|
2553 |
} |
|
2554 |
||
2555 |
/** |
|
2556 |
* Updates the designated column with a binary stream value. |
|
31061 | 2557 |
* The {@code updateXXX} methods are used to update column values in the |
2558 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2559 |
* update the underlying database; instead the {@code updateRow} or |
|
2560 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2561 |
* |
2562 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
2563 |
* @param x the new column value |
|
2564 |
* @param length the length of the stream |
|
2565 |
* @throws SQLException if a database access error occurs |
|
2566 |
* or this rowset does not currently have a valid connection, |
|
2567 |
* prepared statement, and result set |
|
2568 |
* |
|
2569 |
*/ |
|
2570 |
public void updateBinaryStream(int columnIndex, java.io.InputStream x, int length) throws SQLException { |
|
2571 |
checkState(); |
|
2572 |
||
2573 |
// To check the type and concurrency of the ResultSet |
|
2574 |
// to verify whether updates are possible or not |
|
2575 |
checkTypeConcurrency(); |
|
2576 |
||
2577 |
rs.updateBinaryStream(columnIndex, x, length); |
|
2578 |
} |
|
2579 |
||
2580 |
/** |
|
2581 |
* Updates the designated column with a character stream value. |
|
31061 | 2582 |
* The {@code updateXXX} methods are used to update column values in the |
2583 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2584 |
* update the underlying database; instead the {@code updateRow} or |
|
2585 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2586 |
* |
2587 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
2588 |
* @param x the new column value |
|
2589 |
* @param length the length of the stream |
|
2590 |
* @throws SQLException if a database access error occurs |
|
2591 |
* or this rowset does not currently have a valid connection, |
|
2592 |
* prepared statement, and result set |
|
2593 |
* |
|
2594 |
*/ |
|
2595 |
public void updateCharacterStream(int columnIndex, java.io.Reader x, int length) throws SQLException { |
|
2596 |
checkState(); |
|
2597 |
||
2598 |
// To check the type and concurrency of the ResultSet |
|
2599 |
// to verify whether updates are possible or not |
|
2600 |
checkTypeConcurrency(); |
|
2601 |
||
2602 |
rs.updateCharacterStream(columnIndex, x, length); |
|
2603 |
} |
|
2604 |
||
2605 |
/** |
|
31061 | 2606 |
* Updates the designated column with an {@code Object} value. |
2607 |
* The {@code updateXXX} methods are used to update column values in the |
|
2608 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2609 |
* update the underlying database; instead the {@code updateRow} or |
|
2610 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2611 |
* |
2612 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
2613 |
* @param x the new column value |
|
31061 | 2614 |
* @param scale for {@code java.sql.Types.DECIMAl} |
2615 |
* or {@code java.sql.Types.NUMERIC} types, |
|
2616 |
* this is the number of digits after the decimal point. For all other |
|
2617 |
* types this value will be ignored. |
|
2 | 2618 |
* @throws SQLException if a database access error occurs |
2619 |
* or this rowset does not currently have a valid connection, |
|
2620 |
* prepared statement, and result set |
|
2621 |
* |
|
2622 |
*/ |
|
2623 |
public void updateObject(int columnIndex, Object x, int scale) throws SQLException { |
|
2624 |
checkState(); |
|
2625 |
||
2626 |
// To check the type and concurrency of the ResultSet |
|
2627 |
// to verify whether updates are possible or not |
|
2628 |
checkTypeConcurrency(); |
|
2629 |
||
2630 |
rs.updateObject(columnIndex, x, scale); |
|
2631 |
} |
|
2632 |
||
2633 |
/** |
|
31061 | 2634 |
* Updates the designated column with an {@code Object} value. |
2635 |
* The {@code updateXXX} methods are used to update column values in the |
|
2636 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2637 |
* update the underlying database; instead the {@code updateRow} or |
|
2638 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2639 |
* |
2640 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
2641 |
* @param x the new column value |
|
2642 |
* @throws SQLException if a database access error occurs |
|
2643 |
* or this rowset does not currently have a valid connection, |
|
2644 |
* prepared statement, and result set |
|
2645 |
* |
|
2646 |
*/ |
|
2647 |
public void updateObject(int columnIndex, Object x) throws SQLException { |
|
2648 |
checkState(); |
|
2649 |
||
2650 |
// To check the type and concurrency of the ResultSet |
|
2651 |
// to verify whether updates are possible or not |
|
2652 |
checkTypeConcurrency(); |
|
2653 |
||
2654 |
rs.updateObject(columnIndex, x); |
|
2655 |
} |
|
2656 |
||
2657 |
/** |
|
31061 | 2658 |
* Updates the designated column with a {@code null} value. |
2659 |
* The {@code updateXXX} methods are used to update column values in the |
|
2660 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2661 |
* update the underlying database; instead the {@code updateRow} or |
|
2662 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2663 |
* |
2664 |
* @param columnName the name of the column |
|
2665 |
* @throws SQLException if a database access error occurs |
|
2666 |
* or this rowset does not currently have a valid connection, |
|
2667 |
* prepared statement, and result set |
|
2668 |
* |
|
2669 |
*/ |
|
2670 |
public void updateNull(String columnName) throws SQLException { |
|
2671 |
updateNull(findColumn(columnName)); |
|
2672 |
} |
|
2673 |
||
2674 |
/** |
|
31061 | 2675 |
* Updates the designated column with a {@code boolean} value. |
2676 |
* The {@code updateXXX} methods are used to update column values in the |
|
2677 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2678 |
* update the underlying database; instead the {@code updateRow} or |
|
2679 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2680 |
* |
2681 |
* @param columnName the name of the column |
|
2682 |
* @param x the new column value |
|
2683 |
* @throws SQLException if a database access error occurs |
|
2684 |
* |
|
2685 |
*/ |
|
2686 |
public void updateBoolean(String columnName, boolean x) throws SQLException { |
|
2687 |
updateBoolean(findColumn(columnName), x); |
|
2688 |
} |
|
2689 |
||
2690 |
/** |
|
31061 | 2691 |
* Updates the designated column with a {@code byte} value. |
2692 |
* The {@code updateXXX} methods are used to update column values in the |
|
2693 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2694 |
* update the underlying database; instead the {@code updateRow} or |
|
2695 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2696 |
* |
2697 |
* @param columnName the name of the column |
|
2698 |
* @param x the new column value |
|
2699 |
* @throws SQLException if a database access error occurs |
|
2700 |
* |
|
2701 |
*/ |
|
2702 |
public void updateByte(String columnName, byte x) throws SQLException { |
|
2703 |
updateByte(findColumn(columnName), x); |
|
2704 |
} |
|
2705 |
||
2706 |
/** |
|
31061 | 2707 |
* Updates the designated column with a {@code short} value. |
2708 |
* The {@code updateXXX} methods are used to update column values in the |
|
2709 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2710 |
* update the underlying database; instead the {@code updateRow} or |
|
2711 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2712 |
* |
2713 |
* @param columnName the name of the column |
|
2714 |
* @param x the new column value |
|
2715 |
* @throws SQLException if a database access error occurs |
|
2716 |
* |
|
2717 |
*/ |
|
2718 |
public void updateShort(String columnName, short x) throws SQLException { |
|
2719 |
updateShort(findColumn(columnName), x); |
|
2720 |
} |
|
2721 |
||
2722 |
/** |
|
31061 | 2723 |
* Updates the designated column with an {@code int} value. |
2724 |
* The {@code updateXXX} methods are used to update column values in the |
|
2725 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2726 |
* update the underlying database; instead the {@code updateRow} or |
|
2727 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2728 |
* |
2729 |
* @param columnName the name of the column |
|
2730 |
* @param x the new column value |
|
2731 |
* @throws SQLException if a database access error occurs |
|
2732 |
* |
|
2733 |
*/ |
|
2734 |
public void updateInt(String columnName, int x) throws SQLException { |
|
2735 |
updateInt(findColumn(columnName), x); |
|
2736 |
} |
|
2737 |
||
2738 |
/** |
|
31061 | 2739 |
* Updates the designated column with a {@code long} value. |
2740 |
* The {@code updateXXX} methods are used to update column values in the |
|
2741 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2742 |
* update the underlying database; instead the {@code updateRow} or |
|
2743 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2744 |
* |
2745 |
* @param columnName the name of the column |
|
2746 |
* @param x the new column value |
|
2747 |
* @throws SQLException if a database access error occurs |
|
2748 |
* |
|
2749 |
*/ |
|
2750 |
public void updateLong(String columnName, long x) throws SQLException { |
|
2751 |
updateLong(findColumn(columnName), x); |
|
2752 |
} |
|
2753 |
||
2754 |
/** |
|
31061 | 2755 |
* Updates the designated column with a {@code float } value. |
2756 |
* The {@code updateXXX} methods are used to update column values in the |
|
2757 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2758 |
* update the underlying database; instead the {@code updateRow} or |
|
2759 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2760 |
* |
2761 |
* @param columnName the name of the column |
|
2762 |
* @param x the new column value |
|
2763 |
* @throws SQLException if a database access error occurs |
|
2764 |
* |
|
2765 |
*/ |
|
2766 |
public void updateFloat(String columnName, float x) throws SQLException { |
|
2767 |
updateFloat(findColumn(columnName), x); |
|
2768 |
} |
|
2769 |
||
2770 |
/** |
|
31061 | 2771 |
* Updates the designated column with a {@code double} value. |
2772 |
* The {@code updateXXX} methods are used to update column values in the |
|
2773 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2774 |
* update the underlying database; instead the {@code updateRow} or |
|
2775 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2776 |
* |
2777 |
* @param columnName the name of the column |
|
2778 |
* @param x the new column value |
|
2779 |
* @throws SQLException if a database access error occurs |
|
2780 |
* |
|
2781 |
*/ |
|
2782 |
public void updateDouble(String columnName, double x) throws SQLException { |
|
2783 |
updateDouble(findColumn(columnName), x); |
|
2784 |
} |
|
2785 |
||
2786 |
/** |
|
31061 | 2787 |
* Updates the designated column with a {@code java.sql.BigDecimal} |
2 | 2788 |
* value. |
31061 | 2789 |
* The {@code updateXXX} methods are used to update column values in the |
2790 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2791 |
* update the underlying database; instead the {@code updateRow} or |
|
2792 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2793 |
* |
2794 |
* @param columnName the name of the column |
|
2795 |
* @param x the new column value |
|
2796 |
* @throws SQLException if a database access error occurs |
|
2797 |
* |
|
2798 |
*/ |
|
2799 |
public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException { |
|
2800 |
updateBigDecimal(findColumn(columnName), x); |
|
2801 |
} |
|
2802 |
||
2803 |
/** |
|
31061 | 2804 |
* Updates the designated column with a {@code String} value. |
2805 |
* The {@code updateXXX} methods are used to update column values in the |
|
2806 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2807 |
* update the underlying database; instead the {@code updateRow} or |
|
2808 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2809 |
* |
2810 |
* @param columnName the name of the column |
|
2811 |
* @param x the new column value |
|
2812 |
* @throws SQLException if a database access error occurs |
|
2813 |
* |
|
2814 |
*/ |
|
2815 |
public void updateString(String columnName, String x) throws SQLException { |
|
2816 |
updateString(findColumn(columnName), x); |
|
2817 |
} |
|
2818 |
||
2819 |
/** |
|
31061 | 2820 |
* Updates the designated column with a {@code boolean} value. |
2821 |
* The {@code updateXXX} methods are used to update column values in the |
|
2822 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2823 |
* update the underlying database; instead the {@code updateRow} or |
|
2824 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2825 |
* |
2826 |
* JDBC 2.0 |
|
2827 |
* |
|
2828 |
* Updates a column with a byte array value. |
|
2829 |
* |
|
31061 | 2830 |
* The {@code updateXXX} methods are used to update column values in the |
2831 |
* current row, or the insert row. The {@code updateXXX} methods do not |
|
2832 |
* update the underlying database; instead the {@code updateRow} or {@code insertRow} |
|
2 | 2833 |
* methods are called to update the database. |
2834 |
* |
|
2835 |
* @param columnName the name of the column |
|
2836 |
* @param x the new column value |
|
2837 |
* @throws SQLException if a database access error occurs |
|
2838 |
* |
|
2839 |
*/ |
|
2840 |
public void updateBytes(String columnName, byte x[]) throws SQLException { |
|
2841 |
updateBytes(findColumn(columnName), x); |
|
2842 |
} |
|
2843 |
||
2844 |
/** |
|
31061 | 2845 |
* Updates the designated column with a {@code java.sql.Date} value. |
2846 |
* The {@code updateXXX} methods are used to update column values in the |
|
2847 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2848 |
* update the underlying database; instead the {@code updateRow} or |
|
2849 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2850 |
* |
2851 |
* @param columnName the name of the column |
|
2852 |
* @param x the new column value |
|
2853 |
* @throws SQLException if a database access error occurs |
|
2854 |
* |
|
2855 |
*/ |
|
2856 |
public void updateDate(String columnName, java.sql.Date x) throws SQLException { |
|
2857 |
updateDate(findColumn(columnName), x); |
|
2858 |
} |
|
2859 |
||
2860 |
/** |
|
31061 | 2861 |
* Updates the designated column with a {@code java.sql.Time} value. |
2862 |
* The {@code updateXXX} methods are used to update column values in the |
|
2863 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2864 |
* update the underlying database; instead the {@code updateRow} or |
|
2865 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2866 |
* |
2867 |
* @param columnName the name of the column |
|
2868 |
* @param x the new column value |
|
2869 |
* @throws SQLException if a database access error occurs |
|
2870 |
* |
|
2871 |
*/ |
|
2872 |
public void updateTime(String columnName, java.sql.Time x) throws SQLException { |
|
2873 |
updateTime(findColumn(columnName), x); |
|
2874 |
} |
|
2875 |
||
2876 |
/** |
|
31061 | 2877 |
* Updates the designated column with a {@code java.sql.Timestamp} |
2 | 2878 |
* value. |
31061 | 2879 |
* The {@code updateXXX} methods are used to update column values in the |
2880 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2881 |
* update the underlying database; instead the {@code updateRow} or |
|
2882 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2883 |
* |
2884 |
* @param columnName the name of the column |
|
2885 |
* @param x the new column value |
|
2886 |
* @throws SQLException if a database access error occurs |
|
2887 |
* |
|
2888 |
*/ |
|
2889 |
public void updateTimestamp(String columnName, java.sql.Timestamp x) throws SQLException { |
|
2890 |
updateTimestamp(findColumn(columnName), x); |
|
2891 |
} |
|
2892 |
||
2893 |
/** |
|
2894 |
* Updates the designated column with an ascii stream value. |
|
31061 | 2895 |
* The {@code updateXXX} methods are used to update column values in the |
2896 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2897 |
* update the underlying database; instead the {@code updateRow} or |
|
2898 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2899 |
* |
2900 |
* @param columnName the name of the column |
|
2901 |
* @param x the new column value |
|
2902 |
* @param length the length of the stream |
|
2903 |
* @throws SQLException if a database access error occurs |
|
2904 |
* |
|
2905 |
*/ |
|
2906 |
public void updateAsciiStream(String columnName, java.io.InputStream x, int length) throws SQLException { |
|
2907 |
updateAsciiStream(findColumn(columnName), x, length); |
|
2908 |
} |
|
2909 |
||
2910 |
/** |
|
2911 |
* Updates the designated column with a binary stream value. |
|
31061 | 2912 |
* The {@code updateXXX} methods are used to update column values in the |
2913 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2914 |
* update the underlying database; instead the {@code updateRow} or |
|
2915 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2916 |
* |
2917 |
* @param columnName the name of the column |
|
2918 |
* @param x the new column value |
|
2919 |
* @param length the length of the stream |
|
2920 |
* @throws SQLException if a database access error occurs |
|
2921 |
* |
|
2922 |
*/ |
|
2923 |
public void updateBinaryStream(String columnName, java.io.InputStream x, int length) throws SQLException { |
|
2924 |
updateBinaryStream(findColumn(columnName), x, length); |
|
2925 |
} |
|
2926 |
||
2927 |
/** |
|
2928 |
* Updates the designated column with a character stream value. |
|
31061 | 2929 |
* The {@code updateXXX} methods are used to update column values |
2930 |
* in the current row or the insert row. The {@code updateXXX} |
|
2 | 2931 |
* methods do not update the underlying database; instead the |
31061 | 2932 |
* {@code updateRow} or {@code insertRow} methods are called |
2 | 2933 |
* to update the database. |
2934 |
* |
|
2935 |
* @param columnName the name of the column |
|
31061 | 2936 |
* @param reader the new column {@code Reader} stream value |
2 | 2937 |
* @param length the length of the stream |
2938 |
* @throws SQLException if a database access error occurs |
|
2939 |
* |
|
2940 |
*/ |
|
2941 |
public void updateCharacterStream(String columnName, java.io.Reader reader, int length) throws SQLException { |
|
2942 |
updateCharacterStream(findColumn(columnName), reader, length); |
|
2943 |
} |
|
2944 |
||
2945 |
/** |
|
31061 | 2946 |
* Updates the designated column with an {@code Object} value. |
2947 |
* The {@code updateXXX} methods are used to update column values in the |
|
2948 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2949 |
* update the underlying database; instead the {@code updateRow} or |
|
2950 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2951 |
* |
2952 |
* @param columnName the name of the column |
|
2953 |
* @param x the new column value |
|
31061 | 2954 |
* @param scale for {@code java.sql.Types.DECIMAL} |
2955 |
* or {@code java.sql.Types.NUMERIC} types, |
|
2 | 2956 |
* this is the number of digits after the decimal point. For all other |
2957 |
* types this value will be ignored. |
|
2958 |
* @throws SQLException if a database access error occurs |
|
2959 |
* |
|
2960 |
*/ |
|
2961 |
public void updateObject(String columnName, Object x, int scale) throws SQLException { |
|
2962 |
updateObject(findColumn(columnName), x, scale); |
|
2963 |
} |
|
2964 |
||
2965 |
/** |
|
31061 | 2966 |
* Updates the designated column with an {@code Object} value. |
2967 |
* The {@code updateXXX} methods are used to update column values in the |
|
2968 |
* current row or the insert row. The {@code updateXXX} methods do not |
|
2969 |
* update the underlying database; instead the {@code updateRow} or |
|
2970 |
* {@code insertRow} methods are called to update the database. |
|
2 | 2971 |
* |
2972 |
* @param columnName the name of the column |
|
2973 |
* @param x the new column value |
|
2974 |
* @throws SQLException if a database access error occurs |
|
2975 |
* |
|
2976 |
*/ |
|
2977 |
public void updateObject(String columnName, Object x) throws SQLException { |
|
2978 |
updateObject(findColumn(columnName), x); |
|
2979 |
} |
|
2980 |
||
2981 |
/** |
|
2982 |
* Inserts the contents of the insert row into this |
|
31061 | 2983 |
* {@code ResultSet} object and into the database |
2 | 2984 |
* and also notifies listeners that a row has changed. |
2985 |
* The cursor must be on the insert row when this method is called. |
|
2986 |
* |
|
2987 |
* @throws SQLException if (1) a database access error occurs, |
|
2988 |
* (2) this method is called when the cursor is not |
|
2989 |
* on the insert row, (3) not all non-nullable columns in |
|
2990 |
* the insert row have been given a value, or (4) this |
|
2991 |
* rowset does not currently have a valid connection, |
|
2992 |
* prepared statement, and result set |
|
2993 |
*/ |
|
2994 |
public void insertRow() throws SQLException { |
|
2995 |
checkState(); |
|
2996 |
||
2997 |
rs.insertRow(); |
|
2998 |
notifyRowChanged(); |
|
2999 |
} |
|
3000 |
||
3001 |
/** |
|
3002 |
* Updates the underlying database with the new contents of the |
|
31061 | 3003 |
* current row of this rowset's {@code ResultSet} object |
2 | 3004 |
* and notifies listeners that a row has changed. |
3005 |
* This method cannot be called when the cursor is on the insert row. |
|
3006 |
* |
|
3007 |
* @throws SQLException if (1) a database access error occurs, |
|
3008 |
* (2) this method is called when the cursor is |
|
3009 |
* on the insert row, (3) the concurrency of the result |
|
31061 | 3010 |
* set is {@code ResultSet.CONCUR_READ_ONLY}, or |
2 | 3011 |
* (4) this rowset does not currently have a valid connection, |
3012 |
* prepared statement, and result set |
|
3013 |
*/ |
|
3014 |
public void updateRow() throws SQLException { |
|
3015 |
checkState(); |
|
3016 |
||
3017 |
rs.updateRow(); |
|
3018 |
notifyRowChanged(); |
|
3019 |
} |
|
3020 |
||
3021 |
/** |
|
31061 | 3022 |
* Deletes the current row from this rowset's {@code ResultSet} object |
2 | 3023 |
* and from the underlying database and also notifies listeners that a row |
3024 |
* has changed. This method cannot be called when the cursor is on the insert |
|
3025 |
* row. |
|
3026 |
* |
|
3027 |
* @throws SQLException if a database access error occurs |
|
31061 | 3028 |
* or if this method is called when the cursor is on the insert row |
2 | 3029 |
* @throws SQLException if (1) a database access error occurs, |
3030 |
* (2) this method is called when the cursor is before the |
|
3031 |
* first row, after the last row, or on the insert row, |
|
3032 |
* (3) the concurrency of this rowset's result |
|
31061 | 3033 |
* set is {@code ResultSet.CONCUR_READ_ONLY}, or |
2 | 3034 |
* (4) this rowset does not currently have a valid connection, |
3035 |
* prepared statement, and result set |
|
3036 |
*/ |
|
3037 |
public void deleteRow() throws SQLException { |
|
3038 |
checkState(); |
|
3039 |
||
3040 |
rs.deleteRow(); |
|
3041 |
notifyRowChanged(); |
|
3042 |
} |
|
3043 |
||
3044 |
/** |
|
31061 | 3045 |
* Refreshes the current row of this rowset's {@code ResultSet} |
2 | 3046 |
* object with its most recent value in the database. This method |
3047 |
* cannot be called when the cursor is on the insert row. |
|
3048 |
* |
|
31061 | 3049 |
* <P>The {@code refreshRow} method provides a way for an |
2 | 3050 |
* application to explicitly tell the JDBC driver to refetch |
3051 |
* a row(s) from the database. An application may want to call |
|
31061 | 3052 |
* {@code refreshRow} when caching or prefetching is being |
2 | 3053 |
* done by the JDBC driver to fetch the latest value of a row |
3054 |
* from the database. The JDBC driver may actually refresh multiple |
|
3055 |
* rows at once if the fetch size is greater than one. |
|
3056 |
* |
|
3057 |
* <P> All values are refetched subject to the transaction isolation |
|
31061 | 3058 |
* level and cursor sensitivity. If {@code refreshRow} is called after |
3059 |
* calling an {@code updateXXX} method, but before calling |
|
3060 |
* the method {@code updateRow}, then the |
|
2 | 3061 |
* updates made to the row are lost. Calling the method |
31061 | 3062 |
* {@code refreshRow} frequently will likely slow performance. |
2 | 3063 |
* |
3064 |
* @throws SQLException if (1) a database access error occurs, |
|
3065 |
* (2) this method is called when the cursor is |
|
3066 |
* on the insert row, or (3) this rowset does not |
|
3067 |
* currently have a valid connection, prepared statement, |
|
3068 |
* and result set |
|
3069 |
* |
|
3070 |
*/ |
|
3071 |
public void refreshRow() throws SQLException { |
|
3072 |
checkState(); |
|
3073 |
||
3074 |
rs.refreshRow(); |
|
3075 |
} |
|
3076 |
||
3077 |
/** |
|
3078 |
* Cancels the updates made to the current row in this |
|
31061 | 3079 |
* {@code ResultSet} object and notifies listeners that a row |
2 | 3080 |
* has changed. This method may be called after calling an |
31061 | 3081 |
* {@code updateXXX} method(s) and before calling |
3082 |
* the method {@code updateRow} to roll back |
|
2 | 3083 |
* the updates made to a row. If no updates have been made or |
31061 | 3084 |
* {@code updateRow} has already been called, this method has no |
2 | 3085 |
* effect. |
3086 |
* |
|
3087 |
* @throws SQLException if (1) a database access error occurs, |
|
3088 |
* (2) this method is called when the cursor is |
|
3089 |
* on the insert row, or (3) this rowset does not |
|
3090 |
* currently have a valid connection, prepared statement, |
|
3091 |
* and result set |
|
3092 |
*/ |
|
3093 |
public void cancelRowUpdates() throws SQLException { |
|
3094 |
checkState(); |
|
3095 |
||
3096 |
rs.cancelRowUpdates(); |
|
3097 |
||
3098 |
notifyRowChanged(); |
|
3099 |
} |
|
3100 |
||
3101 |
/** |
|
3102 |
* Moves the cursor to the insert row. The current cursor position is |
|
3103 |
* remembered while the cursor is positioned on the insert row. |
|
3104 |
* |
|
3105 |
* The insert row is a special row associated with an updatable |
|
3106 |
* result set. It is essentially a buffer where a new row may |
|
31061 | 3107 |
* be constructed by calling the {@code updateXXX} methods prior to |
2 | 3108 |
* inserting the row into the result set. |
3109 |
* |
|
31061 | 3110 |
* Only the {@code updateXXX}, {@code getXXX}, |
3111 |
* and {@code insertRow} methods may be |
|
2 | 3112 |
* called when the cursor is on the insert row. All of the columns in |
3113 |
* a result set must be given a value each time this method is |
|
31061 | 3114 |
* called before calling {@code insertRow}. |
3115 |
* An {@code updateXXX} method must be called before a |
|
3116 |
* {@code getXXX} method can be called on a column value. |
|
2 | 3117 |
* |
3118 |
* @throws SQLException if (1) a database access error occurs, |
|
31061 | 3119 |
* (2) this rowset's {@code ResultSet} object is |
2 | 3120 |
* not updatable, or (3) this rowset does not |
3121 |
* currently have a valid connection, prepared statement, |
|
3122 |
* and result set |
|
3123 |
* |
|
3124 |
*/ |
|
3125 |
public void moveToInsertRow() throws SQLException { |
|
3126 |
checkState(); |
|
3127 |
||
3128 |
rs.moveToInsertRow(); |
|
3129 |
} |
|
3130 |
||
3131 |
/** |
|
3132 |
* Moves the cursor to the remembered cursor position, usually the |
|
3133 |
* current row. This method has no effect if the cursor is not on |
|
3134 |
* the insert row. |
|
3135 |
* |
|
3136 |
* @throws SQLException if (1) a database access error occurs, |
|
31061 | 3137 |
* (2) this rowset's {@code ResultSet} object is |
2 | 3138 |
* not updatable, or (3) this rowset does not |
3139 |
* currently have a valid connection, prepared statement, |
|
3140 |
* and result set |
|
3141 |
*/ |
|
3142 |
public void moveToCurrentRow() throws SQLException { |
|
3143 |
checkState(); |
|
3144 |
||
3145 |
rs.moveToCurrentRow(); |
|
3146 |
} |
|
3147 |
||
3148 |
/** |
|
31061 | 3149 |
* Returns the {@code Statement} object that produced this |
3150 |
* {@code ResultSet} object. |
|
2 | 3151 |
* If the result set was generated some other way, such as by a |
31061 | 3152 |
* {@code DatabaseMetaData} method, this method returns |
3153 |
* {@code null}. |
|
3154 |
* |
|
3155 |
* @return the {@code Statement} object that produced |
|
3156 |
* this rowset's {@code ResultSet} object or {@code null} |
|
2 | 3157 |
* if the result set was produced some other way |
3158 |
* @throws SQLException if a database access error occurs |
|
3159 |
*/ |
|
3160 |
public java.sql.Statement getStatement() throws SQLException { |
|
3161 |
||
3162 |
if(rs != null) |
|
3163 |
{ |
|
3164 |
return rs.getStatement(); |
|
3165 |
} else { |
|
3166 |
return null; |
|
3167 |
} |
|
3168 |
} |
|
3169 |
||
3170 |
/** |
|
3171 |
* Returns the value of the designated column in the current row |
|
31061 | 3172 |
* of this rowset's {@code ResultSet} object as an {@code Object}. |
3173 |
* This method uses the given {@code Map} object |
|
2 | 3174 |
* for the custom mapping of the |
3175 |
* SQL structured or distinct type that is being retrieved. |
|
3176 |
* |
|
3177 |
* @param i the first column is 1, the second is 2, and so on |
|
31061 | 3178 |
* @param map a {@code java.util.Map} object that contains the mapping |
3179 |
* from SQL type names to classes in the Java programming language |
|
3180 |
* @return an {@code Object} in the Java programming language |
|
3181 |
* representing the SQL value |
|
2 | 3182 |
* @throws SQLException if (1) a database access error occurs |
3183 |
* or (2) this rowset does not currently have a valid connection, |
|
3184 |
* prepared statement, and result set |
|
3185 |
*/ |
|
3186 |
public Object getObject(int i, java.util.Map<String,Class<?>> map) |
|
3187 |
throws SQLException |
|
3188 |
{ |
|
3189 |
checkState(); |
|
3190 |
||
3191 |
return rs.getObject(i, map); |
|
3192 |
} |
|
3193 |
||
3194 |
/** |
|
3195 |
* Returns the value of the designated column in the current row |
|
31061 | 3196 |
* of this rowset's {@code ResultSet} object as a {@code Ref} object. |
2 | 3197 |
* |
3198 |
* @param i the first column is 1, the second is 2, and so on |
|
31061 | 3199 |
* @return a {@code Ref} object representing an SQL {@code REF} value |
2 | 3200 |
* @throws SQLException if (1) a database access error occurs |
3201 |
* or (2) this rowset does not currently have a valid connection, |
|
3202 |
* prepared statement, and result set |
|
3203 |
*/ |
|
3204 |
public Ref getRef(int i) throws SQLException { |
|
3205 |
checkState(); |
|
3206 |
||
3207 |
return rs.getRef(i); |
|
3208 |
} |
|
3209 |
||
3210 |
||
3211 |
/** |
|
3212 |
* Returns the value of the designated column in the current row |
|
31061 | 3213 |
* of this rowset's {@code ResultSet} object as a {@code Blob} object. |
2 | 3214 |
* |
3215 |
* @param i the first column is 1, the second is 2, and so on |
|
31061 | 3216 |
* @return a {@code Blob} object representing the SQL {@code BLOB} |
2 | 3217 |
* value in the specified column |
3218 |
* @throws SQLException if (1) a database access error occurs |
|
3219 |
* or (2) this rowset does not currently have a valid connection, |
|
3220 |
* prepared statement, and result set |
|
3221 |
*/ |
|
3222 |
public Blob getBlob(int i) throws SQLException { |
|
3223 |
checkState(); |
|
3224 |
||
3225 |
return rs.getBlob(i); |
|
3226 |
} |
|
3227 |
||
3228 |
/** |
|
3229 |
* Returns the value of the designated column in the current row |
|
31061 | 3230 |
* of this rowset's {@code ResultSet} object as a {@code Clob} object. |
2 | 3231 |
* |
3232 |
* @param i the first column is 1, the second is 2, and so on |
|
31061 | 3233 |
* @return a {@code Clob} object representing the SQL {@code CLOB} |
2 | 3234 |
* value in the specified column |
3235 |
* @throws SQLException if (1) a database access error occurs |
|
3236 |
* or (2) this rowset does not currently have a valid connection, |
|
3237 |
* prepared statement, and result set |
|
3238 |
*/ |
|
3239 |
public Clob getClob(int i) throws SQLException { |
|
3240 |
checkState(); |
|
3241 |
||
3242 |
return rs.getClob(i); |
|
3243 |
} |
|
3244 |
||
3245 |
/** |
|
3246 |
* Returns the value of the designated column in the current row |
|
31061 | 3247 |
* of this rowset's {@code ResultSet} object as an {@code Array} object. |
2 | 3248 |
* |
3249 |
* @param i the first column is 1, the second is 2, and so on. |
|
31061 | 3250 |
* @return an {@code Array} object representing the SQL {@code ARRAY} |
2 | 3251 |
* value in the specified column |
3252 |
* @throws SQLException if (1) a database access error occurs |
|
3253 |
* or (2) this rowset does not currently have a valid connection, |
|
3254 |
* prepared statement, and result set |
|
3255 |
*/ |
|
3256 |
public Array getArray(int i) throws SQLException { |
|
3257 |
checkState(); |
|
3258 |
||
3259 |
return rs.getArray(i); |
|
3260 |
} |
|
3261 |
||
3262 |
/** |
|
3263 |
* Returns the value of the designated column in the current row |
|
31061 | 3264 |
* of this rowset's {@code ResultSet} object as an {@code Object}. |
3265 |
* This method uses the specified {@code Map} object for |
|
2 | 3266 |
* custom mapping if appropriate. |
3267 |
* |
|
3268 |
* @param colName the name of the column from which to retrieve the value |
|
31061 | 3269 |
* @param map a {@code java.util.Map} object that contains the mapping |
2 | 3270 |
* from SQL type names to classes in the Java programming language |
31061 | 3271 |
* @return an {@code Object} representing the SQL |
2 | 3272 |
* value in the specified column |
3273 |
* @throws SQLException if (1) a database access error occurs |
|
3274 |
* or (2) this rowset does not currently have a valid connection, |
|
3275 |
* prepared statement, and result set |
|
3276 |
*/ |
|
3277 |
public Object getObject(String colName, java.util.Map<String,Class<?>> map) |
|
3278 |
throws SQLException |
|
3279 |
{ |
|
3280 |
return getObject(findColumn(colName), map); |
|
3281 |
} |
|
3282 |
||
3283 |
/** |
|
3284 |
* Returns the value of the designated column in the current row |
|
31061 | 3285 |
* of this rowset's {@code ResultSet} object as a {@code Ref} object. |
2 | 3286 |
* |
3287 |
* @param colName the column name |
|
31061 | 3288 |
* @return a {@code Ref} object representing the SQL {@code REF} value in |
2 | 3289 |
* the specified column |
3290 |
* @throws SQLException if (1) a database access error occurs |
|
3291 |
* or (2) this rowset does not currently have a valid connection, |
|
3292 |
* prepared statement, and result set |
|
3293 |
*/ |
|
3294 |
public Ref getRef(String colName) throws SQLException { |
|
3295 |
return getRef(findColumn(colName)); |
|
3296 |
} |
|
3297 |
||
3298 |
/** |
|
3299 |
* Returns the value of the designated column in the current row |
|
31061 | 3300 |
* of this rowset's {@code ResultSet} object as a {@code Blob} object. |
2 | 3301 |
* |
3302 |
* @param colName the name of the column from which to retrieve the value |
|
31061 | 3303 |
* @return a {@code Blob} object representing the SQL {@code BLOB} |
2 | 3304 |
* value in the specified column |
3305 |
* @throws SQLException if (1) a database access error occurs |
|
3306 |
* or (2) this rowset does not currently have a valid connection, |
|
3307 |
* prepared statement, and result set |
|
3308 |
*/ |
|
3309 |
public Blob getBlob(String colName) throws SQLException { |
|
3310 |
return getBlob(findColumn(colName)); |
|
3311 |
} |
|
3312 |
||
3313 |
/** |
|
3314 |
* Returns the value of the designated column in the current row |
|
31061 | 3315 |
* of this rowset's {@code ResultSet} object as a {@code Clob} object. |
2 | 3316 |
* |
3317 |
* @param colName the name of the column from which to retrieve the value |
|
31061 | 3318 |
* @return a {@code Clob} object representing the SQL {@code CLOB} |
2 | 3319 |
* value in the specified column |
3320 |
* @throws SQLException if (1) a database access error occurs |
|
3321 |
* or (2) this rowset does not currently have a valid connection, |
|
3322 |
* prepared statement, and result set |
|
3323 |
*/ |
|
3324 |
public Clob getClob(String colName) throws SQLException { |
|
3325 |
return getClob(findColumn(colName)); |
|
3326 |
} |
|
3327 |
||
3328 |
/** |
|
3329 |
* Returns the value of the designated column in the current row |
|
31061 | 3330 |
* of this rowset's {@code ResultSet} object as an {@code Array} object. |
2 | 3331 |
* |
3332 |
* @param colName the name of the column from which to retrieve the value |
|
31061 | 3333 |
* @return an {@code Array} object representing the SQL {@code ARRAY} |
2 | 3334 |
* value in the specified column |
3335 |
* @throws SQLException if (1) a database access error occurs |
|
3336 |
* or (2) this rowset does not currently have a valid connection, |
|
3337 |
* prepared statement, and result set |
|
3338 |
*/ |
|
3339 |
public Array getArray(String colName) throws SQLException { |
|
3340 |
return getArray(findColumn(colName)); |
|
3341 |
} |
|
3342 |
||
3343 |
/** |
|
3344 |
* Returns the value of the designated column in the current row |
|
31061 | 3345 |
* of this rowset's {@code ResultSet} object as a {@code java.sql.Date} |
2 | 3346 |
* object. This method uses the given calendar to construct an appropriate |
3347 |
* millisecond value for the date if the underlying database does not store |
|
3348 |
* timezone information. |
|
3349 |
* |
|
3350 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
31061 | 3351 |
* @param cal the {@code java.util.Calendar} object |
2 | 3352 |
* to use in constructing the date |
31061 | 3353 |
* @return the column value as a {@code java.sql.Date} object; |
3354 |
* if the value is SQL {@code NULL}, |
|
3355 |
* the value returned is {@code null} |
|
2 | 3356 |
* @throws SQLException if (1) a database access error occurs |
3357 |
* or (2) this rowset does not currently have a valid connection, |
|
3358 |
* prepared statement, and result set |
|
3359 |
*/ |
|
3360 |
public java.sql.Date getDate(int columnIndex, Calendar cal) throws SQLException { |
|
3361 |
checkState(); |
|
3362 |
||
3363 |
return rs.getDate(columnIndex, cal); |
|
3364 |
} |
|
3365 |
||
3366 |
/** |
|
3367 |
* Returns the value of the designated column in the current row |
|
31061 | 3368 |
* of this rowset's {@code ResultSet} object as a {@code java.sql.Date} |
2 | 3369 |
* object. This method uses the given calendar to construct an appropriate |
3370 |
* millisecond value for the date if the underlying database does not store |
|
3371 |
* timezone information. |
|
3372 |
* |
|
3373 |
* @param columnName the SQL name of the column from which to retrieve the value |
|
31061 | 3374 |
* @param cal the {@code java.util.Calendar} object |
2 | 3375 |
* to use in constructing the date |
31061 | 3376 |
* @return the column value as a {@code java.sql.Date} object; |
3377 |
* if the value is SQL {@code NULL}, |
|
3378 |
* the value returned is {@code null} |
|
2 | 3379 |
* @throws SQLException if a database access error occurs |
3380 |
* or this rowset does not currently have a valid connection, |
|
3381 |
* prepared statement, and result set |
|
3382 |
* |
|
3383 |
*/ |
|
3384 |
public java.sql.Date getDate(String columnName, Calendar cal) throws SQLException { |
|
3385 |
return getDate(findColumn(columnName), cal); |
|
3386 |
} |
|
3387 |
||
3388 |
/** |
|
3389 |
* Returns the value of the designated column in the current row |
|
31061 | 3390 |
* of this rowset's {@code ResultSet} object as a {@code java.sql.Time} |
2 | 3391 |
* object. This method uses the given calendar to construct an appropriate |
3392 |
* millisecond value for the date if the underlying database does not store |
|
3393 |
* timezone information. |
|
3394 |
* |
|
3395 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
31061 | 3396 |
* @param cal the {@code java.util.Calendar} object |
2 | 3397 |
* to use in constructing the time |
31061 | 3398 |
* @return the column value as a {@code java.sql.Time} object; |
3399 |
* if the value is SQL {@code NULL}, |
|
3400 |
* the value returned is {@code null} in the Java programming language |
|
2 | 3401 |
* @throws SQLException if a database access error occurs |
3402 |
* or this rowset does not currently have a valid connection, |
|
3403 |
* prepared statement, and result set |
|
3404 |
*/ |
|
3405 |
public java.sql.Time getTime(int columnIndex, Calendar cal) throws SQLException { |
|
3406 |
checkState(); |
|
3407 |
||
3408 |
return rs.getTime(columnIndex, cal); |
|
3409 |
} |
|
3410 |
||
3411 |
/** |
|
3412 |
* Returns the value of the designated column in the current row |
|
31061 | 3413 |
* of this rowset's {@code ResultSet} object as a {@code java.sql.Time} |
2 | 3414 |
* object. This method uses the given calendar to construct an appropriate |
3415 |
* millisecond value for the date if the underlying database does not store |
|
3416 |
* timezone information. |
|
3417 |
* |
|
3418 |
* @param columnName the SQL name of the column |
|
31061 | 3419 |
* @param cal the {@code java.util.Calendar} object |
2 | 3420 |
* to use in constructing the time |
31061 | 3421 |
* @return the column value as a {@code java.sql.Time} object; |
3422 |
* if the value is SQL {@code NULL}, |
|
3423 |
* the value returned is {@code null} in the Java programming language |
|
2 | 3424 |
* @throws SQLException if a database access error occurs |
3425 |
* or this rowset does not currently have a valid connection, |
|
3426 |
* prepared statement, and result set |
|
3427 |
*/ |
|
3428 |
public java.sql.Time getTime(String columnName, Calendar cal) throws SQLException { |
|
3429 |
return getTime(findColumn(columnName), cal); |
|
3430 |
} |
|
3431 |
||
3432 |
/** |
|
3433 |
* Returns the value of the designated column in the current row |
|
31061 | 3434 |
* of this rowset's {@code ResultSet} object as a |
3435 |
* {@code java.sql.Timestamp} object. |
|
2 | 3436 |
* This method uses the given calendar to construct an appropriate millisecond |
3437 |
* value for the timestamp if the underlying database does not store |
|
3438 |
* timezone information. |
|
3439 |
* |
|
3440 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
31061 | 3441 |
* @param cal the {@code java.util.Calendar} object |
2 | 3442 |
* to use in constructing the timestamp |
31061 | 3443 |
* @return the column value as a {@code java.sql.Timestamp} object; |
3444 |
* if the value is SQL {@code NULL}, |
|
3445 |
* the value returned is {@code null} |
|
2 | 3446 |
* @throws SQLException if a database access error occurs |
3447 |
* or this rowset does not currently have a valid connection, |
|
3448 |
* prepared statement, and result set |
|
3449 |
*/ |
|
3450 |
public java.sql.Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException { |
|
3451 |
checkState(); |
|
3452 |
||
3453 |
return rs.getTimestamp(columnIndex, cal); |
|
3454 |
} |
|
3455 |
||
3456 |
/** |
|
3457 |
* Returns the value of the designated column in the current row |
|
31061 | 3458 |
* of this rowset's {@code ResultSet} object as a |
3459 |
* {@code java.sql.Timestamp} object. |
|
2 | 3460 |
* This method uses the given calendar to construct an appropriate millisecond |
3461 |
* value for the timestamp if the underlying database does not store |
|
3462 |
* timezone information. |
|
3463 |
* |
|
3464 |
* @param columnName the SQL name of the column |
|
31061 | 3465 |
* @param cal the {@code java.util.Calendar} object |
2 | 3466 |
* to use in constructing the timestamp |
31061 | 3467 |
* @return the column value as a {@code java.sql.Timestamp} object; |
3468 |
* if the value is SQL {@code NULL}, |
|
3469 |
* the value returned is {@code null} |
|
2 | 3470 |
* @throws SQLException if a database access error occurs |
3471 |
* or this rowset does not currently have a valid connection, |
|
3472 |
* prepared statement, and result set |
|
3473 |
*/ |
|
3474 |
public java.sql.Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException { |
|
3475 |
return getTimestamp(findColumn(columnName), cal); |
|
3476 |
} |
|
3477 |
||
3478 |
||
3479 |
/** |
|
3480 |
* Sets the designated column in either the current row or the insert |
|
31061 | 3481 |
* row of this {@code JdbcRowSetImpl} object with the given |
3482 |
* {@code double} value. |
|
2 | 3483 |
* |
3484 |
* This method updates a column value in either the current row or |
|
3485 |
* the insert row of this rowset, but it does not update the |
|
3486 |
* database. If the cursor is on a row in the rowset, the |
|
3487 |
* method {@link #updateRow} must be called to update the database. |
|
3488 |
* If the cursor is on the insert row, the method {@link #insertRow} |
|
3489 |
* must be called, which will insert the new row into both this rowset |
|
3490 |
* and the database. Both of these methods must be called before the |
|
3491 |
* cursor moves to another row. |
|
3492 |
* |
|
31061 | 3493 |
* @param columnIndex the first column is {@code 1}, the second |
3494 |
* is {@code 2}, and so on; must be {@code 1} or larger |
|
2 | 3495 |
* and equal to or less than the number of columns in this rowset |
31061 | 3496 |
* @param ref the new {@code Ref} column value |
2 | 3497 |
* @throws SQLException if (1) the given column index is out of bounds, |
3498 |
* (2) the cursor is not on one of this rowset's rows or its |
|
3499 |
* insert row, or (3) this rowset is |
|
31061 | 3500 |
* {@code ResultSet.CONCUR_READ_ONLY} |
2 | 3501 |
*/ |
3502 |
public void updateRef(int columnIndex, java.sql.Ref ref) |
|
3503 |
throws SQLException { |
|
3504 |
checkState(); |
|
3505 |
rs.updateRef(columnIndex, ref); |
|
3506 |
} |
|
3507 |
||
3508 |
/** |
|
3509 |
* Sets the designated column in either the current row or the insert |
|
31061 | 3510 |
* row of this {@code JdbcRowSetImpl} object with the given |
3511 |
* {@code double} value. |
|
2 | 3512 |
* |
3513 |
* This method updates a column value in either the current row or |
|
3514 |
* the insert row of this rowset, but it does not update the |
|
3515 |
* database. If the cursor is on a row in the rowset, the |
|
3516 |
* method {@link #updateRow} must be called to update the database. |
|
3517 |
* If the cursor is on the insert row, the method {@link #insertRow} |
|
3518 |
* must be called, which will insert the new row into both this rowset |
|
3519 |
* and the database. Both of these methods must be called before the |
|
3520 |
* cursor moves to another row. |
|
3521 |
* |
|
31061 | 3522 |
* @param columnName a {@code String} object that must match the |
2 | 3523 |
* SQL name of a column in this rowset, ignoring case |
3524 |
* @param ref the new column value |
|
3525 |
* @throws SQLException if (1) the given column name does not match the |
|
3526 |
* name of a column in this rowset, (2) the cursor is not on |
|
3527 |
* one of this rowset's rows or its insert row, or (3) this |
|
31061 | 3528 |
* rowset is {@code ResultSet.CONCUR_READ_ONLY} |
2 | 3529 |
*/ |
3530 |
public void updateRef(String columnName, java.sql.Ref ref) |
|
3531 |
throws SQLException { |
|
3532 |
updateRef(findColumn(columnName), ref); |
|
3533 |
} |
|
3534 |
||
3535 |
/** |
|
3536 |
* Sets the designated column in either the current row or the insert |
|
31061 | 3537 |
* row of this {@code JdbcRowSetImpl} object with the given |
3538 |
* {@code double} value. |
|
2 | 3539 |
* |
3540 |
* This method updates a column value in either the current row or |
|
3541 |
* the insert row of this rowset, but it does not update the |
|
3542 |
* database. If the cursor is on a row in the rowset, the |
|
3543 |
* method {@link #updateRow} must be called to update the database. |
|
3544 |
* If the cursor is on the insert row, the method {@link #insertRow} |
|
3545 |
* must be called, which will insert the new row into both this rowset |
|
3546 |
* and the database. Both of these methods must be called before the |
|
3547 |
* cursor moves to another row. |
|
3548 |
* |
|
31061 | 3549 |
* @param columnIndex the first column is {@code 1}, the second |
3550 |
* is {@code 2}, and so on; must be {@code 1} or larger |
|
2 | 3551 |
* and equal to or less than the number of columns in this rowset |
31061 | 3552 |
* @param c the new column {@code Clob} value |
2 | 3553 |
* @throws SQLException if (1) the given column index is out of bounds, |
3554 |
* (2) the cursor is not on one of this rowset's rows or its |
|
3555 |
* insert row, or (3) this rowset is |
|
31061 | 3556 |
* {@code ResultSet.CONCUR_READ_ONLY} |
2 | 3557 |
*/ |
3558 |
public void updateClob(int columnIndex, Clob c) throws SQLException { |
|
3559 |
checkState(); |
|
3560 |
rs.updateClob(columnIndex, c); |
|
3561 |
} |
|
3562 |
||
3563 |
||
3564 |
/** |
|
3565 |
* Sets the designated column in either the current row or the insert |
|
31061 | 3566 |
* row of this {@code JdbcRowSetImpl} object with the given |
3567 |
* {@code double} value. |
|
2 | 3568 |
* |
3569 |
* This method updates a column value in either the current row or |
|
3570 |
* the insert row of this rowset, but it does not update the |
|
3571 |
* database. If the cursor is on a row in the rowset, the |
|
3572 |
* method {@link #updateRow} must be called to update the database. |
|
3573 |
* If the cursor is on the insert row, the method {@link #insertRow} |
|
3574 |
* must be called, which will insert the new row into both this rowset |
|
3575 |
* and the database. Both of these methods must be called before the |
|
3576 |
* cursor moves to another row. |
|
3577 |
* |
|
31061 | 3578 |
* @param columnName a {@code String} object that must match the |
2 | 3579 |
* SQL name of a column in this rowset, ignoring case |
31061 | 3580 |
* @param c the new column {@code Clob} value |
2 | 3581 |
* @throws SQLException if (1) the given column name does not match the |
3582 |
* name of a column in this rowset, (2) the cursor is not on |
|
3583 |
* one of this rowset's rows or its insert row, or (3) this |
|
31061 | 3584 |
* rowset is {@code ResultSet.CONCUR_READ_ONLY} |
2 | 3585 |
*/ |
3586 |
public void updateClob(String columnName, Clob c) throws SQLException { |
|
3587 |
updateClob(findColumn(columnName), c); |
|
3588 |
} |
|
3589 |
||
3590 |
/** |
|
3591 |
* Sets the designated column in either the current row or the insert |
|
31061 | 3592 |
* row of this {@code JdbcRowSetImpl} object with the given |
3593 |
* {@code java.sql.Blob} value. |
|
2 | 3594 |
* |
3595 |
* This method updates a column value in either the current row or |
|
3596 |
* the insert row of this rowset, but it does not update the |
|
3597 |
* database. If the cursor is on a row in the rowset, the |
|
3598 |
* method {@link #updateRow} must be called to update the database. |
|
3599 |
* If the cursor is on the insert row, the method {@link #insertRow} |
|
3600 |
* must be called, which will insert the new row into both this rowset |
|
3601 |
* and the database. Both of these methods must be called before the |
|
3602 |
* cursor moves to another row. |
|
3603 |
* |
|
31061 | 3604 |
* @param columnIndex the first column is {@code 1}, the second |
3605 |
* is {@code 2}, and so on; must be {@code 1} or larger |
|
2 | 3606 |
* and equal to or less than the number of columns in this rowset |
31061 | 3607 |
* @param b the new column {@code Blob} value |
2 | 3608 |
* @throws SQLException if (1) the given column index is out of bounds, |
3609 |
* (2) the cursor is not on one of this rowset's rows or its |
|
3610 |
* insert row, or (3) this rowset is |
|
31061 | 3611 |
* {@code ResultSet.CONCUR_READ_ONLY} |
2 | 3612 |
*/ |
3613 |
public void updateBlob(int columnIndex, Blob b) throws SQLException { |
|
3614 |
checkState(); |
|
3615 |
rs.updateBlob(columnIndex, b); |
|
3616 |
} |
|
3617 |
||
3618 |
/** |
|
3619 |
* Sets the designated column in either the current row or the insert |
|
31061 | 3620 |
* row of this {@code JdbcRowSetImpl} object with the given |
3621 |
* {@code java.sql.Blob } value. |
|
2 | 3622 |
* |
3623 |
* This method updates a column value in either the current row or |
|
3624 |
* the insert row of this rowset, but it does not update the |
|
3625 |
* database. If the cursor is on a row in the rowset, the |
|
3626 |
* method {@link #updateRow} must be called to update the database. |
|
3627 |
* If the cursor is on the insert row, the method {@link #insertRow} |
|
3628 |
* must be called, which will insert the new row into both this rowset |
|
3629 |
* and the database. Both of these methods must be called before the |
|
3630 |
* cursor moves to another row. |
|
3631 |
* |
|
31061 | 3632 |
* @param columnName a {@code String} object that must match the |
2 | 3633 |
* SQL name of a column in this rowset, ignoring case |
31061 | 3634 |
* @param b the new column {@code Blob} value |
2 | 3635 |
* @throws SQLException if (1) the given column name does not match the |
3636 |
* name of a column in this rowset, (2) the cursor is not on |
|
3637 |
* one of this rowset's rows or its insert row, or (3) this |
|
31061 | 3638 |
* rowset is {@code ResultSet.CONCUR_READ_ONLY} |
2 | 3639 |
*/ |
3640 |
public void updateBlob(String columnName, Blob b) throws SQLException { |
|
3641 |
updateBlob(findColumn(columnName), b); |
|
3642 |
} |
|
3643 |
||
3644 |
/** |
|
3645 |
* Sets the designated column in either the current row or the insert |
|
31061 | 3646 |
* row of this {@code JdbcRowSetImpl} object with the given |
3647 |
* {@code java.sql.Array} values. |
|
2 | 3648 |
* |
3649 |
* This method updates a column value in either the current row or |
|
3650 |
* the insert row of this rowset, but it does not update the |
|
3651 |
* database. If the cursor is on a row in the rowset, the |
|
3652 |
* method {@link #updateRow} must be called to update the database. |
|
3653 |
* If the cursor is on the insert row, the method {@link #insertRow} |
|
3654 |
* must be called, which will insert the new row into both this rowset |
|
3655 |
* and the database. Both of these methods must be called before the |
|
3656 |
* cursor moves to another row. |
|
3657 |
* |
|
31061 | 3658 |
* @param columnIndex the first column is {@code 1}, the second |
3659 |
* is {@code 2}, and so on; must be {@code 1} or larger |
|
2 | 3660 |
* and equal to or less than the number of columns in this rowset |
31061 | 3661 |
* @param a the new column {@code Array} value |
2 | 3662 |
* @throws SQLException if (1) the given column index is out of bounds, |
3663 |
* (2) the cursor is not on one of this rowset's rows or its |
|
3664 |
* insert row, or (3) this rowset is |
|
31061 | 3665 |
* {@code ResultSet.CONCUR_READ_ONLY} |
2 | 3666 |
*/ |
3667 |
public void updateArray(int columnIndex, Array a) throws SQLException { |
|
3668 |
checkState(); |
|
3669 |
rs.updateArray(columnIndex, a); |
|
3670 |
} |
|
3671 |
||
3672 |
/** |
|
3673 |
* Sets the designated column in either the current row or the insert |
|
31061 | 3674 |
* row of this {@code JdbcRowSetImpl} object with the given |
3675 |
* {@code java.sql.Array} value. |
|
2 | 3676 |
* |
3677 |
* This method updates a column value in either the current row or |
|
3678 |
* the insert row of this rowset, but it does not update the |
|
3679 |
* database. If the cursor is on a row in the rowset, the |
|
3680 |
* method {@link #updateRow} must be called to update the database. |
|
3681 |
* If the cursor is on the insert row, the method {@link #insertRow} |
|
3682 |
* must be called, which will insert the new row into both this rowset |
|
3683 |
* and the database. Both of these methods must be called before the |
|
3684 |
* cursor moves to another row. |
|
3685 |
* |
|
31061 | 3686 |
* @param columnName a {@code String} object that must match the |
2 | 3687 |
* SQL name of a column in this rowset, ignoring case |
31061 | 3688 |
* @param a the new column {@code Array} value |
2 | 3689 |
* @throws SQLException if (1) the given column name does not match the |
3690 |
* name of a column in this rowset, (2) the cursor is not on |
|
3691 |
* one of this rowset's rows or its insert row, or (3) this |
|
31061 | 3692 |
* rowset is {@code ResultSet.CONCUR_READ_ONLY} |
2 | 3693 |
*/ |
3694 |
public void updateArray(String columnName, Array a) throws SQLException { |
|
3695 |
updateArray(findColumn(columnName), a); |
|
3696 |
} |
|
3697 |
||
3698 |
/** |
|
31061 | 3699 |
* Provide interface coverage for getURL(int) in {@code ResultSet->RowSet} |
2 | 3700 |
*/ |
3701 |
public java.net.URL getURL(int columnIndex) throws SQLException { |
|
3702 |
checkState(); |
|
3703 |
return rs.getURL(columnIndex); |
|
3704 |
} |
|
3705 |
||
3706 |
/** |
|
31061 | 3707 |
* Provide interface coverage for getURL(String) in {@code ResultSet->RowSet} |
2 | 3708 |
*/ |
3709 |
public java.net.URL getURL(String columnName) throws SQLException { |
|
3710 |
return getURL(findColumn(columnName)); |
|
3711 |
} |
|
3712 |
||
3713 |
/** |
|
3714 |
* Return the RowSetWarning object for the current row of a |
|
31061 | 3715 |
* {@code JdbcRowSetImpl} |
2 | 3716 |
*/ |
3717 |
public RowSetWarning getRowSetWarnings() throws SQLException { |
|
3718 |
return null; |
|
3719 |
} |
|
3720 |
/** |
|
3721 |
* Unsets the designated parameter to the given int array. |
|
31061 | 3722 |
* This was set using {@code setMatchColumn} |
2 | 3723 |
* as the column which will form the basis of the join. |
3724 |
* <P> |
|
3725 |
* The parameter value unset by this method should be same |
|
3726 |
* as was set. |
|
3727 |
* |
|
3728 |
* @param columnIdxes the index into this rowset |
|
3729 |
* object's internal representation of parameter values |
|
3730 |
* @throws SQLException if an error occurs or the |
|
31061 | 3731 |
* parameter index is out of bounds or if the columnIdx is |
3732 |
* not the same as set using {@code setMatchColumn(int [])} |
|
2 | 3733 |
*/ |
3734 |
public void unsetMatchColumn(int[] columnIdxes) throws SQLException { |
|
3735 |
||
3736 |
int i_val; |
|
3737 |
for( int j= 0 ;j < columnIdxes.length; j++) { |
|
3738 |
i_val = (Integer.parseInt(iMatchColumns.get(j).toString())); |
|
3739 |
if(columnIdxes[j] != i_val) { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
3740 |
throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols").toString()); |
2 | 3741 |
} |
3742 |
} |
|
3743 |
||
3744 |
for( int i = 0;i < columnIdxes.length ;i++) { |
|
6697
39929804f9d4
6989139: Address JDBC Findbugs where Number type Constructor are used
lancea
parents:
6540
diff
changeset
|
3745 |
iMatchColumns.set(i,Integer.valueOf(-1)); |
2 | 3746 |
} |
3747 |
} |
|
3748 |
||
3749 |
/** |
|
3750 |
* Unsets the designated parameter to the given String array. |
|
31061 | 3751 |
* This was set using {@code setMatchColumn} |
2 | 3752 |
* as the column which will form the basis of the join. |
3753 |
* <P> |
|
3754 |
* The parameter value unset by this method should be same |
|
3755 |
* as was set. |
|
3756 |
* |
|
3757 |
* @param columnIdxes the index into this rowset |
|
3758 |
* object's internal representation of parameter values |
|
3759 |
* @throws SQLException if an error occurs or the |
|
31061 | 3760 |
* parameter index is out of bounds or if the columnName is |
3761 |
* not the same as set using {@code setMatchColumn(String [])} |
|
2 | 3762 |
*/ |
3763 |
public void unsetMatchColumn(String[] columnIdxes) throws SQLException { |
|
3764 |
||
3765 |
for(int j = 0 ;j < columnIdxes.length; j++) { |
|
3766 |
if( !columnIdxes[j].equals(strMatchColumns.get(j)) ){ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
3767 |
throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols").toString()); |
2 | 3768 |
} |
3769 |
} |
|
3770 |
||
3771 |
for(int i = 0 ; i < columnIdxes.length; i++) { |
|
3772 |
strMatchColumns.set(i,null); |
|
3773 |
} |
|
3774 |
} |
|
3775 |
||
3776 |
/** |
|
31061 | 3777 |
* Retrieves the column name as {@code String} array |
3778 |
* that was set using {@code setMatchColumn(String [])} |
|
2 | 3779 |
* for this rowset. |
3780 |
* |
|
31061 | 3781 |
* @return a {@code String} array object that contains the column names |
2 | 3782 |
* for the rowset which has this the match columns |
3783 |
* |
|
3784 |
* @throws SQLException if an error occurs or column name is not set |
|
3785 |
*/ |
|
3786 |
public String[] getMatchColumnNames() throws SQLException { |
|
3787 |
||
3788 |
String []str_temp = new String[strMatchColumns.size()]; |
|
3789 |
||
3790 |
if( strMatchColumns.get(0) == null) { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
3791 |
throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.setmatchcols").toString()); |
2 | 3792 |
} |
3793 |
||
3794 |
strMatchColumns.copyInto(str_temp); |
|
3795 |
return str_temp; |
|
3796 |
} |
|
3797 |
||
3798 |
/** |
|
31061 | 3799 |
* Retrieves the column id as {@code int} array that was set using |
3800 |
* {@code setMatchColumn(int [])} for this rowset. |
|
3801 |
* |
|
3802 |
* @return a {@code int} array object that contains the column ids |
|
2 | 3803 |
* for the rowset which has this as the match columns. |
3804 |
* |
|
3805 |
* @throws SQLException if an error occurs or column index is not set |
|
3806 |
*/ |
|
3807 |
public int[] getMatchColumnIndexes() throws SQLException { |
|
3808 |
||
3809 |
Integer []int_temp = new Integer[iMatchColumns.size()]; |
|
3810 |
int [] i_temp = new int[iMatchColumns.size()]; |
|
3811 |
int i_val; |
|
3812 |
||
11129
f9ad1aadf3fa
7116445: Miscellaneous warnings in the JDBC/RowSet classes
lancea
parents:
9257
diff
changeset
|
3813 |
i_val = iMatchColumns.get(0); |
2 | 3814 |
|
3815 |
if( i_val == -1 ) { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
3816 |
throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.setmatchcols").toString()); |
2 | 3817 |
} |
3818 |
||
3819 |
||
3820 |
iMatchColumns.copyInto(int_temp); |
|
3821 |
||
3822 |
for(int i = 0; i < int_temp.length; i++) { |
|
3823 |
i_temp[i] = (int_temp[i]).intValue(); |
|
3824 |
} |
|
3825 |
||
3826 |
return i_temp; |
|
3827 |
} |
|
3828 |
||
3829 |
/** |
|
3830 |
* Sets the designated parameter to the given int array. |
|
3831 |
* This forms the basis of the join for the |
|
31061 | 3832 |
* {@code JoinRowSet} as the column which will form the basis of the |
2 | 3833 |
* join. |
3834 |
* <P> |
|
3835 |
* The parameter value set by this method is stored internally and |
|
3836 |
* will be supplied as the appropriate parameter in this rowset's |
|
31061 | 3837 |
* command when the method {@code getMatchColumnIndexes} is called. |
2 | 3838 |
* |
3839 |
* @param columnIdxes the indexes into this rowset |
|
3840 |
* object's internal representation of parameter values; the |
|
3841 |
* first parameter is 0, the second is 1, and so on; must be |
|
31061 | 3842 |
* {@code 0} or greater |
2 | 3843 |
* @throws SQLException if an error occurs or the |
31061 | 3844 |
* parameter index is out of bounds |
2 | 3845 |
*/ |
3846 |
public void setMatchColumn(int[] columnIdxes) throws SQLException { |
|
3847 |
||
3848 |
for(int j = 0 ; j < columnIdxes.length; j++) { |
|
3849 |
if( columnIdxes[j] < 0 ) { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
3850 |
throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols1").toString()); |
2 | 3851 |
} |
3852 |
} |
|
3853 |
for(int i = 0 ;i < columnIdxes.length; i++) { |
|
6697
39929804f9d4
6989139: Address JDBC Findbugs where Number type Constructor are used
lancea
parents:
6540
diff
changeset
|
3854 |
iMatchColumns.add(i,Integer.valueOf(columnIdxes[i])); |
2 | 3855 |
} |
3856 |
} |
|
3857 |
||
3858 |
/** |
|
3859 |
* Sets the designated parameter to the given String array. |
|
3860 |
* This forms the basis of the join for the |
|
31061 | 3861 |
* {@code JoinRowSet} as the column which will form the basis of the |
2 | 3862 |
* join. |
3863 |
* <P> |
|
3864 |
* The parameter value set by this method is stored internally and |
|
3865 |
* will be supplied as the appropriate parameter in this rowset's |
|
31061 | 3866 |
* command when the method {@code getMatchColumn} is called. |
2 | 3867 |
* |
3868 |
* @param columnNames the name of the column into this rowset |
|
3869 |
* object's internal representation of parameter values |
|
3870 |
* @throws SQLException if an error occurs or the |
|
31061 | 3871 |
* parameter index is out of bounds |
2 | 3872 |
*/ |
3873 |
public void setMatchColumn(String[] columnNames) throws SQLException { |
|
3874 |
||
3875 |
for(int j = 0; j < columnNames.length; j++) { |
|
3876 |
if( columnNames[j] == null || columnNames[j].equals("")) { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
3877 |
throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols2").toString()); |
2 | 3878 |
} |
3879 |
} |
|
3880 |
for( int i = 0; i < columnNames.length; i++) { |
|
3881 |
strMatchColumns.add(i,columnNames[i]); |
|
3882 |
} |
|
3883 |
} |
|
3884 |
||
3885 |
||
31061 | 3886 |
/** |
3887 |
* Sets the designated parameter to the given {@code int} |
|
2 | 3888 |
* object. This forms the basis of the join for the |
31061 | 3889 |
* {@code JoinRowSet} as the column which will form the basis of the |
2 | 3890 |
* join. |
3891 |
* <P> |
|
3892 |
* The parameter value set by this method is stored internally and |
|
3893 |
* will be supplied as the appropriate parameter in this rowset's |
|
31061 | 3894 |
* command when the method {@code getMatchColumn} is called. |
2 | 3895 |
* |
3896 |
* @param columnIdx the index into this rowset |
|
3897 |
* object's internal representation of parameter values; the |
|
3898 |
* first parameter is 0, the second is 1, and so on; must be |
|
31061 | 3899 |
* {@code 0} or greater |
2 | 3900 |
* @throws SQLException if an error occurs or the |
31061 | 3901 |
* parameter index is out of bounds |
2 | 3902 |
*/ |
3903 |
public void setMatchColumn(int columnIdx) throws SQLException { |
|
3904 |
// validate, if col is ok to be set |
|
3905 |
if(columnIdx < 0) { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
3906 |
throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols1").toString()); |
2 | 3907 |
} else { |
3908 |
// set iMatchColumn |
|
6697
39929804f9d4
6989139: Address JDBC Findbugs where Number type Constructor are used
lancea
parents:
6540
diff
changeset
|
3909 |
iMatchColumns.set(0, Integer.valueOf(columnIdx)); |
2 | 3910 |
//strMatchColumn = null; |
3911 |
} |
|
3912 |
} |
|
3913 |
||
3914 |
/** |
|
31061 | 3915 |
* Sets the designated parameter to the given {@code String} |
2 | 3916 |
* object. This forms the basis of the join for the |
31061 | 3917 |
* {@code JoinRowSet} as the column which will form the basis of the |
2 | 3918 |
* join. |
3919 |
* <P> |
|
3920 |
* The parameter value set by this method is stored internally and |
|
3921 |
* will be supplied as the appropriate parameter in this rowset's |
|
31061 | 3922 |
* command when the method {@code getMatchColumn} is called. |
2 | 3923 |
* |
3924 |
* @param columnName the name of the column into this rowset |
|
3925 |
* object's internal representation of parameter values |
|
3926 |
* @throws SQLException if an error occurs or the |
|
31061 | 3927 |
* parameter index is out of bounds |
2 | 3928 |
*/ |
3929 |
public void setMatchColumn(String columnName) throws SQLException { |
|
3930 |
// validate, if col is ok to be set |
|
6697
39929804f9d4
6989139: Address JDBC Findbugs where Number type Constructor are used
lancea
parents:
6540
diff
changeset
|
3931 |
if(columnName == null || (columnName= columnName.trim()).equals("")) { |
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
3932 |
throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols2").toString()); |
2 | 3933 |
} else { |
3934 |
// set strMatchColumn |
|
3935 |
strMatchColumns.set(0, columnName); |
|
3936 |
//iMatchColumn = -1; |
|
3937 |
} |
|
3938 |
} |
|
3939 |
||
3940 |
/** |
|
31061 | 3941 |
* Unsets the designated parameter to the given {@code int} |
3942 |
* object. This was set using {@code setMatchColumn} |
|
2 | 3943 |
* as the column which will form the basis of the join. |
3944 |
* <P> |
|
3945 |
* The parameter value unset by this method should be same |
|
3946 |
* as was set. |
|
3947 |
* |
|
3948 |
* @param columnIdx the index into this rowset |
|
3949 |
* object's internal representation of parameter values |
|
3950 |
* @throws SQLException if an error occurs or the |
|
31061 | 3951 |
* parameter index is out of bounds or if the columnIdx is |
3952 |
* not the same as set using {@code setMatchColumn(int)} |
|
2 | 3953 |
*/ |
3954 |
public void unsetMatchColumn(int columnIdx) throws SQLException { |
|
3955 |
// check if we are unsetting the SAME column |
|
6697
39929804f9d4
6989139: Address JDBC Findbugs where Number type Constructor are used
lancea
parents:
6540
diff
changeset
|
3956 |
if(! iMatchColumns.get(0).equals(Integer.valueOf(columnIdx) ) ) { |
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
3957 |
throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.unsetmatch").toString()); |
2 | 3958 |
} else if(strMatchColumns.get(0) != null) { |
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
3959 |
throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.usecolname").toString()); |
2 | 3960 |
} else { |
3961 |
// that is, we are unsetting it. |
|
6697
39929804f9d4
6989139: Address JDBC Findbugs where Number type Constructor are used
lancea
parents:
6540
diff
changeset
|
3962 |
iMatchColumns.set(0, Integer.valueOf(-1)); |
2 | 3963 |
} |
3964 |
} |
|
3965 |
||
3966 |
/** |
|
31061 | 3967 |
* Unsets the designated parameter to the given {@code String} |
3968 |
* object. This was set using {@code setMatchColumn} |
|
2 | 3969 |
* as the column which will form the basis of the join. |
3970 |
* <P> |
|
3971 |
* The parameter value unset by this method should be same |
|
3972 |
* as was set. |
|
3973 |
* |
|
3974 |
* @param columnName the index into this rowset |
|
3975 |
* object's internal representation of parameter values |
|
3976 |
* @throws SQLException if an error occurs or the |
|
31061 | 3977 |
* parameter index is out of bounds or if the columnName is |
3978 |
* not the same as set using {@code setMatchColumn(String)} |
|
2 | 3979 |
* |
3980 |
*/ |
|
3981 |
public void unsetMatchColumn(String columnName) throws SQLException { |
|
3982 |
// check if we are unsetting the same column |
|
3983 |
columnName = columnName.trim(); |
|
3984 |
||
3985 |
if(!((strMatchColumns.get(0)).equals(columnName))) { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
3986 |
throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.unsetmatch").toString()); |
11129
f9ad1aadf3fa
7116445: Miscellaneous warnings in the JDBC/RowSet classes
lancea
parents:
9257
diff
changeset
|
3987 |
} else if(iMatchColumns.get(0) > 0) { |
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
3988 |
throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.usecolid").toString()); |
2 | 3989 |
} else { |
3990 |
strMatchColumns.set(0, null); // that is, we are unsetting it. |
|
3991 |
} |
|
3992 |
} |
|
3993 |
||
3994 |
/** |
|
31061 | 3995 |
* Retrieves the {@code DatabaseMetaData} associated with |
28059
e576535359cc
8067377: My hobby: caning, then then canning, the the can-can
martin
parents:
25859
diff
changeset
|
3996 |
* the connection handle associated with this |
31061 | 3997 |
* {@code JdbcRowSet} object. |
3998 |
* |
|
3999 |
* @return the {@code DatabaseMetadata} associated |
|
4000 |
* with the rowset's connection. |
|
2 | 4001 |
* @throws SQLException if a database access error occurs |
4002 |
*/ |
|
4003 |
public DatabaseMetaData getDatabaseMetaData() throws SQLException { |
|
4004 |
Connection con = connect(); |
|
4005 |
return con.getMetaData(); |
|
4006 |
} |
|
4007 |
||
4008 |
/** |
|
31061 | 4009 |
* Retrieves the {@code ParameterMetaData} associated with |
28059
e576535359cc
8067377: My hobby: caning, then then canning, the the can-can
martin
parents:
25859
diff
changeset
|
4010 |
* the connection handle associated with this |
31061 | 4011 |
* {@code JdbcRowSet} object. |
4012 |
* |
|
4013 |
* @return the {@code ParameterMetadata} associated |
|
4014 |
* with the rowset's connection. |
|
2 | 4015 |
* @throws SQLException if a database access error occurs |
4016 |
*/ |
|
4017 |
public ParameterMetaData getParameterMetaData() throws SQLException { |
|
4018 |
prepare(); |
|
4019 |
return (ps.getParameterMetaData()); |
|
4020 |
} |
|
4021 |
||
4022 |
/** |
|
31061 | 4023 |
* Commits all updates in this {@code JdbcRowSet} object by |
4024 |
* wrapping the internal {@code Connection} object and calling |
|
4025 |
* its {@code commit} method. |
|
4026 |
* This method sets this {@code JdbcRowSet} object's private field |
|
4027 |
* {@code rs} to {@code null} after saving its value to another |
|
4028 |
* object, but only if the {@code ResultSet} |
|
4029 |
* constant {@code HOLD_CURSORS_OVER_COMMIT} has not been set. |
|
4030 |
* (The field {@code rs} is this {@code JdbcRowSet} object's |
|
4031 |
* {@code ResultSet} object.) |
|
2 | 4032 |
* |
4033 |
* @throws SQLException if autoCommit is set to true or if a database |
|
31061 | 4034 |
* access error occurs |
2 | 4035 |
*/ |
4036 |
public void commit() throws SQLException { |
|
4037 |
conn.commit(); |
|
4038 |
||
4039 |
// Checking the holadbility value and making the result set handle null |
|
4040 |
// Added as per Rave requirements |
|
4041 |
||
4042 |
if( conn.getHoldability() != HOLD_CURSORS_OVER_COMMIT) { |
|
4043 |
rs = null; |
|
4044 |
} |
|
4045 |
} |
|
4046 |
||
4047 |
/** |
|
31061 | 4048 |
* Sets auto-commit on the internal {@code Connection} object with this |
4049 |
* {@code JdbcRowSet} |
|
2 | 4050 |
* |
4051 |
* @throws SQLException if a database access error occurs |
|
4052 |
*/ |
|
4053 |
public void setAutoCommit(boolean autoCommit) throws SQLException { |
|
4054 |
// The connection object should be there |
|
4055 |
// in order to commit the connection handle on or off. |
|
4056 |
||
4057 |
if(conn != null) { |
|
4058 |
conn.setAutoCommit(autoCommit); |
|
4059 |
} else { |
|
4060 |
// Coming here means the connection object is null. |
|
4061 |
// So generate a connection handle internally, since |
|
4062 |
// a JdbcRowSet is always connected to a db, it is fine |
|
4063 |
// to get a handle to the connection. |
|
4064 |
||
4065 |
// Get hold of a connection handle |
|
4066 |
// and change the autcommit as passesd. |
|
4067 |
conn = connect(); |
|
4068 |
||
4069 |
// After setting the below the conn.getAutoCommit() |
|
4070 |
// should return the same value. |
|
4071 |
conn.setAutoCommit(autoCommit); |
|
4072 |
||
4073 |
} |
|
4074 |
} |
|
4075 |
||
4076 |
/** |
|
31061 | 4077 |
* Returns the auto-commit status with this {@code JdbcRowSet}. |
2 | 4078 |
* |
4079 |
* @return true if auto commit is true; false otherwise |
|
4080 |
* @throws SQLException if a database access error occurs |
|
4081 |
*/ |
|
4082 |
public boolean getAutoCommit() throws SQLException { |
|
4083 |
return conn.getAutoCommit(); |
|
4084 |
} |
|
4085 |
||
4086 |
/** |
|
31061 | 4087 |
* Rolls back all the updates in this {@code JdbcRowSet} object by |
4088 |
* wrapping the internal {@code Connection} object and calling its |
|
4089 |
* {@code rollback} method. |
|
4090 |
* This method sets this {@code JdbcRowSet} object's private field |
|
4091 |
* {@code rs} to {@code null} after saving its value to another object. |
|
4092 |
* (The field {@code rs} is this {@code JdbcRowSet} object's |
|
4093 |
* internal {@code ResultSet} object.) |
|
2 | 4094 |
* |
4095 |
* @throws SQLException if autoCommit is set to true or a database |
|
31061 | 4096 |
* access error occurs |
2 | 4097 |
*/ |
4098 |
public void rollback() throws SQLException { |
|
4099 |
conn.rollback(); |
|
4100 |
||
4101 |
// Makes the result ste handle null after rollback |
|
4102 |
// Added as per Rave requirements |
|
4103 |
||
4104 |
rs = null; |
|
4105 |
} |
|
4106 |
||
4107 |
||
4108 |
/** |
|
31061 | 4109 |
* Rollbacks all the updates in the {@code JdbcRowSet} back to the |
4110 |
* last {@code Savepoint} transaction marker. Wraps the internal |
|
4111 |
* {@code Connection} object and call it's rollback method |
|
4112 |
* |
|
4113 |
* @param s the {@code Savepoint} transaction marker to roll the |
|
4114 |
* transaction to. |
|
2 | 4115 |
* @throws SQLException if autoCommit is set to true; or ia a database |
31061 | 4116 |
* access error occurs |
2 | 4117 |
*/ |
4118 |
public void rollback(Savepoint s) throws SQLException { |
|
4119 |
conn.rollback(s); |
|
4120 |
} |
|
4121 |
||
4122 |
// Setting the ResultSet Type and Concurrency |
|
4123 |
protected void setParams() throws SQLException { |
|
4124 |
if(rs == null) { |
|
4125 |
setType(ResultSet.TYPE_SCROLL_INSENSITIVE); |
|
4126 |
setConcurrency(ResultSet.CONCUR_UPDATABLE); |
|
4127 |
} |
|
4128 |
else { |
|
4129 |
setType(rs.getType()); |
|
4130 |
setConcurrency(rs.getConcurrency()); |
|
4131 |
} |
|
4132 |
} |
|
4133 |
||
4134 |
||
4135 |
// Checking ResultSet Type and Concurrency |
|
4136 |
private void checkTypeConcurrency() throws SQLException { |
|
4137 |
if(rs.getType() == TYPE_FORWARD_ONLY || |
|
4138 |
rs.getConcurrency() == CONCUR_READ_ONLY) { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4139 |
throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.resnotupd").toString()); |
2 | 4140 |
} |
4141 |
} |
|
4142 |
||
4143 |
// Returns a Connection Handle |
|
4144 |
// Added as per Rave requirements |
|
4145 |
||
4146 |
/** |
|
31061 | 4147 |
* Gets this {@code JdbcRowSet} object's Connection property |
4148 |
* |
|
4149 |
* |
|
4150 |
* @return the {@code Connection} object associated with this rowset; |
|
2 | 4151 |
*/ |
4152 |
||
4153 |
protected Connection getConnection() { |
|
4154 |
return conn; |
|
4155 |
} |
|
4156 |
||
4157 |
// Sets the connection handle with the parameter |
|
4158 |
// Added as per rave requirements |
|
4159 |
||
4160 |
/** |
|
31061 | 4161 |
* Sets this {@code JdbcRowSet} object's connection property |
4162 |
* to the given {@code Connection} object. |
|
4163 |
* |
|
4164 |
* @param connection the {@code Connection} object. |
|
2 | 4165 |
*/ |
4166 |
||
4167 |
protected void setConnection(Connection connection) { |
|
4168 |
conn = connection; |
|
4169 |
} |
|
4170 |
||
4171 |
// Returns a PreparedStatement Handle |
|
4172 |
// Added as per Rave requirements |
|
4173 |
||
4174 |
/** |
|
31061 | 4175 |
* Gets this {@code JdbcRowSet} object's PreparedStatement property |
4176 |
* |
|
4177 |
* |
|
4178 |
* @return the {@code PreparedStatement} object associated with this rowset; |
|
2 | 4179 |
*/ |
4180 |
||
4181 |
protected PreparedStatement getPreparedStatement() { |
|
4182 |
return ps; |
|
4183 |
} |
|
4184 |
||
4185 |
//Sets the prepared statement handle to the parameter |
|
4186 |
// Added as per Rave requirements |
|
4187 |
||
4188 |
/** |
|
31061 | 4189 |
* Sets this {@code JdbcRowSet} object's preparedtsatement property |
4190 |
* to the given {@code PreparedStatemennt} object. |
|
4191 |
* |
|
4192 |
* @param preparedStatement the {@code PreparedStatement} object |
|
2 | 4193 |
* |
4194 |
*/ |
|
4195 |
protected void setPreparedStatement(PreparedStatement preparedStatement) { |
|
4196 |
ps = preparedStatement; |
|
4197 |
} |
|
4198 |
||
4199 |
// Returns a ResultSet handle |
|
4200 |
// Added as per Rave requirements |
|
4201 |
||
4202 |
/** |
|
31061 | 4203 |
* Gets this {@code JdbcRowSet} object's ResultSet property |
4204 |
* |
|
4205 |
* |
|
4206 |
* @return the {@code ResultSet} object associated with this rowset; |
|
2 | 4207 |
*/ |
4208 |
||
4209 |
protected ResultSet getResultSet() throws SQLException { |
|
4210 |
||
4211 |
checkState(); |
|
4212 |
||
4213 |
return rs; |
|
4214 |
} |
|
4215 |
||
4216 |
// Sets the result set handle to the parameter |
|
4217 |
// Added as per Rave requirements |
|
4218 |
||
4219 |
/** |
|
31061 | 4220 |
* Sets this {@code JdbcRowSet} object's resultset property |
4221 |
* to the given {@code ResultSet} object. |
|
4222 |
* |
|
4223 |
* @param resultSet the {@code ResultSet} object |
|
2 | 4224 |
* |
4225 |
*/ |
|
4226 |
protected void setResultSet(ResultSet resultSet) { |
|
4227 |
rs = resultSet; |
|
4228 |
} |
|
4229 |
||
4230 |
/** |
|
31061 | 4231 |
* Sets this {@code JdbcRowSet} object's {@code command} property to |
4232 |
* the given {@code String} object and clears the parameters, if any, |
|
2 | 4233 |
* that were set for the previous command. In addition, |
31061 | 4234 |
* if the {@code command} property has previously been set to a |
2 | 4235 |
* non-null value and it is |
31061 | 4236 |
* different from the {@code String} object supplied, |
4237 |
* this method sets this {@code JdbcRowSet} object's private fields |
|
4238 |
* {@code ps} and {@code rs} to {@code null}. |
|
4239 |
* (The field {@code ps} is its {@code PreparedStatement} object, and |
|
4240 |
* the field {@code rs} is its {@code ResultSet} object.) |
|
2 | 4241 |
* <P> |
31061 | 4242 |
* The {@code command} property may not be needed if the {@code RowSet} |
2 | 4243 |
* object gets its data from a source that does not support commands, |
4244 |
* such as a spreadsheet or other tabular file. |
|
31061 | 4245 |
* Thus, this property is optional and may be {@code null}. |
4246 |
* |
|
4247 |
* @param command a {@code String} object containing an SQL query |
|
4248 |
* that will be set as this {@code RowSet} object's command |
|
4249 |
* property; may be {@code null} but may not be an empty string |
|
2 | 4250 |
* @throws SQLException if an empty string is provided as the command value |
4251 |
* @see #getCommand |
|
4252 |
*/ |
|
4253 |
public void setCommand(String command) throws SQLException { |
|
4254 |
||
4255 |
if (getCommand() != null) { |
|
4256 |
if(!getCommand().equals(command)) { |
|
4257 |
super.setCommand(command); |
|
4258 |
ps = null; |
|
4259 |
rs = null; |
|
4260 |
} |
|
4261 |
} |
|
4262 |
else { |
|
4263 |
super.setCommand(command); |
|
4264 |
} |
|
4265 |
} |
|
4266 |
||
4267 |
/** |
|
31061 | 4268 |
* Sets the {@code dataSourceName} property for this {@code JdbcRowSet} |
4269 |
* object to the given logical name and sets this {@code JdbcRowSet} object's |
|
4270 |
* Url property to {@code null}. In addition, if the {@code dataSourceName} |
|
2 | 4271 |
* property has previously been set and is different from the one supplied, |
31061 | 4272 |
* this method sets this {@code JdbcRowSet} object's private fields |
4273 |
* {@code ps}, {@code rs}, and {@code conn} to {@code null}. |
|
4274 |
* (The field {@code ps} is its {@code PreparedStatement} object, |
|
4275 |
* the field {@code rs} is its {@code ResultSet} object, and |
|
4276 |
* the field {@code conn} is its {@code Connection} object.) |
|
2 | 4277 |
* <P> |
4278 |
* The name supplied to this method must have been bound to a |
|
31061 | 4279 |
* {@code DataSource} object in a JNDI naming service so that an |
2 | 4280 |
* application can do a lookup using that name to retrieve the |
31061 | 4281 |
* {@code DataSource} object bound to it. The {@code DataSource} |
2 | 4282 |
* object can then be used to establish a connection to the data source it |
4283 |
* represents. |
|
4284 |
* <P> |
|
4285 |
* Users should set either the Url property or the dataSourceName property. |
|
4286 |
* If both properties are set, the driver will use the property set most recently. |
|
4287 |
* |
|
31061 | 4288 |
* @param dsName a {@code String} object with the name that can be supplied |
2 | 4289 |
* to a naming service based on JNDI technology to retrieve the |
31061 | 4290 |
* {@code DataSource} object that can be used to get a connection; |
4291 |
* may be {@code null} |
|
2 | 4292 |
* @throws SQLException if there is a problem setting the |
31061 | 4293 |
* {@code dataSourceName} property |
2 | 4294 |
* @see #getDataSourceName |
4295 |
*/ |
|
4296 |
public void setDataSourceName(String dsName) throws SQLException{ |
|
4297 |
||
4298 |
if(getDataSourceName() != null) { |
|
4299 |
if(!getDataSourceName().equals(dsName)) { |
|
4300 |
super.setDataSourceName(dsName); |
|
4301 |
conn = null; |
|
4302 |
ps = null; |
|
4303 |
rs = null; |
|
4304 |
} |
|
4305 |
} |
|
4306 |
else { |
|
4307 |
super.setDataSourceName(dsName); |
|
4308 |
} |
|
4309 |
} |
|
4310 |
||
4311 |
||
4312 |
/** |
|
31061 | 4313 |
* Sets the Url property for this {@code JdbcRowSet} object |
4314 |
* to the given {@code String} object and sets the dataSource name |
|
4315 |
* property to {@code null}. In addition, if the Url property has |
|
4316 |
* previously been set to a non {@code null} value and its value |
|
2 | 4317 |
* is different from the value to be set, |
31061 | 4318 |
* this method sets this {@code JdbcRowSet} object's private fields |
4319 |
* {@code ps}, {@code rs}, and {@code conn} to {@code null}. |
|
4320 |
* (The field {@code ps} is its {@code PreparedStatement} object, |
|
4321 |
* the field {@code rs} is its {@code ResultSet} object, and |
|
4322 |
* the field {@code conn} is its {@code Connection} object.) |
|
2 | 4323 |
* <P> |
4324 |
* The Url property is a JDBC URL that is used when |
|
4325 |
* the connection is created using a JDBC technology-enabled driver |
|
31061 | 4326 |
* ("JDBC driver") and the {@code DriverManager}. |
2 | 4327 |
* The correct JDBC URL for the specific driver to be used can be found |
28059
e576535359cc
8067377: My hobby: caning, then then canning, the the can-can
martin
parents:
25859
diff
changeset
|
4328 |
* in the driver documentation. Although there are guidelines for how |
2 | 4329 |
* a JDBC URL is formed, |
31061 | 4330 |
* a driver vendor can specify any {@code String} object except |
4331 |
* one with a length of {@code 0} (an empty string). |
|
2 | 4332 |
* <P> |
4333 |
* Setting the Url property is optional if connections are established using |
|
31061 | 4334 |
* a {@code DataSource} object instead of the {@code DriverManager}. |
2 | 4335 |
* The driver will use either the URL property or the |
4336 |
* dataSourceName property to create a connection, whichever was |
|
4337 |
* specified most recently. If an application uses a JDBC URL, it |
|
4338 |
* must load a JDBC driver that accepts the JDBC URL before it uses the |
|
31061 | 4339 |
* {@code RowSet} object to connect to a database. The {@code RowSet} |
2 | 4340 |
* object will use the URL internally to create a database connection in order |
4341 |
* to read or write data. |
|
4342 |
* |
|
31061 | 4343 |
* @param url a {@code String} object that contains the JDBC URL |
2 | 4344 |
* that will be used to establish the connection to a database for this |
31061 | 4345 |
* {@code RowSet} object; may be {@code null} but must not |
2 | 4346 |
* be an empty string |
4347 |
* @throws SQLException if an error occurs setting the Url property or the |
|
31061 | 4348 |
* parameter supplied is a string with a length of {@code 0} (an |
2 | 4349 |
* empty string) |
4350 |
* @see #getUrl |
|
4351 |
*/ |
|
4352 |
||
4353 |
public void setUrl(String url) throws SQLException { |
|
4354 |
||
4355 |
if(getUrl() != null) { |
|
4356 |
if(!getUrl().equals(url)) { |
|
4357 |
super.setUrl(url); |
|
4358 |
conn = null; |
|
4359 |
ps = null; |
|
4360 |
rs = null; |
|
4361 |
} |
|
4362 |
} |
|
4363 |
else { |
|
4364 |
super.setUrl(url); |
|
4365 |
} |
|
4366 |
} |
|
4367 |
||
31061 | 4368 |
/** |
4369 |
* Sets the username property for this {@code JdbcRowSet} object |
|
2 | 4370 |
* to the given user name. Because it |
4371 |
* is not serialized, the username property is set at run time before |
|
31061 | 4372 |
* calling the method {@code execute}. In addition, |
4373 |
* if the {@code username} property is already set with a |
|
4374 |
* non-null value and that value is different from the {@code String} |
|
2 | 4375 |
* object to be set, |
31061 | 4376 |
* this method sets this {@code JdbcRowSet} object's private fields |
4377 |
* {@code ps}, {@code rs}, and {@code conn} to {@code null}. |
|
4378 |
* (The field {@code ps} is its {@code PreparedStatement} object, |
|
4379 |
* {@code rs} is its {@code ResultSet} object, and |
|
4380 |
* {@code conn} is its {@code Connection} object.) |
|
4381 |
* Setting these fields to {@code null} ensures that only current |
|
2 | 4382 |
* values will be used. |
4383 |
* |
|
31061 | 4384 |
* @param uname the {@code String} object containing the user name that |
4385 |
* is supplied to the data source to create a connection. It may be null. |
|
2 | 4386 |
* @see #getUsername |
4387 |
*/ |
|
4388 |
public void setUsername(String uname) { |
|
4389 |
||
4390 |
if( getUsername() != null) { |
|
4391 |
if(!getUsername().equals(uname)) { |
|
4392 |
super.setUsername(uname); |
|
4393 |
conn = null; |
|
4394 |
ps = null; |
|
4395 |
rs = null; |
|
4396 |
} |
|
4397 |
} |
|
4398 |
else{ |
|
4399 |
super.setUsername(uname); |
|
4400 |
} |
|
4401 |
} |
|
4402 |
||
4403 |
/** |
|
31061 | 4404 |
* Sets the password property for this {@code JdbcRowSet} object |
4405 |
* to the given {@code String} object. Because it |
|
2 | 4406 |
* is not serialized, the password property is set at run time before |
31061 | 4407 |
* calling the method {@code execute}. Its default valus is |
4408 |
* {@code null}. In addition, |
|
4409 |
* if the {@code password} property is already set with a |
|
2 | 4410 |
* non-null value and that value is different from the one being set, |
31061 | 4411 |
* this method sets this {@code JdbcRowSet} object's private fields |
4412 |
* {@code ps}, {@code rs}, and {@code conn} to {@code null}. |
|
4413 |
* (The field {@code ps} is its {@code PreparedStatement} object, |
|
4414 |
* {@code rs} is its {@code ResultSet} object, and |
|
4415 |
* {@code conn} is its {@code Connection} object.) |
|
4416 |
* Setting these fields to {@code null} ensures that only current |
|
2 | 4417 |
* values will be used. |
4418 |
* |
|
31061 | 4419 |
* @param password the {@code String} object that represents the password |
4420 |
* that must be supplied to the database to create a connection |
|
2 | 4421 |
*/ |
4422 |
public void setPassword(String password) { |
|
4423 |
||
4424 |
if ( getPassword() != null) { |
|
4425 |
if(!getPassword().equals(password)) { |
|
4426 |
super.setPassword(password); |
|
4427 |
conn = null; |
|
4428 |
ps = null; |
|
4429 |
rs = null; |
|
4430 |
} |
|
4431 |
} |
|
4432 |
else{ |
|
4433 |
super.setPassword(password); |
|
4434 |
} |
|
4435 |
} |
|
4436 |
||
4437 |
/** |
|
31061 | 4438 |
* Sets the type for this {@code RowSet} object to the specified type. |
4439 |
* The default type is {@code ResultSet.TYPE_SCROLL_INSENSITIVE}. |
|
2 | 4440 |
* |
4441 |
* @param type one of the following constants: |
|
31061 | 4442 |
* {@code ResultSet.TYPE_FORWARD_ONLY}, |
4443 |
* {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or |
|
4444 |
* {@code ResultSet.TYPE_SCROLL_SENSITIVE} |
|
2 | 4445 |
* @throws SQLException if the parameter supplied is not one of the |
4446 |
* following constants: |
|
31061 | 4447 |
* {@code ResultSet.TYPE_FORWARD_ONLY} or |
4448 |
* {@code ResultSet.TYPE_SCROLL_INSENSITIVE} |
|
4449 |
* {@code ResultSet.TYPE_SCROLL_SENSITIVE} |
|
2 | 4450 |
* @see #getConcurrency |
4451 |
* @see #getType |
|
4452 |
*/ |
|
4453 |
||
4454 |
public void setType(int type) throws SQLException { |
|
4455 |
||
4456 |
int oldVal; |
|
4457 |
||
4458 |
try { |
|
4459 |
oldVal = getType(); |
|
4460 |
}catch(SQLException ex) { |
|
4461 |
oldVal = 0; |
|
4462 |
} |
|
4463 |
||
4464 |
if(oldVal != type) { |
|
4465 |
super.setType(type); |
|
4466 |
} |
|
4467 |
||
4468 |
} |
|
4469 |
||
4470 |
/** |
|
31061 | 4471 |
* Sets the concurrency for this {@code RowSet} object to |
4472 |
* the specified concurrency. The default concurrency for any {@code RowSet} |
|
4473 |
* object (connected or disconnected) is {@code ResultSet.CONCUR_UPDATABLE}, |
|
2 | 4474 |
* but this method may be called at any time to change the concurrency. |
4475 |
* |
|
4476 |
* @param concur one of the following constants: |
|
31061 | 4477 |
* {@code ResultSet.CONCUR_READ_ONLY} or |
4478 |
* {@code ResultSet.CONCUR_UPDATABLE} |
|
2 | 4479 |
* @throws SQLException if the parameter supplied is not one of the |
4480 |
* following constants: |
|
31061 | 4481 |
* {@code ResultSet.CONCUR_UPDATABLE} or |
4482 |
* {@code ResultSet.CONCUR_READ_ONLY} |
|
2 | 4483 |
* @see #getConcurrency |
4484 |
* @see #isReadOnly |
|
4485 |
*/ |
|
4486 |
public void setConcurrency(int concur) throws SQLException { |
|
4487 |
||
4488 |
int oldVal; |
|
4489 |
||
4490 |
try { |
|
4491 |
oldVal = getConcurrency(); |
|
4492 |
}catch(NullPointerException ex) { |
|
4493 |
oldVal = 0; |
|
4494 |
} |
|
4495 |
||
4496 |
if(oldVal != concur) { |
|
4497 |
super.setConcurrency(concur); |
|
4498 |
} |
|
4499 |
||
4500 |
} |
|
4501 |
||
4502 |
/** |
|
31061 | 4503 |
* Retrieves the value of the designated {@code SQL XML} parameter as a |
4504 |
* {@code SQLXML} object in the Java programming language. |
|
2 | 4505 |
* @param columnIndex the first column is 1, the second is 2, ... |
4506 |
* @return a SQLXML object that maps an SQL XML value |
|
4507 |
* @throws SQLException if a database access error occurs |
|
24865
09b1d992ca72
8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents:
23010
diff
changeset
|
4508 |
* @since 1.6 |
2 | 4509 |
*/ |
4510 |
public SQLXML getSQLXML(int columnIndex) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4511 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4512 |
} |
4513 |
||
4514 |
/** |
|
31061 | 4515 |
* Retrieves the value of the designated {@code SQL XML} parameter as a |
4516 |
* {@code SQLXML} object in the Java programming language. |
|
2 | 4517 |
* @param colName the name of the column from which to retrieve the value |
4518 |
* @return a SQLXML object that maps an SQL XML value |
|
4519 |
* @throws SQLException if a database access error occurs |
|
4520 |
*/ |
|
4521 |
public SQLXML getSQLXML(String colName) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4522 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4523 |
} |
4524 |
||
4525 |
/** |
|
4526 |
* Retrieves the value of the designated column in the current row of this |
|
31061 | 4527 |
* {@code ResultSet} object as a java.sql.RowId object in the Java |
2 | 4528 |
* programming language. |
4529 |
* |
|
4530 |
* @param columnIndex the first column is 1, the second 2, ... |
|
31061 | 4531 |
* @return the column value if the value is a SQL {@code NULL} the |
4532 |
* value returned is {@code null} |
|
2 | 4533 |
* @throws SQLException if a database access error occurs |
24865
09b1d992ca72
8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents:
23010
diff
changeset
|
4534 |
* @since 1.6 |
2 | 4535 |
*/ |
4536 |
public RowId getRowId(int columnIndex) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4537 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4538 |
} |
4539 |
||
4540 |
/** |
|
4541 |
* Retrieves the value of the designated column in the current row of this |
|
31061 | 4542 |
* {@code ResultSet} object as a java.sql.RowId object in the Java |
2 | 4543 |
* programming language. |
4544 |
* |
|
4545 |
* @param columnName the name of the column |
|
31061 | 4546 |
* @return the column value if the value is a SQL {@code NULL} the |
4547 |
* value returned is {@code null} |
|
2 | 4548 |
* @throws SQLException if a database access error occurs |
24865
09b1d992ca72
8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents:
23010
diff
changeset
|
4549 |
* @since 1.6 |
2 | 4550 |
*/ |
4551 |
public RowId getRowId(String columnName) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4552 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4553 |
} |
4554 |
||
4555 |
/** |
|
31061 | 4556 |
* Updates the designated column with a {@code RowId} value. The updater |
2 | 4557 |
* methods are used to update column values in the current row or the insert |
4558 |
* row. The updater methods do not update the underlying database; instead |
|
31061 | 4559 |
* the {@code updateRow} or {@code insertRow} methods are called |
2 | 4560 |
* to update the database. |
4561 |
* |
|
4562 |
* @param columnIndex the first column is 1, the second 2, ... |
|
4563 |
* @param x the column value |
|
4564 |
* @throws SQLException if a database access occurs |
|
24865
09b1d992ca72
8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents:
23010
diff
changeset
|
4565 |
* @since 1.6 |
2 | 4566 |
*/ |
4567 |
public void updateRowId(int columnIndex, RowId x) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4568 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4569 |
} |
4570 |
||
4571 |
/** |
|
31061 | 4572 |
* Updates the designated column with a {@code RowId} value. The updater |
2 | 4573 |
* methods are used to update column values in the current row or the insert |
4574 |
* row. The updater methods do not update the underlying database; instead |
|
31061 | 4575 |
* the {@code updateRow} or {@code insertRow} methods are called |
2 | 4576 |
* to update the database. |
4577 |
* |
|
4578 |
* @param columnName the name of the column |
|
4579 |
* @param x the column value |
|
4580 |
* @throws SQLException if a database access occurs |
|
24865
09b1d992ca72
8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents:
23010
diff
changeset
|
4581 |
* @since 1.6 |
2 | 4582 |
*/ |
4583 |
public void updateRowId(String columnName, RowId x) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4584 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4585 |
} |
4586 |
||
4587 |
/** |
|
4588 |
* Retrieves the holdability of this ResultSet object |
|
4589 |
* @return either ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT |
|
4590 |
* @throws SQLException if a database error occurs |
|
24865
09b1d992ca72
8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents:
23010
diff
changeset
|
4591 |
* @since 1.6 |
2 | 4592 |
*/ |
4593 |
public int getHoldability() throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4594 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4595 |
} |
4596 |
||
4597 |
/** |
|
4598 |
* Retrieves whether this ResultSet object has been closed. A ResultSet is closed if the |
|
4599 |
* method close has been called on it, or if it is automatically closed. |
|
4600 |
* @return true if this ResultSet object is closed; false if it is still open |
|
4601 |
* @throws SQLException if a database access error occurs |
|
24865
09b1d992ca72
8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents:
23010
diff
changeset
|
4602 |
* @since 1.6 |
2 | 4603 |
*/ |
4604 |
public boolean isClosed() throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4605 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4606 |
} |
4607 |
||
4608 |
/** |
|
4609 |
* This method is used for updating columns that support National Character sets. |
|
4610 |
* It can be used for updating NCHAR,NVARCHAR and LONGNVARCHAR columns. |
|
4611 |
* @param columnIndex the first column is 1, the second 2, ... |
|
4612 |
* @param nString the value for the column to be updated |
|
4613 |
* @throws SQLException if a database access error occurs |
|
24865
09b1d992ca72
8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents:
23010
diff
changeset
|
4614 |
* @since 1.6 |
2 | 4615 |
*/ |
4616 |
public void updateNString(int columnIndex, String nString) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4617 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4618 |
} |
4619 |
||
4620 |
/** |
|
4621 |
* This method is used for updating columns that support National Character sets. |
|
4622 |
* It can be used for updating NCHAR,NVARCHAR and LONGNVARCHAR columns. |
|
4623 |
* @param columnName name of the Column |
|
4624 |
* @param nString the value for the column to be updated |
|
4625 |
* @throws SQLException if a database access error occurs |
|
24865
09b1d992ca72
8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents:
23010
diff
changeset
|
4626 |
* @since 1.6 |
2 | 4627 |
*/ |
4628 |
public void updateNString(String columnName, String nString) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4629 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4630 |
} |
4631 |
||
4632 |
||
4633 |
/*o |
|
31061 | 4634 |
* This method is used for updating SQL {@code NCLOB} type that maps |
4635 |
* to {@code java.sql.Types.NCLOB} |
|
2 | 4636 |
* @param columnIndex the first column is 1, the second 2, ... |
4637 |
* @param nClob the value for the column to be updated |
|
4638 |
* @throws SQLException if a database access error occurs |
|
24865
09b1d992ca72
8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents:
23010
diff
changeset
|
4639 |
* @since 1.6 |
2 | 4640 |
*/ |
4641 |
public void updateNClob(int columnIndex, NClob nClob) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4642 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4643 |
} |
4644 |
||
4645 |
/** |
|
31061 | 4646 |
* This method is used for updating SQL {@code NCLOB} type that maps |
4647 |
* to {@code java.sql.Types.NCLOB} |
|
2 | 4648 |
* @param columnName name of the column |
4649 |
* @param nClob the value for the column to be updated |
|
4650 |
* @throws SQLException if a database access error occurs |
|
24865
09b1d992ca72
8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents:
23010
diff
changeset
|
4651 |
* @since 1.6 |
2 | 4652 |
*/ |
4653 |
public void updateNClob(String columnName, NClob nClob) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4654 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4655 |
} |
4656 |
||
4657 |
/** |
|
4658 |
* Retrieves the value of the designated column in the current row |
|
31061 | 4659 |
* of this {@code ResultSet} object as a {@code NClob} object |
2 | 4660 |
* in the Java programming language. |
4661 |
* |
|
4662 |
* @param i the first column is 1, the second is 2, ... |
|
31061 | 4663 |
* @return a {@code NClob} object representing the SQL |
4664 |
* {@code NCLOB} value in the specified column |
|
2 | 4665 |
* @exception SQLException if a database access error occurs |
24865
09b1d992ca72
8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents:
23010
diff
changeset
|
4666 |
* @since 1.6 |
2 | 4667 |
*/ |
4668 |
public NClob getNClob(int i) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4669 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4670 |
} |
4671 |
||
4672 |
||
4673 |
/** |
|
4674 |
* Retrieves the value of the designated column in the current row |
|
31061 | 4675 |
* of this {@code ResultSet} object as a {@code NClob} object |
2 | 4676 |
* in the Java programming language. |
4677 |
* |
|
4678 |
* @param colName the name of the column from which to retrieve the value |
|
31061 | 4679 |
* @return a {@code NClob} object representing the SQL {@code NCLOB} |
2 | 4680 |
* value in the specified column |
4681 |
* @exception SQLException if a database access error occurs |
|
24865
09b1d992ca72
8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents:
23010
diff
changeset
|
4682 |
* @since 1.6 |
2 | 4683 |
*/ |
4684 |
public NClob getNClob(String colName) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4685 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4686 |
} |
4687 |
||
4688 |
public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException{ |
|
4689 |
return null; |
|
4690 |
} |
|
4691 |
||
4692 |
public boolean isWrapperFor(Class<?> interfaces) throws SQLException { |
|
4693 |
return false; |
|
4694 |
} |
|
4695 |
||
4696 |
/** |
|
31061 | 4697 |
* Sets the designated parameter to the given {@code java.sql.SQLXML} object. The driver converts this to an |
4698 |
* SQL {@code XML} value when it sends it to the database. |
|
2 | 4699 |
* @param parameterIndex index of the first parameter is 1, the second is 2, ... |
31061 | 4700 |
* @param xmlObject a {@code SQLXML} object that maps an SQL {@code XML} value |
2 | 4701 |
* @throws SQLException if a database access error occurs |
4702 |
* @since 1.6 |
|
4703 |
*/ |
|
4704 |
public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4705 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4706 |
} |
4707 |
||
4708 |
/** |
|
31061 | 4709 |
* Sets the designated parameter to the given {@code java.sql.SQLXML} object. The driver converts this to an |
4710 |
* {@code SQL XML} value when it sends it to the database. |
|
2 | 4711 |
* @param parameterName the name of the parameter |
31061 | 4712 |
* @param xmlObject a {@code SQLXML} object that maps an {@code SQL XML} value |
2 | 4713 |
* @throws SQLException if a database access error occurs |
4714 |
* @since 1.6 |
|
4715 |
*/ |
|
4716 |
public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4717 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4718 |
} |
4719 |
||
4720 |
/** |
|
31061 | 4721 |
* Sets the designated parameter to the given {@code java.sql.RowId} object. The |
4722 |
* driver converts this to a SQL {@code ROWID} value when it sends it |
|
2 | 4723 |
* to the database |
4724 |
* |
|
4725 |
* @param parameterIndex the first parameter is 1, the second is 2, ... |
|
4726 |
* @param x the parameter value |
|
4727 |
* @throws SQLException if a database access error occurs |
|
4728 |
* |
|
4729 |
* @since 1.6 |
|
4730 |
*/ |
|
4731 |
public void setRowId(int parameterIndex, RowId x) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4732 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4733 |
} |
4734 |
||
31061 | 4735 |
/** |
4736 |
* Sets the designated parameter to the given {@code java.sql.RowId} object. The |
|
4737 |
* driver converts this to a SQL {@code ROWID} when it sends it to the |
|
2 | 4738 |
* database. |
4739 |
* |
|
4740 |
* @param parameterName the name of the parameter |
|
4741 |
* @param x the parameter value |
|
4742 |
* @throws SQLException if a database access error occurs |
|
4743 |
* @since 1.6 |
|
4744 |
*/ |
|
4745 |
public void setRowId(String parameterName, RowId x) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4746 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4747 |
} |
4748 |
||
4749 |
||
4750 |
/** |
|
31061 | 4751 |
* Sets the designated parameter to the given {@code String} object. |
4752 |
* The driver converts this to a SQL {@code NCHAR} or |
|
4753 |
* {@code NVARCHAR} or {@code LONGNVARCHAR} value |
|
2 | 4754 |
* (depending on the argument's |
31061 | 4755 |
* size relative to the driver's limits on {@code NVARCHAR} values) |
2 | 4756 |
* when it sends it to the database. |
4757 |
* |
|
4758 |
* @param parameterIndex of the first parameter is 1, the second is 2, ... |
|
4759 |
* @param value the parameter value |
|
4760 |
* @throws SQLException if the driver does not support national |
|
4761 |
* character sets; if the driver can detect that a data conversion |
|
31061 | 4762 |
* error could occur ; or if a database access error occurs |
2 | 4763 |
* @since 1.6 |
4764 |
*/ |
|
4765 |
public void setNString(int parameterIndex, String value) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4766 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4767 |
} |
4768 |
||
4769 |
||
4770 |
/** |
|
31061 | 4771 |
* Sets the designated parameter in this {@code RowSet} object's command |
4772 |
* to a {@code Reader} object. The |
|
4773 |
* {@code Reader} reads the data till end-of-file is reached. The |
|
2 | 4774 |
* driver does the necessary conversion from Java character format to |
4775 |
* the national character set in the database. |
|
4776 |
||
4777 |
* <P><B>Note:</B> This stream object can either be a standard |
|
4778 |
* Java stream object or your own subclass that implements the |
|
4779 |
* standard interface. |
|
4780 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
4781 |
* it might be more efficient to use a version of |
|
31061 | 4782 |
* {@code setNCharacterStream} which takes a length parameter. |
2 | 4783 |
* |
4784 |
* @param parameterIndex of the first parameter is 1, the second is 2, ... |
|
4785 |
* @param value the parameter value |
|
4786 |
* @throws SQLException if the driver does not support national |
|
4787 |
* character sets; if the driver can detect that a data conversion |
|
31061 | 4788 |
* error could occur ; if a database access error occurs; or |
4789 |
* this method is called on a closed {@code PreparedStatement} |
|
2 | 4790 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
4791 |
* @since 1.6 |
|
4792 |
*/ |
|
4793 |
public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4794 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4795 |
} |
4796 |
||
4797 |
/** |
|
31061 | 4798 |
* Sets the designated parameter to a {@code java.sql.NClob} object. The object |
4799 |
* implements the {@code java.sql.NClob} interface. This {@code NClob} |
|
4800 |
* object maps to a SQL {@code NCLOB}. |
|
2 | 4801 |
* @param parameterName the name of the column to be set |
4802 |
* @param value the parameter value |
|
4803 |
* @throws SQLException if the driver does not support national |
|
4804 |
* character sets; if the driver can detect that a data conversion |
|
31061 | 4805 |
* error could occur; or if a database access error occurs |
2 | 4806 |
* @since 1.6 |
4807 |
*/ |
|
4808 |
public void setNClob(String parameterName, NClob value) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4809 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4810 |
} |
4811 |
||
4812 |
||
31061 | 4813 |
/** |
2 | 4814 |
* Retrieves the value of the designated column in the current row |
31061 | 4815 |
* of this {@code ResultSet} object as a |
4816 |
* {@code java.io.Reader} object. |
|
2 | 4817 |
* It is intended for use when |
31061 | 4818 |
* accessing {@code NCHAR},{@code NVARCHAR} |
4819 |
* and {@code LONGNVARCHAR} columns. |
|
4820 |
* |
|
4821 |
* @return a {@code java.io.Reader} object that contains the column |
|
4822 |
* value; if the value is SQL {@code NULL}, the value returned is |
|
4823 |
* {@code null} in the Java programming language. |
|
2 | 4824 |
* @param columnIndex the first column is 1, the second is 2, ... |
4825 |
* @exception SQLException if a database access error occurs |
|
4826 |
* @since 1.6 |
|
4827 |
*/ |
|
4828 |
public java.io.Reader getNCharacterStream(int columnIndex) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4829 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4830 |
} |
4831 |
||
4832 |
||
4833 |
/** |
|
4834 |
* Retrieves the value of the designated column in the current row |
|
31061 | 4835 |
* of this {@code ResultSet} object as a |
4836 |
* {@code java.io.Reader} object. |
|
2 | 4837 |
* It is intended for use when |
31061 | 4838 |
* accessing {@code NCHAR},{@code NVARCHAR} |
4839 |
* and {@code LONGNVARCHAR} columns. |
|
2 | 4840 |
* |
4841 |
* @param columnName the name of the column |
|
31061 | 4842 |
* @return a {@code java.io.Reader} object that contains the column |
4843 |
* value; if the value is SQL {@code NULL}, the value returned is |
|
4844 |
* {@code null} in the Java programming language |
|
2 | 4845 |
* @exception SQLException if a database access error occurs |
4846 |
* @since 1.6 |
|
4847 |
*/ |
|
4848 |
public java.io.Reader getNCharacterStream(String columnName) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4849 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4850 |
} |
4851 |
||
4852 |
/** |
|
31061 | 4853 |
* Updates the designated column with a {@code java.sql.SQLXML} value. |
2 | 4854 |
* The updater |
4855 |
* methods are used to update column values in the current row or the insert |
|
4856 |
* row. The updater methods do not update the underlying database; instead |
|
31061 | 4857 |
* the {@code updateRow} or {@code insertRow} methods are called |
2 | 4858 |
* to update the database. |
4859 |
* @param columnIndex the first column is 1, the second 2, ... |
|
4860 |
* @param xmlObject the value for the column to be updated |
|
4861 |
* @throws SQLException if a database access error occurs |
|
4862 |
* @since 1.6 |
|
4863 |
*/ |
|
4864 |
public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4865 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4866 |
} |
4867 |
||
4868 |
/** |
|
31061 | 4869 |
* Updates the designated column with a {@code java.sql.SQLXML} value. |
2 | 4870 |
* The updater |
4871 |
* methods are used to update column values in the current row or the insert |
|
4872 |
* row. The updater methods do not update the underlying database; instead |
|
31061 | 4873 |
* the {@code updateRow} or {@code insertRow} methods are called |
2 | 4874 |
* to update the database. |
4875 |
* |
|
4876 |
* @param columnName the name of the column |
|
4877 |
* @param xmlObject the column value |
|
4878 |
* @throws SQLException if a database access occurs |
|
4879 |
* @since 1.6 |
|
4880 |
*/ |
|
4881 |
public void updateSQLXML(String columnName, SQLXML xmlObject) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4882 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4883 |
} |
4884 |
||
4885 |
/** |
|
4886 |
* Retrieves the value of the designated column in the current row |
|
31061 | 4887 |
* of this {@code ResultSet} object as |
4888 |
* a {@code String} in the Java programming language. |
|
2 | 4889 |
* It is intended for use when |
31061 | 4890 |
* accessing {@code NCHAR},{@code NVARCHAR} |
4891 |
* and {@code LONGNVARCHAR} columns. |
|
2 | 4892 |
* |
4893 |
* @param columnIndex the first column is 1, the second is 2, ... |
|
31061 | 4894 |
* @return the column value; if the value is SQL {@code NULL}, the |
4895 |
* value returned is {@code null} |
|
2 | 4896 |
* @exception SQLException if a database access error occurs |
4897 |
* @since 1.6 |
|
4898 |
*/ |
|
4899 |
public String getNString(int columnIndex) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4900 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4901 |
} |
4902 |
||
4903 |
/** |
|
4904 |
* Retrieves the value of the designated column in the current row |
|
31061 | 4905 |
* of this {@code ResultSet} object as |
4906 |
* a {@code String} in the Java programming language. |
|
2 | 4907 |
* It is intended for use when |
31061 | 4908 |
* accessing {@code NCHAR},{@code NVARCHAR} |
4909 |
* and {@code LONGNVARCHAR} columns. |
|
2 | 4910 |
* |
4911 |
* @param columnName the SQL name of the column |
|
31061 | 4912 |
* @return the column value; if the value is SQL {@code NULL}, the |
4913 |
* value returned is {@code null} |
|
2 | 4914 |
* @exception SQLException if a database access error occurs |
4915 |
* @since 1.6 |
|
4916 |
*/ |
|
4917 |
public String getNString(String columnName) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4918 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4919 |
} |
4920 |
||
4921 |
/** |
|
4922 |
* Updates the designated column with a character stream value, which will |
|
4923 |
* have the specified number of bytes. The driver does the necessary conversion |
|
4924 |
* from Java character format to the national character set in the database. |
|
4925 |
* It is intended for use when updating NCHAR,NVARCHAR and LONGNVARCHAR columns. |
|
4926 |
* The updater methods are used to update column values in the current row or |
|
4927 |
* the insert row. The updater methods do not update the underlying database; |
|
4928 |
* instead the updateRow or insertRow methods are called to update the database. |
|
4929 |
* |
|
31061 | 4930 |
* @param columnIndex the first column is 1, the second is 2, ... |
4931 |
* @param x the new column value |
|
4932 |
* @param length the length of the stream |
|
2 | 4933 |
* @exception SQLException if a database access error occurs |
4934 |
* @since 1.6 |
|
4935 |
*/ |
|
4936 |
public void updateNCharacterStream(int columnIndex, |
|
4937 |
java.io.Reader x, |
|
4938 |
long length) |
|
4939 |
throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4940 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4941 |
} |
4942 |
||
4943 |
/** |
|
4944 |
* Updates the designated column with a character stream value, which will |
|
4945 |
* have the specified number of bytes. The driver does the necessary conversion |
|
4946 |
* from Java character format to the national character set in the database. |
|
4947 |
* It is intended for use when updating NCHAR,NVARCHAR and LONGNVARCHAR columns. |
|
4948 |
* The updater methods are used to update column values in the current row or |
|
4949 |
* the insert row. The updater methods do not update the underlying database; |
|
4950 |
* instead the updateRow or insertRow methods are called to update the database. |
|
4951 |
* |
|
31061 | 4952 |
* @param columnName name of the Column |
4953 |
* @param x the new column value |
|
4954 |
* @param length the length of the stream |
|
2 | 4955 |
* @exception SQLException if a database access error occurs |
4956 |
* @since 1.6 |
|
4957 |
*/ |
|
4958 |
public void updateNCharacterStream(String columnName, |
|
4959 |
java.io.Reader x, |
|
4960 |
long length) |
|
4961 |
throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4962 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4963 |
} |
4964 |
||
4965 |
/** |
|
31061 | 4966 |
* Updates the designated column with a character stream value. The |
2 | 4967 |
* driver does the necessary conversion from Java character format to |
4968 |
* the national character set in the database. |
|
4969 |
* It is intended for use when |
|
31061 | 4970 |
* updating {@code NCHAR},{@code NVARCHAR} |
4971 |
* and {@code LONGNVARCHAR} columns. |
|
2 | 4972 |
* |
4973 |
* The updater methods are used to update column values in the |
|
4974 |
* current row or the insert row. The updater methods do not |
|
31061 | 4975 |
* update the underlying database; instead the {@code updateRow} or |
4976 |
* {@code insertRow} methods are called to update the database. |
|
2 | 4977 |
* |
4978 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
4979 |
* it might be more efficient to use a version of |
|
31061 | 4980 |
* {@code updateNCharacterStream} which takes a length parameter. |
2 | 4981 |
* |
4982 |
* @param columnIndex the first column is 1, the second is 2, ... |
|
4983 |
* @param x the new column value |
|
4984 |
* @exception SQLException if a database access error occurs, |
|
31061 | 4985 |
* the result set concurrency is {@code CONCUR_READ_ONLY} or this |
4986 |
* method is called on a closed result set |
|
2 | 4987 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
4988 |
* this method |
|
4989 |
* @since 1.6 |
|
4990 |
*/ |
|
4991 |
public void updateNCharacterStream(int columnIndex, |
|
4992 |
java.io.Reader x) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4993 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4994 |
} |
4995 |
||
4996 |
/** |
|
4997 |
* Updates the designated column with a character stream value. The |
|
4998 |
* driver does the necessary conversion from Java character format to |
|
4999 |
* the national character set in the database. |
|
5000 |
* It is intended for use when |
|
31061 | 5001 |
* updating {@code NCHAR},{@code NVARCHAR} |
5002 |
* and {@code LONGNVARCHAR} columns. |
|
2 | 5003 |
* |
5004 |
* The updater methods are used to update column values in the |
|
5005 |
* current row or the insert row. The updater methods do not |
|
31061 | 5006 |
* update the underlying database; instead the {@code updateRow} or |
5007 |
* {@code insertRow} methods are called to update the database. |
|
2 | 5008 |
* |
5009 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5010 |
* it might be more efficient to use a version of |
|
31061 | 5011 |
* {@code updateNCharacterStream} which takes a length parameter. |
5012 |
* |
|
5013 |
* @param columnLabel the label for the column specified with the SQL AS clause. |
|
5014 |
* If the SQL AS clause was not specified, then the label is the name of the column |
|
5015 |
* @param reader the {@code java.io.Reader} object containing |
|
2 | 5016 |
* the new column value |
5017 |
* @exception SQLException if a database access error occurs, |
|
31061 | 5018 |
* the result set concurrency is {@code CONCUR_READ_ONLY} or |
5019 |
* this method is called on a closed result set |
|
5020 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5021 |
* this method |
|
2 | 5022 |
* @since 1.6 |
5023 |
*/ |
|
5024 |
public void updateNCharacterStream(String columnLabel, |
|
5025 |
java.io.Reader reader) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5026 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5027 |
} |
5028 |
||
5029 |
/** |
|
5030 |
* Updates the designated column using the given input stream, which |
|
5031 |
* will have the specified number of bytes. |
|
31061 | 5032 |
* When a very large ASCII value is input to a {@code LONGVARCHAR} |
2 | 5033 |
* parameter, it may be more practical to send it via a |
31061 | 5034 |
* {@code java.io.InputStream}. Data will be read from the stream |
2 | 5035 |
* as needed until end-of-file is reached. The JDBC driver will |
5036 |
* do any necessary conversion from ASCII to the database char format. |
|
5037 |
* |
|
5038 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5039 |
* Java stream object or your own subclass that implements the |
|
5040 |
* standard interface. |
|
5041 |
* <p> |
|
5042 |
* The updater methods are used to update column values in the |
|
5043 |
* current row or the insert row. The updater methods do not |
|
31061 | 5044 |
* update the underlying database; instead the {@code updateRow} or |
5045 |
* {@code insertRow} methods are called to update the database. |
|
2 | 5046 |
* |
5047 |
* @param columnIndex the first column is 1, the second is 2, ... |
|
5048 |
* @param inputStream An object that contains the data to set the parameter |
|
31061 | 5049 |
* value to. |
2 | 5050 |
* @param length the number of bytes in the parameter data. |
5051 |
* @exception SQLException if a database access error occurs, |
|
31061 | 5052 |
* the result set concurrency is {@code CONCUR_READ_ONLY} |
5053 |
* or this method is called on a closed result set |
|
2 | 5054 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
5055 |
* this method |
|
5056 |
* @since 1.6 |
|
5057 |
*/ |
|
5058 |
public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5059 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5060 |
} |
5061 |
||
5062 |
/** |
|
5063 |
* Updates the designated column using the given input stream, which |
|
5064 |
* will have the specified number of bytes. |
|
31061 | 5065 |
* When a very large ASCII value is input to a {@code LONGVARCHAR} |
2 | 5066 |
* parameter, it may be more practical to send it via a |
31061 | 5067 |
* {@code java.io.InputStream}. Data will be read from the stream |
2 | 5068 |
* as needed until end-of-file is reached. The JDBC driver will |
5069 |
* do any necessary conversion from ASCII to the database char format. |
|
5070 |
* |
|
5071 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5072 |
* Java stream object or your own subclass that implements the |
|
5073 |
* standard interface. |
|
5074 |
* <p> |
|
5075 |
* The updater methods are used to update column values in the |
|
5076 |
* current row or the insert row. The updater methods do not |
|
31061 | 5077 |
* update the underlying database; instead the {@code updateRow} or |
5078 |
* {@code insertRow} methods are called to update the database. |
|
5079 |
* |
|
5080 |
* @param columnLabel the label for the column specified with the SQL AS clause. |
|
5081 |
* If the SQL AS clause was not specified, |
|
5082 |
* then the label is the name of the column. |
|
2 | 5083 |
* @param inputStream An object that contains the data to set the parameter |
31061 | 5084 |
* value to. |
2 | 5085 |
* @param length the number of bytes in the parameter data. |
5086 |
* @exception SQLException if a database access error occurs, |
|
31061 | 5087 |
* the result set concurrency is {@code CONCUR_READ_ONLY} |
5088 |
* or this method is called on a closed result set |
|
2 | 5089 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 5090 |
* this method |
2 | 5091 |
* @since 1.6 |
5092 |
*/ |
|
5093 |
public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5094 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5095 |
} |
5096 |
||
5097 |
/** |
|
5098 |
* Updates the designated column using the given input stream. |
|
31061 | 5099 |
* When a very large ASCII value is input to a {@code LONGVARCHAR} |
2 | 5100 |
* parameter, it may be more practical to send it via a |
31061 | 5101 |
* {@code java.io.InputStream}. Data will be read from the stream |
2 | 5102 |
* as needed until end-of-file is reached. The JDBC driver will |
5103 |
* do any necessary conversion from ASCII to the database char format. |
|
5104 |
* |
|
5105 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5106 |
* Java stream object or your own subclass that implements the |
|
5107 |
* standard interface. |
|
5108 |
* |
|
31061 | 5109 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
2 | 5110 |
* it might be more efficient to use a version of |
31061 | 5111 |
* {@code updateBlob} which takes a length parameter. |
2 | 5112 |
* <p> |
5113 |
* The updater methods are used to update column values in the |
|
5114 |
* current row or the insert row. The updater methods do not |
|
31061 | 5115 |
* update the underlying database; instead the {@code updateRow} or |
5116 |
* {@code insertRow} methods are called to update the database. |
|
2 | 5117 |
* |
5118 |
* @param columnIndex the first column is 1, the second is 2, ... |
|
5119 |
* @param inputStream An object that contains the data to set the parameter |
|
31061 | 5120 |
* value to. |
2 | 5121 |
* @exception SQLException if a database access error occurs, |
31061 | 5122 |
* the result set concurrency is {@code CONCUR_READ_ONLY} |
5123 |
* or this method is called on a closed result set |
|
2 | 5124 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 5125 |
* this method |
2 | 5126 |
* @since 1.6 |
5127 |
*/ |
|
5128 |
public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5129 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5130 |
} |
5131 |
||
5132 |
/** |
|
5133 |
* Updates the designated column using the given input stream. |
|
31061 | 5134 |
* When a very large ASCII value is input to a {@code LONGVARCHAR} |
2 | 5135 |
* parameter, it may be more practical to send it via a |
31061 | 5136 |
* {@code java.io.InputStream}. Data will be read from the stream |
2 | 5137 |
* as needed until end-of-file is reached. The JDBC driver will |
5138 |
* do any necessary conversion from ASCII to the database char format. |
|
5139 |
* |
|
5140 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5141 |
* Java stream object or your own subclass that implements the |
|
5142 |
* standard interface. |
|
5143 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5144 |
* it might be more efficient to use a version of |
|
31061 | 5145 |
* {@code updateBlob} which takes a length parameter. |
2 | 5146 |
* <p> |
5147 |
* The updater methods are used to update column values in the |
|
5148 |
* current row or the insert row. The updater methods do not |
|
31061 | 5149 |
* update the underlying database; instead the {@code updateRow} or |
5150 |
* {@code insertRow} methods are called to update the database. |
|
5151 |
* |
|
5152 |
* @param columnLabel the label for the column specified with the SQL AS clause. |
|
5153 |
* If the SQL AS clause was not specified, then the label |
|
5154 |
* is the name of the column |
|
2 | 5155 |
* @param inputStream An object that contains the data to set the parameter |
31061 | 5156 |
* value to. |
2 | 5157 |
* @exception SQLException if a database access error occurs, |
31061 | 5158 |
* the result set concurrency is {@code CONCUR_READ_ONLY} |
5159 |
* or this method is called on a closed result set |
|
2 | 5160 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 5161 |
* this method |
2 | 5162 |
* @since 1.6 |
5163 |
*/ |
|
5164 |
public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5165 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5166 |
} |
5167 |
||
5168 |
/** |
|
31061 | 5169 |
* Updates the designated column using the given {@code Reader} |
2 | 5170 |
* object, which is the given number of characters long. |
31061 | 5171 |
* When a very large UNICODE value is input to a {@code LONGVARCHAR} |
2 | 5172 |
* parameter, it may be more practical to send it via a |
31061 | 5173 |
* {@code java.io.Reader} object. The data will be read from the stream |
2 | 5174 |
* as needed until end-of-file is reached. The JDBC driver will |
5175 |
* do any necessary conversion from UNICODE to the database char format. |
|
5176 |
* |
|
5177 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5178 |
* Java stream object or your own subclass that implements the |
|
5179 |
* standard interface. |
|
5180 |
* <p> |
|
5181 |
* The updater methods are used to update column values in the |
|
5182 |
* current row or the insert row. The updater methods do not |
|
31061 | 5183 |
* update the underlying database; instead the {@code updateRow} or |
5184 |
* {@code insertRow} methods are called to update the database. |
|
2 | 5185 |
* |
5186 |
* @param columnIndex the first column is 1, the second is 2, ... |
|
5187 |
* @param reader An object that contains the data to set the parameter value to. |
|
5188 |
* @param length the number of characters in the parameter data. |
|
5189 |
* @exception SQLException if a database access error occurs, |
|
31061 | 5190 |
* the result set concurrency is {@code CONCUR_READ_ONLY} |
5191 |
* or this method is called on a closed result set |
|
2 | 5192 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 5193 |
* this method |
2 | 5194 |
* @since 1.6 |
5195 |
*/ |
|
5196 |
public void updateClob(int columnIndex, Reader reader, long length) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5197 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5198 |
} |
5199 |
||
5200 |
/** |
|
31061 | 5201 |
* Updates the designated column using the given {@code Reader} |
2 | 5202 |
* object, which is the given number of characters long. |
31061 | 5203 |
* When a very large UNICODE value is input to a {@code LONGVARCHAR} |
2 | 5204 |
* parameter, it may be more practical to send it via a |
31061 | 5205 |
* {@code java.io.Reader} object. The data will be read from the stream |
2 | 5206 |
* as needed until end-of-file is reached. The JDBC driver will |
5207 |
* do any necessary conversion from UNICODE to the database char format. |
|
5208 |
* |
|
5209 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5210 |
* Java stream object or your own subclass that implements the |
|
5211 |
* standard interface. |
|
5212 |
* <p> |
|
5213 |
* The updater methods are used to update column values in the |
|
5214 |
* current row or the insert row. The updater methods do not |
|
31061 | 5215 |
* update the underlying database; instead the {@code updateRow} or |
5216 |
* {@code insertRow} methods are called to update the database. |
|
5217 |
* |
|
5218 |
* @param columnLabel the label for the column specified with the SQL AS clause. |
|
5219 |
* If the SQL AS clause was not specified, then the label is the name of the column |
|
2 | 5220 |
* @param reader An object that contains the data to set the parameter value to. |
5221 |
* @param length the number of characters in the parameter data. |
|
5222 |
* @exception SQLException if a database access error occurs, |
|
31061 | 5223 |
* the result set concurrency is {@code CONCUR_READ_ONLY} |
5224 |
* or this method is called on a closed result set |
|
2 | 5225 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 5226 |
* this method |
2 | 5227 |
* @since 1.6 |
5228 |
*/ |
|
5229 |
public void updateClob(String columnLabel, Reader reader, long length) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5230 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5231 |
} |
5232 |
||
5233 |
/** |
|
31061 | 5234 |
* Updates the designated column using the given {@code Reader} |
2 | 5235 |
* object. |
31061 | 5236 |
* When a very large UNICODE value is input to a {@code LONGVARCHAR} |
2 | 5237 |
* parameter, it may be more practical to send it via a |
31061 | 5238 |
* {@code java.io.Reader} object. The data will be read from the stream |
2 | 5239 |
* as needed until end-of-file is reached. The JDBC driver will |
5240 |
* do any necessary conversion from UNICODE to the database char format. |
|
5241 |
* |
|
5242 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5243 |
* Java stream object or your own subclass that implements the |
|
5244 |
* standard interface. |
|
31061 | 5245 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
2 | 5246 |
* it might be more efficient to use a version of |
31061 | 5247 |
* {@code updateClob} which takes a length parameter. |
2 | 5248 |
* <p> |
5249 |
* The updater methods are used to update column values in the |
|
5250 |
* current row or the insert row. The updater methods do not |
|
31061 | 5251 |
* update the underlying database; instead the {@code updateRow} or |
5252 |
* {@code insertRow} methods are called to update the database. |
|
2 | 5253 |
* |
5254 |
* @param columnIndex the first column is 1, the second is 2, ... |
|
5255 |
* @param reader An object that contains the data to set the parameter value to. |
|
5256 |
* @exception SQLException if a database access error occurs, |
|
31061 | 5257 |
* the result set concurrency is {@code CONCUR_READ_ONLY} |
5258 |
* or this method is called on a closed result set |
|
2 | 5259 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 5260 |
* this method |
2 | 5261 |
* @since 1.6 |
5262 |
*/ |
|
5263 |
public void updateClob(int columnIndex, Reader reader) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5264 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5265 |
} |
5266 |
||
5267 |
/** |
|
31061 | 5268 |
* Updates the designated column using the given {@code Reader} |
2 | 5269 |
* object. |
31061 | 5270 |
* When a very large UNICODE value is input to a {@code LONGVARCHAR} |
2 | 5271 |
* parameter, it may be more practical to send it via a |
31061 | 5272 |
* {@code java.io.Reader} object. The data will be read from the stream |
2 | 5273 |
* as needed until end-of-file is reached. The JDBC driver will |
5274 |
* do any necessary conversion from UNICODE to the database char format. |
|
5275 |
* |
|
5276 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5277 |
* Java stream object or your own subclass that implements the |
|
5278 |
* standard interface. |
|
31061 | 5279 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
2 | 5280 |
* it might be more efficient to use a version of |
31061 | 5281 |
* {@code updateClob} which takes a length parameter. |
2 | 5282 |
* <p> |
5283 |
* The updater methods are used to update column values in the |
|
5284 |
* current row or the insert row. The updater methods do not |
|
31061 | 5285 |
* update the underlying database; instead the {@code updateRow} or |
5286 |
* {@code insertRow} methods are called to update the database. |
|
5287 |
* |
|
5288 |
* @param columnLabel the label for the column specified with the SQL AS clause. |
|
5289 |
* If the SQL AS clause was not specified, then the label |
|
5290 |
* is the name of the column |
|
2 | 5291 |
* @param reader An object that contains the data to set the parameter value to. |
5292 |
* @exception SQLException if a database access error occurs, |
|
31061 | 5293 |
* the result set concurrency is {@code CONCUR_READ_ONLY} |
5294 |
* or this method is called on a closed result set |
|
2 | 5295 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 5296 |
* this method |
2 | 5297 |
* @since 1.6 |
5298 |
*/ |
|
5299 |
public void updateClob(String columnLabel, Reader reader) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5300 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5301 |
} |
5302 |
||
5303 |
/** |
|
31061 | 5304 |
* Updates the designated column using the given {@code Reader} |
2 | 5305 |
* object, which is the given number of characters long. |
31061 | 5306 |
* When a very large UNICODE value is input to a {@code LONGVARCHAR} |
2 | 5307 |
* parameter, it may be more practical to send it via a |
31061 | 5308 |
* {@code java.io.Reader} object. The data will be read from the stream |
2 | 5309 |
* as needed until end-of-file is reached. The JDBC driver will |
5310 |
* do any necessary conversion from UNICODE to the database char format. |
|
5311 |
* |
|
5312 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5313 |
* Java stream object or your own subclass that implements the |
|
5314 |
* standard interface. |
|
5315 |
* <p> |
|
5316 |
* The updater methods are used to update column values in the |
|
5317 |
* current row or the insert row. The updater methods do not |
|
31061 | 5318 |
* update the underlying database; instead the {@code updateRow} or |
5319 |
* {@code insertRow} methods are called to update the database. |
|
2 | 5320 |
* |
5321 |
* @param columnIndex the first column is 1, the second 2, ... |
|
5322 |
* @param reader An object that contains the data to set the parameter value to. |
|
5323 |
* @param length the number of characters in the parameter data. |
|
5324 |
* @throws SQLException if the driver does not support national |
|
5325 |
* character sets; if the driver can detect that a data conversion |
|
31061 | 5326 |
* error could occur; this method is called on a closed result set, |
5327 |
* if a database access error occurs or |
|
5328 |
* the result set concurrency is {@code CONCUR_READ_ONLY} |
|
2 | 5329 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 5330 |
* this method |
2 | 5331 |
* @since 1.6 |
5332 |
*/ |
|
5333 |
public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5334 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5335 |
} |
5336 |
||
5337 |
/** |
|
31061 | 5338 |
* Updates the designated column using the given {@code Reader} |
2 | 5339 |
* object, which is the given number of characters long. |
31061 | 5340 |
* When a very large UNICODE value is input to a {@code LONGVARCHAR} |
2 | 5341 |
* parameter, it may be more practical to send it via a |
31061 | 5342 |
* {@code java.io.Reader} object. The data will be read from the stream |
2 | 5343 |
* as needed until end-of-file is reached. The JDBC driver will |
5344 |
* do any necessary conversion from UNICODE to the database char format. |
|
5345 |
* |
|
5346 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5347 |
* Java stream object or your own subclass that implements the |
|
5348 |
* standard interface. |
|
5349 |
* <p> |
|
5350 |
* The updater methods are used to update column values in the |
|
5351 |
* current row or the insert row. The updater methods do not |
|
31061 | 5352 |
* update the underlying database; instead the {@code updateRow} or |
5353 |
* {@code insertRow} methods are called to update the database. |
|
5354 |
* |
|
5355 |
* @param columnLabel the label for the column specified with the SQL AS clause. |
|
5356 |
* If the SQL AS clause was not specified, then the label is the name of the column |
|
2 | 5357 |
* @param reader An object that contains the data to set the parameter value to. |
5358 |
* @param length the number of characters in the parameter data. |
|
5359 |
* @throws SQLException if the driver does not support national |
|
5360 |
* character sets; if the driver can detect that a data conversion |
|
31061 | 5361 |
* error could occur; this method is called on a closed result set; |
5362 |
* if a database access error occurs or |
|
5363 |
* the result set concurrency is {@code CONCUR_READ_ONLY} |
|
2 | 5364 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 5365 |
* this method |
2 | 5366 |
* @since 1.6 |
5367 |
*/ |
|
5368 |
public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5369 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5370 |
} |
5371 |
||
5372 |
/** |
|
31061 | 5373 |
* Updates the designated column using the given {@code Reader} |
2 | 5374 |
* object. |
31061 | 5375 |
* When a very large UNICODE value is input to a {@code LONGVARCHAR} |
2 | 5376 |
* parameter, it may be more practical to send it via a |
31061 | 5377 |
* {@code java.io.Reader} object. The data will be read from the stream |
2 | 5378 |
* as needed until end-of-file is reached. The JDBC driver will |
5379 |
* do any necessary conversion from UNICODE to the database char format. |
|
5380 |
* |
|
5381 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5382 |
* Java stream object or your own subclass that implements the |
|
5383 |
* standard interface. |
|
5384 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5385 |
* it might be more efficient to use a version of |
|
31061 | 5386 |
* {@code updateNClob} which takes a length parameter. |
2 | 5387 |
* <p> |
5388 |
* The updater methods are used to update column values in the |
|
5389 |
* current row or the insert row. The updater methods do not |
|
31061 | 5390 |
* update the underlying database; instead the {@code updateRow} or |
5391 |
* {@code insertRow} methods are called to update the database. |
|
2 | 5392 |
* |
5393 |
* @param columnIndex the first column is 1, the second 2, ... |
|
5394 |
* @param reader An object that contains the data to set the parameter value to. |
|
5395 |
* @throws SQLException if the driver does not support national |
|
5396 |
* character sets; if the driver can detect that a data conversion |
|
31061 | 5397 |
* error could occur; this method is called on a closed result set, |
5398 |
* if a database access error occurs or |
|
5399 |
* the result set concurrency is {@code CONCUR_READ_ONLY} |
|
2 | 5400 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 5401 |
* this method |
2 | 5402 |
* @since 1.6 |
5403 |
*/ |
|
5404 |
public void updateNClob(int columnIndex, Reader reader) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5405 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5406 |
} |
5407 |
||
5408 |
/** |
|
31061 | 5409 |
* Updates the designated column using the given {@code Reader} |
2 | 5410 |
* object. |
31061 | 5411 |
* When a very large UNICODE value is input to a {@code LONGVARCHAR} |
2 | 5412 |
* parameter, it may be more practical to send it via a |
31061 | 5413 |
* {@code java.io.Reader} object. The data will be read from the stream |
2 | 5414 |
* as needed until end-of-file is reached. The JDBC driver will |
5415 |
* do any necessary conversion from UNICODE to the database char format. |
|
5416 |
* |
|
5417 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5418 |
* Java stream object or your own subclass that implements the |
|
5419 |
* standard interface. |
|
5420 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5421 |
* it might be more efficient to use a version of |
|
31061 | 5422 |
* {@code updateNClob} which takes a length parameter. |
2 | 5423 |
* <p> |
5424 |
* The updater methods are used to update column values in the |
|
5425 |
* current row or the insert row. The updater methods do not |
|
31061 | 5426 |
* update the underlying database; instead the {@code updateRow} or |
5427 |
* {@code insertRow} methods are called to update the database. |
|
5428 |
* |
|
5429 |
* @param columnLabel the label for the column specified with the SQL AS clause. |
|
5430 |
* If the SQL AS clause was not specified, then |
|
5431 |
* the label is the name of the column |
|
2 | 5432 |
* @param reader An object that contains the data to set the parameter value to. |
5433 |
* @throws SQLException if the driver does not support national |
|
5434 |
* character sets; if the driver can detect that a data conversion |
|
31061 | 5435 |
* error could occur; this method is called on a closed result set; |
5436 |
* if a database access error occurs or |
|
5437 |
* the result set concurrency is {@code CONCUR_READ_ONLY} |
|
2 | 5438 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 5439 |
* this method |
2 | 5440 |
* @since 1.6 |
5441 |
*/ |
|
5442 |
public void updateNClob(String columnLabel, Reader reader) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5443 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5444 |
} |
5445 |
||
5446 |
||
31061 | 5447 |
/** |
2 | 5448 |
* Updates the designated column with an ascii stream value, which will have |
5449 |
* the specified number of bytes. |
|
5450 |
* The updater methods are used to update column values in the |
|
5451 |
* current row or the insert row. The updater methods do not |
|
31061 | 5452 |
* update the underlying database; instead the {@code updateRow} or |
5453 |
* {@code insertRow} methods are called to update the database. |
|
2 | 5454 |
* |
5455 |
* @param columnIndex the first column is 1, the second is 2, ... |
|
5456 |
* @param x the new column value |
|
5457 |
* @param length the length of the stream |
|
5458 |
* @exception SQLException if a database access error occurs, |
|
31061 | 5459 |
* the result set concurrency is {@code CONCUR_READ_ONLY} |
5460 |
* or this method is called on a closed result set |
|
2 | 5461 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 5462 |
* this method |
2 | 5463 |
* @since 1.6 |
5464 |
*/ |
|
5465 |
public void updateAsciiStream(int columnIndex, |
|
5466 |
java.io.InputStream x, |
|
5467 |
long length) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5468 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5469 |
} |
5470 |
||
5471 |
/** |
|
5472 |
* Updates the designated column with a binary stream value, which will have |
|
5473 |
* the specified number of bytes. |
|
5474 |
* The updater methods are used to update column values in the |
|
5475 |
* current row or the insert row. The updater methods do not |
|
31061 | 5476 |
* update the underlying database; instead the {@code updateRow} or |
5477 |
* {@code insertRow} methods are called to update the database. |
|
2 | 5478 |
* |
5479 |
* @param columnIndex the first column is 1, the second is 2, ... |
|
5480 |
* @param x the new column value |
|
5481 |
* @param length the length of the stream |
|
5482 |
* @exception SQLException if a database access error occurs, |
|
31061 | 5483 |
* the result set concurrency is {@code CONCUR_READ_ONLY} |
5484 |
* or this method is called on a closed result set |
|
2 | 5485 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 5486 |
* this method |
2 | 5487 |
* @since 1.6 |
5488 |
*/ |
|
5489 |
public void updateBinaryStream(int columnIndex, |
|
5490 |
java.io.InputStream x, |
|
5491 |
long length) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5492 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5493 |
} |
5494 |
||
5495 |
/** |
|
5496 |
* Updates the designated column with a character stream value, which will have |
|
5497 |
* the specified number of bytes. |
|
5498 |
* The updater methods are used to update column values in the |
|
5499 |
* current row or the insert row. The updater methods do not |
|
31061 | 5500 |
* update the underlying database; instead the {@code updateRow} or |
5501 |
* {@code insertRow} methods are called to update the database. |
|
2 | 5502 |
* |
5503 |
* @param columnIndex the first column is 1, the second is 2, ... |
|
5504 |
* @param x the new column value |
|
5505 |
* @param length the length of the stream |
|
5506 |
* @exception SQLException if a database access error occurs, |
|
31061 | 5507 |
* the result set concurrency is {@code CONCUR_READ_ONLY} |
5508 |
* or this method is called on a closed result set |
|
2 | 5509 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 5510 |
* this method |
2 | 5511 |
* @since 1.6 |
5512 |
*/ |
|
5513 |
public void updateCharacterStream(int columnIndex, |
|
5514 |
java.io.Reader x, |
|
5515 |
long length) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5516 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5517 |
} |
5518 |
||
5519 |
/** |
|
5520 |
* Updates the designated column with an ascii stream value, which will have |
|
5521 |
* the specified number of bytes.. |
|
5522 |
* The updater methods are used to update column values in the |
|
5523 |
* current row or the insert row. The updater methods do not |
|
31061 | 5524 |
* update the underlying database; instead the {@code updateRow} or |
5525 |
* {@code insertRow} methods are called to update the database. |
|
5526 |
* |
|
5527 |
* @param columnLabel the label for the column specified with the SQL AS clause. |
|
5528 |
* If the SQL AS clause was not specified, then |
|
5529 |
* the label is the name of the column |
|
2 | 5530 |
* @param x the new column value |
5531 |
* @param length the length of the stream |
|
5532 |
* @exception SQLException if a database access error occurs, |
|
31061 | 5533 |
* the result set concurrency is {@code CONCUR_READ_ONLY} |
5534 |
* or this method is called on a closed result set |
|
2 | 5535 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 5536 |
* this method |
2 | 5537 |
* @since 1.6 |
5538 |
*/ |
|
5539 |
public void updateAsciiStream(String columnLabel, |
|
5540 |
java.io.InputStream x, |
|
5541 |
long length) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5542 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5543 |
} |
5544 |
||
5545 |
/** |
|
5546 |
* Updates the designated column with an ascii stream value. |
|
5547 |
* The updater methods are used to update column values in the |
|
5548 |
* current row or the insert row. The updater methods do not |
|
31061 | 5549 |
* update the underlying database; instead the {@code updateRow} or |
5550 |
* {@code insertRow} methods are called to update the database. |
|
2 | 5551 |
* |
5552 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5553 |
* it might be more efficient to use a version of |
|
31061 | 5554 |
* {@code updateAsciiStream} which takes a length parameter. |
2 | 5555 |
* |
5556 |
* @param columnIndex the first column is 1, the second is 2, ... |
|
5557 |
* @param x the new column value |
|
5558 |
* @exception SQLException if a database access error occurs, |
|
31061 | 5559 |
* the result set concurrency is {@code CONCUR_READ_ONLY} |
5560 |
* or this method is called on a closed result set |
|
2 | 5561 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 5562 |
* this method |
2 | 5563 |
* @since 1.6 |
5564 |
*/ |
|
5565 |
public void updateAsciiStream(int columnIndex, |
|
5566 |
java.io.InputStream x) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5567 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5568 |
} |
5569 |
||
5570 |
/** |
|
5571 |
* Updates the designated column with an ascii stream value. |
|
5572 |
* The updater methods are used to update column values in the |
|
5573 |
* current row or the insert row. The updater methods do not |
|
31061 | 5574 |
* update the underlying database; instead the {@code updateRow} or |
5575 |
* {@code insertRow} methods are called to update the database. |
|
2 | 5576 |
* |
5577 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5578 |
* it might be more efficient to use a version of |
|
31061 | 5579 |
* {@code updateAsciiStream} which takes a length parameter. |
5580 |
* |
|
5581 |
* @param columnLabel the label for the column specified with the SQL AS clause. |
|
5582 |
* If the SQL AS clause was not specified, then the label |
|
5583 |
* is the name of the column |
|
2 | 5584 |
* @param x the new column value |
5585 |
* @exception SQLException if a database access error occurs, |
|
31061 | 5586 |
* the result set concurrency is {@code CONCUR_READ_ONLY} |
5587 |
* or this method is called on a closed result set |
|
2 | 5588 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 5589 |
* this method |
2 | 5590 |
* @since 1.6 |
5591 |
*/ |
|
5592 |
public void updateAsciiStream(String columnLabel, |
|
5593 |
java.io.InputStream x) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5594 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5595 |
} |
5596 |
||
5597 |
||
5598 |
/** |
|
5599 |
* Updates the designated column with a binary stream value, which will have |
|
5600 |
* the specified number of bytes. |
|
5601 |
* The updater methods are used to update column values in the |
|
5602 |
* current row or the insert row. The updater methods do not |
|
31061 | 5603 |
* update the underlying database; instead the {@code updateRow} or |
5604 |
* {@code insertRow} methods are called to update the database. |
|
5605 |
* |
|
5606 |
* @param columnLabel the label for the column specified with the SQL AS clause. |
|
5607 |
* If the SQL AS clause was not specified, then |
|
5608 |
* the label is the name of the column |
|
2 | 5609 |
* @param x the new column value |
5610 |
* @param length the length of the stream |
|
5611 |
* @exception SQLException if a database access error occurs, |
|
31061 | 5612 |
* the result set concurrency is {@code CONCUR_READ_ONLY} |
5613 |
* or this method is called on a closed result set |
|
2 | 5614 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
5615 |
* this method |
|
5616 |
* @since 1.6 |
|
5617 |
*/ |
|
5618 |
public void updateBinaryStream(String columnLabel, |
|
5619 |
java.io.InputStream x, |
|
5620 |
long length) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5621 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5622 |
} |
5623 |
||
5624 |
/** |
|
5625 |
* Updates the designated column with a binary stream value. |
|
5626 |
* The updater methods are used to update column values in the |
|
5627 |
* current row or the insert row. The updater methods do not |
|
31061 | 5628 |
* update the underlying database; instead the {@code updateRow} or |
5629 |
* {@code insertRow} methods are called to update the database. |
|
2 | 5630 |
* |
5631 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5632 |
* it might be more efficient to use a version of |
|
31061 | 5633 |
* {@code updateBinaryStream} which takes a length parameter. |
2 | 5634 |
* |
5635 |
* @param columnIndex the first column is 1, the second is 2, ... |
|
5636 |
* @param x the new column value |
|
5637 |
* @exception SQLException if a database access error occurs, |
|
31061 | 5638 |
* the result set concurrency is {@code CONCUR_READ_ONLY} |
5639 |
* or this method is called on a closed result set |
|
2 | 5640 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
5641 |
* this method |
|
5642 |
* @since 1.6 |
|
5643 |
*/ |
|
5644 |
public void updateBinaryStream(int columnIndex, |
|
5645 |
java.io.InputStream x) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5646 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5647 |
} |
5648 |
||
5649 |
||
5650 |
/** |
|
5651 |
* Updates the designated column with a binary stream value. |
|
5652 |
* The updater methods are used to update column values in the |
|
5653 |
* current row or the insert row. The updater methods do not |
|
31061 | 5654 |
* update the underlying database; instead the {@code updateRow} or |
5655 |
* {@code insertRow} methods are called to update the database. |
|
2 | 5656 |
* |
5657 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5658 |
* it might be more efficient to use a version of |
|
31061 | 5659 |
* {@code updateBinaryStream} which takes a length parameter. |
5660 |
* |
|
5661 |
* @param columnLabel the label for the column specified with the SQL AS clause. |
|
5662 |
* If the SQL AS clause was not specified, then |
|
5663 |
* the label is the name of the column |
|
2 | 5664 |
* @param x the new column value |
5665 |
* @exception SQLException if a database access error occurs, |
|
31061 | 5666 |
* the result set concurrency is {@code CONCUR_READ_ONLY} |
5667 |
* or this method is called on a closed result set |
|
2 | 5668 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
5669 |
* this method |
|
5670 |
* @since 1.6 |
|
5671 |
*/ |
|
5672 |
public void updateBinaryStream(String columnLabel, |
|
5673 |
java.io.InputStream x) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5674 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5675 |
} |
5676 |
||
5677 |
||
5678 |
/** |
|
5679 |
* Updates the designated column with a character stream value, which will have |
|
5680 |
* the specified number of bytes. |
|
5681 |
* The updater methods are used to update column values in the |
|
5682 |
* current row or the insert row. The updater methods do not |
|
31061 | 5683 |
* update the underlying database; instead the {@code updateRow} or |
5684 |
* {@code insertRow} methods are called to update the database. |
|
5685 |
* |
|
5686 |
* @param columnLabel the label for the column specified with the SQL AS clause. |
|
5687 |
* If the SQL AS clause was not specified, then |
|
5688 |
* the label is the name of the column |
|
5689 |
* @param reader the {@code java.io.Reader} object containing |
|
2 | 5690 |
* the new column value |
5691 |
* @param length the length of the stream |
|
5692 |
* @exception SQLException if a database access error occurs, |
|
31061 | 5693 |
* the result set concurrency is {@code CONCUR_READ_ONLY} |
5694 |
* or this method is called on a closed result set |
|
2 | 5695 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 5696 |
* this method |
2 | 5697 |
* @since 1.6 |
5698 |
*/ |
|
5699 |
public void updateCharacterStream(String columnLabel, |
|
5700 |
java.io.Reader reader, |
|
5701 |
long length) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5702 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5703 |
} |
5704 |
||
5705 |
/** |
|
5706 |
* Updates the designated column with a character stream value. |
|
5707 |
* The updater methods are used to update column values in the |
|
5708 |
* current row or the insert row. The updater methods do not |
|
31061 | 5709 |
* update the underlying database; instead the {@code updateRow} or |
5710 |
* {@code insertRow} methods are called to update the database. |
|
2 | 5711 |
* |
5712 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5713 |
* it might be more efficient to use a version of |
|
31061 | 5714 |
* {@code updateCharacterStream} which takes a length parameter. |
2 | 5715 |
* |
5716 |
* @param columnIndex the first column is 1, the second is 2, ... |
|
5717 |
* @param x the new column value |
|
5718 |
* @exception SQLException if a database access error occurs, |
|
31061 | 5719 |
* the result set concurrency is {@code CONCUR_READ_ONLY} |
5720 |
* or this method is called on a closed result set |
|
2 | 5721 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 5722 |
* this method |
2 | 5723 |
* @since 1.6 |
5724 |
*/ |
|
5725 |
public void updateCharacterStream(int columnIndex, |
|
5726 |
java.io.Reader x) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5727 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5728 |
} |
5729 |
||
5730 |
/** |
|
5731 |
* Updates the designated column with a character stream value. |
|
5732 |
* The updater methods are used to update column values in the |
|
5733 |
* current row or the insert row. The updater methods do not |
|
31061 | 5734 |
* update the underlying database; instead the {@code updateRow} or |
5735 |
* {@code insertRow} methods are called to update the database. |
|
2 | 5736 |
* |
5737 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5738 |
* it might be more efficient to use a version of |
|
31061 | 5739 |
* {@code updateCharacterStream} which takes a length parameter. |
5740 |
* |
|
5741 |
* @param columnLabel the label for the column specified with the SQL AS clause. |
|
5742 |
* If the SQL AS clause was not specified, then the label |
|
5743 |
* is the name of the column |
|
5744 |
* @param reader the {@code java.io.Reader} object containing |
|
2 | 5745 |
* the new column value |
5746 |
* @exception SQLException if a database access error occurs, |
|
31061 | 5747 |
* the result set concurrency is {@code CONCUR_READ_ONLY} |
5748 |
* or this method is called on a closed result set |
|
2 | 5749 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 5750 |
* this method |
2 | 5751 |
* @since 1.6 |
5752 |
*/ |
|
5753 |
public void updateCharacterStream(String columnLabel, |
|
5754 |
java.io.Reader reader) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5755 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5756 |
} |
5757 |
||
5758 |
||
31061 | 5759 |
/** |
5760 |
* Sets the designated parameter to the given {@code java.net.URL} value. |
|
5761 |
* The driver converts this to an SQL {@code DATALINK} value |
|
5762 |
* when it sends it to the database. |
|
5763 |
* |
|
5764 |
* @param parameterIndex the first parameter is 1, the second is 2, ... |
|
5765 |
* @param x the {@code java.net.URL} object to be set |
|
5766 |
* @exception SQLException if a database access error occurs or |
|
5767 |
* this method is called on a closed {@code PreparedStatement} |
|
5768 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
|
5769 |
* @since 1.4 |
|
5770 |
*/ |
|
2 | 5771 |
public void setURL(int parameterIndex, java.net.URL x) throws SQLException{ |
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5772 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5773 |
} |
5774 |
||
5775 |
||
31061 | 5776 |
/** |
5777 |
* Sets the designated parameter to a {@code Reader} object. |
|
5778 |
* This method differs from the {@code setCharacterStream (int, Reader)} method |
|
5779 |
* because it informs the driver that the parameter value should be sent to |
|
5780 |
* the server as a {@code NCLOB}. When the {@code setCharacterStream} method is used, the |
|
5781 |
* driver may have to do extra work to determine whether the parameter |
|
5782 |
* data should be sent to the server as a {@code LONGNVARCHAR} or a {@code NCLOB} |
|
5783 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5784 |
* it might be more efficient to use a version of |
|
5785 |
* {@code setNClob} which takes a length parameter. |
|
5786 |
* |
|
5787 |
* @param parameterIndex index of the first parameter is 1, the second is 2, ... |
|
5788 |
* @param reader An object that contains the data to set the parameter value to. |
|
5789 |
* @throws SQLException if parameterIndex does not correspond to a parameter |
|
5790 |
* marker in the SQL statement; |
|
5791 |
* if the driver does not support national character sets; |
|
5792 |
* if the driver can detect that a data conversion |
|
5793 |
* error could occur; if a database access error occurs or |
|
5794 |
* this method is called on a closed {@code PreparedStatement} |
|
5795 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
|
5796 |
* |
|
5797 |
* @since 1.6 |
|
5798 |
*/ |
|
2 | 5799 |
public void setNClob(int parameterIndex, Reader reader) |
5800 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5801 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5802 |
} |
5803 |
||
31061 | 5804 |
/** |
5805 |
* Sets the designated parameter to a {@code Reader} object. |
|
5806 |
* The {@code reader} must contain the number |
|
5807 |
* of characters specified by length otherwise a {@code SQLException} will be |
|
5808 |
* generated when the {@code CallableStatement} is executed. |
|
5809 |
* This method differs from the {@code setCharacterStream (int, Reader, int)} method |
|
5810 |
* because it informs the driver that the parameter value should be sent to |
|
5811 |
* the server as a {@code NCLOB}. When the {@code setCharacterStream} method is used, the |
|
5812 |
* driver may have to do extra work to determine whether the parameter |
|
5813 |
* data should be send to the server as a {@code LONGNVARCHAR} or a {@code NCLOB} |
|
5814 |
* |
|
5815 |
* @param parameterName the name of the parameter to be set |
|
5816 |
* @param reader An object that contains the data to set the parameter value to. |
|
5817 |
* @param length the number of characters in the parameter data. |
|
5818 |
* @throws SQLException if parameterIndex does not correspond to a parameter |
|
5819 |
* marker in the SQL statement; if the length specified is less than zero; |
|
5820 |
* if the driver does not support national |
|
5821 |
* character sets; if the driver can detect that a data conversion |
|
5822 |
* error could occur; if a database access error occurs or |
|
5823 |
* this method is called on a closed {@code CallableStatement} |
|
5824 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5825 |
* this method |
|
5826 |
* @since 1.6 |
|
5827 |
*/ |
|
5828 |
public void setNClob(String parameterName, Reader reader, long length) |
|
2 | 5829 |
throws SQLException{ |
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5830 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
31061 | 5831 |
} |
2 | 5832 |
|
5833 |
||
5834 |
/** |
|
31061 | 5835 |
* Sets the designated parameter to a {@code Reader} object. |
5836 |
* This method differs from the {@code setCharacterStream (int, Reader)} method |
|
2 | 5837 |
* because it informs the driver that the parameter value should be sent to |
31061 | 5838 |
* the server as a {@code NCLOB}. When the {@code setCharacterStream} method is used, the |
2 | 5839 |
* driver may have to do extra work to determine whether the parameter |
31061 | 5840 |
* data should be send to the server as a {@code LONGNVARCHAR} or a {@code NCLOB} |
2 | 5841 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
5842 |
* it might be more efficient to use a version of |
|
31061 | 5843 |
* {@code setNClob} which takes a length parameter. |
2 | 5844 |
* |
5845 |
* @param parameterName the name of the parameter |
|
5846 |
* @param reader An object that contains the data to set the parameter value to. |
|
5847 |
* @throws SQLException if the driver does not support national character sets; |
|
31061 | 5848 |
* if the driver can detect that a data conversion |
5849 |
* error could occur; if a database access error occurs or |
|
5850 |
* this method is called on a closed {@code CallableStatement} |
|
2 | 5851 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
5852 |
* |
|
5853 |
* @since 1.6 |
|
5854 |
*/ |
|
5855 |
public void setNClob(String parameterName, Reader reader) |
|
5856 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5857 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5858 |
} |
5859 |
||
5860 |
||
31061 | 5861 |
/** |
5862 |
* Sets the designated parameter to a {@code Reader} object. The reader must contain the number |
|
5863 |
* of characters specified by length otherwise a {@code SQLException} will be |
|
5864 |
* generated when the {@code PreparedStatement} is executed. |
|
5865 |
* This method differs from the {@code setCharacterStream (int, Reader, int)} method |
|
2 | 5866 |
* because it informs the driver that the parameter value should be sent to |
31061 | 5867 |
* the server as a {@code NCLOB}. When the {@code setCharacterStream} method is used, the |
2 | 5868 |
* driver may have to do extra work to determine whether the parameter |
31061 | 5869 |
* data should be sent to the server as a {@code LONGNVARCHAR} or a {@code NCLOB} |
5870 |
* |
|
2 | 5871 |
* @param parameterIndex index of the first parameter is 1, the second is 2, ... |
5872 |
* @param reader An object that contains the data to set the parameter value to. |
|
5873 |
* @param length the number of characters in the parameter data. |
|
5874 |
* @throws SQLException if parameterIndex does not correspond to a parameter |
|
31061 | 5875 |
* marker in the SQL statement; if the length specified is less than zero; |
5876 |
* if the driver does not support national character sets; |
|
5877 |
* if the driver can detect that a data conversion |
|
5878 |
* error could occur; if a database access error occurs or |
|
5879 |
* this method is called on a closed {@code PreparedStatement} |
|
2 | 5880 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
5881 |
* |
|
5882 |
* @since 1.6 |
|
5883 |
*/ |
|
5884 |
public void setNClob(int parameterIndex, Reader reader, long length) |
|
5885 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5886 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5887 |
} |
5888 |
||
5889 |
||
5890 |
/** |
|
31061 | 5891 |
* Sets the designated parameter to a {@code java.sql.NClob} object. |
5892 |
* The driver converts this to an |
|
5893 |
* SQL {@code NCLOB} value when it sends it to the database. |
|
2 | 5894 |
* @param parameterIndex of the first parameter is 1, the second is 2, ... |
5895 |
* @param value the parameter value |
|
5896 |
* @throws SQLException if the driver does not support national |
|
5897 |
* character sets; if the driver can detect that a data conversion |
|
31061 | 5898 |
* error could occur; or if a database access error occurs |
2 | 5899 |
* @since 1.6 |
5900 |
*/ |
|
5901 |
public void setNClob(int parameterIndex, NClob value) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5902 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5903 |
} |
5904 |
||
5905 |
||
5906 |
/** |
|
31061 | 5907 |
* Sets the designated parameter to the given {@code String} object. |
5908 |
* The driver converts this to a SQL {@code NCHAR} or |
|
5909 |
* {@code NVARCHAR} or {@code LONGNVARCHAR} |
|
2 | 5910 |
* @param parameterName the name of the column to be set |
5911 |
* @param value the parameter value |
|
5912 |
* @throws SQLException if the driver does not support national |
|
5913 |
* character sets; if the driver can detect that a data conversion |
|
31061 | 5914 |
* error could occur; or if a database access error occurs |
2 | 5915 |
* @since 1.6 |
5916 |
*/ |
|
5917 |
public void setNString(String parameterName, String value) |
|
5918 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5919 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5920 |
} |
5921 |
||
5922 |
/** |
|
31061 | 5923 |
* Sets the designated parameter to a {@code Reader} object. The |
5924 |
* {@code Reader} reads the data till end-of-file is reached. The |
|
2 | 5925 |
* driver does the necessary conversion from Java character format to |
5926 |
* the national character set in the database. |
|
5927 |
* @param parameterIndex of the first parameter is 1, the second is 2, ... |
|
5928 |
* @param value the parameter value |
|
5929 |
* @param length the number of characters in the parameter data. |
|
5930 |
* @throws SQLException if the driver does not support national |
|
5931 |
* character sets; if the driver can detect that a data conversion |
|
31061 | 5932 |
* error could occur ; or if a database access error occurs |
2 | 5933 |
* @since 1.6 |
5934 |
*/ |
|
5935 |
public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5936 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5937 |
} |
5938 |
||
5939 |
||
5940 |
||
5941 |
/** |
|
31061 | 5942 |
* Sets the designated parameter to a {@code Reader} object. The |
5943 |
* {@code Reader} reads the data till end-of-file is reached. The |
|
2 | 5944 |
* driver does the necessary conversion from Java character format to |
5945 |
* the national character set in the database. |
|
5946 |
* @param parameterName the name of the column to be set |
|
5947 |
* @param value the parameter value |
|
5948 |
* @param length the number of characters in the parameter data. |
|
5949 |
* @throws SQLException if the driver does not support national |
|
5950 |
* character sets; if the driver can detect that a data conversion |
|
5951 |
* error could occur; or if a database access error occurs |
|
5952 |
* @since 1.6 |
|
5953 |
*/ |
|
5954 |
public void setNCharacterStream(String parameterName, Reader value, long length) |
|
5955 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5956 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5957 |
} |
5958 |
||
31061 | 5959 |
/** |
5960 |
* Sets the designated parameter to a {@code Reader} object. The |
|
5961 |
* {@code Reader} reads the data till end-of-file is reached. The |
|
2 | 5962 |
* driver does the necessary conversion from Java character format to |
5963 |
* the national character set in the database. |
|
5964 |
||
5965 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5966 |
* Java stream object or your own subclass that implements the |
|
5967 |
* standard interface. |
|
5968 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5969 |
* it might be more efficient to use a version of |
|
31061 | 5970 |
* {@code setNCharacterStream} which takes a length parameter. |
2 | 5971 |
* |
5972 |
* @param parameterName the name of the parameter |
|
5973 |
* @param value the parameter value |
|
5974 |
* @throws SQLException if the driver does not support national |
|
5975 |
* character sets; if the driver can detect that a data conversion |
|
31061 | 5976 |
* error could occur ; if a database access error occurs; or |
5977 |
* this method is called on a closed {@code CallableStatement} |
|
2 | 5978 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
5979 |
* @since 1.6 |
|
5980 |
*/ |
|
5981 |
public void setNCharacterStream(String parameterName, Reader value) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5982 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5983 |
} |
5984 |
||
5985 |
/** |
|
31061 | 5986 |
* Sets the designated parameter to the given {@code java.sql.Timestamp} value, |
5987 |
* using the given {@code Calendar} object. The driver uses |
|
5988 |
* the {@code Calendar} object to construct an SQL {@code TIMESTAMP} value, |
|
2 | 5989 |
* which the driver then sends to the database. With a |
31061 | 5990 |
* a {@code Calendar} object, the driver can calculate the timestamp |
2 | 5991 |
* taking into account a custom timezone. If no |
31061 | 5992 |
* {@code Calendar} object is specified, the driver uses the default |
2 | 5993 |
* timezone, which is that of the virtual machine running the application. |
5994 |
* |
|
5995 |
* @param parameterName the name of the parameter |
|
5996 |
* @param x the parameter value |
|
31061 | 5997 |
* @param cal the {@code Calendar} object the driver will use |
5998 |
* to construct the timestamp |
|
2 | 5999 |
* @exception SQLException if a database access error occurs or |
31061 | 6000 |
* this method is called on a closed {@code CallableStatement} |
2 | 6001 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 6002 |
* this method |
2 | 6003 |
* @see #getTimestamp |
6004 |
* @since 1.4 |
|
6005 |
*/ |
|
6006 |
public void setTimestamp(String parameterName, java.sql.Timestamp x, Calendar cal) |
|
6007 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6008 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6009 |
} |
6010 |
||
31061 | 6011 |
/** |
6012 |
* Sets the designated parameter to a {@code Reader} object. The {@code reader} must contain the number |
|
6013 |
* of characters specified by length otherwise a {@code SQLException} will be |
|
6014 |
* generated when the {@code CallableStatement} is executed. |
|
6015 |
* This method differs from the {@code setCharacterStream (int, Reader, int)} method |
|
6016 |
* because it informs the driver that the parameter value should be sent to |
|
6017 |
* the server as a {@code CLOB}. When the {@code setCharacterStream} method is used, the |
|
6018 |
* driver may have to do extra work to determine whether the parameter |
|
6019 |
* data should be send to the server as a {@code LONGVARCHAR} or a {@code CLOB} |
|
6020 |
* |
|
6021 |
* @param parameterName the name of the parameter to be set |
|
6022 |
* @param reader An object that contains the data to set the parameter value to. |
|
6023 |
* @param length the number of characters in the parameter data. |
|
6024 |
* @throws SQLException if parameterIndex does not correspond to a parameter |
|
6025 |
* marker in the SQL statement; if the length specified is less than zero; |
|
6026 |
* a database access error occurs or |
|
6027 |
* this method is called on a closed {@code CallableStatement} |
|
6028 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6029 |
* this method |
|
6030 |
* |
|
6031 |
* @since 1.6 |
|
6032 |
*/ |
|
6033 |
public void setClob(String parameterName, Reader reader, long length) |
|
2 | 6034 |
throws SQLException{ |
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6035 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6036 |
} |
6037 |
||
6038 |
||
6039 |
||
6040 |
/** |
|
31061 | 6041 |
* Sets the designated parameter to the given {@code java.sql.Clob} object. |
6042 |
* The driver converts this to an SQL {@code CLOB} value when it |
|
2 | 6043 |
* sends it to the database. |
6044 |
* |
|
6045 |
* @param parameterName the name of the parameter |
|
31061 | 6046 |
* @param x a {@code Clob} object that maps an SQL {@code CLOB} value |
2 | 6047 |
* @exception SQLException if a database access error occurs or |
31061 | 6048 |
* this method is called on a closed {@code CallableStatement} |
2 | 6049 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 6050 |
* this method |
2 | 6051 |
* @since 1.6 |
6052 |
*/ |
|
6053 |
public void setClob (String parameterName, Clob x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6054 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6055 |
} |
6056 |
||
6057 |
/** |
|
31061 | 6058 |
* Sets the designated parameter to a {@code Reader} object. |
6059 |
* This method differs from the {@code setCharacterStream (int, Reader)} method |
|
2 | 6060 |
* because it informs the driver that the parameter value should be sent to |
31061 | 6061 |
* the server as a {@code CLOB}. When the {@code setCharacterStream} method is used, the |
2 | 6062 |
* driver may have to do extra work to determine whether the parameter |
31061 | 6063 |
* data should be send to the server as a {@code LONGVARCHAR} or a {@code CLOB} |
2 | 6064 |
* |
6065 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
6066 |
* it might be more efficient to use a version of |
|
31061 | 6067 |
* {@code setClob} which takes a length parameter. |
2 | 6068 |
* |
6069 |
* @param parameterName the name of the parameter |
|
6070 |
* @param reader An object that contains the data to set the parameter value to. |
|
6071 |
* @throws SQLException if a database access error occurs or this method is called on |
|
31061 | 6072 |
* a closed {@code CallableStatement} |
2 | 6073 |
* |
6074 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
|
6075 |
* @since 1.6 |
|
6076 |
*/ |
|
6077 |
public void setClob(String parameterName, Reader reader) |
|
6078 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6079 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6080 |
} |
6081 |
||
6082 |
||
31061 | 6083 |
/** |
6084 |
* Sets the designated parameter to the given {@code java.sql.Date} value |
|
2 | 6085 |
* using the default time zone of the virtual machine that is running |
6086 |
* the application. |
|
6087 |
* The driver converts this |
|
31061 | 6088 |
* to an SQL {@code DATE} value when it sends it to the database. |
2 | 6089 |
* |
6090 |
* @param parameterName the name of the parameter |
|
6091 |
* @param x the parameter value |
|
6092 |
* @exception SQLException if a database access error occurs or |
|
31061 | 6093 |
* this method is called on a closed {@code CallableStatement} |
2 | 6094 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 6095 |
* this method |
2 | 6096 |
* @see #getDate |
6097 |
* @since 1.4 |
|
6098 |
*/ |
|
6099 |
public void setDate(String parameterName, java.sql.Date x) |
|
6100 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6101 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6102 |
} |
6103 |
||
6104 |
/** |
|
31061 | 6105 |
* Sets the designated parameter to the given {@code java.sql.Date} value, |
6106 |
* using the given {@code Calendar} object. The driver uses |
|
6107 |
* the {@code Calendar} object to construct an SQL {@code DATE} value, |
|
2 | 6108 |
* which the driver then sends to the database. With a |
31061 | 6109 |
* a {@code Calendar} object, the driver can calculate the date |
2 | 6110 |
* taking into account a custom timezone. If no |
31061 | 6111 |
* {@code Calendar} object is specified, the driver uses the default |
2 | 6112 |
* timezone, which is that of the virtual machine running the application. |
6113 |
* |
|
6114 |
* @param parameterName the name of the parameter |
|
6115 |
* @param x the parameter value |
|
31061 | 6116 |
* @param cal the {@code Calendar} object the driver will use |
2 | 6117 |
* to construct the date |
6118 |
* @exception SQLException if a database access error occurs or |
|
31061 | 6119 |
* this method is called on a closed {@code CallableStatement} |
2 | 6120 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 6121 |
* this method |
2 | 6122 |
* @see #getDate |
6123 |
* @since 1.4 |
|
6124 |
*/ |
|
6125 |
public void setDate(String parameterName, java.sql.Date x, Calendar cal) |
|
6126 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6127 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6128 |
} |
6129 |
||
6130 |
||
6131 |
/** |
|
31061 | 6132 |
* Sets the designated parameter to the given {@code java.sql.Time} value. |
2 | 6133 |
* The driver converts this |
31061 | 6134 |
* to an SQL {@code TIME} value when it sends it to the database. |
2 | 6135 |
* |
6136 |
* @param parameterName the name of the parameter |
|
6137 |
* @param x the parameter value |
|
6138 |
* @exception SQLException if a database access error occurs or |
|
31061 | 6139 |
* this method is called on a closed {@code CallableStatement} |
2 | 6140 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 6141 |
* this method |
2 | 6142 |
* @see #getTime |
6143 |
* @since 1.4 |
|
6144 |
*/ |
|
6145 |
public void setTime(String parameterName, java.sql.Time x) |
|
6146 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6147 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6148 |
} |
6149 |
||
6150 |
/** |
|
31061 | 6151 |
* Sets the designated parameter to the given {@code java.sql.Time} value, |
6152 |
* using the given {@code Calendar} object. The driver uses |
|
6153 |
* the {@code Calendar} object to construct an SQL {@code TIME} value, |
|
2 | 6154 |
* which the driver then sends to the database. With a |
31061 | 6155 |
* a {@code Calendar} object, the driver can calculate the time |
2 | 6156 |
* taking into account a custom timezone. If no |
31061 | 6157 |
* {@code Calendar} object is specified, the driver uses the default |
2 | 6158 |
* timezone, which is that of the virtual machine running the application. |
6159 |
* |
|
6160 |
* @param parameterName the name of the parameter |
|
6161 |
* @param x the parameter value |
|
31061 | 6162 |
* @param cal the {@code Calendar} object the driver will use |
2 | 6163 |
* to construct the time |
6164 |
* @exception SQLException if a database access error occurs or |
|
31061 | 6165 |
* this method is called on a closed {@code CallableStatement} |
2 | 6166 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 6167 |
* this method |
2 | 6168 |
* @see #getTime |
6169 |
* @since 1.4 |
|
6170 |
*/ |
|
6171 |
public void setTime(String parameterName, java.sql.Time x, Calendar cal) |
|
6172 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6173 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6174 |
} |
6175 |
||
6176 |
/** |
|
31061 | 6177 |
* Sets the designated parameter to a {@code Reader} object. |
6178 |
* This method differs from the {@code setCharacterStream (int, Reader)} method |
|
2 | 6179 |
* because it informs the driver that the parameter value should be sent to |
31061 | 6180 |
* the server as a {@code CLOB}. When the {@code setCharacterStream} method is used, the |
2 | 6181 |
* driver may have to do extra work to determine whether the parameter |
31061 | 6182 |
* data should be sent to the server as a {@code LONGVARCHAR} or a {@code CLOB} |
2 | 6183 |
* |
6184 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
6185 |
* it might be more efficient to use a version of |
|
31061 | 6186 |
* {@code setClob} which takes a length parameter. |
2 | 6187 |
* |
6188 |
* @param parameterIndex index of the first parameter is 1, the second is 2, ... |
|
6189 |
* @param reader An object that contains the data to set the parameter value to. |
|
6190 |
* @throws SQLException if a database access error occurs, this method is called on |
|
31061 | 6191 |
* a closed {@code PreparedStatement}or if parameterIndex does not correspond to a parameter |
6192 |
* marker in the SQL statement |
|
2 | 6193 |
* |
6194 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
|
6195 |
* @since 1.6 |
|
6196 |
*/ |
|
6197 |
public void setClob(int parameterIndex, Reader reader) |
|
6198 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6199 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6200 |
} |
6201 |
||
6202 |
||
31061 | 6203 |
/** |
6204 |
* Sets the designated parameter to a {@code Reader} object. The reader must contain the number |
|
6205 |
* of characters specified by length otherwise a {@code SQLException} will be |
|
6206 |
* generated when the {@code PreparedStatement} is executed. |
|
6207 |
* This method differs from the {@code setCharacterStream (int, Reader, int)} method |
|
2 | 6208 |
* because it informs the driver that the parameter value should be sent to |
31061 | 6209 |
* the server as a {@code CLOB}. When the {@code setCharacterStream} method is used, the |
2 | 6210 |
* driver may have to do extra work to determine whether the parameter |
31061 | 6211 |
* data should be sent to the server as a {@code LONGVARCHAR} or a {@code CLOB} |
2 | 6212 |
* @param parameterIndex index of the first parameter is 1, the second is 2, ... |
6213 |
* @param reader An object that contains the data to set the parameter value to. |
|
6214 |
* @param length the number of characters in the parameter data. |
|
6215 |
* @throws SQLException if a database access error occurs, this method is called on |
|
31061 | 6216 |
* a closed {@code PreparedStatement}, if parameterIndex does not correspond to a parameter |
2 | 6217 |
* marker in the SQL statement, or if the length specified is less than zero. |
6218 |
* |
|
6219 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
|
6220 |
* @since 1.6 |
|
6221 |
*/ |
|
6222 |
public void setClob(int parameterIndex, Reader reader, long length) |
|
6223 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6224 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6225 |
} |
6226 |
||
6227 |
||
31061 | 6228 |
/** |
6229 |
* Sets the designated parameter to a {@code InputStream} object. The inputstream must contain the number |
|
6230 |
* of characters specified by length otherwise a {@code SQLException} will be |
|
6231 |
* generated when the {@code PreparedStatement} is executed. |
|
6232 |
* This method differs from the {@code setBinaryStream (int, InputStream, int)} |
|
2 | 6233 |
* method because it informs the driver that the parameter value should be |
31061 | 6234 |
* sent to the server as a {@code BLOB}. When the {@code setBinaryStream} method is used, |
2 | 6235 |
* the driver may have to do extra work to determine whether the parameter |
31061 | 6236 |
* data should be sent to the server as a {@code LONGVARBINARY} or a {@code BLOB} |
6237 |
* |
|
2 | 6238 |
* @param parameterIndex index of the first parameter is 1, |
31061 | 6239 |
* the second is 2, ... |
2 | 6240 |
* @param inputStream An object that contains the data to set the parameter |
31061 | 6241 |
* value to. |
2 | 6242 |
* @param length the number of bytes in the parameter data. |
6243 |
* @throws SQLException if a database access error occurs, |
|
31061 | 6244 |
* this method is called on a closed {@code PreparedStatement}, |
6245 |
* if parameterIndex does not correspond |
|
6246 |
* to a parameter marker in the SQL statement, if the length specified |
|
6247 |
* is less than zero or if the number of bytes in the inputstream does not match |
|
6248 |
* the specified length. |
|
2 | 6249 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
6250 |
* |
|
6251 |
* @since 1.6 |
|
6252 |
*/ |
|
6253 |
public void setBlob(int parameterIndex, InputStream inputStream, long length) |
|
6254 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6255 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6256 |
} |
6257 |
||
6258 |
/** |
|
31061 | 6259 |
* Sets the designated parameter to a {@code InputStream} object. |
6260 |
* This method differs from the {@code setBinaryStream (int, InputStream)} |
|
6261 |
* This method differs from the {@code setBinaryStream (int, InputStream)} |
|
2 | 6262 |
* method because it informs the driver that the parameter value should be |
31061 | 6263 |
* sent to the server as a {@code BLOB}. When the {@code setBinaryStream} method is used, |
2 | 6264 |
* the driver may have to do extra work to determine whether the parameter |
31061 | 6265 |
* data should be sent to the server as a {@code LONGVARBINARY} or a {@code BLOB} |
2 | 6266 |
* |
6267 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
6268 |
* it might be more efficient to use a version of |
|
31061 | 6269 |
* {@code setBlob} which takes a length parameter. |
2 | 6270 |
* |
6271 |
* @param parameterIndex index of the first parameter is 1, |
|
31061 | 6272 |
* the second is 2, ... |
6273 |
* |
|
2 | 6274 |
* @param inputStream An object that contains the data to set the parameter |
31061 | 6275 |
* value to. |
2 | 6276 |
* @throws SQLException if a database access error occurs, |
31061 | 6277 |
* this method is called on a closed {@code PreparedStatement} or |
6278 |
* if parameterIndex does not correspond |
|
6279 |
* to a parameter marker in the SQL statement, |
|
2 | 6280 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
6281 |
* |
|
6282 |
* @since 1.6 |
|
6283 |
*/ |
|
6284 |
public void setBlob(int parameterIndex, InputStream inputStream) |
|
6285 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6286 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6287 |
} |
6288 |
||
31061 | 6289 |
/** |
6290 |
* Sets the designated parameter to a {@code InputStream} object. The {@code inputstream} must contain the number |
|
6291 |
* of characters specified by length, otherwise a {@code SQLException} will be |
|
6292 |
* generated when the {@code CallableStatement} is executed. |
|
6293 |
* This method differs from the {@code setBinaryStream (int, InputStream, int)} |
|
6294 |
* method because it informs the driver that the parameter value should be |
|
6295 |
* sent to the server as a {@code BLOB}. When the {@code setBinaryStream} method is used, |
|
6296 |
* the driver may have to do extra work to determine whether the parameter |
|
6297 |
* data should be sent to the server as a {@code LONGVARBINARY} or a {@code BLOB} |
|
6298 |
* |
|
6299 |
* @param parameterName the name of the parameter to be set |
|
6300 |
* the second is 2, ... |
|
6301 |
* |
|
6302 |
* @param inputStream An object that contains the data to set the parameter |
|
6303 |
* value to. |
|
6304 |
* @param length the number of bytes in the parameter data. |
|
6305 |
* @throws SQLException if parameterIndex does not correspond |
|
6306 |
* to a parameter marker in the SQL statement, or if the length specified |
|
6307 |
* is less than zero; if the number of bytes in the inputstream does not match |
|
6308 |
* the specified length; if a database access error occurs or |
|
6309 |
* this method is called on a closed {@code CallableStatement} |
|
6310 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6311 |
* this method |
|
6312 |
* |
|
6313 |
* @since 1.6 |
|
6314 |
*/ |
|
6315 |
public void setBlob(String parameterName, InputStream inputStream, long length) |
|
2 | 6316 |
throws SQLException{ |
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6317 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6318 |
} |
6319 |
||
6320 |
||
31061 | 6321 |
/** |
6322 |
* Sets the designated parameter to the given {@code java.sql.Blob} object. |
|
6323 |
* The driver converts this to an SQL {@code BLOB} value when it |
|
2 | 6324 |
* sends it to the database. |
6325 |
* |
|
6326 |
* @param parameterName the name of the parameter |
|
31061 | 6327 |
* @param x a {@code Blob} object that maps an SQL {@code BLOB} value |
2 | 6328 |
* @exception SQLException if a database access error occurs or |
31061 | 6329 |
* this method is called on a closed {@code CallableStatement} |
2 | 6330 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 6331 |
* this method |
2 | 6332 |
* @since 1.6 |
6333 |
*/ |
|
6334 |
public void setBlob (String parameterName, Blob x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6335 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6336 |
} |
6337 |
||
31061 | 6338 |
/** |
6339 |
* Sets the designated parameter to a {@code InputStream} object. |
|
6340 |
* This method differs from the {@code setBinaryStream (int, InputStream)} |
|
2 | 6341 |
* method because it informs the driver that the parameter value should be |
31061 | 6342 |
* sent to the server as a {@code BLOB}. When the {@code setBinaryStream} method is used, |
2 | 6343 |
* the driver may have to do extra work to determine whether the parameter |
31061 | 6344 |
* data should be send to the server as a {@code LONGVARBINARY} or a {@code BLOB} |
2 | 6345 |
* |
6346 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
6347 |
* it might be more efficient to use a version of |
|
31061 | 6348 |
* {@code setBlob} which takes a length parameter. |
2 | 6349 |
* |
6350 |
* @param parameterName the name of the parameter |
|
6351 |
* @param inputStream An object that contains the data to set the parameter |
|
31061 | 6352 |
* value to. |
2 | 6353 |
* @throws SQLException if a database access error occurs or |
31061 | 6354 |
* this method is called on a closed {@code CallableStatement} |
2 | 6355 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
6356 |
* |
|
6357 |
* @since 1.6 |
|
6358 |
*/ |
|
6359 |
public void setBlob(String parameterName, InputStream inputStream) |
|
6360 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6361 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6362 |
} |
6363 |
||
31061 | 6364 |
/** |
2 | 6365 |
* Sets the value of the designated parameter with the given object. The second |
6366 |
* argument must be an object type; for integral values, the |
|
31061 | 6367 |
* {@code java.lang} equivalent objects should be used. |
2 | 6368 |
* |
6369 |
* <p>The given Java object will be converted to the given targetSqlType |
|
6370 |
* before being sent to the database. |
|
6371 |
* |
|
6372 |
* If the object has a custom mapping (is of a class implementing the |
|
31061 | 6373 |
* interface {@code SQLData}), |
6374 |
* the JDBC driver should call the method {@code SQLData.writeSQL} to write it |
|
2 | 6375 |
* to the SQL data stream. |
6376 |
* If, on the other hand, the object is of a class implementing |
|
31061 | 6377 |
* {@code Ref}, {@code Blob}, {@code Clob}, {@code NClob}, |
6378 |
* {@code Struct}, {@code java.net.URL}, |
|
6379 |
* or {@code Array}, the driver should pass it to the database as a |
|
2 | 6380 |
* value of the corresponding SQL type. |
6381 |
* <P> |
|
6382 |
* Note that this method may be used to pass datatabase- |
|
6383 |
* specific abstract data types. |
|
6384 |
* |
|
6385 |
* @param parameterName the name of the parameter |
|
6386 |
* @param x the object containing the input parameter value |
|
6387 |
* @param targetSqlType the SQL type (as defined in java.sql.Types) to be |
|
6388 |
* sent to the database. The scale argument may further qualify this type. |
|
6389 |
* @param scale for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types, |
|
31061 | 6390 |
* this is the number of digits after the decimal point. For all other |
6391 |
* types, this value will be ignored. |
|
2 | 6392 |
* @exception SQLException if a database access error occurs or |
31061 | 6393 |
* this method is called on a closed {@code CallableStatement} |
6394 |
* @exception SQLFeatureNotSupportedException if {@code targetSqlType} is |
|
6395 |
* an {@code ARRAY, BLOB, CLOB, |
|
6396 |
* DATALINK, JAVA_OBJECT, NCHAR, |
|
6397 |
* NCLOB, NVARCHAR, LONGNVARCHAR, |
|
6398 |
* REF, ROWID, SQLXML} |
|
6399 |
* or {@code STRUCT} data type and the JDBC driver does not support |
|
6400 |
* this data type |
|
2 | 6401 |
* @see Types |
6402 |
* @see #getObject |
|
6403 |
* @since 1.4 |
|
6404 |
*/ |
|
6405 |
public void setObject(String parameterName, Object x, int targetSqlType, int scale) |
|
6406 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6407 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6408 |
} |
6409 |
||
6410 |
/** |
|
6411 |
* Sets the value of the designated parameter with the given object. |
|
31061 | 6412 |
* This method is like the method {@code setObject} |
2 | 6413 |
* above, except that it assumes a scale of zero. |
6414 |
* |
|
6415 |
* @param parameterName the name of the parameter |
|
6416 |
* @param x the object containing the input parameter value |
|
6417 |
* @param targetSqlType the SQL type (as defined in java.sql.Types) to be |
|
6418 |
* sent to the database |
|
6419 |
* @exception SQLException if a database access error occurs or |
|
31061 | 6420 |
* this method is called on a closed {@code CallableStatement} |
6421 |
* @exception SQLFeatureNotSupportedException if {@code targetSqlType} is |
|
6422 |
* an {@code ARRAY, BLOB, CLOB, |
|
6423 |
* DATALINK, JAVA_OBJECT, NCHAR, |
|
6424 |
* NCLOB, NVARCHAR, LONGNVARCHAR, |
|
6425 |
* REF, ROWID, SQLXML} |
|
6426 |
* or {@code STRUCT} data type and the JDBC driver does not support |
|
6427 |
* this data type |
|
2 | 6428 |
* @see #getObject |
6429 |
* @since 1.4 |
|
6430 |
*/ |
|
6431 |
public void setObject(String parameterName, Object x, int targetSqlType) |
|
6432 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6433 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6434 |
} |
6435 |
||
31061 | 6436 |
/** |
2 | 6437 |
* Sets the value of the designated parameter with the given object. |
31061 | 6438 |
* The second parameter must be of type {@code Object}; therefore, the |
6439 |
* {@code java.lang} equivalent objects should be used for built-in types. |
|
2 | 6440 |
* |
6441 |
* <p>The JDBC specification specifies a standard mapping from |
|
31061 | 6442 |
* Java {@code Object} types to SQL types. The given argument |
2 | 6443 |
* will be converted to the corresponding SQL type before being |
6444 |
* sent to the database. |
|
6445 |
* |
|
6446 |
* <p>Note that this method may be used to pass datatabase- |
|
6447 |
* specific abstract data types, by using a driver-specific Java |
|
6448 |
* type. |
|
6449 |
* |
|
31061 | 6450 |
* If the object is of a class implementing the interface {@code SQLData}, |
6451 |
* the JDBC driver should call the method {@code SQLData.writeSQL} |
|
2 | 6452 |
* to write it to the SQL data stream. |
6453 |
* If, on the other hand, the object is of a class implementing |
|
31061 | 6454 |
* {@code Ref}, {@code Blob}, {@code Clob}, {@code NClob}, |
6455 |
* {@code Struct}, {@code java.net.URL}, |
|
6456 |
* or {@code Array}, the driver should pass it to the database as a |
|
2 | 6457 |
* value of the corresponding SQL type. |
6458 |
* <P> |
|
6459 |
* This method throws an exception if there is an ambiguity, for example, if the |
|
6460 |
* object is of a class implementing more than one of the interfaces named above. |
|
6461 |
* |
|
6462 |
* @param parameterName the name of the parameter |
|
6463 |
* @param x the object containing the input parameter value |
|
6464 |
* @exception SQLException if a database access error occurs, |
|
31061 | 6465 |
* this method is called on a closed {@code CallableStatement} or if the given |
6466 |
* {@code Object} parameter is ambiguous |
|
2 | 6467 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 6468 |
* this method |
2 | 6469 |
* @see #getObject |
6470 |
* @since 1.4 |
|
6471 |
*/ |
|
6472 |
public void setObject(String parameterName, Object x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6473 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6474 |
} |
6475 |
||
6476 |
/** |
|
6477 |
* Sets the designated parameter to the given input stream, which will have |
|
6478 |
* the specified number of bytes. |
|
31061 | 6479 |
* When a very large ASCII value is input to a {@code LONGVARCHAR} |
2 | 6480 |
* parameter, it may be more practical to send it via a |
31061 | 6481 |
* {@code java.io.InputStream}. Data will be read from the stream |
2 | 6482 |
* as needed until end-of-file is reached. The JDBC driver will |
6483 |
* do any necessary conversion from ASCII to the database char format. |
|
6484 |
* |
|
6485 |
* <P><B>Note:</B> This stream object can either be a standard |
|
6486 |
* Java stream object or your own subclass that implements the |
|
6487 |
* standard interface. |
|
6488 |
* |
|
6489 |
* @param parameterName the name of the parameter |
|
6490 |
* @param x the Java input stream that contains the ASCII parameter value |
|
6491 |
* @param length the number of bytes in the stream |
|
6492 |
* @exception SQLException if a database access error occurs or |
|
31061 | 6493 |
* this method is called on a closed {@code CallableStatement} |
2 | 6494 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 6495 |
* this method |
2 | 6496 |
* @since 1.4 |
6497 |
*/ |
|
6498 |
public void setAsciiStream(String parameterName, java.io.InputStream x, int length) |
|
6499 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6500 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6501 |
} |
6502 |
||
6503 |
||
6504 |
/** |
|
6505 |
* Sets the designated parameter to the given input stream, which will have |
|
6506 |
* the specified number of bytes. |
|
31061 | 6507 |
* When a very large binary value is input to a {@code LONGVARBINARY} |
2 | 6508 |
* parameter, it may be more practical to send it via a |
31061 | 6509 |
* {@code java.io.InputStream} object. The data will be read from the stream |
2 | 6510 |
* as needed until end-of-file is reached. |
6511 |
* |
|
6512 |
* <P><B>Note:</B> This stream object can either be a standard |
|
6513 |
* Java stream object or your own subclass that implements the |
|
6514 |
* standard interface. |
|
6515 |
* |
|
6516 |
* @param parameterName the name of the parameter |
|
6517 |
* @param x the java input stream which contains the binary parameter value |
|
6518 |
* @param length the number of bytes in the stream |
|
6519 |
* @exception SQLException if a database access error occurs or |
|
31061 | 6520 |
* this method is called on a closed {@code CallableStatement} |
2 | 6521 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 6522 |
* this method |
2 | 6523 |
* @since 1.4 |
6524 |
*/ |
|
6525 |
public void setBinaryStream(String parameterName, java.io.InputStream x, |
|
6526 |
int length) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6527 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6528 |
} |
6529 |
||
6530 |
/** |
|
31061 | 6531 |
* Sets the designated parameter to the given {@code Reader} |
2 | 6532 |
* object, which is the given number of characters long. |
31061 | 6533 |
* When a very large UNICODE value is input to a {@code LONGVARCHAR} |
2 | 6534 |
* parameter, it may be more practical to send it via a |
31061 | 6535 |
* {@code java.io.Reader} object. The data will be read from the stream |
2 | 6536 |
* as needed until end-of-file is reached. The JDBC driver will |
6537 |
* do any necessary conversion from UNICODE to the database char format. |
|
6538 |
* |
|
6539 |
* <P><B>Note:</B> This stream object can either be a standard |
|
6540 |
* Java stream object or your own subclass that implements the |
|
6541 |
* standard interface. |
|
6542 |
* |
|
6543 |
* @param parameterName the name of the parameter |
|
31061 | 6544 |
* @param reader the {@code java.io.Reader} object that |
2 | 6545 |
* contains the UNICODE data used as the designated parameter |
6546 |
* @param length the number of characters in the stream |
|
6547 |
* @exception SQLException if a database access error occurs or |
|
31061 | 6548 |
* this method is called on a closed {@code CallableStatement} |
2 | 6549 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 6550 |
* this method |
2 | 6551 |
* @since 1.4 |
6552 |
*/ |
|
6553 |
public void setCharacterStream(String parameterName, |
|
6554 |
java.io.Reader reader, |
|
6555 |
int length) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6556 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6557 |
} |
6558 |
||
6559 |
/** |
|
6560 |
* Sets the designated parameter to the given input stream. |
|
31061 | 6561 |
* When a very large ASCII value is input to a {@code LONGVARCHAR} |
2 | 6562 |
* parameter, it may be more practical to send it via a |
31061 | 6563 |
* {@code java.io.InputStream}. Data will be read from the stream |
2 | 6564 |
* as needed until end-of-file is reached. The JDBC driver will |
6565 |
* do any necessary conversion from ASCII to the database char format. |
|
6566 |
* |
|
6567 |
* <P><B>Note:</B> This stream object can either be a standard |
|
6568 |
* Java stream object or your own subclass that implements the |
|
6569 |
* standard interface. |
|
6570 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
6571 |
* it might be more efficient to use a version of |
|
31061 | 6572 |
* {@code setAsciiStream} which takes a length parameter. |
2 | 6573 |
* |
6574 |
* @param parameterName the name of the parameter |
|
6575 |
* @param x the Java input stream that contains the ASCII parameter value |
|
6576 |
* @exception SQLException if a database access error occurs or |
|
31061 | 6577 |
* this method is called on a closed {@code CallableStatement} |
2 | 6578 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
31061 | 6579 |
* @since 1.6 |
6580 |
*/ |
|
2 | 6581 |
public void setAsciiStream(String parameterName, java.io.InputStream x) |
6582 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6583 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6584 |
} |
6585 |
||
6586 |
||
6587 |
/** |
|
6588 |
* Sets the designated parameter to the given input stream. |
|
31061 | 6589 |
* When a very large binary value is input to a {@code LONGVARBINARY} |
2 | 6590 |
* parameter, it may be more practical to send it via a |
31061 | 6591 |
* {@code java.io.InputStream} object. The data will be read from the |
2 | 6592 |
* stream as needed until end-of-file is reached. |
6593 |
* |
|
6594 |
* <P><B>Note:</B> This stream object can either be a standard |
|
6595 |
* Java stream object or your own subclass that implements the |
|
6596 |
* standard interface. |
|
6597 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
6598 |
* it might be more efficient to use a version of |
|
31061 | 6599 |
* {@code setBinaryStream} which takes a length parameter. |
2 | 6600 |
* |
6601 |
* @param parameterName the name of the parameter |
|
6602 |
* @param x the java input stream which contains the binary parameter value |
|
6603 |
* @exception SQLException if a database access error occurs or |
|
31061 | 6604 |
* this method is called on a closed {@code CallableStatement} |
2 | 6605 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
6606 |
* @since 1.6 |
|
6607 |
*/ |
|
6608 |
public void setBinaryStream(String parameterName, java.io.InputStream x) |
|
6609 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6610 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6611 |
} |
6612 |
||
6613 |
/** |
|
31061 | 6614 |
* Sets the designated parameter to the given {@code Reader} |
2 | 6615 |
* object. |
31061 | 6616 |
* When a very large UNICODE value is input to a {@code LONGVARCHAR} |
2 | 6617 |
* parameter, it may be more practical to send it via a |
31061 | 6618 |
* {@code java.io.Reader} object. The data will be read from the stream |
2 | 6619 |
* as needed until end-of-file is reached. The JDBC driver will |
6620 |
* do any necessary conversion from UNICODE to the database char format. |
|
6621 |
* |
|
6622 |
* <P><B>Note:</B> This stream object can either be a standard |
|
6623 |
* Java stream object or your own subclass that implements the |
|
6624 |
* standard interface. |
|
6625 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
6626 |
* it might be more efficient to use a version of |
|
31061 | 6627 |
* {@code setCharacterStream} which takes a length parameter. |
2 | 6628 |
* |
6629 |
* @param parameterName the name of the parameter |
|
31061 | 6630 |
* @param reader the {@code java.io.Reader} object that contains the |
2 | 6631 |
* Unicode data |
6632 |
* @exception SQLException if a database access error occurs or |
|
31061 | 6633 |
* this method is called on a closed {@code CallableStatement} |
2 | 6634 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
6635 |
* @since 1.6 |
|
6636 |
*/ |
|
6637 |
public void setCharacterStream(String parameterName, |
|
6638 |
java.io.Reader reader) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6639 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6640 |
} |
6641 |
||
6642 |
/** |
|
6643 |
* Sets the designated parameter to the given |
|
31061 | 6644 |
* {@code java.math.BigDecimal} value. |
6645 |
* The driver converts this to an SQL {@code NUMERIC} value when |
|
2 | 6646 |
* it sends it to the database. |
6647 |
* |
|
6648 |
* @param parameterName the name of the parameter |
|
6649 |
* @param x the parameter value |
|
6650 |
* @exception SQLException if a database access error occurs or |
|
31061 | 6651 |
* this method is called on a closed {@code CallableStatement} |
2 | 6652 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 6653 |
* this method |
2 | 6654 |
* @see #getBigDecimal |
6655 |
* @since 1.4 |
|
6656 |
*/ |
|
6657 |
public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6658 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6659 |
} |
6660 |
||
31061 | 6661 |
/** |
6662 |
* Sets the designated parameter to the given Java {@code String} value. |
|
2 | 6663 |
* The driver converts this |
31061 | 6664 |
* to an SQL {@code VARCHAR} or {@code LONGVARCHAR} value |
2 | 6665 |
* (depending on the argument's |
31061 | 6666 |
* size relative to the driver's limits on {@code VARCHAR} values) |
2 | 6667 |
* when it sends it to the database. |
6668 |
* |
|
6669 |
* @param parameterName the name of the parameter |
|
6670 |
* @param x the parameter value |
|
6671 |
* @exception SQLException if a database access error occurs or |
|
31061 | 6672 |
* this method is called on a closed {@code CallableStatement} |
2 | 6673 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 6674 |
* this method |
2 | 6675 |
* @see #getString |
6676 |
* @since 1.4 |
|
6677 |
*/ |
|
6678 |
public void setString(String parameterName, String x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6679 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6680 |
} |
6681 |
||
6682 |
||
6683 |
||
31061 | 6684 |
/** |
2 | 6685 |
* Sets the designated parameter to the given Java array of bytes. |
31061 | 6686 |
* The driver converts this to an SQL {@code VARBINARY} or |
6687 |
* {@code LONGVARBINARY} (depending on the argument's size relative |
|
6688 |
* to the driver's limits on {@code VARBINARY} values) when it sends |
|
2 | 6689 |
* it to the database. |
6690 |
* |
|
6691 |
* @param parameterName the name of the parameter |
|
6692 |
* @param x the parameter value |
|
6693 |
* @exception SQLException if a database access error occurs or |
|
31061 | 6694 |
* this method is called on a closed {@code CallableStatement} |
2 | 6695 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 6696 |
* this method |
2 | 6697 |
* @see #getBytes |
6698 |
* @since 1.4 |
|
6699 |
*/ |
|
6700 |
public void setBytes(String parameterName, byte x[]) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6701 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6702 |
} |
6703 |
||
6704 |
/** |
|
31061 | 6705 |
* Sets the designated parameter to the given {@code java.sql.Timestamp} value. |
2 | 6706 |
* The driver |
31061 | 6707 |
* converts this to an SQL {@code TIMESTAMP} value when it sends it to the |
2 | 6708 |
* database. |
6709 |
* |
|
6710 |
* @param parameterName the name of the parameter |
|
6711 |
* @param x the parameter value |
|
6712 |
* @exception SQLException if a database access error occurs or |
|
31061 | 6713 |
* this method is called on a closed {@code CallableStatement} |
2 | 6714 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 6715 |
* this method |
2 | 6716 |
* @see #getTimestamp |
6717 |
* @since 1.4 |
|
6718 |
*/ |
|
6719 |
public void setTimestamp(String parameterName, java.sql.Timestamp x) |
|
6720 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6721 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6722 |
} |
6723 |
||
6724 |
/** |
|
31061 | 6725 |
* Sets the designated parameter to SQL {@code NULL}. |
2 | 6726 |
* |
6727 |
* <P><B>Note:</B> You must specify the parameter's SQL type. |
|
6728 |
* |
|
6729 |
* @param parameterName the name of the parameter |
|
31061 | 6730 |
* @param sqlType the SQL type code defined in {@code java.sql.Types} |
2 | 6731 |
* @exception SQLException if a database access error occurs or |
31061 | 6732 |
* this method is called on a closed {@code CallableStatement} |
2 | 6733 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 6734 |
* this method |
2 | 6735 |
* @since 1.4 |
6736 |
*/ |
|
6737 |
public void setNull(String parameterName, int sqlType) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6738 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6739 |
} |
6740 |
||
6741 |
/** |
|
31061 | 6742 |
* Sets the designated parameter to SQL {@code NULL}. |
6743 |
* This version of the method {@code setNull} should |
|
2 | 6744 |
* be used for user-defined types and REF type parameters. Examples |
6745 |
* of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and |
|
6746 |
* named array types. |
|
6747 |
* |
|
6748 |
* <P><B>Note:</B> To be portable, applications must give the |
|
6749 |
* SQL type code and the fully-qualified SQL type name when specifying |
|
6750 |
* a NULL user-defined or REF parameter. In the case of a user-defined type |
|
6751 |
* the name is the type name of the parameter itself. For a REF |
|
6752 |
* parameter, the name is the type name of the referenced type. If |
|
6753 |
* a JDBC driver does not need the type code or type name information, |
|
6754 |
* it may ignore it. |
|
6755 |
* |
|
6756 |
* Although it is intended for user-defined and Ref parameters, |
|
6757 |
* this method may be used to set a null parameter of any JDBC type. |
|
6758 |
* If the parameter does not have a user-defined or REF type, the given |
|
6759 |
* typeName is ignored. |
|
6760 |
* |
|
6761 |
* |
|
6762 |
* @param parameterName the name of the parameter |
|
31061 | 6763 |
* @param sqlType a value from {@code java.sql.Types} |
2 | 6764 |
* @param typeName the fully-qualified name of an SQL user-defined type; |
6765 |
* ignored if the parameter is not a user-defined type or |
|
31061 | 6766 |
* SQL {@code REF} value |
2 | 6767 |
* @exception SQLException if a database access error occurs or |
31061 | 6768 |
* this method is called on a closed {@code CallableStatement} |
2 | 6769 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 6770 |
* this method |
2 | 6771 |
* @since 1.4 |
6772 |
*/ |
|
6773 |
public void setNull (String parameterName, int sqlType, String typeName) |
|
6774 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6775 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6776 |
} |
6777 |
||
6778 |
/** |
|
31061 | 6779 |
* Sets the designated parameter to the given Java {@code boolean} value. |
2 | 6780 |
* The driver converts this |
31061 | 6781 |
* to an SQL {@code BIT} or {@code BOOLEAN} value when it sends it to the database. |
2 | 6782 |
* |
6783 |
* @param parameterName the name of the parameter |
|
6784 |
* @param x the parameter value |
|
6785 |
* @exception SQLException if a database access error occurs or |
|
31061 | 6786 |
* this method is called on a closed {@code CallableStatement} |
2 | 6787 |
* @see #getBoolean |
6788 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
31061 | 6789 |
* this method |
2 | 6790 |
* @since 1.4 |
6791 |
*/ |
|
6792 |
public void setBoolean(String parameterName, boolean x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6793 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6794 |
} |
6795 |
||
6796 |
||
6797 |
||
6798 |
/** |
|
31061 | 6799 |
* Sets the designated parameter to the given Java {@code byte} value. |
2 | 6800 |
* The driver converts this |
31061 | 6801 |
* to an SQL {@code TINYINT} value when it sends it to the database. |
2 | 6802 |
* |
6803 |
* @param parameterName the name of the parameter |
|
6804 |
* @param x the parameter value |
|
6805 |
* @exception SQLException if a database access error occurs or |
|
31061 | 6806 |
* this method is called on a closed {@code CallableStatement} |
2 | 6807 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 6808 |
* this method |
2 | 6809 |
* @see #getByte |
6810 |
* @since 1.4 |
|
6811 |
*/ |
|
6812 |
public void setByte(String parameterName, byte x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6813 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6814 |
} |
6815 |
||
6816 |
||
6817 |
/** |
|
31061 | 6818 |
* Sets the designated parameter to the given Java {@code short} value. |
2 | 6819 |
* The driver converts this |
31061 | 6820 |
* to an SQL {@code SMALLINT} value when it sends it to the database. |
2 | 6821 |
* |
6822 |
* @param parameterName the name of the parameter |
|
6823 |
* @param x the parameter value |
|
6824 |
* @exception SQLException if a database access error occurs or |
|
31061 | 6825 |
* this method is called on a closed {@code CallableStatement} |
2 | 6826 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 6827 |
* this method |
2 | 6828 |
* @see #getShort |
6829 |
* @since 1.4 |
|
6830 |
*/ |
|
6831 |
public void setShort(String parameterName, short x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6832 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6833 |
} |
6834 |
||
6835 |
||
6836 |
/** |
|
31061 | 6837 |
* Sets the designated parameter to the given Java {@code int} value. |
2 | 6838 |
* The driver converts this |
31061 | 6839 |
* to an SQL {@code INTEGER} value when it sends it to the database. |
2 | 6840 |
* |
6841 |
* @param parameterName the name of the parameter |
|
6842 |
* @param x the parameter value |
|
6843 |
* @exception SQLException if a database access error occurs or |
|
31061 | 6844 |
* this method is called on a closed {@code CallableStatement} |
2 | 6845 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 6846 |
* this method |
2 | 6847 |
* @see #getInt |
6848 |
* @since 1.4 |
|
6849 |
*/ |
|
6850 |
public void setInt(String parameterName, int x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6851 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6852 |
} |
6853 |
||
31061 | 6854 |
/** |
6855 |
* Sets the designated parameter to the given Java {@code long} value. |
|
2 | 6856 |
* The driver converts this |
31061 | 6857 |
* to an SQL {@code BIGINT} value when it sends it to the database. |
2 | 6858 |
* |
6859 |
* @param parameterName the name of the parameter |
|
6860 |
* @param x the parameter value |
|
6861 |
* @exception SQLException if a database access error occurs or |
|
31061 | 6862 |
* this method is called on a closed {@code CallableStatement} |
2 | 6863 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 6864 |
* this method |
2 | 6865 |
* @see #getLong |
6866 |
* @since 1.4 |
|
6867 |
*/ |
|
6868 |
public void setLong(String parameterName, long x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6869 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6870 |
} |
6871 |
||
6872 |
||
31061 | 6873 |
/** |
6874 |
* Sets the designated parameter to the given Java {@code float} value. |
|
2 | 6875 |
* The driver converts this |
31061 | 6876 |
* to an SQL {@code FLOAT} value when it sends it to the database. |
2 | 6877 |
* |
6878 |
* @param parameterName the name of the parameter |
|
6879 |
* @param x the parameter value |
|
6880 |
* @exception SQLException if a database access error occurs or |
|
31061 | 6881 |
* this method is called on a closed {@code CallableStatement} |
2 | 6882 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 6883 |
* this method |
2 | 6884 |
* @see #getFloat |
6885 |
* @since 1.4 |
|
6886 |
*/ |
|
6887 |
public void setFloat(String parameterName, float x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6888 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6889 |
} |
6890 |
||
31061 | 6891 |
/** |
6892 |
* Sets the designated parameter to the given Java {@code double} value. |
|
2 | 6893 |
* The driver converts this |
31061 | 6894 |
* to an SQL {@code DOUBLE} value when it sends it to the database. |
2 | 6895 |
* |
6896 |
* @param parameterName the name of the parameter |
|
6897 |
* @param x the parameter value |
|
6898 |
* @exception SQLException if a database access error occurs or |
|
31061 | 6899 |
* this method is called on a closed {@code CallableStatement} |
2 | 6900 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
31061 | 6901 |
* this method |
2 | 6902 |
* @see #getDouble |
6903 |
* @since 1.4 |
|
6904 |
*/ |
|
6905 |
public void setDouble(String parameterName, double x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6906 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6907 |
} |
6908 |
||
6909 |
/** |
|
6910 |
* This method re populates the resBundle |
|
6911 |
* during the deserialization process |
|
6912 |
*/ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6913 |
private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { |
2 | 6914 |
// Default state initialization happens here |
6915 |
ois.defaultReadObject(); |
|
6916 |
// Initialization of transient Res Bundle happens here . |
|
6917 |
try { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6918 |
resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle(); |
2 | 6919 |
} catch(IOException ioe) {} |
6920 |
||
6921 |
} |
|
6922 |
||
6923 |
static final long serialVersionUID = -3591946023893483003L; |
|
6540 | 6924 |
|
6925 |
//------------------------- JDBC 4.1 ----------------------------------- |
|
6926 |
||
6927 |
public <T> T getObject(int columnIndex, Class<T> type) throws SQLException { |
|
6928 |
throw new SQLFeatureNotSupportedException("Not supported yet."); |
|
6929 |
} |
|
6930 |
||
6931 |
public <T> T getObject(String columnLabel, Class<T> type) throws SQLException { |
|
6932 |
throw new SQLFeatureNotSupportedException("Not supported yet."); |
|
6933 |
} |
|
2 | 6934 |
} |