author | martin |
Thu, 30 Oct 2014 07:31:41 -0700 | |
changeset 28059 | e576535359cc |
parent 25859 | 3317bb8137f4 |
child 31061 | fead7d86d75f |
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 |
/** |
|
38 |
* The standard implementation of the <code>JdbcRowSet</code> 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 |
/** |
|
47 |
* The <code>Connection</code> object that is this rowset's |
|
48 |
* current connection to the database. This field is set |
|
49 |
* internally when the connection is established. |
|
50 |
*/ |
|
51 |
private Connection conn; |
|
52 |
||
53 |
/** |
|
54 |
* The <code>PreparedStatement</code> object that is this rowset's |
|
55 |
* current command. This field is set internally when the method |
|
56 |
* <code>execute</code> creates the <code>PreparedStatement</code> |
|
57 |
* object. |
|
58 |
*/ |
|
59 |
private PreparedStatement ps; |
|
60 |
||
61 |
/** |
|
62 |
* The <code>ResultSet</code> object that is this rowset's |
|
63 |
* current result set. This field is set internally when the method |
|
64 |
* <code>execute</code> executes the rowset's command and thereby |
|
65 |
* creates the rowset's <code>ResultSet</code> object. |
|
66 |
*/ |
|
67 |
private ResultSet rs; |
|
68 |
||
69 |
/** |
|
21278 | 70 |
* The <code>RowSetMetaDataImpl</code> object that is constructed when |
2 | 71 |
* a <code>ResultSet</code> object is passed to the <code>JdbcRowSet</code> |
72 |
* constructor. This helps in constructing all metadata associated |
|
73 |
* with the <code>ResultSet</code> object using the setter methods of |
|
74 |
* <code>RowSetMetaDataImpl</code>. |
|
75 |
*/ |
|
76 |
private RowSetMetaDataImpl rowsMD; |
|
77 |
||
78 |
/** |
|
79 |
* The <code>ResultSetMetaData</code> object from which this |
|
80 |
* <code>RowSetMetaDataImpl</code> is formed and which helps in getting |
|
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 |
/** |
|
100 |
* Constructs a default <code>JdbcRowSet</code> object. |
|
101 |
* The new instance of <code>JdbcRowSet</code> will serve as a proxy |
|
102 |
* for the <code>ResultSet</code> object it creates, and by so doing, |
|
103 |
* it will make it possible to use the result set as a JavaBeans |
|
104 |
* component. |
|
105 |
* <P> |
|
106 |
* The following is true of a default <code>JdbcRowSet</code> instance: |
|
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 |
|
117 |
* <LI>Has its connection's type map set to <code>null</code> |
|
118 |
* <LI>Has an empty <code>Hashtable</code> object for storing any |
|
119 |
* parameters that are set |
|
120 |
* </UL> |
|
121 |
* A newly created <code>JdbcRowSet</code> object must have its |
|
122 |
* <code>execute</code> method invoked before other public methods |
|
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 |
|
127 |
* to calling the <code>execute</code> method; [2] if invalid JDBC driver |
|
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 |
/** |
|
220 |
* Constructs a default <code>JdbcRowSet</code> object given a |
|
221 |
* valid <code>Connection</code> object. The new |
|
222 |
* instance of <code>JdbcRowSet</code> will serve as a proxy for |
|
223 |
* the <code>ResultSet</code> object it creates, and by so doing, |
|
224 |
* it will make it possible to use the result set as a JavaBeans |
|
225 |
* component. |
|
226 |
* <P> |
|
227 |
* The following is true of a default <code>JdbcRowSet</code> instance: |
|
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 |
|
238 |
* <LI>Has its connection's type map set to <code>null</code> |
|
239 |
* <LI>Has an empty <code>Hashtable</code> object for storing any |
|
240 |
* parameters that are set |
|
241 |
* </UL> |
|
242 |
* A newly created <code>JdbcRowSet</code> object must have its |
|
243 |
* <code>execute</code> method invoked before other public methods |
|
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 |
|
248 |
* to calling the <code>execute</code> method, [2] if invalid JDBC driver |
|
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 |
/** |
|
292 |
* Constructs a default <code>JdbcRowSet</code> object using the |
|
293 |
* URL, username, and password arguments supplied. The new |
|
294 |
* instance of <code>JdbcRowSet</code> will serve as a proxy for |
|
295 |
* the <code>ResultSet</code> object it creates, and by so doing, |
|
296 |
* it will make it possible to use the result set as a JavaBeans |
|
297 |
* component. |
|
298 |
* |
|
299 |
* <P> |
|
300 |
* The following is true of a default <code>JdbcRowSet</code> instance: |
|
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 |
|
311 |
* <LI>Has its connection's type map set to <code>null</code> |
|
312 |
* <LI>Has an empty <code>Hashtable</code> object for storing any |
|
313 |
* parameters that are set |
|
314 |
* </UL> |
|
315 |
* |
|
316 |
* @param url - a JDBC URL for the database to which this <code>JdbcRowSet</code> |
|
317 |
* object will be connected. The form for a JDBC URL is |
|
318 |
* <code>jdbc:subprotocol:subname</code>. |
|
319 |
* @param user - the database user on whose behalf the connection |
|
320 |
* is being made |
|
321 |
* @param password - the user's password |
|
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 |
/** |
|
375 |
* Constructs a <code>JdbcRowSet</code> object using the given valid |
|
376 |
* <code>ResultSet</code> object. The new |
|
377 |
* instance of <code>JdbcRowSet</code> will serve as a proxy for |
|
378 |
* the <code>ResultSet</code> object, and by so doing, |
|
379 |
* it will make it possible to use the result set as a JavaBeans |
|
380 |
* component. |
|
381 |
* |
|
382 |
* <P> |
|
383 |
* The following is true of a default <code>JdbcRowSet</code> instance: |
|
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 |
|
394 |
* <LI>Has its connection's type map set to <code>null</code> |
|
395 |
* <LI>Has an empty <code>Hashtable</code> object for storing any |
|
396 |
* parameters that are set |
|
397 |
* </UL> |
|
398 |
* |
|
399 |
* @param res a valid <code>ResultSet</code> object |
|
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 |
/** |
|
463 |
* Initializes the given <code>RowSetMetaData</code> object with the values |
|
464 |
* in the given <code>ResultSetMetaData</code> object. |
|
465 |
* |
|
466 |
* @param md the <code>RowSetMetaData</code> object for this |
|
467 |
* <code>JdbcRowSetImpl</code> object, which will be set with |
|
468 |
* values from rsmd |
|
469 |
* @param rsmd the <code>ResultSetMetaData</code> object from which new |
|
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 |
/** |
|
514 |
* Creates the internal <code>ResultSet</code> object for which this |
|
515 |
* <code>JdbcRowSet</code> object is a wrapper, effectively |
|
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 |
|
520 |
* query that will create the result set. If a <code>DataSource</code> |
|
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 |
|
523 |
* <code>DriverManager</code> will be used, the properties for the |
|
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 |
|
530 |
* to new values. The <code>execute</code> method will use the value |
|
531 |
* for the command property to create a <code>PreparedStatement</code> |
|
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 |
/** |
|
787 |
* Moves the cursor for this rowset's <code>ResultSet</code> |
|
788 |
* object down one row from its current position. |
|
789 |
* A <code>ResultSet</code> cursor is initially positioned |
|
790 |
* before the first row; the first call to the method |
|
791 |
* <code>next</code> makes the first row the current row; the |
|
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 |
|
795 |
* to the method <code>next</code> will |
|
796 |
* implicitly close it. A <code>ResultSet</code> object's |
|
797 |
* warning chain is cleared when a new row is read. |
|
798 |
* |
|
799 |
* @return <code>true</code> if the new current row is valid; |
|
800 |
* <code>false</code> if there are no more rows |
|
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 |
/** |
|
814 |
* Releases this rowset's <code>ResultSet</code> object's database and |
|
815 |
* JDBC resources immediately instead of waiting for |
|
816 |
* this to happen when it is automatically closed. |
|
817 |
* |
|
818 |
* <P><B>Note:</B> A <code>ResultSet</code> object |
|
819 |
* is automatically closed by the |
|
820 |
* <code>Statement</code> object that generated it when |
|
821 |
* that <code>Statement</code> object is closed, |
|
822 |
* re-executed, or is used to retrieve the next result from a |
|
823 |
* sequence of multiple results. A <code>ResultSet</code> object |
|
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 |
|
839 |
* <code>ResultSet</code> object had a value of SQL <code>NULL</code>. |
|
840 |
* Note that you must first call one of the <code>getXXX</code> methods |
|
841 |
* on a column to try to read its value and then call |
|
842 |
* the method <code>wasNull</code> to see if the value read was |
|
843 |
* SQL <code>NULL</code>. |
|
844 |
* |
|
845 |
* @return <code>true</code> if the last column value read was SQL |
|
846 |
* <code>NULL</code> and <code>false</code> otherwise |
|
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 |
|
863 |
* of this rowset's <code>ResultSet</code> object as |
|
864 |
* a <code>String</code>. |
|
865 |
* |
|
866 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
867 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
868 |
* value returned is <code>null</code> |
|
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 |
|
881 |
* of this rowset's <code>ResultSet</code> object as |
|
882 |
* a <code>boolean</code>. |
|
883 |
* |
|
884 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
885 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
886 |
* value returned is <code>false</code> |
|
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 |
|
899 |
* of this rowset's <code>ResultSet</code> object as |
|
900 |
* a <code>byte</code>. |
|
901 |
* |
|
902 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
903 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
904 |
* value returned is <code>0</code> |
|
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 |
|
917 |
* of this rowset's <code>ResultSet</code> object as |
|
918 |
* a <code>short</code>. |
|
919 |
* |
|
920 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
921 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
922 |
* value returned is <code>0</code> |
|
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 |
|
935 |
* of this rowset's <code>ResultSet</code> object as |
|
936 |
* an <code>int</code>. |
|
937 |
* |
|
938 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
939 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
940 |
* value returned is <code>0</code> |
|
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 |
|
953 |
* of this rowset's <code>ResultSet</code> object as |
|
954 |
* a <code>long</code>. |
|
955 |
* |
|
956 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
957 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
958 |
* value returned is <code>0</code> |
|
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 |
|
971 |
* of this rowset's <code>ResultSet</code> object as |
|
972 |
* a <code>float</code>. |
|
973 |
* |
|
974 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
975 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
976 |
* value returned is <code>0</code> |
|
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 |
|
989 |
* of this rowset's <code>ResultSet</code> object as |
|
990 |
* a <code>double</code>. |
|
991 |
* |
|
992 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
993 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
994 |
* value returned is <code>0</code> |
|
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 |
|
1007 |
* of this rowset's <code>ResultSet</code> object as |
|
1008 |
* a <code>java.sql.BigDecimal</code>. |
|
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 |
|
1012 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
1013 |
* value returned is <code>null</code> |
|
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 |
|
1028 |
* of this rowset's <code>ResultSet</code> object as |
|
1029 |
* a <code>byte</code> array in the Java programming language. |
|
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 |
|
1033 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
1034 |
* value returned is <code>null</code> |
|
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 |
|
1047 |
* of this rowset's <code>ResultSet</code> object as |
|
1048 |
* a <code>java.sql.Date</code> object in the Java programming language. |
|
1049 |
* |
|
1050 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
1051 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
1052 |
* value returned is <code>null</code> |
|
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 |
|
1065 |
* of this rowset's <code>ResultSet</code> object as |
|
1066 |
* a <code>java.sql.Time</code> object in the Java programming language. |
|
1067 |
* |
|
1068 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
1069 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
1070 |
* value returned is <code>null</code> |
|
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 |
|
1083 |
* of this rowset's <code>ResultSet</code> object as |
|
1084 |
* a <code>java.sql.Timestamp</code> object in the Java programming language. |
|
1085 |
* |
|
1086 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
1087 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
1088 |
* value returned is <code>null</code> |
|
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 |
|
1101 |
* of this rowset's <code>ResultSet</code> object as |
|
1102 |
* a stream of ASCII characters. The value can then be read in chunks from the |
|
1103 |
* stream. This method is particularly |
|
1104 |
* suitable for retrieving large <code>LONGVARCHAR</code> values. |
|
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 |
|
1110 |
* call to a <code>getXXX</code> method implicitly closes the stream. Also, a |
|
1111 |
* stream may return <code>0</code> when the method |
|
1112 |
* <code>InputStream.available</code> |
|
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 |
|
1117 |
* as a stream of one-byte ASCII characters; |
|
1118 |
* if the value is SQL <code>NULL</code>, the |
|
1119 |
* value returned is <code>null</code> |
|
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 |
|
1132 |
* of this rowset's <code>ResultSet</code> object as |
|
1133 |
* as a stream of Unicode characters. |
|
1134 |
* The value can then be read in chunks from the |
|
1135 |
* stream. This method is particularly |
|
1136 |
* suitable for retrieving large<code>LONGVARCHAR</code>values. The JDBC driver will |
|
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 |
|
1143 |
* call to a <code>getXXX</code> method implicitly closes the stream. Also, a |
|
1144 |
* stream may return <code>0</code> when the method |
|
1145 |
* <code>InputStream.available</code> |
|
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 |
|
1150 |
* as a stream in Java UTF-8 byte format; |
|
1151 |
* if the value is SQL <code>NULL</code>, the value returned is <code>null</code> |
|
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 |
|
1155 |
* @deprecated use <code>getCharacterStream</code> in place of |
|
1156 |
* <code>getUnicodeStream</code> |
|
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 |
|
1168 |
* of this rowset's <code>ResultSet</code> object as a binary stream of |
|
1169 |
* uninterpreted bytes. The value can then be read in chunks from the |
|
1170 |
* stream. This method is particularly |
|
1171 |
* suitable for retrieving large <code>LONGVARBINARY</code> values. |
|
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 |
|
1175 |
* call to a <code>getXXX</code> method implicitly closes the stream. Also, a |
|
1176 |
* stream may return <code>0</code> when the method |
|
1177 |
* <code>InputStream.available</code> |
|
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 |
|
1182 |
* as a stream of uninterpreted bytes; |
|
1183 |
* if the value is SQL <code>NULL</code>, the value returned is <code>null</code> |
|
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 |
|
1201 |
* of this rowset's <code>ResultSet</code> object as |
|
1202 |
* a <code>String</code>. |
|
1203 |
* |
|
1204 |
* @param columnName the SQL name of the column |
|
1205 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
1206 |
* value returned is <code>null</code> |
|
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 |
|
1217 |
* of this rowset's <code>ResultSet</code> object as |
|
1218 |
* a <code>boolean</code>. |
|
1219 |
* |
|
1220 |
* @param columnName the SQL name of the column |
|
1221 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
1222 |
* value returned is <code>false</code> |
|
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 |
|
1233 |
* of this rowset's <code>ResultSet</code> object as |
|
1234 |
* a <code>byte</code>. |
|
1235 |
* |
|
1236 |
* @param columnName the SQL name of the column |
|
1237 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
1238 |
* value returned is <code>0</code> |
|
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 |
|
1249 |
* of this rowset's <code>ResultSet</code> object as |
|
1250 |
* a <code>short</code>. |
|
1251 |
* |
|
1252 |
* @param columnName the SQL name of the column |
|
1253 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
1254 |
* value returned is <code>0</code> |
|
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 |
|
1265 |
* of this rowset's <code>ResultSet</code> object as |
|
1266 |
* an <code>int</code>. |
|
1267 |
* |
|
1268 |
* @param columnName the SQL name of the column |
|
1269 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
1270 |
* value returned is <code>0</code> |
|
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 |
|
1281 |
* of this rowset's <code>ResultSet</code> object as |
|
1282 |
* a <code>long</code>. |
|
1283 |
* |
|
1284 |
* @param columnName the SQL name of the column |
|
1285 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
1286 |
* value returned is <code>0</code> |
|
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 |
|
1297 |
* of this rowset's <code>ResultSet</code> object as |
|
1298 |
* a <code>float</code>. |
|
1299 |
* |
|
1300 |
* @param columnName the SQL name of the column |
|
1301 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
1302 |
* value returned is <code>0</code> |
|
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 |
|
1313 |
* of this rowset's <code>ResultSet</code> object as |
|
1314 |
* a <code>double</code>. |
|
1315 |
* |
|
1316 |
* @param columnName the SQL name of the column |
|
1317 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
1318 |
* value returned is <code>0</code> |
|
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 |
|
1329 |
* of this rowset's <code>ResultSet</code> object as |
|
1330 |
* a <code>java.math.BigDecimal</code>. |
|
1331 |
* |
|
1332 |
* @param columnName the SQL name of the column |
|
1333 |
* @param scale the number of digits to the right of the decimal point |
|
1334 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
1335 |
* value returned is <code>null</code> |
|
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 |
|
1348 |
* of this rowset's <code>ResultSet</code> object as |
|
1349 |
* a <code>byte</code> array in the Java programming language. |
|
1350 |
* The bytes represent the raw values returned by the driver. |
|
1351 |
* |
|
1352 |
* @param columnName the SQL name of the column |
|
1353 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
1354 |
* value returned is <code>null</code> |
|
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 |
|
1365 |
* of this rowset's <code>ResultSet</code> object as |
|
1366 |
* a <code>java.sql.Date</code> object in the Java programming language. |
|
1367 |
* |
|
1368 |
* @param columnName the SQL name of the column |
|
1369 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
1370 |
* value returned is <code>null</code> |
|
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 |
|
1381 |
* of this rowset's <code>ResultSet</code> object as |
|
1382 |
* a <code>java.sql.Time</code> object in the Java programming language. |
|
1383 |
* |
|
1384 |
* @param columnName the SQL name of the column |
|
1385 |
* @return the column value; |
|
1386 |
* if the value is SQL <code>NULL</code>, |
|
1387 |
* the value returned is <code>null</code> |
|
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 |
|
1398 |
* of this rowset's <code>ResultSet</code> object as |
|
1399 |
* a <code>java.sql.Timestamp</code> object. |
|
1400 |
* |
|
1401 |
* @param columnName the SQL name of the column |
|
1402 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
1403 |
* value returned is <code>null</code> |
|
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 |
|
1414 |
* of this rowset's <code>ResultSet</code> object as a stream of |
|
1415 |
* ASCII characters. The value can then be read in chunks from the |
|
1416 |
* stream. This method is particularly |
|
1417 |
* suitable for retrieving large <code>LONGVARCHAR</code> values. |
|
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 |
|
1423 |
* call to a <code>getXXX</code> method implicitly closes the stream. Also, a |
|
1424 |
* stream may return <code>0</code> when the method <code>available</code> |
|
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 |
|
1429 |
* as a stream of one-byte ASCII characters. |
|
1430 |
* If the value is SQL <code>NULL</code>, |
|
1431 |
* the value returned is <code>null</code>. |
|
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 |
|
1442 |
* of this rowset's <code>ResultSet</code> object as a stream of |
|
1443 |
* Unicode characters. The value can then be read in chunks from the |
|
1444 |
* stream. This method is particularly |
|
1445 |
* suitable for retrieving large <code>LONGVARCHAR</code> values. |
|
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 |
|
1453 |
* call to a <code>getXXX</code> method implicitly closes the stream. Also, a |
|
1454 |
* stream may return <code>0</code> when the method <code>available</code> |
|
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 |
|
1459 |
* as a stream of two-byte Unicode characters. |
|
1460 |
* If the value is SQL <code>NULL</code>, |
|
1461 |
* the value returned is <code>null</code>. |
|
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 |
|
1474 |
* of this rowset's <code>ResultSet</code> object as a stream of uninterpreted |
|
1475 |
* <code>byte</code>s. |
|
1476 |
* The value can then be read in chunks from the |
|
1477 |
* stream. This method is particularly |
|
1478 |
* suitable for retrieving large <code>LONGVARBINARY</code> |
|
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 |
|
1483 |
* call to a <code>getXXX</code> method implicitly closes the stream. Also, a |
|
1484 |
* stream may return <code>0</code> when the method <code>available</code> |
|
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 |
|
1489 |
* as a stream of uninterpreted bytes; |
|
1490 |
* if the value is SQL <code>NULL</code>, the result is <code>null</code> |
|
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 |
|
1506 |
* <code>ResultSet</code> object. |
|
1507 |
* Subsequent warnings on this rowset's <code>ResultSet</code> object |
|
1508 |
* will be chained to the <code>SQLWarning</code> object that |
|
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 |
|
1515 |
* by <code>ResultSet</code> methods. Any warning caused by |
|
1516 |
* <code>Statement</code> methods |
|
1517 |
* (such as reading OUT parameters) will be chained on the |
|
1518 |
* <code>Statement</code> object. |
|
1519 |
* |
|
1520 |
* @return the first <code>SQLWarning</code> object reported or <code>null</code> |
|
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 |
/** |
|
1532 |
* Clears all warnings reported on this rowset's <code>ResultSet</code> object. |
|
1533 |
* After this method is called, the method <code>getWarnings</code> |
|
1534 |
* returns <code>null</code> until a new warning is |
|
1535 |
* reported for this rowset's <code>ResultSet</code> object. |
|
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 |
/** |
|
1548 |
* Gets the name of the SQL cursor used by this rowset's <code>ResultSet</code> |
|
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 |
|
1555 |
* level to support update, the cursor's <code>select</code> statement should be |
|
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 |
|
1560 |
* SQL cursor used by a <code>ResultSet</code> object. |
|
1561 |
* The current row of a <code>ResultSet</code> object |
|
1562 |
* is also the current row of this SQL cursor. |
|
1563 |
* |
|
1564 |
* <P><B>Note:</B> If positioned update is not supported, a |
|
1565 |
* <code>SQLException</code> is thrown. |
|
1566 |
* |
|
1567 |
* @return the SQL name for this rowset's <code>ResultSet</code> object's cursor |
|
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 |
|
1580 |
* this rowset's <code>ResultSet</code> object's columns. |
|
1581 |
* |
|
1582 |
* @return the description of this rowset's <code>ResultSet</code> |
|
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 |
|
1610 |
* of this rowset's <code>ResultSet</code> object as |
|
1611 |
* an <code>Object</code>. |
|
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 |
|
1623 |
* <code>getObject</code> is extended to materialize |
|
1624 |
* data of SQL user-defined types. When a column contains |
|
1625 |
* a structured or distinct value, the behavior of this method is as |
|
1626 |
* if it were a call to: <code>getObject(columnIndex, |
|
1627 |
* this.getStatement().getConnection().getTypeMap())</code>. |
|
1628 |
* |
|
1629 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
1630 |
* @return a <code>java.lang.Object</code> holding the column value |
|
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 |
|
1643 |
* of this rowset's <code>ResultSet</code> object as |
|
1644 |
* an <code>Object</code>. |
|
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 |
|
1656 |
* <code>getObject</code> is extended to materialize |
|
1657 |
* data of SQL user-defined types. When a column contains |
|
1658 |
* a structured or distinct value, the behavior of this method is as |
|
1659 |
* if it were a call to: <code>getObject(columnIndex, |
|
1660 |
* this.getStatement().getConnection().getTypeMap())</code>. |
|
1661 |
* |
|
1662 |
* @param columnName the SQL name of the column |
|
1663 |
* @return a <code>java.lang.Object</code> holding the column value |
|
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 |
/** |
|
1675 |
* Maps the given <code>JdbcRowSetImpl</code> column name to its |
|
1676 |
* <code>JdbcRowSetImpl</code> column index and reflects this on |
|
1677 |
* the internal <code>ResultSet</code> object. |
|
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 |
|
1700 |
* of this rowset's <code>ResultSet</code> object as a |
|
1701 |
* <code>java.io.Reader</code> object. |
|
1702 |
* @return a <code>java.io.Reader</code> object that contains the column |
|
1703 |
* value; if the value is SQL <code>NULL</code>, the value returned is |
|
1704 |
* <code>null</code>. |
|
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 |
|
1716 |
* of this rowset's <code>ResultSet</code> object as a |
|
1717 |
* <code>java.io.Reader</code> object. |
|
1718 |
* |
|
1719 |
* @return a <code>java.io.Reader</code> object that contains the column |
|
1720 |
* value; if the value is SQL <code>NULL</code>, the value returned is |
|
1721 |
* <code>null</code>. |
|
1722 |
* @param columnName the name of the column |
|
1723 |
* @return the value in the specified column as a <code>java.io.Reader</code> |
|
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 |
|
1732 |
* of this rowset's <code>ResultSet</code> object as a |
|
1733 |
* <code>java.math.BigDecimal</code> with full precision. |
|
1734 |
* |
|
1735 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
1736 |
* @return the column value (full precision); |
|
1737 |
* if the value is SQL <code>NULL</code>, the value returned is |
|
1738 |
* <code>null</code>. |
|
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 |
|
1751 |
* of this rowset's <code>ResultSet</code> object as a |
|
1752 |
* <code>java.math.BigDecimal</code> with full precision. |
|
1753 |
* |
|
1754 |
* @param columnName the column name |
|
1755 |
* @return the column value (full precision); |
|
1756 |
* if the value is SQL <code>NULL</code>, the value returned is |
|
1757 |
* <code>null</code>. |
|
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 |
|
1772 |
* this rowset's <code>ResultSet</code> object. |
|
1773 |
* |
|
1774 |
* @return <code>true</code> if the cursor is before the first row; |
|
1775 |
* <code>false</code> if the cursor is at any other position or the |
|
1776 |
* result set contains no rows |
|
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 |
|
1789 |
* this rowset's <code>ResultSet</code> object. |
|
1790 |
* |
|
1791 |
* @return <code>true</code> if the cursor is after the last row; |
|
1792 |
* <code>false</code> if the cursor is at any other position or the |
|
1793 |
* result set contains no rows |
|
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 |
|
1806 |
* this rowset's <code>ResultSet</code> object. |
|
1807 |
* |
|
1808 |
* @return <code>true</code> if the cursor is on the first row; |
|
1809 |
* <code>false</code> otherwise |
|
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 |
|
1822 |
* this rowset's <code>ResultSet</code> object. |
|
1823 |
* Note: Calling the method <code>isLast</code> may be expensive |
|
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 |
* |
|
1828 |
* @return <code>true</code> if the cursor is on the last row; |
|
1829 |
* <code>false</code> otherwise |
|
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 |
|
1843 |
* this rowset's <code>ResultSet</code> object, just before the |
|
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, |
|
1847 |
* (2) the result set type is <code>TYPE_FORWARD_ONLY</code>, |
|
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 |
|
1860 |
* this rowset's <code>ResultSet</code> object, just after the |
|
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, |
|
1863 |
* (2) the result set type is <code>TYPE_FORWARD_ONLY</code>, |
|
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 |
|
1876 |
* this rowset's <code>ResultSet</code> object. |
|
1877 |
* |
|
1878 |
* @return <code>true</code> if the cursor is on a valid row; |
|
1879 |
* <code>false</code> if there are no rows in the result set |
|
1880 |
* @throws SQLException if (1) a database access error occurs, |
|
1881 |
* (2) the result set type is <code>TYPE_FORWARD_ONLY</code>, |
|
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 |
|
1896 |
* this rowset's <code>ResultSet</code> object. |
|
1897 |
* |
|
1898 |
* @return <code>true</code> if the cursor is on a valid row; |
|
1899 |
* <code>false</code> if there are no rows in the result set |
|
1900 |
* @throws SQLException if (1) a database access error occurs, |
|
1901 |
* (2) the result set type is <code>TYPE_FORWARD_ONLY</code>, |
|
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 |
* |
|
1917 |
* @return the current row number; <code>0</code> if there is no current row |
|
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 |
|
1930 |
* this rowset's internal <code>ResultSet</code> object. |
|
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 |
|
1940 |
* <code>absolute(-1)</code> positions the |
|
1941 |
* cursor on the last row, calling the method <code>absolute(-2)</code> |
|
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 |
* |
|
1948 |
* <p><B>Note:</B> Calling <code>absolute(1)</code> is the same |
|
1949 |
* as calling <code>first()</code>. Calling <code>absolute(-1)</code> |
|
1950 |
* is the same as calling <code>last()</code>. |
|
1951 |
* |
|
1952 |
* @return <code>true</code> if the cursor is on the result set; |
|
1953 |
* <code>false</code> otherwise |
|
1954 |
* @throws SQLException if (1) a database access error occurs, |
|
1955 |
* (2) the row is <code>0</code>, (3) the result set |
|
1956 |
* type is <code>TYPE_FORWARD_ONLY</code>, or (4) this |
|
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 |
|
1972 |
* the first/last row. Calling <code>relative(0)</code> is valid, but does |
|
1973 |
* not change the cursor position. |
|
1974 |
* |
|
1975 |
* <p>Note: Calling the method <code>relative(1)</code> |
|
1976 |
* is different from calling the method <code>next()</code> |
|
1977 |
* because is makes sense to call <code>next()</code> when there |
|
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 |
* |
|
1982 |
* @return <code>true</code> if the cursor is on a row; |
|
1983 |
* <code>false</code> otherwise |
|
1984 |
* @throws SQLException if (1) a database access error occurs, |
|
1985 |
* (2) there is no current row, (3) the result set |
|
1986 |
* type is <code>TYPE_FORWARD_ONLY</code>, or (4) this |
|
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 |
|
2000 |
* <code>ResultSet</code> object. |
|
2001 |
* |
|
2002 |
* <p><B>Note:</B> Calling the method <code>previous()</code> is not the same as |
|
2003 |
* calling the method <code>relative(-1)</code> because it |
|
2004 |
* makes sense to call <code>previous()</code> when there is no current row. |
|
2005 |
* |
|
2006 |
* @return <code>true</code> if the cursor is on a valid row; |
|
2007 |
* <code>false</code> if it is off the result set |
|
2008 |
* @throws SQLException if (1) a database access error occurs, |
|
2009 |
* (2) the result set type is <code>TYPE_FORWARD_ONLY</code>, |
|
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 |
|
2023 |
* <code>ResultSet</code> object will be processed. |
|
2024 |
* The initial value is determined by the |
|
2025 |
* <code>Statement</code> object |
|
2026 |
* that produced this rowset's <code>ResultSet</code> object. |
|
2027 |
* The fetch direction may be changed at any time. |
|
2028 |
* |
|
2029 |
* @throws SQLException if (1) a database access error occurs, |
|
2030 |
* (2) the result set type is <code>TYPE_FORWARD_ONLY</code> |
|
2031 |
* and the fetch direction is not <code>FETCH_FORWARD</code>, |
|
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 |
|
2044 |
* <code>ResultSet</code> object. |
|
2045 |
* |
|
2046 |
* @return the current fetch direction for this rowset's |
|
2047 |
* <code>ResultSet</code> object |
|
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 |
|
2064 |
* <code>ResultSet</code> object. |
|
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 |
|
2068 |
* <code>Statement</code> object |
|
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 |
|
2073 |
* condition <code>0 <= rows <= this.getMaxRows()</code> is not |
|
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 |
|
2087 |
* <code>ResultSet</code> object. |
|
2088 |
* |
|
2089 |
* @return the current fetch size for this rowset's <code>ResultSet</code> object |
|
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 |
/** |
|
2114 |
* Returns the concurrency mode of this rowset's <code>ResultSet</code> object. |
|
2115 |
* The concurrency used is determined by the |
|
2116 |
* <code>Statement</code> object that created the result set. |
|
2117 |
* |
|
2118 |
* @return the concurrency type, either <code>CONCUR_READ_ONLY</code> |
|
2119 |
* or <code>CONCUR_UPDATABLE</code> |
|
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 |
* |
|
2141 |
* @return <code>true</code> if the row has been visibly updated |
|
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 |
|
2157 |
* <code>ResultSet</code> object can detect visible inserts. |
|
2158 |
* |
|
2159 |
* @return <code>true</code> if a row has had an insertion |
|
2160 |
* and insertions are detected; <code>false</code> otherwise |
|
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 |
|
2177 |
* or not this rowset's <code>ResultSet</code> object can detect deletions. |
|
2178 |
* |
|
2179 |
* @return <code>true</code> if a row was deleted and deletions are detected; |
|
2180 |
* <code>false</code> otherwise |
|
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 |
* |
|
2195 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2196 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2197 |
* update the underlying database; instead the <code>updateRow</code> |
|
2198 |
* or <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2216 |
* Updates the designated column with a <code>boolean</code> value. |
|
2217 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2218 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2219 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2220 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2240 |
* Updates the designated column with a <code>byte</code> value. |
|
2241 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2242 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2243 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2244 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2265 |
* Updates the designated column with a <code>short</code> value. |
|
2266 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2267 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2268 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2269 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2289 |
* Updates the designated column with an <code>int</code> value. |
|
2290 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2291 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2292 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2293 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2312 |
* Updates the designated column with a <code>long</code> value. |
|
2313 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2314 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2315 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2316 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2336 |
* Updates the designated column with a <code>float</code> value. |
|
2337 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2338 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2339 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2340 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2360 |
* Updates the designated column with a <code>double</code> value. |
|
2361 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2362 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2363 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2364 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2384 |
* Updates the designated column with a <code>java.math.BigDecimal</code> |
|
2385 |
* value. |
|
2386 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2387 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2388 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2389 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2409 |
* Updates the designated column with a <code>String</code> value. |
|
2410 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2411 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2412 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2413 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2433 |
* Updates the designated column with a <code>byte</code> array value. |
|
2434 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2435 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2436 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2437 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2457 |
* Updates the designated column with a <code>java.sql.Date</code> value. |
|
2458 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2459 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2460 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2461 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2482 |
* Updates the designated column with a <code>java.sql.Time</code> value. |
|
2483 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2484 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2485 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2486 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2506 |
* Updates the designated column with a <code>java.sql.Timestamp</code> |
|
2507 |
* value. |
|
2508 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2509 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2510 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2511 |
* <code>insertRow</code> methods are called to update the database. |
|
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. |
|
2532 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2533 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2534 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2535 |
* <code>insertRow</code> methods are called to update the database. |
|
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. |
|
2557 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2558 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2559 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2560 |
* <code>insertRow</code> methods are called to update the database. |
|
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. |
|
2582 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2583 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2584 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2585 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2606 |
* Updates the designated column with an <code>Object</code> value. |
|
2607 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2608 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2609 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2610 |
* <code>insertRow</code> methods are called to update the database. |
|
2611 |
* |
|
2612 |
* @param columnIndex the first column is 1, the second is 2, and so on |
|
2613 |
* @param x the new column value |
|
2614 |
* @param scale for <code>java.sql.Types.DECIMAl</code> |
|
2615 |
* or <code>java.sql.Types.NUMERIC</code> types, |
|
2616 |
* this is the number of digits after the decimal point. For all other |
|
2617 |
* types this value will be ignored. |
|
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 |
/** |
|
2634 |
* Updates the designated column with an <code>Object</code> value. |
|
2635 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2636 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2637 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2638 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2658 |
* Updates the designated column with a <code>null</code> value. |
|
2659 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2660 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2661 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2662 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2675 |
* Updates the designated column with a <code>boolean</code> value. |
|
2676 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2677 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2678 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2679 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2691 |
* Updates the designated column with a <code>byte</code> value. |
|
2692 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2693 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2694 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2695 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2707 |
* Updates the designated column with a <code>short</code> value. |
|
2708 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2709 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2710 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2711 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2723 |
* Updates the designated column with an <code>int</code> value. |
|
2724 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2725 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2726 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2727 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2739 |
* Updates the designated column with a <code>long</code> value. |
|
2740 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2741 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2742 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2743 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2755 |
* Updates the designated column with a <code>float </code> value. |
|
2756 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2757 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2758 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2759 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2771 |
* Updates the designated column with a <code>double</code> value. |
|
2772 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2773 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2774 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2775 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2787 |
* Updates the designated column with a <code>java.sql.BigDecimal</code> |
|
2788 |
* value. |
|
2789 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2790 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2791 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2792 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2804 |
* Updates the designated column with a <code>String</code> value. |
|
2805 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2806 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2807 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2808 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2820 |
* Updates the designated column with a <code>boolean</code> value. |
|
2821 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2822 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2823 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2824 |
* <code>insertRow</code> methods are called to update the database. |
|
2825 |
* |
|
2826 |
* JDBC 2.0 |
|
2827 |
* |
|
2828 |
* Updates a column with a byte array value. |
|
2829 |
* |
|
2830 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2831 |
* current row, or the insert row. The <code>updateXXX</code> methods do not |
|
2832 |
* update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code> |
|
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 |
/** |
|
2845 |
* Updates the designated column with a <code>java.sql.Date</code> value. |
|
2846 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2847 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2848 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2849 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2861 |
* Updates the designated column with a <code>java.sql.Time</code> value. |
|
2862 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2863 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2864 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2865 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
/** |
|
2877 |
* Updates the designated column with a <code>java.sql.Timestamp</code> |
|
2878 |
* value. |
|
2879 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2880 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2881 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2882 |
* <code>insertRow</code> methods are called to update the database. |
|
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. |
|
2895 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2896 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2897 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2898 |
* <code>insertRow</code> methods are called to update the database. |
|
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. |
|
2912 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2913 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2914 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2915 |
* <code>insertRow</code> methods are called to update the database. |
|
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. |
|
2929 |
* The <code>updateXXX</code> methods are used to update column values |
|
2930 |
* in the current row or the insert row. The <code>updateXXX</code> |
|
2931 |
* methods do not update the underlying database; instead the |
|
2932 |
* <code>updateRow</code> or <code>insertRow</code> methods are called |
|
2933 |
* to update the database. |
|
2934 |
* |
|
2935 |
* @param columnName the name of the column |
|
2936 |
* @param reader the new column <code>Reader</code> stream value |
|
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 |
/** |
|
2946 |
* Updates the designated column with an <code>Object</code> value. |
|
2947 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2948 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2949 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2950 |
* <code>insertRow</code> methods are called to update the database. |
|
2951 |
* |
|
2952 |
* @param columnName the name of the column |
|
2953 |
* @param x the new column value |
|
2954 |
* @param scale for <code>java.sql.Types.DECIMAL</code> |
|
2955 |
* or <code>java.sql.Types.NUMERIC</code> types, |
|
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 |
/** |
|
2966 |
* Updates the designated column with an <code>Object</code> value. |
|
2967 |
* The <code>updateXXX</code> methods are used to update column values in the |
|
2968 |
* current row or the insert row. The <code>updateXXX</code> methods do not |
|
2969 |
* update the underlying database; instead the <code>updateRow</code> or |
|
2970 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
|
2983 |
* <code>ResultSet</code> object and into the database |
|
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 |
|
3003 |
* current row of this rowset's <code>ResultSet</code> object |
|
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 |
|
3010 |
* set is <code>ResultSet.CONCUR_READ_ONLY</code>, or |
|
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 |
/** |
|
3022 |
* Deletes the current row from this rowset's <code>ResultSet</code> object |
|
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 |
|
3028 |
* or if this method is called when the cursor is on the insert row |
|
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 |
|
3033 |
* set is <code>ResultSet.CONCUR_READ_ONLY</code>, or |
|
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 |
/** |
|
3045 |
* Refreshes the current row of this rowset's <code>ResultSet</code> |
|
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 |
* |
|
3049 |
* <P>The <code>refreshRow</code> method provides a way for an |
|
3050 |
* application to explicitly tell the JDBC driver to refetch |
|
3051 |
* a row(s) from the database. An application may want to call |
|
3052 |
* <code>refreshRow</code> when caching or prefetching is being |
|
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 |
|
3058 |
* level and cursor sensitivity. If <code>refreshRow</code> is called after |
|
3059 |
* calling an <code>updateXXX</code> method, but before calling |
|
3060 |
* the method <code>updateRow</code>, then the |
|
3061 |
* updates made to the row are lost. Calling the method |
|
3062 |
* <code>refreshRow</code> frequently will likely slow performance. |
|
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 |
|
3079 |
* <code>ResultSet</code> object and notifies listeners that a row |
|
3080 |
* has changed. This method may be called after calling an |
|
3081 |
* <code>updateXXX</code> method(s) and before calling |
|
3082 |
* the method <code>updateRow</code> to roll back |
|
3083 |
* the updates made to a row. If no updates have been made or |
|
3084 |
* <code>updateRow</code> has already been called, this method has no |
|
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 |
|
3107 |
* be constructed by calling the <code>updateXXX</code> methods prior to |
|
3108 |
* inserting the row into the result set. |
|
3109 |
* |
|
3110 |
* Only the <code>updateXXX</code>, <code>getXXX</code>, |
|
3111 |
* and <code>insertRow</code> methods may be |
|
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 |
|
3114 |
* called before calling <code>insertRow</code>. |
|
3115 |
* An <code>updateXXX</code> method must be called before a |
|
3116 |
* <code>getXXX</code> method can be called on a column value. |
|
3117 |
* |
|
3118 |
* @throws SQLException if (1) a database access error occurs, |
|
3119 |
* (2) this rowset's <code>ResultSet</code> object is |
|
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, |
|
3137 |
* (2) this rowset's <code>ResultSet</code> object is |
|
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 |
/** |
|
3149 |
* Returns the <code>Statement</code> object that produced this |
|
3150 |
* <code>ResultSet</code> object. |
|
3151 |
* If the result set was generated some other way, such as by a |
|
3152 |
* <code>DatabaseMetaData</code> method, this method returns |
|
3153 |
* <code>null</code>. |
|
3154 |
* |
|
21278 | 3155 |
* @return the <code>Statement</code> object that produced |
2 | 3156 |
* this rowset's <code>ResultSet</code> object or <code>null</code> |
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 |
|
3172 |
* of this rowset's <code>ResultSet</code> object as an <code>Object</code>. |
|
3173 |
* This method uses the given <code>Map</code> object |
|
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 |
|
3178 |
* @param map a <code>java.util.Map</code> object that contains the mapping |
|
3179 |
* from SQL type names to classes in the Java programming language |
|
3180 |
* @return an <code>Object</code> in the Java programming language |
|
3181 |
* representing the SQL value |
|
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 |
|
3196 |
* of this rowset's <code>ResultSet</code> object as a <code>Ref</code> object. |
|
3197 |
* |
|
3198 |
* @param i the first column is 1, the second is 2, and so on |
|
3199 |
* @return a <code>Ref</code> object representing an SQL <code>REF</code> value |
|
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 |
|
3213 |
* of this rowset's <code>ResultSet</code> object as a <code>Blob</code> object. |
|
3214 |
* |
|
3215 |
* @param i the first column is 1, the second is 2, and so on |
|
3216 |
* @return a <code>Blob</code> object representing the SQL <code>BLOB</code> |
|
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 |
|
3230 |
* of this rowset's <code>ResultSet</code> object as a <code>Clob</code> object. |
|
3231 |
* |
|
3232 |
* @param i the first column is 1, the second is 2, and so on |
|
3233 |
* @return a <code>Clob</code> object representing the SQL <code>CLOB</code> |
|
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 |
|
3247 |
* of this rowset's <code>ResultSet</code> object as an <code>Array</code> object. |
|
3248 |
* |
|
3249 |
* @param i the first column is 1, the second is 2, and so on. |
|
3250 |
* @return an <code>Array</code> object representing the SQL <code>ARRAY</code> |
|
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 |
|
3264 |
* of this rowset's <code>ResultSet</code> object as an <code>Object</code>. |
|
3265 |
* This method uses the specified <code>Map</code> object for |
|
3266 |
* custom mapping if appropriate. |
|
3267 |
* |
|
3268 |
* @param colName the name of the column from which to retrieve the value |
|
3269 |
* @param map a <code>java.util.Map</code> object that contains the mapping |
|
3270 |
* from SQL type names to classes in the Java programming language |
|
3271 |
* @return an <code>Object</code> representing the SQL |
|
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 |
|
3285 |
* of this rowset's <code>ResultSet</code> object as a <code>Ref</code> object. |
|
3286 |
* |
|
3287 |
* @param colName the column name |
|
3288 |
* @return a <code>Ref</code> object representing the SQL <code>REF</code> value in |
|
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 |
|
3300 |
* of this rowset's <code>ResultSet</code> object as a <code>Blob</code> object. |
|
3301 |
* |
|
3302 |
* @param colName the name of the column from which to retrieve the value |
|
3303 |
* @return a <code>Blob</code> object representing the SQL <code>BLOB</code> |
|
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 |
|
3315 |
* of this rowset's <code>ResultSet</code> object as a <code>Clob</code> object. |
|
3316 |
* |
|
3317 |
* @param colName the name of the column from which to retrieve the value |
|
3318 |
* @return a <code>Clob</code> object representing the SQL <code>CLOB</code> |
|
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 |
|
3330 |
* of this rowset's <code>ResultSet</code> object as an <code>Array</code> object. |
|
3331 |
* |
|
3332 |
* @param colName the name of the column from which to retrieve the value |
|
3333 |
* @return an <code>Array</code> object representing the SQL <code>ARRAY</code> |
|
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 |
|
3345 |
* of this rowset's <code>ResultSet</code> object as a <code>java.sql.Date</code> |
|
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 |
|
3351 |
* @param cal the <code>java.util.Calendar</code> object |
|
3352 |
* to use in constructing the date |
|
3353 |
* @return the column value as a <code>java.sql.Date</code> object; |
|
3354 |
* if the value is SQL <code>NULL</code>, |
|
3355 |
* the value returned is <code>null</code> |
|
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 |
|
3368 |
* of this rowset's <code>ResultSet</code> object as a <code>java.sql.Date</code> |
|
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 |
|
3374 |
* @param cal the <code>java.util.Calendar</code> object |
|
3375 |
* to use in constructing the date |
|
3376 |
* @return the column value as a <code>java.sql.Date</code> object; |
|
3377 |
* if the value is SQL <code>NULL</code>, |
|
3378 |
* the value returned is <code>null</code> |
|
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 |
|
3390 |
* of this rowset's <code>ResultSet</code> object as a <code>java.sql.Time</code> |
|
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 |
|
3396 |
* @param cal the <code>java.util.Calendar</code> object |
|
3397 |
* to use in constructing the time |
|
3398 |
* @return the column value as a <code>java.sql.Time</code> object; |
|
3399 |
* if the value is SQL <code>NULL</code>, |
|
3400 |
* the value returned is <code>null</code> in the Java programming language |
|
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 |
|
3413 |
* of this rowset's <code>ResultSet</code> object as a <code>java.sql.Time</code> |
|
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 |
|
3419 |
* @param cal the <code>java.util.Calendar</code> object |
|
3420 |
* to use in constructing the time |
|
3421 |
* @return the column value as a <code>java.sql.Time</code> object; |
|
3422 |
* if the value is SQL <code>NULL</code>, |
|
3423 |
* the value returned is <code>null</code> in the Java programming language |
|
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 |
|
3434 |
* of this rowset's <code>ResultSet</code> object as a |
|
3435 |
* <code>java.sql.Timestamp</code> object. |
|
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 |
|
3441 |
* @param cal the <code>java.util.Calendar</code> object |
|
3442 |
* to use in constructing the timestamp |
|
3443 |
* @return the column value as a <code>java.sql.Timestamp</code> object; |
|
3444 |
* if the value is SQL <code>NULL</code>, |
|
3445 |
* the value returned is <code>null</code> |
|
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 |
|
3458 |
* of this rowset's <code>ResultSet</code> object as a |
|
3459 |
* <code>java.sql.Timestamp</code> object. |
|
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 |
|
3465 |
* @param cal the <code>java.util.Calendar</code> object |
|
3466 |
* to use in constructing the timestamp |
|
3467 |
* @return the column value as a <code>java.sql.Timestamp</code> object; |
|
3468 |
* if the value is SQL <code>NULL</code>, |
|
3469 |
* the value returned is <code>null</code> |
|
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 |
|
3481 |
* row of this <code>JdbcRowSetImpl</code> object with the given |
|
3482 |
* <code>double</code> value. |
|
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 |
* |
|
3493 |
* @param columnIndex the first column is <code>1</code>, the second |
|
3494 |
* is <code>2</code>, and so on; must be <code>1</code> or larger |
|
3495 |
* and equal to or less than the number of columns in this rowset |
|
3496 |
* @param ref the new <code>Ref</code> column value |
|
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 |
|
3500 |
* <code>ResultSet.CONCUR_READ_ONLY</code> |
|
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 |
|
3510 |
* row of this <code>JdbcRowSetImpl</code> object with the given |
|
3511 |
* <code>double</code> value. |
|
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 |
* |
|
3522 |
* @param columnName a <code>String</code> object that must match the |
|
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 |
|
3528 |
* rowset is <code>ResultSet.CONCUR_READ_ONLY</code> |
|
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 |
|
3537 |
* row of this <code>JdbcRowSetImpl</code> object with the given |
|
3538 |
* <code>double</code> value. |
|
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 |
* |
|
3549 |
* @param columnIndex the first column is <code>1</code>, the second |
|
3550 |
* is <code>2</code>, and so on; must be <code>1</code> or larger |
|
3551 |
* and equal to or less than the number of columns in this rowset |
|
3552 |
* @param c the new column <code>Clob</code> value |
|
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 |
|
3556 |
* <code>ResultSet.CONCUR_READ_ONLY</code> |
|
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 |
|
3566 |
* row of this <code>JdbcRowSetImpl</code> object with the given |
|
3567 |
* <code>double</code> value. |
|
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 |
* |
|
3578 |
* @param columnName a <code>String</code> object that must match the |
|
3579 |
* SQL name of a column in this rowset, ignoring case |
|
3580 |
* @param c the new column <code>Clob</code> value |
|
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 |
|
3584 |
* rowset is <code>ResultSet.CONCUR_READ_ONLY</code> |
|
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 |
|
3592 |
* row of this <code>JdbcRowSetImpl</code> object with the given |
|
3593 |
* <code>java.sql.Blob</code> value. |
|
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 |
* |
|
3604 |
* @param columnIndex the first column is <code>1</code>, the second |
|
3605 |
* is <code>2</code>, and so on; must be <code>1</code> or larger |
|
3606 |
* and equal to or less than the number of columns in this rowset |
|
3607 |
* @param b the new column <code>Blob</code> value |
|
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 |
|
3611 |
* <code>ResultSet.CONCUR_READ_ONLY</code> |
|
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 |
|
3620 |
* row of this <code>JdbcRowSetImpl</code> object with the given |
|
3621 |
* <code>java.sql.Blob </code> value. |
|
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 |
* |
|
3632 |
* @param columnName a <code>String</code> object that must match the |
|
3633 |
* SQL name of a column in this rowset, ignoring case |
|
3634 |
* @param b the new column <code>Blob</code> value |
|
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 |
|
3638 |
* rowset is <code>ResultSet.CONCUR_READ_ONLY</code> |
|
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 |
|
3646 |
* row of this <code>JdbcRowSetImpl</code> object with the given |
|
3647 |
* <code>java.sql.Array</code> values. |
|
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 |
* |
|
3658 |
* @param columnIndex the first column is <code>1</code>, the second |
|
3659 |
* is <code>2</code>, and so on; must be <code>1</code> or larger |
|
3660 |
* and equal to or less than the number of columns in this rowset |
|
3661 |
* @param a the new column <code>Array</code> value |
|
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 |
|
3665 |
* <code>ResultSet.CONCUR_READ_ONLY</code> |
|
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 |
|
3674 |
* row of this <code>JdbcRowSetImpl</code> object with the given |
|
3675 |
* <code>java.sql.Array</code> value. |
|
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 |
* |
|
3686 |
* @param columnName a <code>String</code> object that must match the |
|
3687 |
* SQL name of a column in this rowset, ignoring case |
|
3688 |
* @param a the new column <code>Array</code> value |
|
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 |
|
3692 |
* rowset is <code>ResultSet.CONCUR_READ_ONLY</code> |
|
3693 |
*/ |
|
3694 |
public void updateArray(String columnName, Array a) throws SQLException { |
|
3695 |
updateArray(findColumn(columnName), a); |
|
3696 |
} |
|
3697 |
||
3698 |
/** |
|
3699 |
* Provide interface coverage for getURL(int) in ResultSet->RowSet |
|
3700 |
*/ |
|
3701 |
public java.net.URL getURL(int columnIndex) throws SQLException { |
|
3702 |
checkState(); |
|
3703 |
return rs.getURL(columnIndex); |
|
3704 |
} |
|
3705 |
||
3706 |
/** |
|
3707 |
* Provide interface coverage for getURL(String) in ResultSet->RowSet |
|
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 |
|
3715 |
* <code>JdbcRowSetImpl</code> |
|
3716 |
*/ |
|
3717 |
public RowSetWarning getRowSetWarnings() throws SQLException { |
|
3718 |
return null; |
|
3719 |
} |
|
3720 |
/** |
|
3721 |
* Unsets the designated parameter to the given int array. |
|
3722 |
* This was set using <code>setMatchColumn</code> |
|
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 |
|
3731 |
* parameter index is out of bounds or if the columnIdx is |
|
3732 |
* not the same as set using <code>setMatchColumn(int [])</code> |
|
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. |
|
3751 |
* This was set using <code>setMatchColumn</code> |
|
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 |
|
3760 |
* parameter index is out of bounds or if the columnName is |
|
3761 |
* not the same as set using <code>setMatchColumn(String [])</code> |
|
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 |
/** |
|
3777 |
* Retrieves the column name as <code>String</code> array |
|
3778 |
* that was set using <code>setMatchColumn(String [])</code> |
|
3779 |
* for this rowset. |
|
3780 |
* |
|
3781 |
* @return a <code>String</code> array object that contains the column names |
|
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 |
/** |
|
3799 |
* Retrieves the column id as <code>int</code> array that was set using |
|
3800 |
* <code>setMatchColumn(int [])</code> for this rowset. |
|
3801 |
* |
|
3802 |
* @return a <code>int</code> array object that contains the column ids |
|
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 |
|
3832 |
* <code>JoinRowSet</code> as the column which will form the basis of the |
|
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 |
|
3837 |
* command when the method <code>getMatchColumnIndexes</code> is called. |
|
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 |
|
3842 |
* <code>0</code> or greater |
|
3843 |
* @throws SQLException if an error occurs or the |
|
3844 |
* parameter index is out of bounds |
|
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 |
|
3861 |
* <code>JoinRowSet</code> as the column which will form the basis of the |
|
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 |
|
3866 |
* command when the method <code>getMatchColumn</code> is called. |
|
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 |
|
3871 |
* parameter index is out of bounds |
|
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 |
||
3886 |
/** |
|
3887 |
* Sets the designated parameter to the given <code>int</code> |
|
3888 |
* object. This forms the basis of the join for the |
|
3889 |
* <code>JoinRowSet</code> as the column which will form the basis of the |
|
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 |
|
3894 |
* command when the method <code>getMatchColumn</code> is called. |
|
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 |
|
3899 |
* <code>0</code> or greater |
|
3900 |
* @throws SQLException if an error occurs or the |
|
3901 |
* parameter index is out of bounds |
|
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 |
/** |
|
3915 |
* Sets the designated parameter to the given <code>String</code> |
|
3916 |
* object. This forms the basis of the join for the |
|
3917 |
* <code>JoinRowSet</code> as the column which will form the basis of the |
|
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 |
|
3922 |
* command when the method <code>getMatchColumn</code> is called. |
|
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 |
|
3927 |
* parameter index is out of bounds |
|
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 |
/** |
|
3941 |
* Unsets the designated parameter to the given <code>int</code> |
|
3942 |
* object. This was set using <code>setMatchColumn</code> |
|
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 |
|
3951 |
* parameter index is out of bounds or if the columnIdx is |
|
3952 |
* not the same as set using <code>setMatchColumn(int)</code> |
|
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 |
/** |
|
3967 |
* Unsets the designated parameter to the given <code>String</code> |
|
3968 |
* object. This was set using <code>setMatchColumn</code> |
|
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 |
|
3977 |
* parameter index is out of bounds or if the columnName is |
|
3978 |
* not the same as set using <code>setMatchColumn(String)</code> |
|
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 |
/** |
|
3995 |
* Retrieves the <code>DatabaseMetaData</code> 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 |
2 | 3997 |
* <code>JdbcRowSet</code> object. |
3998 |
* |
|
3999 |
* @return the <code>DatabaseMetadata</code> associated |
|
4000 |
* with the rowset's connection. |
|
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 |
/** |
|
4009 |
* Retrieves the <code>ParameterMetaData</code> 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 |
2 | 4011 |
* <code>JdbcRowSet</code> object. |
4012 |
* |
|
4013 |
* @return the <code>ParameterMetadata</code> associated |
|
4014 |
* with the rowset's connection. |
|
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 |
/** |
|
4023 |
* Commits all updates in this <code>JdbcRowSet</code> object by |
|
4024 |
* wrapping the internal <code>Connection</code> object and calling |
|
4025 |
* its <code>commit</code> method. |
|
4026 |
* This method sets this <code>JdbcRowSet</code> object's private field |
|
4027 |
* <code>rs</code> to <code>null</code> after saving its value to another |
|
4028 |
* object, but only if the <code>ResultSet</code> |
|
4029 |
* constant <code>HOLD_CURSORS_OVER_COMMIT</code> has not been set. |
|
4030 |
* (The field <code>rs</code> is this <code>JdbcRowSet</code> object's |
|
4031 |
* <code>ResultSet</code> object.) |
|
4032 |
* |
|
4033 |
* @throws SQLException if autoCommit is set to true or if a database |
|
4034 |
* access error occurs |
|
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 |
/** |
|
4048 |
* Sets auto-commit on the internal <code>Connection</code> object with this |
|
4049 |
* <code>JdbcRowSet</code> |
|
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 |
/** |
|
4077 |
* Returns the auto-commit status with this <code>JdbcRowSet</code>. |
|
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 |
/** |
|
4087 |
* Rolls back all the updates in this <code>JdbcRowSet</code> object by |
|
4088 |
* wrapping the internal <code>Connection</code> object and calling its |
|
4089 |
* <code>rollback</code> method. |
|
4090 |
* This method sets this <code>JdbcRowSet</code> object's private field |
|
4091 |
* <code>rs</code> to <code>null</code> after saving its value to another object. |
|
4092 |
* (The field <code>rs</code> is this <code>JdbcRowSet</code> object's |
|
4093 |
* internal <code>ResultSet</code> object.) |
|
4094 |
* |
|
4095 |
* @throws SQLException if autoCommit is set to true or a database |
|
4096 |
* access error occurs |
|
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 |
/** |
|
4109 |
* Rollbacks all the updates in the <code>JdbcRowSet</code> back to the |
|
4110 |
* last <code>Savepoint</code> transaction marker. Wraps the internal |
|
4111 |
* <code>Connection</code> object and call it's rollback method |
|
4112 |
* |
|
4113 |
* @param s the <code>Savepoint</code> transaction marker to roll the |
|
4114 |
* transaction to. |
|
4115 |
* @throws SQLException if autoCommit is set to true; or ia a database |
|
4116 |
* access error occurs |
|
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 |
/** |
|
4147 |
* Gets this <code>JdbcRowSet</code> object's Connection property |
|
4148 |
* |
|
4149 |
* |
|
4150 |
* @return the <code>Connection</code> object associated with this rowset; |
|
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 |
/** |
|
4161 |
* Sets this <code>JdbcRowSet</code> object's connection property |
|
4162 |
* to the given <code>Connection</code> object. |
|
4163 |
* |
|
4164 |
* @param connection the <code>Connection</code> object. |
|
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 |
/** |
|
4175 |
* Gets this <code>JdbcRowSet</code> object's PreparedStatement property |
|
4176 |
* |
|
4177 |
* |
|
4178 |
* @return the <code>PreparedStatement</code> object associated with this rowset; |
|
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 |
/** |
|
4189 |
* Sets this <code>JdbcRowSet</code> object's preparedtsatement property |
|
4190 |
* to the given <code>PreparedStatemennt</code> object. |
|
4191 |
* |
|
4192 |
* @param preparedStatement the <code>PreparedStatement</code> object |
|
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 |
/** |
|
4203 |
* Gets this <code>JdbcRowSet</code> object's ResultSet property |
|
4204 |
* |
|
4205 |
* |
|
4206 |
* @return the <code>ResultSet</code> object associated with this rowset; |
|
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 |
/** |
|
4220 |
* Sets this <code>JdbcRowSet</code> object's resultset property |
|
4221 |
* to the given <code>ResultSet</code> object. |
|
4222 |
* |
|
4223 |
* @param resultSet the <code>ResultSet</code> object |
|
4224 |
* |
|
4225 |
*/ |
|
4226 |
protected void setResultSet(ResultSet resultSet) { |
|
4227 |
rs = resultSet; |
|
4228 |
} |
|
4229 |
||
4230 |
/** |
|
4231 |
* Sets this <code>JdbcRowSet</code> object's <code>command</code> property to |
|
4232 |
* the given <code>String</code> object and clears the parameters, if any, |
|
4233 |
* that were set for the previous command. In addition, |
|
4234 |
* if the <code>command</code> property has previously been set to a |
|
4235 |
* non-null value and it is |
|
4236 |
* different from the <code>String</code> object supplied, |
|
4237 |
* this method sets this <code>JdbcRowSet</code> object's private fields |
|
4238 |
* <code>ps</code> and <code>rs</code> to <code>null</code>. |
|
4239 |
* (The field <code>ps</code> is its <code>PreparedStatement</code> object, and |
|
4240 |
* the field <code>rs</code> is its <code>ResultSet</code> object.) |
|
4241 |
* <P> |
|
4242 |
* The <code>command</code> property may not be needed if the <code>RowSet</code> |
|
4243 |
* object gets its data from a source that does not support commands, |
|
4244 |
* such as a spreadsheet or other tabular file. |
|
4245 |
* Thus, this property is optional and may be <code>null</code>. |
|
4246 |
* |
|
4247 |
* @param command a <code>String</code> object containing an SQL query |
|
4248 |
* that will be set as this <code>RowSet</code> object's command |
|
4249 |
* property; may be <code>null</code> but may not be an empty string |
|
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 |
/** |
|
4268 |
* Sets the <code>dataSourceName</code> property for this <code>JdbcRowSet</code> |
|
4269 |
* object to the given logical name and sets this <code>JdbcRowSet</code> object's |
|
4270 |
* Url property to <code>null</code>. In addition, if the <code>dataSourceName</code> |
|
4271 |
* property has previously been set and is different from the one supplied, |
|
4272 |
* this method sets this <code>JdbcRowSet</code> object's private fields |
|
4273 |
* <code>ps</code>, <code>rs</code>, and <code>conn</code> to <code>null</code>. |
|
4274 |
* (The field <code>ps</code> is its <code>PreparedStatement</code> object, |
|
4275 |
* the field <code>rs</code> is its <code>ResultSet</code> object, and |
|
4276 |
* the field <code>conn</code> is its <code>Connection</code> object.) |
|
4277 |
* <P> |
|
4278 |
* The name supplied to this method must have been bound to a |
|
4279 |
* <code>DataSource</code> object in a JNDI naming service so that an |
|
4280 |
* application can do a lookup using that name to retrieve the |
|
4281 |
* <code>DataSource</code> object bound to it. The <code>DataSource</code> |
|
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 |
* |
|
4288 |
* @param dsName a <code>String</code> object with the name that can be supplied |
|
4289 |
* to a naming service based on JNDI technology to retrieve the |
|
4290 |
* <code>DataSource</code> object that can be used to get a connection; |
|
4291 |
* may be <code>null</code> |
|
4292 |
* @throws SQLException if there is a problem setting the |
|
4293 |
* <code>dataSourceName</code> property |
|
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 |
/** |
|
4313 |
* Sets the Url property for this <code>JdbcRowSet</code> object |
|
4314 |
* to the given <code>String</code> object and sets the dataSource name |
|
4315 |
* property to <code>null</code>. In addition, if the Url property has |
|
4316 |
* previously been set to a non <code>null</code> value and its value |
|
4317 |
* is different from the value to be set, |
|
4318 |
* this method sets this <code>JdbcRowSet</code> object's private fields |
|
4319 |
* <code>ps</code>, <code>rs</code>, and <code>conn</code> to <code>null</code>. |
|
4320 |
* (The field <code>ps</code> is its <code>PreparedStatement</code> object, |
|
4321 |
* the field <code>rs</code> is its <code>ResultSet</code> object, and |
|
4322 |
* the field <code>conn</code> is its <code>Connection</code> object.) |
|
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 |
|
4326 |
* ("JDBC driver") and the <code>DriverManager</code>. |
|
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, |
4330 |
* a driver vendor can specify any <code>String</code> object except |
|
4331 |
* one with a length of <code>0</code> (an empty string). |
|
4332 |
* <P> |
|
4333 |
* Setting the Url property is optional if connections are established using |
|
4334 |
* a <code>DataSource</code> object instead of the <code>DriverManager</code>. |
|
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 |
|
4339 |
* <code>RowSet</code> object to connect to a database. The <code>RowSet</code> |
|
4340 |
* object will use the URL internally to create a database connection in order |
|
4341 |
* to read or write data. |
|
4342 |
* |
|
4343 |
* @param url a <code>String</code> object that contains the JDBC URL |
|
4344 |
* that will be used to establish the connection to a database for this |
|
4345 |
* <code>RowSet</code> object; may be <code>null</code> but must not |
|
4346 |
* be an empty string |
|
4347 |
* @throws SQLException if an error occurs setting the Url property or the |
|
4348 |
* parameter supplied is a string with a length of <code>0</code> (an |
|
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 |
||
4368 |
/** |
|
4369 |
* Sets the username property for this <code>JdbcRowSet</code> object |
|
4370 |
* to the given user name. Because it |
|
4371 |
* is not serialized, the username property is set at run time before |
|
4372 |
* calling the method <code>execute</code>. In addition, |
|
4373 |
* if the <code>username</code> property is already set with a |
|
4374 |
* non-null value and that value is different from the <code>String</code> |
|
4375 |
* object to be set, |
|
4376 |
* this method sets this <code>JdbcRowSet</code> object's private fields |
|
4377 |
* <code>ps</code>, <code>rs</code>, and <code>conn</code> to <code>null</code>. |
|
4378 |
* (The field <code>ps</code> is its <code>PreparedStatement</code> object, |
|
4379 |
* <code>rs</code> is its <code>ResultSet</code> object, and |
|
4380 |
* <code>conn</code> is its <code>Connection</code> object.) |
|
4381 |
* Setting these fields to <code>null</code> ensures that only current |
|
4382 |
* values will be used. |
|
4383 |
* |
|
4384 |
* @param uname the <code>String</code> object containing the user name that |
|
4385 |
* is supplied to the data source to create a connection. It may be null. |
|
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 |
/** |
|
4404 |
* Sets the password property for this <code>JdbcRowSet</code> object |
|
4405 |
* to the given <code>String</code> object. Because it |
|
4406 |
* is not serialized, the password property is set at run time before |
|
4407 |
* calling the method <code>execute</code>. Its default valus is |
|
4408 |
* <code>null</code>. In addition, |
|
4409 |
* if the <code>password</code> property is already set with a |
|
4410 |
* non-null value and that value is different from the one being set, |
|
4411 |
* this method sets this <code>JdbcRowSet</code> object's private fields |
|
4412 |
* <code>ps</code>, <code>rs</code>, and <code>conn</code> to <code>null</code>. |
|
4413 |
* (The field <code>ps</code> is its <code>PreparedStatement</code> object, |
|
4414 |
* <code>rs</code> is its <code>ResultSet</code> object, and |
|
4415 |
* <code>conn</code> is its <code>Connection</code> object.) |
|
4416 |
* Setting these fields to <code>null</code> ensures that only current |
|
4417 |
* values will be used. |
|
4418 |
* |
|
4419 |
* @param password the <code>String</code> object that represents the password |
|
4420 |
* that must be supplied to the database to create a connection |
|
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 |
/** |
|
4438 |
* Sets the type for this <code>RowSet</code> object to the specified type. |
|
4439 |
* The default type is <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>. |
|
4440 |
* |
|
4441 |
* @param type one of the following constants: |
|
4442 |
* <code>ResultSet.TYPE_FORWARD_ONLY</code>, |
|
4443 |
* <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or |
|
4444 |
* <code>ResultSet.TYPE_SCROLL_SENSITIVE</code> |
|
4445 |
* @throws SQLException if the parameter supplied is not one of the |
|
4446 |
* following constants: |
|
4447 |
* <code>ResultSet.TYPE_FORWARD_ONLY</code> or |
|
4448 |
* <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code> |
|
4449 |
* <code>ResultSet.TYPE_SCROLL_SENSITIVE</code> |
|
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 |
/** |
|
4471 |
* Sets the concurrency for this <code>RowSet</code> object to |
|
4472 |
* the specified concurrency. The default concurrency for any <code>RowSet</code> |
|
4473 |
* object (connected or disconnected) is <code>ResultSet.CONCUR_UPDATABLE</code>, |
|
4474 |
* but this method may be called at any time to change the concurrency. |
|
4475 |
* |
|
4476 |
* @param concur one of the following constants: |
|
4477 |
* <code>ResultSet.CONCUR_READ_ONLY</code> or |
|
4478 |
* <code>ResultSet.CONCUR_UPDATABLE</code> |
|
4479 |
* @throws SQLException if the parameter supplied is not one of the |
|
4480 |
* following constants: |
|
4481 |
* <code>ResultSet.CONCUR_UPDATABLE</code> or |
|
4482 |
* <code>ResultSet.CONCUR_READ_ONLY</code> |
|
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 |
/** |
|
4503 |
* Retrieves the value of the designated <code>SQL XML</code> parameter as a |
|
4504 |
* <code>SQLXML</code> object in the Java programming language. |
|
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 |
/** |
|
4515 |
* Retrieves the value of the designated <code>SQL XML</code> parameter as a |
|
4516 |
* <code>SQLXML</code> object in the Java programming language. |
|
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 |
|
4527 |
* <code>ResultSet</code> object as a java.sql.RowId object in the Java |
|
4528 |
* programming language. |
|
4529 |
* |
|
4530 |
* @param columnIndex the first column is 1, the second 2, ... |
|
4531 |
* @return the column value if the value is a SQL <code>NULL</code> the |
|
4532 |
* value returned is <code>null</code> |
|
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 |
|
4542 |
* <code>ResultSet</code> object as a java.sql.RowId object in the Java |
|
4543 |
* programming language. |
|
4544 |
* |
|
4545 |
* @param columnName the name of the column |
|
4546 |
* @return the column value if the value is a SQL <code>NULL</code> the |
|
4547 |
* value returned is <code>null</code> |
|
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 |
/** |
|
4556 |
* Updates the designated column with a <code>RowId</code> value. The updater |
|
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 |
|
4559 |
* the <code>updateRow<code> or <code>insertRow</code> methods are called |
|
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 |
/** |
|
4572 |
* Updates the designated column with a <code>RowId</code> value. The updater |
|
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 |
|
4575 |
* the <code>updateRow<code> or <code>insertRow</code> methods are called |
|
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 |
|
4634 |
* This method is used for updating SQL <code>NCLOB</code> type that maps |
|
4635 |
* to <code>java.sql.Types.NCLOB</code> |
|
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 |
/** |
|
4646 |
* This method is used for updating SQL <code>NCLOB</code> type that maps |
|
4647 |
* to <code>java.sql.Types.NCLOB</code> |
|
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 |
|
4659 |
* of this <code>ResultSet</code> object as a <code>NClob</code> object |
|
4660 |
* in the Java programming language. |
|
4661 |
* |
|
4662 |
* @param i the first column is 1, the second is 2, ... |
|
4663 |
* @return a <code>NClob</code> object representing the SQL |
|
4664 |
* <code>NCLOB</code> value in the specified column |
|
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 |
|
4675 |
* of this <code>ResultSet</code> object as a <code>NClob</code> object |
|
4676 |
* in the Java programming language. |
|
4677 |
* |
|
4678 |
* @param colName the name of the column from which to retrieve the value |
|
4679 |
* @return a <code>NClob</code> object representing the SQL <code>NCLOB</code> |
|
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 |
/** |
|
4697 |
* Sets the designated parameter to the given <code>java.sql.SQLXML</code> object. The driver converts this to an |
|
4698 |
* SQL <code>XML</code> value when it sends it to the database. |
|
4699 |
* @param parameterIndex index of the first parameter is 1, the second is 2, ... |
|
4700 |
* @param xmlObject a <code>SQLXML</code> object that maps an SQL <code>XML</code> value |
|
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 |
/** |
|
4709 |
* Sets the designated parameter to the given <code>java.sql.SQLXML</code> object. The driver converts this to an |
|
4710 |
* <code>SQL XML</code> value when it sends it to the database. |
|
4711 |
* @param parameterName the name of the parameter |
|
4712 |
* @param xmlObject a <code>SQLXML</code> object that maps an <code>SQL XML</code> value |
|
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 |
/** |
|
4721 |
* Sets the designated parameter to the given <code>java.sql.RowId</code> object. The |
|
4722 |
* driver converts this to a SQL <code>ROWID</code> value when it sends it |
|
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 |
||
4735 |
/** |
|
4736 |
* Sets the designated parameter to the given <code>java.sql.RowId</code> object. The |
|
4737 |
* driver converts this to a SQL <code>ROWID</code> when it sends it to the |
|
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 |
/** |
|
21278 | 4751 |
* Sets the designated parameter to the given <code>String</code> object. |
2 | 4752 |
* The driver converts this to a SQL <code>NCHAR</code> or |
4753 |
* <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> value |
|
4754 |
* (depending on the argument's |
|
4755 |
* size relative to the driver's limits on <code>NVARCHAR</code> values) |
|
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 |
|
4762 |
* error could occur ; or if a database access error occurs |
|
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 |
/** |
|
4771 |
* Sets the designated parameter in this <code>RowSet</code> object's command |
|
4772 |
* to a <code>Reader</code> object. The |
|
4773 |
* <code>Reader</code> reads the data till end-of-file is reached. The |
|
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 |
|
4782 |
* <code>setNCharacterStream</code> which takes a length parameter. |
|
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 |
|
4788 |
* error could occur ; if a database access error occurs; or |
|
4789 |
* this method is called on a closed <code>PreparedStatement</code> |
|
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 |
/** |
|
4798 |
* Sets the designated parameter to a <code>java.sql.NClob</code> object. The object |
|
4799 |
* implements the <code>java.sql.NClob</code> interface. This <code>NClob</code> |
|
4800 |
* object maps to a SQL <code>NCLOB</code>. |
|
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 |
|
4805 |
* error could occur; or if a database access error occurs |
|
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 |
||
4813 |
/** |
|
4814 |
* Retrieves the value of the designated column in the current row |
|
4815 |
* of this <code>ResultSet</code> object as a |
|
4816 |
* <code>java.io.Reader</code> object. |
|
4817 |
* It is intended for use when |
|
4818 |
* accessing <code>NCHAR</code>,<code>NVARCHAR</code> |
|
4819 |
* and <code>LONGNVARCHAR</code> columns. |
|
4820 |
* |
|
4821 |
* @return a <code>java.io.Reader</code> object that contains the column |
|
4822 |
* value; if the value is SQL <code>NULL</code>, the value returned is |
|
4823 |
* <code>null</code> in the Java programming language. |
|
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 |
|
4835 |
* of this <code>ResultSet</code> object as a |
|
4836 |
* <code>java.io.Reader</code> object. |
|
4837 |
* It is intended for use when |
|
4838 |
* accessing <code>NCHAR</code>,<code>NVARCHAR</code> |
|
4839 |
* and <code>LONGNVARCHAR</code> columns. |
|
4840 |
* |
|
4841 |
* @param columnName the name of the column |
|
4842 |
* @return a <code>java.io.Reader</code> object that contains the column |
|
4843 |
* value; if the value is SQL <code>NULL</code>, the value returned is |
|
4844 |
* <code>null</code> in the Java programming language |
|
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 |
/** |
|
4853 |
* Updates the designated column with a <code>java.sql.SQLXML</code> value. |
|
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 |
|
4857 |
* the <code>updateRow</code> or <code>insertRow</code> methods are called |
|
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 |
/** |
|
4869 |
* Updates the designated column with a <code>java.sql.SQLXML</code> value. |
|
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 |
|
4873 |
* the <code>updateRow</code> or <code>insertRow</code> methods are called |
|
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 |
|
4887 |
* of this <code>ResultSet</code> object as |
|
4888 |
* a <code>String</code> in the Java programming language. |
|
4889 |
* It is intended for use when |
|
4890 |
* accessing <code>NCHAR</code>,<code>NVARCHAR</code> |
|
4891 |
* and <code>LONGNVARCHAR</code> columns. |
|
4892 |
* |
|
4893 |
* @param columnIndex the first column is 1, the second is 2, ... |
|
4894 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
4895 |
* value returned is <code>null</code> |
|
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 |
|
4905 |
* of this <code>ResultSet</code> object as |
|
4906 |
* a <code>String</code> in the Java programming language. |
|
4907 |
* It is intended for use when |
|
4908 |
* accessing <code>NCHAR</code>,<code>NVARCHAR</code> |
|
4909 |
* and <code>LONGNVARCHAR</code> columns. |
|
4910 |
* |
|
4911 |
* @param columnName the SQL name of the column |
|
4912 |
* @return the column value; if the value is SQL <code>NULL</code>, the |
|
4913 |
* value returned is <code>null</code> |
|
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 |
* |
|
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 |
|
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 |
* |
|
4952 |
* @param columnName - name of the Column |
|
4953 |
* @param x - the new column value |
|
4954 |
* @param length - the length of the stream |
|
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 |
/** |
|
4966 |
* Updates the designated column with a character stream value. The |
|
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 |
|
4970 |
* updating <code>NCHAR</code>,<code>NVARCHAR</code> |
|
4971 |
* and <code>LONGNVARCHAR</code> columns. |
|
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 |
|
4975 |
* update the underlying database; instead the <code>updateRow</code> or |
|
4976 |
* <code>insertRow</code> methods are called to update the database. |
|
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 |
|
4980 |
* <code>updateNCharacterStream</code> which takes a length parameter. |
|
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, |
|
4985 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> or this method is called on a closed result set |
|
4986 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
4987 |
* this method |
|
4988 |
* @since 1.6 |
|
4989 |
*/ |
|
4990 |
public void updateNCharacterStream(int columnIndex, |
|
4991 |
java.io.Reader x) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
4992 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 4993 |
} |
4994 |
||
4995 |
/** |
|
4996 |
* Updates the designated column with a character stream value. The |
|
4997 |
* driver does the necessary conversion from Java character format to |
|
4998 |
* the national character set in the database. |
|
4999 |
* It is intended for use when |
|
5000 |
* updating <code>NCHAR</code>,<code>NVARCHAR</code> |
|
5001 |
* and <code>LONGNVARCHAR</code> columns. |
|
5002 |
* |
|
5003 |
* The updater methods are used to update column values in the |
|
5004 |
* current row or the insert row. The updater methods do not |
|
5005 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5006 |
* <code>insertRow</code> methods are called to update the database. |
|
5007 |
* |
|
5008 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5009 |
* it might be more efficient to use a version of |
|
5010 |
* <code>updateNCharacterStream</code> which takes a length parameter. |
|
5011 |
* |
|
5012 |
* @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the la |
|
5013 |
bel is the name of the column |
|
5014 |
* @param reader the <code>java.io.Reader</code> object containing |
|
5015 |
* the new column value |
|
5016 |
* @exception SQLException if a database access error occurs, |
|
5017 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> or this method is called on a closed result set |
|
5018 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5019 |
* this method |
|
5020 |
* @since 1.6 |
|
5021 |
*/ |
|
5022 |
public void updateNCharacterStream(String columnLabel, |
|
5023 |
java.io.Reader reader) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5024 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5025 |
} |
5026 |
||
5027 |
/** |
|
5028 |
* Updates the designated column using the given input stream, which |
|
5029 |
* will have the specified number of bytes. |
|
5030 |
* When a very large ASCII value is input to a <code>LONGVARCHAR</code> |
|
5031 |
* parameter, it may be more practical to send it via a |
|
5032 |
* <code>java.io.InputStream</code>. Data will be read from the stream |
|
5033 |
* as needed until end-of-file is reached. The JDBC driver will |
|
5034 |
* do any necessary conversion from ASCII to the database char format. |
|
5035 |
* |
|
5036 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5037 |
* Java stream object or your own subclass that implements the |
|
5038 |
* standard interface. |
|
5039 |
* <p> |
|
5040 |
* The updater methods are used to update column values in the |
|
5041 |
* current row or the insert row. The updater methods do not |
|
5042 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5043 |
* <code>insertRow</code> methods are called to update the database. |
|
5044 |
* |
|
5045 |
* @param columnIndex the first column is 1, the second is 2, ... |
|
5046 |
* @param inputStream An object that contains the data to set the parameter |
|
5047 |
* value to. |
|
5048 |
* @param length the number of bytes in the parameter data. |
|
5049 |
* @exception SQLException if a database access error occurs, |
|
5050 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> |
|
5051 |
* or this method is called on a closed result set |
|
5052 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5053 |
* this method |
|
5054 |
* @since 1.6 |
|
5055 |
*/ |
|
5056 |
public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5057 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5058 |
} |
5059 |
||
5060 |
/** |
|
5061 |
* Updates the designated column using the given input stream, which |
|
5062 |
* will have the specified number of bytes. |
|
5063 |
* When a very large ASCII value is input to a <code>LONGVARCHAR</code> |
|
5064 |
* parameter, it may be more practical to send it via a |
|
5065 |
* <code>java.io.InputStream</code>. Data will be read from the stream |
|
5066 |
* as needed until end-of-file is reached. The JDBC driver will |
|
5067 |
* do any necessary conversion from ASCII to the database char format. |
|
5068 |
* |
|
5069 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5070 |
* Java stream object or your own subclass that implements the |
|
5071 |
* standard interface. |
|
5072 |
* <p> |
|
5073 |
* The updater methods are used to update column values in the |
|
5074 |
* current row or the insert row. The updater methods do not |
|
5075 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5076 |
* <code>insertRow</code> methods are called to update the database. |
|
5077 |
* |
|
5078 |
* @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column |
|
5079 |
* @param inputStream An object that contains the data to set the parameter |
|
5080 |
* value to. |
|
5081 |
* @param length the number of bytes in the parameter data. |
|
5082 |
* @exception SQLException if a database access error occurs, |
|
5083 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> |
|
5084 |
* or this method is called on a closed result set |
|
5085 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5086 |
* this method |
|
5087 |
* @since 1.6 |
|
5088 |
*/ |
|
5089 |
public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5090 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5091 |
} |
5092 |
||
5093 |
/** |
|
5094 |
* Updates the designated column using the given input stream. |
|
5095 |
* When a very large ASCII value is input to a <code>LONGVARCHAR</code> |
|
5096 |
* parameter, it may be more practical to send it via a |
|
5097 |
* <code>java.io.InputStream</code>. Data will be read from the stream |
|
5098 |
* as needed until end-of-file is reached. The JDBC driver will |
|
5099 |
* do any necessary conversion from ASCII to the database char format. |
|
5100 |
* |
|
5101 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5102 |
* Java stream object or your own subclass that implements the |
|
5103 |
* standard interface. |
|
5104 |
* |
|
5105 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5106 |
* it might be more efficient to use a version of |
|
5107 |
* <code>updateBlob</code> which takes a length parameter. |
|
5108 |
* <p> |
|
5109 |
* The updater methods are used to update column values in the |
|
5110 |
* current row or the insert row. The updater methods do not |
|
5111 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5112 |
* <code>insertRow</code> methods are called to update the database. |
|
5113 |
* |
|
5114 |
* @param columnIndex the first column is 1, the second is 2, ... |
|
5115 |
* @param inputStream An object that contains the data to set the parameter |
|
5116 |
* value to. |
|
5117 |
* @exception SQLException if a database access error occurs, |
|
5118 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> |
|
5119 |
* or this method is called on a closed result set |
|
5120 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5121 |
* this method |
|
5122 |
* @since 1.6 |
|
5123 |
*/ |
|
5124 |
public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5125 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5126 |
} |
5127 |
||
5128 |
/** |
|
5129 |
* Updates the designated column using the given input stream. |
|
5130 |
* When a very large ASCII value is input to a <code>LONGVARCHAR</code> |
|
5131 |
* parameter, it may be more practical to send it via a |
|
5132 |
* <code>java.io.InputStream</code>. Data will be read from the stream |
|
5133 |
* as needed until end-of-file is reached. The JDBC driver will |
|
5134 |
* do any necessary conversion from ASCII to the database char format. |
|
5135 |
* |
|
5136 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5137 |
* Java stream object or your own subclass that implements the |
|
5138 |
* standard interface. |
|
5139 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5140 |
* it might be more efficient to use a version of |
|
5141 |
* <code>updateBlob</code> which takes a length parameter. |
|
5142 |
* <p> |
|
5143 |
* The updater methods are used to update column values in the |
|
5144 |
* current row or the insert row. The updater methods do not |
|
5145 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5146 |
* <code>insertRow</code> methods are called to update the database. |
|
5147 |
* |
|
5148 |
* @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the la |
|
5149 |
bel is the name of the column |
|
5150 |
* @param inputStream An object that contains the data to set the parameter |
|
5151 |
* value to. |
|
5152 |
* @exception SQLException if a database access error occurs, |
|
5153 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> |
|
5154 |
* or this method is called on a closed result set |
|
5155 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5156 |
* this method |
|
5157 |
* @since 1.6 |
|
5158 |
*/ |
|
5159 |
public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5160 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5161 |
} |
5162 |
||
5163 |
/** |
|
5164 |
* Updates the designated column using the given <code>Reader</code> |
|
5165 |
* object, which is the given number of characters long. |
|
5166 |
* When a very large UNICODE value is input to a <code>LONGVARCHAR</code> |
|
5167 |
* parameter, it may be more practical to send it via a |
|
5168 |
* <code>java.io.Reader</code> object. The data will be read from the stream |
|
5169 |
* as needed until end-of-file is reached. The JDBC driver will |
|
5170 |
* do any necessary conversion from UNICODE to the database char format. |
|
5171 |
* |
|
5172 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5173 |
* Java stream object or your own subclass that implements the |
|
5174 |
* standard interface. |
|
5175 |
* <p> |
|
5176 |
* The updater methods are used to update column values in the |
|
5177 |
* current row or the insert row. The updater methods do not |
|
5178 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5179 |
* <code>insertRow</code> methods are called to update the database. |
|
5180 |
* |
|
5181 |
* @param columnIndex the first column is 1, the second is 2, ... |
|
5182 |
* @param reader An object that contains the data to set the parameter value to. |
|
5183 |
* @param length the number of characters in the parameter data. |
|
5184 |
* @exception SQLException if a database access error occurs, |
|
5185 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> |
|
5186 |
* or this method is called on a closed result set |
|
5187 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5188 |
* this method |
|
5189 |
* @since 1.6 |
|
5190 |
*/ |
|
5191 |
public void updateClob(int columnIndex, Reader reader, long length) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5192 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5193 |
} |
5194 |
||
5195 |
/** |
|
5196 |
* Updates the designated column using the given <code>Reader</code> |
|
5197 |
* object, which is the given number of characters long. |
|
5198 |
* When a very large UNICODE value is input to a <code>LONGVARCHAR</code> |
|
5199 |
* parameter, it may be more practical to send it via a |
|
5200 |
* <code>java.io.Reader</code> object. The data will be read from the stream |
|
5201 |
* as needed until end-of-file is reached. The JDBC driver will |
|
5202 |
* do any necessary conversion from UNICODE to the database char format. |
|
5203 |
* |
|
5204 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5205 |
* Java stream object or your own subclass that implements the |
|
5206 |
* standard interface. |
|
5207 |
* <p> |
|
5208 |
* The updater methods are used to update column values in the |
|
5209 |
* current row or the insert row. The updater methods do not |
|
5210 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5211 |
* <code>insertRow</code> methods are called to update the database. |
|
5212 |
* |
|
5213 |
* @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column |
|
5214 |
* @param reader An object that contains the data to set the parameter value to. |
|
5215 |
* @param length the number of characters in the parameter data. |
|
5216 |
* @exception SQLException if a database access error occurs, |
|
5217 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> |
|
5218 |
* or this method is called on a closed result set |
|
5219 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5220 |
* this method |
|
5221 |
* @since 1.6 |
|
5222 |
*/ |
|
5223 |
public void updateClob(String columnLabel, Reader reader, long length) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5224 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5225 |
} |
5226 |
||
5227 |
/** |
|
5228 |
* Updates the designated column using the given <code>Reader</code> |
|
5229 |
* object. |
|
5230 |
* When a very large UNICODE value is input to a <code>LONGVARCHAR</code> |
|
5231 |
* parameter, it may be more practical to send it via a |
|
5232 |
* <code>java.io.Reader</code> object. The data will be read from the stream |
|
5233 |
* as needed until end-of-file is reached. The JDBC driver will |
|
5234 |
* do any necessary conversion from UNICODE to the database char format. |
|
5235 |
* |
|
5236 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5237 |
* Java stream object or your own subclass that implements the |
|
5238 |
* standard interface. |
|
5239 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5240 |
* it might be more efficient to use a version of |
|
5241 |
* <code>updateClob</code> which takes a length parameter. |
|
5242 |
* <p> |
|
5243 |
* The updater methods are used to update column values in the |
|
5244 |
* current row or the insert row. The updater methods do not |
|
5245 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5246 |
* <code>insertRow</code> methods are called to update the database. |
|
5247 |
* |
|
5248 |
* @param columnIndex the first column is 1, the second is 2, ... |
|
5249 |
* @param reader An object that contains the data to set the parameter value to. |
|
5250 |
* @exception SQLException if a database access error occurs, |
|
5251 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> |
|
5252 |
* or this method is called on a closed result set |
|
5253 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5254 |
* this method |
|
5255 |
* @since 1.6 |
|
5256 |
*/ |
|
5257 |
public void updateClob(int columnIndex, Reader reader) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5258 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5259 |
} |
5260 |
||
5261 |
/** |
|
5262 |
* Updates the designated column using the given <code>Reader</code> |
|
5263 |
* object. |
|
5264 |
* When a very large UNICODE value is input to a <code>LONGVARCHAR</code> |
|
5265 |
* parameter, it may be more practical to send it via a |
|
5266 |
* <code>java.io.Reader</code> object. The data will be read from the stream |
|
5267 |
* as needed until end-of-file is reached. The JDBC driver will |
|
5268 |
* do any necessary conversion from UNICODE to the database char format. |
|
5269 |
* |
|
5270 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5271 |
* Java stream object or your own subclass that implements the |
|
5272 |
* standard interface. |
|
5273 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5274 |
* it might be more efficient to use a version of |
|
5275 |
* <code>updateClob</code> which takes a length parameter. |
|
5276 |
* <p> |
|
5277 |
* The updater methods are used to update column values in the |
|
5278 |
* current row or the insert row. The updater methods do not |
|
5279 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5280 |
* <code>insertRow</code> methods are called to update the database. |
|
5281 |
* |
|
5282 |
* @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the la |
|
5283 |
bel is the name of the column |
|
5284 |
* @param reader An object that contains the data to set the parameter value to. |
|
5285 |
* @exception SQLException if a database access error occurs, |
|
5286 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> |
|
5287 |
* or this method is called on a closed result set |
|
5288 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5289 |
* this method |
|
5290 |
* @since 1.6 |
|
5291 |
*/ |
|
5292 |
public void updateClob(String columnLabel, Reader reader) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5293 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5294 |
} |
5295 |
||
5296 |
/** |
|
5297 |
* Updates the designated column using the given <code>Reader</code> |
|
5298 |
* object, which is the given number of characters long. |
|
5299 |
* When a very large UNICODE value is input to a <code>LONGVARCHAR</code> |
|
5300 |
* parameter, it may be more practical to send it via a |
|
5301 |
* <code>java.io.Reader</code> object. The data will be read from the stream |
|
5302 |
* as needed until end-of-file is reached. The JDBC driver will |
|
5303 |
* do any necessary conversion from UNICODE to the database char format. |
|
5304 |
* |
|
5305 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5306 |
* Java stream object or your own subclass that implements the |
|
5307 |
* standard interface. |
|
5308 |
* <p> |
|
5309 |
* The updater methods are used to update column values in the |
|
5310 |
* current row or the insert row. The updater methods do not |
|
5311 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5312 |
* <code>insertRow</code> methods are called to update the database. |
|
5313 |
* |
|
5314 |
* @param columnIndex the first column is 1, the second 2, ... |
|
5315 |
* @param reader An object that contains the data to set the parameter value to. |
|
5316 |
* @param length the number of characters in the parameter data. |
|
5317 |
* @throws SQLException if the driver does not support national |
|
5318 |
* character sets; if the driver can detect that a data conversion |
|
5319 |
* error could occur; this method is called on a closed result set, |
|
5320 |
* if a database access error occurs or |
|
5321 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> |
|
5322 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5323 |
* this method |
|
5324 |
* @since 1.6 |
|
5325 |
*/ |
|
5326 |
public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5327 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5328 |
} |
5329 |
||
5330 |
/** |
|
5331 |
* Updates the designated column using the given <code>Reader</code> |
|
5332 |
* object, which is the given number of characters long. |
|
5333 |
* When a very large UNICODE value is input to a <code>LONGVARCHAR</code> |
|
5334 |
* parameter, it may be more practical to send it via a |
|
5335 |
* <code>java.io.Reader</code> object. The data will be read from the stream |
|
5336 |
* as needed until end-of-file is reached. The JDBC driver will |
|
5337 |
* do any necessary conversion from UNICODE to the database char format. |
|
5338 |
* |
|
5339 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5340 |
* Java stream object or your own subclass that implements the |
|
5341 |
* standard interface. |
|
5342 |
* <p> |
|
5343 |
* The updater methods are used to update column values in the |
|
5344 |
* current row or the insert row. The updater methods do not |
|
5345 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5346 |
* <code>insertRow</code> methods are called to update the database. |
|
5347 |
* |
|
5348 |
* @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column |
|
5349 |
* @param reader An object that contains the data to set the parameter value to. |
|
5350 |
* @param length the number of characters in the parameter data. |
|
5351 |
* @throws SQLException if the driver does not support national |
|
5352 |
* character sets; if the driver can detect that a data conversion |
|
5353 |
* error could occur; this method is called on a closed result set; |
|
5354 |
* if a database access error occurs or |
|
5355 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> |
|
5356 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5357 |
* this method |
|
5358 |
* @since 1.6 |
|
5359 |
*/ |
|
5360 |
public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5361 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5362 |
} |
5363 |
||
5364 |
/** |
|
5365 |
* Updates the designated column using the given <code>Reader</code> |
|
5366 |
* object. |
|
5367 |
* When a very large UNICODE value is input to a <code>LONGVARCHAR</code> |
|
5368 |
* parameter, it may be more practical to send it via a |
|
5369 |
* <code>java.io.Reader</code> object. The data will be read from the stream |
|
5370 |
* as needed until end-of-file is reached. The JDBC driver will |
|
5371 |
* do any necessary conversion from UNICODE to the database char format. |
|
5372 |
* |
|
5373 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5374 |
* Java stream object or your own subclass that implements the |
|
5375 |
* standard interface. |
|
5376 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5377 |
* it might be more efficient to use a version of |
|
5378 |
* <code>updateNClob</code> which takes a length parameter. |
|
5379 |
* <p> |
|
5380 |
* The updater methods are used to update column values in the |
|
5381 |
* current row or the insert row. The updater methods do not |
|
5382 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5383 |
* <code>insertRow</code> methods are called to update the database. |
|
5384 |
* |
|
5385 |
* @param columnIndex the first column is 1, the second 2, ... |
|
5386 |
* @param reader An object that contains the data to set the parameter value to. |
|
5387 |
* @throws SQLException if the driver does not support national |
|
5388 |
* character sets; if the driver can detect that a data conversion |
|
5389 |
* error could occur; this method is called on a closed result set, |
|
5390 |
* if a database access error occurs or |
|
5391 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> |
|
5392 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5393 |
* this method |
|
5394 |
* @since 1.6 |
|
5395 |
*/ |
|
5396 |
public void updateNClob(int columnIndex, Reader reader) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5397 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5398 |
} |
5399 |
||
5400 |
/** |
|
5401 |
* Updates the designated column using the given <code>Reader</code> |
|
5402 |
* object. |
|
5403 |
* When a very large UNICODE value is input to a <code>LONGVARCHAR</code> |
|
5404 |
* parameter, it may be more practical to send it via a |
|
5405 |
* <code>java.io.Reader</code> object. The data will be read from the stream |
|
5406 |
* as needed until end-of-file is reached. The JDBC driver will |
|
5407 |
* do any necessary conversion from UNICODE to the database char format. |
|
5408 |
* |
|
5409 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5410 |
* Java stream object or your own subclass that implements the |
|
5411 |
* standard interface. |
|
5412 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5413 |
* it might be more efficient to use a version of |
|
5414 |
* <code>updateNClob</code> which takes a length parameter. |
|
5415 |
* <p> |
|
5416 |
* The updater methods are used to update column values in the |
|
5417 |
* current row or the insert row. The updater methods do not |
|
5418 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5419 |
* <code>insertRow</code> methods are called to update the database. |
|
5420 |
* |
|
5421 |
* @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the la |
|
5422 |
bel is the name of the column |
|
5423 |
* @param reader An object that contains the data to set the parameter value to. |
|
5424 |
* @throws SQLException if the driver does not support national |
|
5425 |
* character sets; if the driver can detect that a data conversion |
|
5426 |
* error could occur; this method is called on a closed result set; |
|
5427 |
* if a database access error occurs or |
|
5428 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> |
|
5429 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5430 |
* this method |
|
5431 |
* @since 1.6 |
|
5432 |
*/ |
|
5433 |
public void updateNClob(String columnLabel, Reader reader) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5434 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5435 |
} |
5436 |
||
5437 |
||
5438 |
/** |
|
5439 |
* Updates the designated column with an ascii stream value, which will have |
|
5440 |
* the specified number of bytes. |
|
5441 |
* The updater methods are used to update column values in the |
|
5442 |
* current row or the insert row. The updater methods do not |
|
5443 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5444 |
* <code>insertRow</code> methods are called to update the database. |
|
5445 |
* |
|
5446 |
* @param columnIndex the first column is 1, the second is 2, ... |
|
5447 |
* @param x the new column value |
|
5448 |
* @param length the length of the stream |
|
5449 |
* @exception SQLException if a database access error occurs, |
|
5450 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> |
|
5451 |
* or this method is called on a closed result set |
|
5452 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5453 |
* this method |
|
5454 |
* @since 1.6 |
|
5455 |
*/ |
|
5456 |
public void updateAsciiStream(int columnIndex, |
|
5457 |
java.io.InputStream x, |
|
5458 |
long length) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5459 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5460 |
} |
5461 |
||
5462 |
/** |
|
5463 |
* Updates the designated column with a binary stream value, which will have |
|
5464 |
* the specified number of bytes. |
|
5465 |
* The updater methods are used to update column values in the |
|
5466 |
* current row or the insert row. The updater methods do not |
|
5467 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5468 |
* <code>insertRow</code> methods are called to update the database. |
|
5469 |
* |
|
5470 |
* @param columnIndex the first column is 1, the second is 2, ... |
|
5471 |
* @param x the new column value |
|
5472 |
* @param length the length of the stream |
|
5473 |
* @exception SQLException if a database access error occurs, |
|
5474 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> |
|
5475 |
* or this method is called on a closed result set |
|
5476 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5477 |
* this method |
|
5478 |
* @since 1.6 |
|
5479 |
*/ |
|
5480 |
public void updateBinaryStream(int columnIndex, |
|
5481 |
java.io.InputStream x, |
|
5482 |
long length) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5483 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5484 |
} |
5485 |
||
5486 |
/** |
|
5487 |
* Updates the designated column with a character stream value, which will have |
|
5488 |
* the specified number of bytes. |
|
5489 |
* The updater methods are used to update column values in the |
|
5490 |
* current row or the insert row. The updater methods do not |
|
5491 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5492 |
* <code>insertRow</code> methods are called to update the database. |
|
5493 |
* |
|
5494 |
* @param columnIndex the first column is 1, the second is 2, ... |
|
5495 |
* @param x the new column value |
|
5496 |
* @param length the length of the stream |
|
5497 |
* @exception SQLException if a database access error occurs, |
|
5498 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> |
|
5499 |
* or this method is called on a closed result set |
|
5500 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5501 |
* this method |
|
5502 |
* @since 1.6 |
|
5503 |
*/ |
|
5504 |
public void updateCharacterStream(int columnIndex, |
|
5505 |
java.io.Reader x, |
|
5506 |
long length) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5507 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5508 |
} |
5509 |
||
5510 |
/** |
|
5511 |
* Updates the designated column with an ascii stream value, which will have |
|
5512 |
* the specified number of bytes.. |
|
5513 |
* The updater methods are used to update column values in the |
|
5514 |
* current row or the insert row. The updater methods do not |
|
5515 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5516 |
* <code>insertRow</code> methods are called to update the database. |
|
5517 |
* |
|
5518 |
* @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column |
|
5519 |
* @param x the new column value |
|
5520 |
* @param length the length of the stream |
|
5521 |
* @exception SQLException if a database access error occurs, |
|
5522 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> |
|
5523 |
* or this method is called on a closed result set |
|
5524 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5525 |
* this method |
|
5526 |
* @since 1.6 |
|
5527 |
*/ |
|
5528 |
public void updateAsciiStream(String columnLabel, |
|
5529 |
java.io.InputStream x, |
|
5530 |
long length) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5531 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5532 |
} |
5533 |
||
5534 |
/** |
|
5535 |
* Updates the designated column with an ascii stream value. |
|
5536 |
* The updater methods are used to update column values in the |
|
5537 |
* current row or the insert row. The updater methods do not |
|
5538 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5539 |
* <code>insertRow</code> methods are called to update the database. |
|
5540 |
* |
|
5541 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5542 |
* it might be more efficient to use a version of |
|
5543 |
* <code>updateAsciiStream</code> which takes a length parameter. |
|
5544 |
* |
|
5545 |
* @param columnIndex the first column is 1, the second is 2, ... |
|
5546 |
* @param x the new column value |
|
5547 |
* @exception SQLException if a database access error occurs, |
|
5548 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> |
|
5549 |
* or this method is called on a closed result set |
|
5550 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5551 |
* this method |
|
5552 |
* @since 1.6 |
|
5553 |
*/ |
|
5554 |
public void updateAsciiStream(int columnIndex, |
|
5555 |
java.io.InputStream x) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5556 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5557 |
} |
5558 |
||
5559 |
/** |
|
5560 |
* Updates the designated column with an ascii stream value. |
|
5561 |
* The updater methods are used to update column values in the |
|
5562 |
* current row or the insert row. The updater methods do not |
|
5563 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5564 |
* <code>insertRow</code> methods are called to update the database. |
|
5565 |
* |
|
5566 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5567 |
* it might be more efficient to use a version of |
|
5568 |
* <code>updateAsciiStream</code> which takes a length parameter. |
|
5569 |
* |
|
5570 |
* @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the la |
|
5571 |
bel is the name of the column |
|
5572 |
* @param x the new column value |
|
5573 |
* @exception SQLException if a database access error occurs, |
|
5574 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> |
|
5575 |
* or this method is called on a closed result set |
|
5576 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5577 |
* this method |
|
5578 |
* @since 1.6 |
|
5579 |
*/ |
|
5580 |
public void updateAsciiStream(String columnLabel, |
|
5581 |
java.io.InputStream x) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5582 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5583 |
} |
5584 |
||
5585 |
||
5586 |
/** |
|
5587 |
* Updates the designated column with a binary stream value, which will have |
|
5588 |
* the specified number of bytes. |
|
5589 |
* The updater methods are used to update column values in the |
|
5590 |
* current row or the insert row. The updater methods do not |
|
5591 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5592 |
* <code>insertRow</code> methods are called to update the database. |
|
5593 |
* |
|
5594 |
* @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column |
|
5595 |
* @param x the new column value |
|
5596 |
* @param length the length of the stream |
|
5597 |
* @exception SQLException if a database access error occurs, |
|
5598 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> |
|
5599 |
* or this method is called on a closed result set |
|
5600 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5601 |
* this method |
|
5602 |
* @since 1.6 |
|
5603 |
*/ |
|
5604 |
public void updateBinaryStream(String columnLabel, |
|
5605 |
java.io.InputStream x, |
|
5606 |
long length) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5607 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5608 |
} |
5609 |
||
5610 |
/** |
|
5611 |
* Updates the designated column with a binary stream value. |
|
5612 |
* The updater methods are used to update column values in the |
|
5613 |
* current row or the insert row. The updater methods do not |
|
5614 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5615 |
* <code>insertRow</code> methods are called to update the database. |
|
5616 |
* |
|
5617 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5618 |
* it might be more efficient to use a version of |
|
5619 |
* <code>updateBinaryStream</code> which takes a length parameter. |
|
5620 |
* |
|
5621 |
* @param columnIndex the first column is 1, the second is 2, ... |
|
5622 |
* @param x the new column value |
|
5623 |
* @exception SQLException if a database access error occurs, |
|
5624 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> |
|
5625 |
* or this method is called on a closed result set |
|
5626 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5627 |
* this method |
|
5628 |
* @since 1.6 |
|
5629 |
*/ |
|
5630 |
public void updateBinaryStream(int columnIndex, |
|
5631 |
java.io.InputStream x) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5632 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5633 |
} |
5634 |
||
5635 |
||
5636 |
/** |
|
5637 |
* Updates the designated column with a binary stream value. |
|
5638 |
* The updater methods are used to update column values in the |
|
5639 |
* current row or the insert row. The updater methods do not |
|
5640 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5641 |
* <code>insertRow</code> methods are called to update the database. |
|
5642 |
* |
|
5643 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5644 |
* it might be more efficient to use a version of |
|
5645 |
* <code>updateBinaryStream</code> which takes a length parameter. |
|
5646 |
* |
|
5647 |
* @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the la |
|
5648 |
bel is the name of the column |
|
5649 |
* @param x the new column value |
|
5650 |
* @exception SQLException if a database access error occurs, |
|
5651 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> |
|
5652 |
* or this method is called on a closed result set |
|
5653 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5654 |
* this method |
|
5655 |
* @since 1.6 |
|
5656 |
*/ |
|
5657 |
public void updateBinaryStream(String columnLabel, |
|
5658 |
java.io.InputStream x) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5659 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5660 |
} |
5661 |
||
5662 |
||
5663 |
/** |
|
5664 |
* Updates the designated column with a character stream value, which will have |
|
5665 |
* the specified number of bytes. |
|
5666 |
* The updater methods are used to update column values in the |
|
5667 |
* current row or the insert row. The updater methods do not |
|
5668 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5669 |
* <code>insertRow</code> methods are called to update the database. |
|
5670 |
* |
|
5671 |
* @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column |
|
5672 |
* @param reader the <code>java.io.Reader</code> object containing |
|
5673 |
* the new column value |
|
5674 |
* @param length the length of the stream |
|
5675 |
* @exception SQLException if a database access error occurs, |
|
5676 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> |
|
5677 |
* or this method is called on a closed result set |
|
5678 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5679 |
* this method |
|
5680 |
* @since 1.6 |
|
5681 |
*/ |
|
5682 |
public void updateCharacterStream(String columnLabel, |
|
5683 |
java.io.Reader reader, |
|
5684 |
long length) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5685 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5686 |
} |
5687 |
||
5688 |
/** |
|
5689 |
* Updates the designated column with a character stream value. |
|
5690 |
* The updater methods are used to update column values in the |
|
5691 |
* current row or the insert row. The updater methods do not |
|
5692 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5693 |
* <code>insertRow</code> methods are called to update the database. |
|
5694 |
* |
|
5695 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5696 |
* it might be more efficient to use a version of |
|
5697 |
* <code>updateCharacterStream</code> which takes a length parameter. |
|
5698 |
* |
|
5699 |
* @param columnIndex the first column is 1, the second is 2, ... |
|
5700 |
* @param x the new column value |
|
5701 |
* @exception SQLException if a database access error occurs, |
|
5702 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> |
|
5703 |
* or this method is called on a closed result set |
|
5704 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5705 |
* this method |
|
5706 |
* @since 1.6 |
|
5707 |
*/ |
|
5708 |
public void updateCharacterStream(int columnIndex, |
|
5709 |
java.io.Reader x) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5710 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5711 |
} |
5712 |
||
5713 |
/** |
|
5714 |
* Updates the designated column with a character stream value. |
|
5715 |
* The updater methods are used to update column values in the |
|
5716 |
* current row or the insert row. The updater methods do not |
|
5717 |
* update the underlying database; instead the <code>updateRow</code> or |
|
5718 |
* <code>insertRow</code> methods are called to update the database. |
|
5719 |
* |
|
5720 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5721 |
* it might be more efficient to use a version of |
|
5722 |
* <code>updateCharacterStream</code> which takes a length parameter. |
|
5723 |
* |
|
5724 |
* @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the la |
|
5725 |
bel is the name of the column |
|
5726 |
* @param reader the <code>java.io.Reader</code> object containing |
|
5727 |
* the new column value |
|
5728 |
* @exception SQLException if a database access error occurs, |
|
5729 |
* the result set concurrency is <code>CONCUR_READ_ONLY</code> |
|
5730 |
* or this method is called on a closed result set |
|
5731 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5732 |
* this method |
|
5733 |
* @since 1.6 |
|
5734 |
*/ |
|
5735 |
public void updateCharacterStream(String columnLabel, |
|
5736 |
java.io.Reader reader) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5737 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5738 |
} |
5739 |
||
5740 |
||
5741 |
/** |
|
5742 |
* Sets the designated parameter to the given <code>java.net.URL</code> value. |
|
5743 |
* The driver converts this to an SQL <code>DATALINK</code> value |
|
5744 |
* when it sends it to the database. |
|
5745 |
* |
|
5746 |
* @param parameterIndex the first parameter is 1, the second is 2, ... |
|
5747 |
* @param x the <code>java.net.URL</code> object to be set |
|
5748 |
* @exception SQLException if a database access error occurs or |
|
5749 |
* this method is called on a closed <code>PreparedStatement</code> |
|
5750 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
|
5751 |
* @since 1.4 |
|
5752 |
*/ |
|
5753 |
public void setURL(int parameterIndex, java.net.URL x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5754 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5755 |
} |
5756 |
||
5757 |
||
5758 |
/** |
|
5759 |
* Sets the designated parameter to a <code>Reader</code> object. |
|
5760 |
* This method differs from the <code>setCharacterStream (int, Reader)</code> method |
|
5761 |
* because it informs the driver that the parameter value should be sent to |
|
5762 |
* the server as a <code>NCLOB</code>. When the <code>setCharacterStream</code> method is used, the |
|
5763 |
* driver may have to do extra work to determine whether the parameter |
|
5764 |
* data should be sent to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code> |
|
5765 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5766 |
* it might be more efficient to use a version of |
|
5767 |
* <code>setNClob</code> which takes a length parameter. |
|
5768 |
* |
|
5769 |
* @param parameterIndex index of the first parameter is 1, the second is 2, ... |
|
5770 |
* @param reader An object that contains the data to set the parameter value to. |
|
5771 |
* @throws SQLException if parameterIndex does not correspond to a parameter |
|
5772 |
* marker in the SQL statement; |
|
5773 |
* if the driver does not support national character sets; |
|
5774 |
* if the driver can detect that a data conversion |
|
5775 |
* error could occur; if a database access error occurs or |
|
5776 |
* this method is called on a closed <code>PreparedStatement</code> |
|
5777 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
|
5778 |
* |
|
5779 |
* @since 1.6 |
|
5780 |
*/ |
|
5781 |
public void setNClob(int parameterIndex, Reader reader) |
|
5782 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5783 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5784 |
} |
5785 |
||
5786 |
/** |
|
5787 |
* Sets the designated parameter to a <code>Reader</code> object. The <code>reader</code> must contain the number |
|
5788 |
* of characters specified by length otherwise a <code>SQLException</code> will be |
|
5789 |
* generated when the <code>CallableStatement</code> is executed. |
|
5790 |
* This method differs from the <code>setCharacterStream (int, Reader, int)</code> method |
|
5791 |
* because it informs the driver that the parameter value should be sent to |
|
5792 |
* the server as a <code>NCLOB</code>. When the <code>setCharacterStream</code> method is used, the |
|
5793 |
* driver may have to do extra work to determine whether the parameter |
|
5794 |
* data should be send to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code> |
|
5795 |
* |
|
5796 |
* @param parameterName the name of the parameter to be set |
|
5797 |
* @param reader An object that contains the data to set the parameter value to. |
|
5798 |
* @param length the number of characters in the parameter data. |
|
5799 |
* @throws SQLException if parameterIndex does not correspond to a parameter |
|
5800 |
* marker in the SQL statement; if the length specified is less than zero; |
|
5801 |
* if the driver does not support national |
|
5802 |
* character sets; if the driver can detect that a data conversion |
|
5803 |
* error could occur; if a database access error occurs or |
|
5804 |
* this method is called on a closed <code>CallableStatement</code> |
|
5805 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5806 |
* this method |
|
5807 |
* @since 1.6 |
|
5808 |
*/ |
|
5809 |
public void setNClob(String parameterName, Reader reader, long length) |
|
5810 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5811 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5812 |
} |
5813 |
||
5814 |
||
5815 |
/** |
|
5816 |
* Sets the designated parameter to a <code>Reader</code> object. |
|
5817 |
* This method differs from the <code>setCharacterStream (int, Reader)</code> method |
|
5818 |
* because it informs the driver that the parameter value should be sent to |
|
5819 |
* the server as a <code>NCLOB</code>. When the <code>setCharacterStream</code> method is used, the |
|
5820 |
* driver may have to do extra work to determine whether the parameter |
|
5821 |
* data should be send to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code> |
|
5822 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5823 |
* it might be more efficient to use a version of |
|
5824 |
* <code>setNClob</code> which takes a length parameter. |
|
5825 |
* |
|
5826 |
* @param parameterName the name of the parameter |
|
5827 |
* @param reader An object that contains the data to set the parameter value to. |
|
5828 |
* @throws SQLException if the driver does not support national character sets; |
|
5829 |
* if the driver can detect that a data conversion |
|
5830 |
* error could occur; if a database access error occurs or |
|
5831 |
* this method is called on a closed <code>CallableStatement</code> |
|
5832 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
|
5833 |
* |
|
5834 |
* @since 1.6 |
|
5835 |
*/ |
|
5836 |
public void setNClob(String parameterName, Reader reader) |
|
5837 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5838 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5839 |
} |
5840 |
||
5841 |
||
5842 |
/** |
|
5843 |
** of characters specified by length otherwise a <code>SQLException</code> will becontain the number |
|
5844 |
* generated when the <code>PreparedStatement</code> is executed. |
|
5845 |
* This method differs from the <code>setCharacterStream (int, Reader, int)</code> method |
|
5846 |
* because it informs the driver that the parameter value should be sent to |
|
5847 |
* the server as a <code>NCLOB</code>. When the <code>setCharacterStream</code> method is used, the |
|
5848 |
* driver may have to do extra work to determine whether the parameter |
|
5849 |
* data should be sent to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code> |
|
5850 |
* @param parameterIndex index of the first parameter is 1, the second is 2, ... |
|
5851 |
* @param reader An object that contains the data to set the parameter value to. |
|
5852 |
* @param length the number of characters in the parameter data. |
|
5853 |
* @throws SQLException if parameterIndex does not correspond to a parameter |
|
5854 |
* marker in the SQL statement; if the length specified is less than zero; |
|
5855 |
* if the driver does not support national character sets; |
|
5856 |
* if the driver can detect that a data conversion |
|
5857 |
* error could occur; if a database access error occurs or |
|
5858 |
* this method is called on a closed <code>PreparedStatement</code> |
|
5859 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
|
5860 |
* |
|
5861 |
* @since 1.6 |
|
5862 |
*/ |
|
5863 |
public void setNClob(int parameterIndex, Reader reader, long length) |
|
5864 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5865 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5866 |
} |
5867 |
||
5868 |
||
5869 |
/** |
|
5870 |
* Sets the designated parameter to a <code>java.sql.NClob</code> object. The driver converts this to |
|
5871 |
a |
|
5872 |
* SQL <code>NCLOB</code> value when it sends it to the database. |
|
5873 |
* @param parameterIndex of the first parameter is 1, the second is 2, ... |
|
5874 |
* @param value the parameter value |
|
5875 |
* @throws SQLException if the driver does not support national |
|
5876 |
* character sets; if the driver can detect that a data conversion |
|
5877 |
* error could occur ; or if a database access error occurs |
|
5878 |
* @since 1.6 |
|
5879 |
*/ |
|
5880 |
public void setNClob(int parameterIndex, NClob value) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5881 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5882 |
} |
5883 |
||
5884 |
||
5885 |
/** |
|
21278 | 5886 |
* Sets the designated parameter to the given <code>String</code> object. |
2 | 5887 |
* The driver converts this to a SQL <code>NCHAR</code> or |
5888 |
* <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> |
|
5889 |
* @param parameterName the name of the column to be set |
|
5890 |
* @param value the parameter value |
|
5891 |
* @throws SQLException if the driver does not support national |
|
5892 |
* character sets; if the driver can detect that a data conversion |
|
5893 |
* error could occur; or if a database access error occurs |
|
5894 |
* @since 1.6 |
|
5895 |
*/ |
|
5896 |
public void setNString(String parameterName, String value) |
|
5897 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5898 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5899 |
} |
5900 |
||
5901 |
/** |
|
5902 |
* Sets the designated parameter to a <code>Reader</code> object. The |
|
5903 |
* <code>Reader</code> reads the data till end-of-file is reached. The |
|
5904 |
* driver does the necessary conversion from Java character format to |
|
5905 |
* the national character set in the database. |
|
5906 |
* @param parameterIndex of the first parameter is 1, the second is 2, ... |
|
5907 |
* @param value the parameter value |
|
5908 |
* @param length the number of characters in the parameter data. |
|
5909 |
* @throws SQLException if the driver does not support national |
|
5910 |
* character sets; if the driver can detect that a data conversion |
|
5911 |
* error could occur ; or if a database access error occurs |
|
5912 |
* @since 1.6 |
|
5913 |
*/ |
|
5914 |
public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5915 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5916 |
} |
5917 |
||
5918 |
||
5919 |
||
5920 |
/** |
|
5921 |
* Sets the designated parameter to a <code>Reader</code> object. The |
|
5922 |
* <code>Reader</code> reads the data till end-of-file is reached. The |
|
5923 |
* driver does the necessary conversion from Java character format to |
|
5924 |
* the national character set in the database. |
|
5925 |
* @param parameterName the name of the column to be set |
|
5926 |
* @param value the parameter value |
|
5927 |
* @param length the number of characters in the parameter data. |
|
5928 |
* @throws SQLException if the driver does not support national |
|
5929 |
* character sets; if the driver can detect that a data conversion |
|
5930 |
* error could occur; or if a database access error occurs |
|
5931 |
* @since 1.6 |
|
5932 |
*/ |
|
5933 |
public void setNCharacterStream(String parameterName, Reader value, long length) |
|
5934 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5935 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5936 |
} |
5937 |
||
5938 |
/** |
|
5939 |
* Sets the designated parameter to a <code>Reader</code> object. The |
|
5940 |
* <code>Reader</code> reads the data till end-of-file is reached. The |
|
5941 |
* driver does the necessary conversion from Java character format to |
|
5942 |
* the national character set in the database. |
|
5943 |
||
5944 |
* <P><B>Note:</B> This stream object can either be a standard |
|
5945 |
* Java stream object or your own subclass that implements the |
|
5946 |
* standard interface. |
|
5947 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
5948 |
* it might be more efficient to use a version of |
|
5949 |
* <code>setNCharacterStream</code> which takes a length parameter. |
|
5950 |
* |
|
5951 |
* @param parameterName the name of the parameter |
|
5952 |
* @param value the parameter value |
|
5953 |
* @throws SQLException if the driver does not support national |
|
5954 |
* character sets; if the driver can detect that a data conversion |
|
5955 |
* error could occur ; if a database access error occurs; or |
|
5956 |
* this method is called on a closed <code>CallableStatement</code> |
|
5957 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
|
5958 |
* @since 1.6 |
|
5959 |
*/ |
|
5960 |
public void setNCharacterStream(String parameterName, Reader value) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5961 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5962 |
} |
5963 |
||
5964 |
/** |
|
5965 |
* Sets the designated parameter to the given <code>java.sql.Timestamp</code> value, |
|
5966 |
* using the given <code>Calendar</code> object. The driver uses |
|
5967 |
* the <code>Calendar</code> object to construct an SQL <code>TIMESTAMP</code> value, |
|
5968 |
* which the driver then sends to the database. With a |
|
5969 |
* a <code>Calendar</code> object, the driver can calculate the timestamp |
|
5970 |
* taking into account a custom timezone. If no |
|
5971 |
* <code>Calendar</code> object is specified, the driver uses the default |
|
5972 |
* timezone, which is that of the virtual machine running the application. |
|
5973 |
* |
|
5974 |
* @param parameterName the name of the parameter |
|
5975 |
* @param x the parameter value |
|
5976 |
* @param cal the <code>Calendar</code> object the driver will use |
|
5977 |
* to construct the timestamp |
|
5978 |
* @exception SQLException if a database access error occurs or |
|
5979 |
* this method is called on a closed <code>CallableStatement</code> |
|
5980 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
5981 |
* this method |
|
5982 |
* @see #getTimestamp |
|
5983 |
* @since 1.4 |
|
5984 |
*/ |
|
5985 |
public void setTimestamp(String parameterName, java.sql.Timestamp x, Calendar cal) |
|
5986 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
5987 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 5988 |
} |
5989 |
||
5990 |
/** |
|
5991 |
* Sets the designated parameter to a <code>Reader</code> object. The <code>reader</code> must contain the number |
|
5992 |
* of characters specified by length otherwise a <code>SQLException</code> will be |
|
5993 |
* generated when the <code>CallableStatement</code> is executed. |
|
5994 |
* This method differs from the <code>setCharacterStream (int, Reader, int)</code> method |
|
5995 |
* because it informs the driver that the parameter value should be sent to |
|
5996 |
* the server as a <code>CLOB</code>. When the <code>setCharacterStream</code> method is used, the |
|
5997 |
* driver may have to do extra work to determine whether the parameter |
|
5998 |
* data should be send to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code> |
|
5999 |
* @param parameterName the name of the parameter to be set |
|
6000 |
* @param reader An object that contains the data to set the parameter value to. |
|
6001 |
* @param length the number of characters in the parameter data. |
|
6002 |
* @throws SQLException if parameterIndex does not correspond to a parameter |
|
6003 |
* marker in the SQL statement; if the length specified is less than zero; |
|
6004 |
* a database access error occurs or |
|
6005 |
* this method is called on a closed <code>CallableStatement</code> |
|
6006 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6007 |
* this method |
|
6008 |
* |
|
6009 |
* @since 1.6 |
|
6010 |
*/ |
|
6011 |
public void setClob(String parameterName, Reader reader, long length) |
|
6012 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6013 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6014 |
} |
6015 |
||
6016 |
||
6017 |
||
6018 |
/** |
|
6019 |
* Sets the designated parameter to the given <code>java.sql.Clob</code> object. |
|
6020 |
* The driver converts this to an SQL <code>CLOB</code> value when it |
|
6021 |
* sends it to the database. |
|
6022 |
* |
|
6023 |
* @param parameterName the name of the parameter |
|
6024 |
* @param x a <code>Clob</code> object that maps an SQL <code>CLOB</code> value |
|
6025 |
* @exception SQLException if a database access error occurs or |
|
6026 |
* this method is called on a closed <code>CallableStatement</code> |
|
6027 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6028 |
* this method |
|
6029 |
* @since 1.6 |
|
6030 |
*/ |
|
6031 |
public void setClob (String parameterName, Clob x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6032 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6033 |
} |
6034 |
||
6035 |
/** |
|
6036 |
* Sets the designated parameter to a <code>Reader</code> object. |
|
6037 |
* This method differs from the <code>setCharacterStream (int, Reader)</code> method |
|
6038 |
* because it informs the driver that the parameter value should be sent to |
|
6039 |
* the server as a <code>CLOB</code>. When the <code>setCharacterStream</code> method is used, the |
|
6040 |
* driver may have to do extra work to determine whether the parameter |
|
6041 |
* data should be send to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code> |
|
6042 |
* |
|
6043 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
6044 |
* it might be more efficient to use a version of |
|
6045 |
* <code>setClob</code> which takes a length parameter. |
|
6046 |
* |
|
6047 |
* @param parameterName the name of the parameter |
|
6048 |
* @param reader An object that contains the data to set the parameter value to. |
|
6049 |
* @throws SQLException if a database access error occurs or this method is called on |
|
6050 |
* a closed <code>CallableStatement</code> |
|
6051 |
* |
|
6052 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
|
6053 |
* @since 1.6 |
|
6054 |
*/ |
|
6055 |
public void setClob(String parameterName, Reader reader) |
|
6056 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6057 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6058 |
} |
6059 |
||
6060 |
||
6061 |
/** |
|
6062 |
* Sets the designated parameter to the given <code>java.sql.Date</code> value |
|
6063 |
* using the default time zone of the virtual machine that is running |
|
6064 |
* the application. |
|
6065 |
* The driver converts this |
|
6066 |
* to an SQL <code>DATE</code> value when it sends it to the database. |
|
6067 |
* |
|
6068 |
* @param parameterName the name of the parameter |
|
6069 |
* @param x the parameter value |
|
6070 |
* @exception SQLException if a database access error occurs or |
|
6071 |
* this method is called on a closed <code>CallableStatement</code> |
|
6072 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6073 |
* this method |
|
6074 |
* @see #getDate |
|
6075 |
* @since 1.4 |
|
6076 |
*/ |
|
6077 |
public void setDate(String parameterName, java.sql.Date x) |
|
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 |
/** |
|
6083 |
* Sets the designated parameter to the given <code>java.sql.Date</code> value, |
|
6084 |
* using the given <code>Calendar</code> object. The driver uses |
|
6085 |
* the <code>Calendar</code> object to construct an SQL <code>DATE</code> value, |
|
6086 |
* which the driver then sends to the database. With a |
|
6087 |
* a <code>Calendar</code> object, the driver can calculate the date |
|
6088 |
* taking into account a custom timezone. If no |
|
6089 |
* <code>Calendar</code> object is specified, the driver uses the default |
|
6090 |
* timezone, which is that of the virtual machine running the application. |
|
6091 |
* |
|
6092 |
* @param parameterName the name of the parameter |
|
6093 |
* @param x the parameter value |
|
6094 |
* @param cal the <code>Calendar</code> object the driver will use |
|
6095 |
* to construct the date |
|
6096 |
* @exception SQLException if a database access error occurs or |
|
6097 |
* this method is called on a closed <code>CallableStatement</code> |
|
6098 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6099 |
* this method |
|
6100 |
* @see #getDate |
|
6101 |
* @since 1.4 |
|
6102 |
*/ |
|
6103 |
public void setDate(String parameterName, java.sql.Date x, Calendar cal) |
|
6104 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6105 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6106 |
} |
6107 |
||
6108 |
||
6109 |
/** |
|
6110 |
* Sets the designated parameter to the given <code>java.sql.Time</code> value. |
|
6111 |
* The driver converts this |
|
6112 |
* to an SQL <code>TIME</code> value when it sends it to the database. |
|
6113 |
* |
|
6114 |
* @param parameterName the name of the parameter |
|
6115 |
* @param x the parameter value |
|
6116 |
* @exception SQLException if a database access error occurs or |
|
6117 |
* this method is called on a closed <code>CallableStatement</code> |
|
6118 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6119 |
* this method |
|
6120 |
* @see #getTime |
|
6121 |
* @since 1.4 |
|
6122 |
*/ |
|
6123 |
public void setTime(String parameterName, java.sql.Time x) |
|
6124 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6125 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6126 |
} |
6127 |
||
6128 |
/** |
|
6129 |
* Sets the designated parameter to the given <code>java.sql.Time</code> value, |
|
6130 |
* using the given <code>Calendar</code> object. The driver uses |
|
6131 |
* the <code>Calendar</code> object to construct an SQL <code>TIME</code> value, |
|
6132 |
* which the driver then sends to the database. With a |
|
6133 |
* a <code>Calendar</code> object, the driver can calculate the time |
|
6134 |
* taking into account a custom timezone. If no |
|
6135 |
* <code>Calendar</code> object is specified, the driver uses the default |
|
6136 |
* timezone, which is that of the virtual machine running the application. |
|
6137 |
* |
|
6138 |
* @param parameterName the name of the parameter |
|
6139 |
* @param x the parameter value |
|
6140 |
* @param cal the <code>Calendar</code> object the driver will use |
|
6141 |
* to construct the time |
|
6142 |
* @exception SQLException if a database access error occurs or |
|
6143 |
* this method is called on a closed <code>CallableStatement</code> |
|
6144 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6145 |
* this method |
|
6146 |
* @see #getTime |
|
6147 |
* @since 1.4 |
|
6148 |
*/ |
|
6149 |
public void setTime(String parameterName, java.sql.Time x, Calendar cal) |
|
6150 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6151 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6152 |
} |
6153 |
||
6154 |
/** |
|
6155 |
* Sets the designated parameter to a <code>Reader</code> object. |
|
6156 |
* This method differs from the <code>setCharacterStream (int, Reader)</code> method |
|
6157 |
* because it informs the driver that the parameter value should be sent to |
|
6158 |
* the server as a <code>CLOB</code>. When the <code>setCharacterStream</code> method is used, the |
|
6159 |
* driver may have to do extra work to determine whether the parameter |
|
6160 |
* data should be sent to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code> |
|
6161 |
* |
|
6162 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
6163 |
* it might be more efficient to use a version of |
|
6164 |
* <code>setClob</code> which takes a length parameter. |
|
6165 |
* |
|
6166 |
* @param parameterIndex index of the first parameter is 1, the second is 2, ... |
|
6167 |
* @param reader An object that contains the data to set the parameter value to. |
|
6168 |
* @throws SQLException if a database access error occurs, this method is called on |
|
6169 |
* a closed <code>PreparedStatement</code>or if parameterIndex does not correspond to a parameter |
|
6170 |
* marker in the SQL statement |
|
6171 |
* |
|
6172 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
|
6173 |
* @since 1.6 |
|
6174 |
*/ |
|
6175 |
public void setClob(int parameterIndex, Reader reader) |
|
6176 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6177 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6178 |
} |
6179 |
||
6180 |
||
6181 |
/** |
|
6182 |
* Sets the designated parameter to a <code>Reader</code> object. The reader must contain the number |
|
6183 |
* of characters specified by length otherwise a <code>SQLException</code> will be |
|
6184 |
* generated when the <code>PreparedStatement</code> is executed. |
|
6185 |
*This method differs from the <code>setCharacterStream (int, Reader, int)</code> method |
|
6186 |
* because it informs the driver that the parameter value should be sent to |
|
6187 |
* the server as a <code>CLOB</code>. When the <code>setCharacterStream</code> method is used, the |
|
6188 |
* driver may have to do extra work to determine whether the parameter |
|
6189 |
* data should be sent to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code> |
|
6190 |
* @param parameterIndex index of the first parameter is 1, the second is 2, ... |
|
6191 |
* @param reader An object that contains the data to set the parameter value to. |
|
6192 |
* @param length the number of characters in the parameter data. |
|
6193 |
* @throws SQLException if a database access error occurs, this method is called on |
|
6194 |
* a closed <code>PreparedStatement</code>, if parameterIndex does not correspond to a parameter |
|
6195 |
* marker in the SQL statement, or if the length specified is less than zero. |
|
6196 |
* |
|
6197 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
|
6198 |
* @since 1.6 |
|
6199 |
*/ |
|
6200 |
public void setClob(int parameterIndex, Reader reader, long length) |
|
6201 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6202 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6203 |
} |
6204 |
||
6205 |
||
6206 |
/** |
|
6207 |
* Sets the designated parameter to a <code>InputStream</code> object. The inputstream must contain the number |
|
6208 |
* of characters specified by length otherwise a <code>SQLException</code> will be |
|
6209 |
* generated when the <code>PreparedStatement</code> is executed. |
|
6210 |
* This method differs from the <code>setBinaryStream (int, InputStream, int)</code> |
|
6211 |
* method because it informs the driver that the parameter value should be |
|
6212 |
* sent to the server as a <code>BLOB</code>. When the <code>setBinaryStream</code> method is used, |
|
6213 |
* the driver may have to do extra work to determine whether the parameter |
|
6214 |
* data should be sent to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code> |
|
6215 |
* @param parameterIndex index of the first parameter is 1, |
|
6216 |
* the second is 2, ... |
|
6217 |
* @param inputStream An object that contains the data to set the parameter |
|
6218 |
* value to. |
|
6219 |
* @param length the number of bytes in the parameter data. |
|
6220 |
* @throws SQLException if a database access error occurs, |
|
6221 |
* this method is called on a closed <code>PreparedStatement</code>, |
|
6222 |
* if parameterIndex does not correspond |
|
6223 |
* to a parameter marker in the SQL statement, if the length specified |
|
6224 |
* is less than zero or if the number of bytes in the inputstream does not match |
|
21278 | 6225 |
* the specified length. |
2 | 6226 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
6227 |
* |
|
6228 |
* @since 1.6 |
|
6229 |
*/ |
|
6230 |
public void setBlob(int parameterIndex, InputStream inputStream, long length) |
|
6231 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6232 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6233 |
} |
6234 |
||
6235 |
/** |
|
6236 |
* Sets the designated parameter to a <code>InputStream</code> object. |
|
6237 |
* This method differs from the <code>setBinaryStream (int, InputStream)</code> |
|
6238 |
* This method differs from the <code>setBinaryStream (int, InputStream)</code> |
|
6239 |
* method because it informs the driver that the parameter value should be |
|
6240 |
* sent to the server as a <code>BLOB</code>. When the <code>setBinaryStream</code> method is used, |
|
6241 |
* the driver may have to do extra work to determine whether the parameter |
|
6242 |
* data should be sent to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code> |
|
6243 |
* |
|
6244 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
6245 |
* it might be more efficient to use a version of |
|
6246 |
* <code>setBlob</code> which takes a length parameter. |
|
6247 |
* |
|
6248 |
* @param parameterIndex index of the first parameter is 1, |
|
6249 |
* the second is 2, ... |
|
6250 |
||
6251 |
||
6252 |
* @param inputStream An object that contains the data to set the parameter |
|
6253 |
* value to. |
|
6254 |
* @throws SQLException if a database access error occurs, |
|
6255 |
* this method is called on a closed <code>PreparedStatement</code> or |
|
6256 |
* if parameterIndex does not correspond |
|
6257 |
* to a parameter marker in the SQL statement, |
|
6258 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
|
6259 |
* |
|
6260 |
* @since 1.6 |
|
6261 |
*/ |
|
6262 |
public void setBlob(int parameterIndex, InputStream inputStream) |
|
6263 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6264 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6265 |
} |
6266 |
||
6267 |
/** |
|
6268 |
* Sets the designated parameter to a <code>InputStream</code> object. The <code>inputstream</code> must contain the number |
|
6269 |
* of characters specified by length, otherwise a <code>SQLException</code> will be |
|
6270 |
* generated when the <code>CallableStatement</code> is executed. |
|
6271 |
* This method differs from the <code>setBinaryStream (int, InputStream, int)</code> |
|
6272 |
* method because it informs the driver that the parameter value should be |
|
6273 |
* sent to the server as a <code>BLOB</code>. When the <code>setBinaryStream</code> method is used, |
|
6274 |
* the driver may have to do extra work to determine whether the parameter |
|
6275 |
* data should be sent to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code> |
|
6276 |
* |
|
6277 |
* @param parameterName the name of the parameter to be set |
|
6278 |
* the second is 2, ... |
|
6279 |
* |
|
6280 |
* @param inputStream An object that contains the data to set the parameter |
|
6281 |
* value to. |
|
6282 |
* @param length the number of bytes in the parameter data. |
|
6283 |
* @throws SQLException if parameterIndex does not correspond |
|
6284 |
* to a parameter marker in the SQL statement, or if the length specified |
|
6285 |
* is less than zero; if the number of bytes in the inputstream does not match |
|
21278 | 6286 |
* the specified length; if a database access error occurs or |
2 | 6287 |
* this method is called on a closed <code>CallableStatement</code> |
6288 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6289 |
* this method |
|
6290 |
* |
|
6291 |
* @since 1.6 |
|
6292 |
*/ |
|
6293 |
public void setBlob(String parameterName, InputStream inputStream, long length) |
|
6294 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6295 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6296 |
} |
6297 |
||
6298 |
||
6299 |
/** |
|
6300 |
* Sets the designated parameter to the given <code>java.sql.Blob</code> object. |
|
6301 |
* The driver converts this to an SQL <code>BLOB</code> value when it |
|
6302 |
* sends it to the database. |
|
6303 |
* |
|
6304 |
* @param parameterName the name of the parameter |
|
6305 |
* @param x a <code>Blob</code> object that maps an SQL <code>BLOB</code> value |
|
6306 |
* @exception SQLException if a database access error occurs or |
|
6307 |
* this method is called on a closed <code>CallableStatement</code> |
|
6308 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6309 |
* this method |
|
6310 |
* @since 1.6 |
|
6311 |
*/ |
|
6312 |
public void setBlob (String parameterName, Blob x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6313 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6314 |
} |
6315 |
||
6316 |
/** |
|
6317 |
* Sets the designated parameter to a <code>InputStream</code> object. |
|
6318 |
* This method differs from the <code>setBinaryStream (int, InputStream)</code> |
|
6319 |
* method because it informs the driver that the parameter value should be |
|
6320 |
* sent to the server as a <code>BLOB</code>. When the <code>setBinaryStream</code> method is used, |
|
6321 |
* the driver may have to do extra work to determine whether the parameter |
|
6322 |
* data should be send to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code> |
|
6323 |
* |
|
6324 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
6325 |
* it might be more efficient to use a version of |
|
6326 |
* <code>setBlob</code> which takes a length parameter. |
|
6327 |
* |
|
6328 |
* @param parameterName the name of the parameter |
|
6329 |
* @param inputStream An object that contains the data to set the parameter |
|
6330 |
* value to. |
|
6331 |
* @throws SQLException if a database access error occurs or |
|
6332 |
* this method is called on a closed <code>CallableStatement</code> |
|
6333 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
|
6334 |
* |
|
6335 |
* @since 1.6 |
|
6336 |
*/ |
|
6337 |
public void setBlob(String parameterName, InputStream inputStream) |
|
6338 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6339 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6340 |
} |
6341 |
||
6342 |
/** |
|
6343 |
* Sets the value of the designated parameter with the given object. The second |
|
6344 |
* argument must be an object type; for integral values, the |
|
6345 |
* <code>java.lang</code> equivalent objects should be used. |
|
6346 |
* |
|
6347 |
* <p>The given Java object will be converted to the given targetSqlType |
|
6348 |
* before being sent to the database. |
|
6349 |
* |
|
6350 |
* If the object has a custom mapping (is of a class implementing the |
|
6351 |
* interface <code>SQLData</code>), |
|
6352 |
* the JDBC driver should call the method <code>SQLData.writeSQL</code> to write it |
|
6353 |
* to the SQL data stream. |
|
6354 |
* If, on the other hand, the object is of a class implementing |
|
6355 |
* <code>Ref</code>, <code>Blob</code>, <code>Clob</code>, <code>NClob</code>, |
|
6356 |
* <code>Struct</code>, <code>java.net.URL</code>, |
|
6357 |
* or <code>Array</code>, the driver should pass it to the database as a |
|
6358 |
* value of the corresponding SQL type. |
|
6359 |
* <P> |
|
6360 |
* Note that this method may be used to pass datatabase- |
|
6361 |
* specific abstract data types. |
|
6362 |
* |
|
6363 |
* @param parameterName the name of the parameter |
|
6364 |
* @param x the object containing the input parameter value |
|
6365 |
* @param targetSqlType the SQL type (as defined in java.sql.Types) to be |
|
6366 |
* sent to the database. The scale argument may further qualify this type. |
|
6367 |
* @param scale for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types, |
|
6368 |
* this is the number of digits after the decimal point. For all other |
|
6369 |
* types, this value will be ignored. |
|
6370 |
* @exception SQLException if a database access error occurs or |
|
6371 |
* this method is called on a closed <code>CallableStatement</code> |
|
6372 |
* @exception SQLFeatureNotSupportedException if <code>targetSqlType</code> is |
|
6373 |
* a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>, |
|
6374 |
* <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>, |
|
6375 |
* <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>, |
|
6376 |
* <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code> |
|
6377 |
* or <code>STRUCT</code> data type and the JDBC driver does not support |
|
6378 |
* this data type |
|
6379 |
* @see Types |
|
6380 |
* @see #getObject |
|
6381 |
* @since 1.4 |
|
6382 |
*/ |
|
6383 |
public void setObject(String parameterName, Object x, int targetSqlType, int scale) |
|
6384 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6385 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6386 |
} |
6387 |
||
6388 |
/** |
|
6389 |
* Sets the value of the designated parameter with the given object. |
|
6390 |
* This method is like the method <code>setObject</code> |
|
6391 |
* above, except that it assumes a scale of zero. |
|
6392 |
* |
|
6393 |
* @param parameterName the name of the parameter |
|
6394 |
* @param x the object containing the input parameter value |
|
6395 |
* @param targetSqlType the SQL type (as defined in java.sql.Types) to be |
|
6396 |
* sent to the database |
|
6397 |
* @exception SQLException if a database access error occurs or |
|
6398 |
* this method is called on a closed <code>CallableStatement</code> |
|
6399 |
* @exception SQLFeatureNotSupportedException if <code>targetSqlType</code> is |
|
6400 |
* a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>, |
|
6401 |
* <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>, |
|
6402 |
* <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>, |
|
6403 |
* <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code> |
|
6404 |
* or <code>STRUCT</code> data type and the JDBC driver does not support |
|
6405 |
* this data type |
|
6406 |
* @see #getObject |
|
6407 |
* @since 1.4 |
|
6408 |
*/ |
|
6409 |
public void setObject(String parameterName, Object x, int targetSqlType) |
|
6410 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6411 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6412 |
} |
6413 |
||
6414 |
/** |
|
6415 |
* Sets the value of the designated parameter with the given object. |
|
6416 |
* The second parameter must be of type <code>Object</code>; therefore, the |
|
6417 |
* <code>java.lang</code> equivalent objects should be used for built-in types. |
|
6418 |
* |
|
6419 |
* <p>The JDBC specification specifies a standard mapping from |
|
6420 |
* Java <code>Object</code> types to SQL types. The given argument |
|
6421 |
* will be converted to the corresponding SQL type before being |
|
6422 |
* sent to the database. |
|
6423 |
* |
|
6424 |
* <p>Note that this method may be used to pass datatabase- |
|
6425 |
* specific abstract data types, by using a driver-specific Java |
|
6426 |
* type. |
|
6427 |
* |
|
6428 |
* If the object is of a class implementing the interface <code>SQLData</code>, |
|
6429 |
* the JDBC driver should call the method <code>SQLData.writeSQL</code> |
|
6430 |
* to write it to the SQL data stream. |
|
6431 |
* If, on the other hand, the object is of a class implementing |
|
6432 |
* <code>Ref</code>, <code>Blob</code>, <code>Clob</code>, <code>NClob</code>, |
|
6433 |
* <code>Struct</code>, <code>java.net.URL</code>, |
|
6434 |
* or <code>Array</code>, the driver should pass it to the database as a |
|
6435 |
* value of the corresponding SQL type. |
|
6436 |
* <P> |
|
6437 |
* This method throws an exception if there is an ambiguity, for example, if the |
|
6438 |
* object is of a class implementing more than one of the interfaces named above. |
|
6439 |
* |
|
6440 |
* @param parameterName the name of the parameter |
|
6441 |
* @param x the object containing the input parameter value |
|
6442 |
* @exception SQLException if a database access error occurs, |
|
6443 |
* this method is called on a closed <code>CallableStatement</code> or if the given |
|
6444 |
* <code>Object</code> parameter is ambiguous |
|
6445 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6446 |
* this method |
|
6447 |
* @see #getObject |
|
6448 |
* @since 1.4 |
|
6449 |
*/ |
|
6450 |
public void setObject(String parameterName, Object x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6451 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6452 |
} |
6453 |
||
6454 |
/** |
|
6455 |
* Sets the designated parameter to the given input stream, which will have |
|
6456 |
* the specified number of bytes. |
|
6457 |
* When a very large ASCII value is input to a <code>LONGVARCHAR</code> |
|
6458 |
* parameter, it may be more practical to send it via a |
|
6459 |
* <code>java.io.InputStream</code>. Data will be read from the stream |
|
6460 |
* as needed until end-of-file is reached. The JDBC driver will |
|
6461 |
* do any necessary conversion from ASCII to the database char format. |
|
6462 |
* |
|
6463 |
* <P><B>Note:</B> This stream object can either be a standard |
|
6464 |
* Java stream object or your own subclass that implements the |
|
6465 |
* standard interface. |
|
6466 |
* |
|
6467 |
* @param parameterName the name of the parameter |
|
6468 |
* @param x the Java input stream that contains the ASCII parameter value |
|
6469 |
* @param length the number of bytes in the stream |
|
6470 |
* @exception SQLException if a database access error occurs or |
|
6471 |
* this method is called on a closed <code>CallableStatement</code> |
|
6472 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6473 |
* this method |
|
6474 |
* @since 1.4 |
|
6475 |
*/ |
|
6476 |
public void setAsciiStream(String parameterName, java.io.InputStream x, int length) |
|
6477 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6478 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6479 |
} |
6480 |
||
6481 |
||
6482 |
/** |
|
6483 |
* Sets the designated parameter to the given input stream, which will have |
|
6484 |
* the specified number of bytes. |
|
6485 |
* When a very large binary value is input to a <code>LONGVARBINARY</code> |
|
6486 |
* parameter, it may be more practical to send it via a |
|
6487 |
* <code>java.io.InputStream</code> object. The data will be read from the stream |
|
6488 |
* as needed until end-of-file is reached. |
|
6489 |
* |
|
6490 |
* <P><B>Note:</B> This stream object can either be a standard |
|
6491 |
* Java stream object or your own subclass that implements the |
|
6492 |
* standard interface. |
|
6493 |
* |
|
6494 |
* @param parameterName the name of the parameter |
|
6495 |
* @param x the java input stream which contains the binary parameter value |
|
6496 |
* @param length the number of bytes in the stream |
|
6497 |
* @exception SQLException if a database access error occurs or |
|
6498 |
* this method is called on a closed <code>CallableStatement</code> |
|
6499 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6500 |
* this method |
|
6501 |
* @since 1.4 |
|
6502 |
*/ |
|
6503 |
public void setBinaryStream(String parameterName, java.io.InputStream x, |
|
6504 |
int length) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6505 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6506 |
} |
6507 |
||
6508 |
/** |
|
6509 |
* Sets the designated parameter to the given <code>Reader</code> |
|
6510 |
* object, which is the given number of characters long. |
|
6511 |
* When a very large UNICODE value is input to a <code>LONGVARCHAR</code> |
|
6512 |
* parameter, it may be more practical to send it via a |
|
6513 |
* <code>java.io.Reader</code> object. The data will be read from the stream |
|
6514 |
* as needed until end-of-file is reached. The JDBC driver will |
|
6515 |
* do any necessary conversion from UNICODE to the database char format. |
|
6516 |
* |
|
6517 |
* <P><B>Note:</B> This stream object can either be a standard |
|
6518 |
* Java stream object or your own subclass that implements the |
|
6519 |
* standard interface. |
|
6520 |
* |
|
6521 |
* @param parameterName the name of the parameter |
|
6522 |
* @param reader the <code>java.io.Reader</code> object that |
|
6523 |
* contains the UNICODE data used as the designated parameter |
|
6524 |
* @param length the number of characters in the stream |
|
6525 |
* @exception SQLException if a database access error occurs or |
|
6526 |
* this method is called on a closed <code>CallableStatement</code> |
|
6527 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6528 |
* this method |
|
6529 |
* @since 1.4 |
|
6530 |
*/ |
|
6531 |
public void setCharacterStream(String parameterName, |
|
6532 |
java.io.Reader reader, |
|
6533 |
int length) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6534 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6535 |
} |
6536 |
||
6537 |
/** |
|
6538 |
* Sets the designated parameter to the given input stream. |
|
6539 |
* When a very large ASCII value is input to a <code>LONGVARCHAR</code> |
|
6540 |
* parameter, it may be more practical to send it via a |
|
6541 |
* <code>java.io.InputStream</code>. Data will be read from the stream |
|
6542 |
* as needed until end-of-file is reached. The JDBC driver will |
|
6543 |
* do any necessary conversion from ASCII to the database char format. |
|
6544 |
* |
|
6545 |
* <P><B>Note:</B> This stream object can either be a standard |
|
6546 |
* Java stream object or your own subclass that implements the |
|
6547 |
* standard interface. |
|
6548 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
6549 |
* it might be more efficient to use a version of |
|
6550 |
* <code>setAsciiStream</code> which takes a length parameter. |
|
6551 |
* |
|
6552 |
* @param parameterName the name of the parameter |
|
6553 |
* @param x the Java input stream that contains the ASCII parameter value |
|
6554 |
* @exception SQLException if a database access error occurs or |
|
6555 |
* this method is called on a closed <code>CallableStatement</code> |
|
6556 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
|
6557 |
* @since 1.6 |
|
6558 |
*/ |
|
6559 |
public void setAsciiStream(String parameterName, java.io.InputStream x) |
|
6560 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6561 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6562 |
} |
6563 |
||
6564 |
||
6565 |
/** |
|
6566 |
* Sets the designated parameter to the given input stream. |
|
6567 |
* When a very large binary value is input to a <code>LONGVARBINARY</code> |
|
6568 |
* parameter, it may be more practical to send it via a |
|
6569 |
* <code>java.io.InputStream</code> object. The data will be read from the |
|
6570 |
* stream as needed until end-of-file is reached. |
|
6571 |
* |
|
6572 |
* <P><B>Note:</B> This stream object can either be a standard |
|
6573 |
* Java stream object or your own subclass that implements the |
|
6574 |
* standard interface. |
|
6575 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
6576 |
* it might be more efficient to use a version of |
|
6577 |
* <code>setBinaryStream</code> which takes a length parameter. |
|
6578 |
* |
|
6579 |
* @param parameterName the name of the parameter |
|
6580 |
* @param x the java input stream which contains the binary parameter value |
|
6581 |
* @exception SQLException if a database access error occurs or |
|
6582 |
* this method is called on a closed <code>CallableStatement</code> |
|
6583 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
|
6584 |
* @since 1.6 |
|
6585 |
*/ |
|
6586 |
public void setBinaryStream(String parameterName, java.io.InputStream x) |
|
6587 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6588 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6589 |
} |
6590 |
||
6591 |
/** |
|
6592 |
* Sets the designated parameter to the given <code>Reader</code> |
|
6593 |
* object. |
|
6594 |
* When a very large UNICODE value is input to a <code>LONGVARCHAR</code> |
|
6595 |
* parameter, it may be more practical to send it via a |
|
6596 |
* <code>java.io.Reader</code> object. The data will be read from the stream |
|
6597 |
* as needed until end-of-file is reached. The JDBC driver will |
|
6598 |
* do any necessary conversion from UNICODE to the database char format. |
|
6599 |
* |
|
6600 |
* <P><B>Note:</B> This stream object can either be a standard |
|
6601 |
* Java stream object or your own subclass that implements the |
|
6602 |
* standard interface. |
|
6603 |
* <P><B>Note:</B> Consult your JDBC driver documentation to determine if |
|
6604 |
* it might be more efficient to use a version of |
|
6605 |
* <code>setCharacterStream</code> which takes a length parameter. |
|
6606 |
* |
|
6607 |
* @param parameterName the name of the parameter |
|
6608 |
* @param reader the <code>java.io.Reader</code> object that contains the |
|
6609 |
* Unicode data |
|
6610 |
* @exception SQLException if a database access error occurs or |
|
6611 |
* this method is called on a closed <code>CallableStatement</code> |
|
6612 |
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
|
6613 |
* @since 1.6 |
|
6614 |
*/ |
|
6615 |
public void setCharacterStream(String parameterName, |
|
6616 |
java.io.Reader reader) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6617 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6618 |
} |
6619 |
||
6620 |
/** |
|
6621 |
* Sets the designated parameter to the given |
|
6622 |
* <code>java.math.BigDecimal</code> value. |
|
6623 |
* The driver converts this to an SQL <code>NUMERIC</code> value when |
|
6624 |
* it sends it to the database. |
|
6625 |
* |
|
6626 |
* @param parameterName the name of the parameter |
|
6627 |
* @param x the parameter value |
|
6628 |
* @exception SQLException if a database access error occurs or |
|
6629 |
* this method is called on a closed <code>CallableStatement</code> |
|
6630 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6631 |
* this method |
|
6632 |
* @see #getBigDecimal |
|
6633 |
* @since 1.4 |
|
6634 |
*/ |
|
6635 |
public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6636 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6637 |
} |
6638 |
||
6639 |
/** |
|
6640 |
* Sets the designated parameter to the given Java <code>String</code> value. |
|
6641 |
* The driver converts this |
|
6642 |
* to an SQL <code>VARCHAR</code> or <code>LONGVARCHAR</code> value |
|
6643 |
* (depending on the argument's |
|
6644 |
* size relative to the driver's limits on <code>VARCHAR</code> values) |
|
6645 |
* when it sends it to the database. |
|
6646 |
* |
|
6647 |
* @param parameterName the name of the parameter |
|
6648 |
* @param x the parameter value |
|
6649 |
* @exception SQLException if a database access error occurs or |
|
6650 |
* this method is called on a closed <code>CallableStatement</code> |
|
6651 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6652 |
* this method |
|
6653 |
* @see #getString |
|
6654 |
* @since 1.4 |
|
6655 |
*/ |
|
6656 |
public void setString(String parameterName, String x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6657 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6658 |
} |
6659 |
||
6660 |
||
6661 |
||
6662 |
/** |
|
6663 |
* Sets the designated parameter to the given Java array of bytes. |
|
6664 |
* The driver converts this to an SQL <code>VARBINARY</code> or |
|
6665 |
* <code>LONGVARBINARY</code> (depending on the argument's size relative |
|
6666 |
* to the driver's limits on <code>VARBINARY</code> values) when it sends |
|
6667 |
* 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 |
|
6672 |
* this method is called on a closed <code>CallableStatement</code> |
|
6673 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6674 |
* this method |
|
6675 |
* @see #getBytes |
|
6676 |
* @since 1.4 |
|
6677 |
*/ |
|
6678 |
public void setBytes(String parameterName, byte 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 |
* Sets the designated parameter to the given <code>java.sql.Timestamp</code> value. |
|
6684 |
* The driver |
|
6685 |
* converts this to an SQL <code>TIMESTAMP</code> value when it sends it to the |
|
6686 |
* database. |
|
6687 |
* |
|
6688 |
* @param parameterName the name of the parameter |
|
6689 |
* @param x the parameter value |
|
6690 |
* @exception SQLException if a database access error occurs or |
|
6691 |
* this method is called on a closed <code>CallableStatement</code> |
|
6692 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6693 |
* this method |
|
6694 |
* @see #getTimestamp |
|
6695 |
* @since 1.4 |
|
6696 |
*/ |
|
6697 |
public void setTimestamp(String parameterName, java.sql.Timestamp x) |
|
6698 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6699 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6700 |
} |
6701 |
||
6702 |
/** |
|
6703 |
* Sets the designated parameter to SQL <code>NULL</code>. |
|
6704 |
* |
|
6705 |
* <P><B>Note:</B> You must specify the parameter's SQL type. |
|
6706 |
* |
|
6707 |
* @param parameterName the name of the parameter |
|
6708 |
* @param sqlType the SQL type code defined in <code>java.sql.Types</code> |
|
6709 |
* @exception SQLException if a database access error occurs or |
|
6710 |
* this method is called on a closed <code>CallableStatement</code> |
|
6711 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6712 |
* this method |
|
6713 |
* @since 1.4 |
|
6714 |
*/ |
|
6715 |
public void setNull(String parameterName, int sqlType) throws SQLException { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6716 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6717 |
} |
6718 |
||
6719 |
/** |
|
6720 |
* Sets the designated parameter to SQL <code>NULL</code>. |
|
6721 |
* This version of the method <code>setNull</code> should |
|
6722 |
* be used for user-defined types and REF type parameters. Examples |
|
6723 |
* of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and |
|
6724 |
* named array types. |
|
6725 |
* |
|
6726 |
* <P><B>Note:</B> To be portable, applications must give the |
|
6727 |
* SQL type code and the fully-qualified SQL type name when specifying |
|
6728 |
* a NULL user-defined or REF parameter. In the case of a user-defined type |
|
6729 |
* the name is the type name of the parameter itself. For a REF |
|
6730 |
* parameter, the name is the type name of the referenced type. If |
|
6731 |
* a JDBC driver does not need the type code or type name information, |
|
6732 |
* it may ignore it. |
|
6733 |
* |
|
6734 |
* Although it is intended for user-defined and Ref parameters, |
|
6735 |
* this method may be used to set a null parameter of any JDBC type. |
|
6736 |
* If the parameter does not have a user-defined or REF type, the given |
|
6737 |
* typeName is ignored. |
|
6738 |
* |
|
6739 |
* |
|
6740 |
* @param parameterName the name of the parameter |
|
6741 |
* @param sqlType a value from <code>java.sql.Types</code> |
|
6742 |
* @param typeName the fully-qualified name of an SQL user-defined type; |
|
6743 |
* ignored if the parameter is not a user-defined type or |
|
6744 |
* SQL <code>REF</code> value |
|
6745 |
* @exception SQLException if a database access error occurs or |
|
6746 |
* this method is called on a closed <code>CallableStatement</code> |
|
6747 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6748 |
* this method |
|
6749 |
* @since 1.4 |
|
6750 |
*/ |
|
6751 |
public void setNull (String parameterName, int sqlType, String typeName) |
|
6752 |
throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6753 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6754 |
} |
6755 |
||
6756 |
/** |
|
6757 |
* Sets the designated parameter to the given Java <code>boolean</code> value. |
|
6758 |
* The driver converts this |
|
6759 |
* to an SQL <code>BIT</code> or <code>BOOLEAN</code> value when it sends it to the database. |
|
6760 |
* |
|
6761 |
* @param parameterName the name of the parameter |
|
6762 |
* @param x the parameter value |
|
6763 |
* @exception SQLException if a database access error occurs or |
|
6764 |
* this method is called on a closed <code>CallableStatement</code> |
|
6765 |
* @see #getBoolean |
|
6766 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6767 |
* this method |
|
6768 |
* @since 1.4 |
|
6769 |
*/ |
|
6770 |
public void setBoolean(String parameterName, boolean x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6771 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6772 |
} |
6773 |
||
6774 |
||
6775 |
||
6776 |
/** |
|
6777 |
* Sets the designated parameter to the given Java <code>byte</code> value. |
|
6778 |
* The driver converts this |
|
6779 |
* to an SQL <code>TINYINT</code> value when it sends it to the database. |
|
6780 |
* |
|
6781 |
* @param parameterName the name of the parameter |
|
6782 |
* @param x the parameter value |
|
6783 |
* @exception SQLException if a database access error occurs or |
|
6784 |
* this method is called on a closed <code>CallableStatement</code> |
|
6785 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6786 |
* this method |
|
6787 |
* @see #getByte |
|
6788 |
* @since 1.4 |
|
6789 |
*/ |
|
6790 |
public void setByte(String parameterName, byte x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6791 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6792 |
} |
6793 |
||
6794 |
||
6795 |
/** |
|
6796 |
* Sets the designated parameter to the given Java <code>short</code> value. |
|
6797 |
* The driver converts this |
|
6798 |
* to an SQL <code>SMALLINT</code> value when it sends it to the database. |
|
6799 |
* |
|
6800 |
* @param parameterName the name of the parameter |
|
6801 |
* @param x the parameter value |
|
6802 |
* @exception SQLException if a database access error occurs or |
|
6803 |
* this method is called on a closed <code>CallableStatement</code> |
|
6804 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6805 |
* this method |
|
6806 |
* @see #getShort |
|
6807 |
* @since 1.4 |
|
6808 |
*/ |
|
6809 |
public void setShort(String parameterName, short x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6810 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6811 |
} |
6812 |
||
6813 |
||
6814 |
/** |
|
6815 |
* Sets the designated parameter to the given Java <code>int</code> value. |
|
6816 |
* The driver converts this |
|
6817 |
* to an SQL <code>INTEGER</code> value when it sends it to the database. |
|
6818 |
* |
|
6819 |
* @param parameterName the name of the parameter |
|
6820 |
* @param x the parameter value |
|
6821 |
* @exception SQLException if a database access error occurs or |
|
6822 |
* this method is called on a closed <code>CallableStatement</code> |
|
6823 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6824 |
* this method |
|
6825 |
* @see #getInt |
|
6826 |
* @since 1.4 |
|
6827 |
*/ |
|
6828 |
public void setInt(String parameterName, int x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6829 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6830 |
} |
6831 |
||
6832 |
/** |
|
6833 |
* Sets the designated parameter to the given Java <code>long</code> value. |
|
6834 |
* The driver converts this |
|
6835 |
* to an SQL <code>BIGINT</code> value when it sends it to the database. |
|
6836 |
* |
|
6837 |
* @param parameterName the name of the parameter |
|
6838 |
* @param x the parameter value |
|
6839 |
* @exception SQLException if a database access error occurs or |
|
6840 |
* this method is called on a closed <code>CallableStatement</code> |
|
6841 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6842 |
* this method |
|
6843 |
* @see #getLong |
|
6844 |
* @since 1.4 |
|
6845 |
*/ |
|
6846 |
public void setLong(String parameterName, long x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6847 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6848 |
} |
6849 |
||
6850 |
||
6851 |
/** |
|
6852 |
* Sets the designated parameter to the given Java <code>float</code> value. |
|
6853 |
* The driver converts this |
|
6854 |
* to an SQL <code>FLOAT</code> value when it sends it to the database. |
|
6855 |
* |
|
6856 |
* @param parameterName the name of the parameter |
|
6857 |
* @param x the parameter value |
|
6858 |
* @exception SQLException if a database access error occurs or |
|
6859 |
* this method is called on a closed <code>CallableStatement</code> |
|
6860 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6861 |
* this method |
|
6862 |
* @see #getFloat |
|
6863 |
* @since 1.4 |
|
6864 |
*/ |
|
6865 |
public void setFloat(String parameterName, float x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6866 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6867 |
} |
6868 |
||
6869 |
/** |
|
6870 |
* Sets the designated parameter to the given Java <code>double</code> value. |
|
6871 |
* The driver converts this |
|
6872 |
* to an SQL <code>DOUBLE</code> value when it sends it to the database. |
|
6873 |
* |
|
6874 |
* @param parameterName the name of the parameter |
|
6875 |
* @param x the parameter value |
|
6876 |
* @exception SQLException if a database access error occurs or |
|
6877 |
* this method is called on a closed <code>CallableStatement</code> |
|
6878 |
* @exception SQLFeatureNotSupportedException if the JDBC driver does not support |
|
6879 |
* this method |
|
6880 |
* @see #getDouble |
|
6881 |
* @since 1.4 |
|
6882 |
*/ |
|
6883 |
public void setDouble(String parameterName, double x) throws SQLException{ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6884 |
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); |
2 | 6885 |
} |
6886 |
||
6887 |
/** |
|
6888 |
* This method re populates the resBundle |
|
6889 |
* during the deserialization process |
|
6890 |
* |
|
6891 |
*/ |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6892 |
private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { |
2 | 6893 |
// Default state initialization happens here |
6894 |
ois.defaultReadObject(); |
|
6895 |
// Initialization of transient Res Bundle happens here . |
|
6896 |
try { |
|
6530
bfb7b294dd14
6680198: UnmarshalException caused by incompatible serialVersionUID
lancea
parents:
5506
diff
changeset
|
6897 |
resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle(); |
2 | 6898 |
} catch(IOException ioe) {} |
6899 |
||
6900 |
} |
|
6901 |
||
6902 |
static final long serialVersionUID = -3591946023893483003L; |
|
6540 | 6903 |
|
6904 |
//------------------------- JDBC 4.1 ----------------------------------- |
|
6905 |
||
6906 |
public <T> T getObject(int columnIndex, Class<T> type) throws SQLException { |
|
6907 |
throw new SQLFeatureNotSupportedException("Not supported yet."); |
|
6908 |
} |
|
6909 |
||
6910 |
public <T> T getObject(String columnLabel, Class<T> type) throws SQLException { |
|
6911 |
throw new SQLFeatureNotSupportedException("Not supported yet."); |
|
6912 |
} |
|
2 | 6913 |
} |