KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > nqadmin > swingSet > datasources > SSRowSet


1 /* $Id: SSRowSet.java,v 1.6 2005/02/09 23:04:01 yoda2 Exp $
2  *
3  * Tab Spacing = 4
4  *
5  * Copyright (c) 2004-2005, The Pangburn Company and Prasanth R. Pasala
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions are met:
10  *
11  * Redistributions of source code must retain the above copyright notice, this
12  * list of conditions and the following disclaimer. Redistributions in binary
13  * form must reproduce the above copyright notice, this list of conditions and
14  * the following disclaimer in the documentation and/or other materials
15  * provided with the distribution. The names of its contributors may not be
16  * used to endorse or promote products derived from this software without
17  * specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  * POSSIBILITY OF SUCH DAMAGE.
30  *
31  */

32
33  package com.nqadmin.swingSet.datasources;
34
35  import java.io.Serializable JavaDoc;
36  import javax.sql.RowSetListener JavaDoc;
37  import java.sql.SQLException JavaDoc;
38  import java.sql.Date JavaDoc;
39
40  /**
41   * SSRowSet.java
42   *<p>
43   * SwingSet - Open Toolkit For Making Swing Controls Database-Aware
44   *<p><pre>
45   * This interface provides functions which can be used by other swingset components
46   * to get the values or update the values of a given column. This interface is a
47   * stripped down version of RowSet interface.
48   *
49   *</pre>
50   */

51  public interface SSRowSet extends Serializable JavaDoc{
52
53     /**
54      * Retrieves the value of the designated column in the current row of this DataSet
55      * object as a boolean in the Java programming language.
56      * @param columnIndex - column number . first column is 1, second column is 2....
57      * @return returns the column value of the current row, if the value is null then a false
58      * is returned.
59      * @throws throws an SQL exception if an access error occurs.
60      */

61     public boolean getBoolean(int columnIndex) throws SQLException JavaDoc;
62
63     /**
64      * Retrieves the value of the designated column in the current row of this DataSet
65      * object as a int in the Java programming language.
66      * @param columnIndex - column number . first column is 1, second column is 2....
67      * @return returns the column value of the current row, if the value is null then 0
68      * is returned.
69      * @throws throws an SQL exception if an access error occurs.
70      */

71     public int getInt(int columnIndex) throws SQLException JavaDoc;
72
73     /**
74      * Retrieves the value of the designated column in the current row of this DataSet
75      * object as a long in the Java programming language.
76      * @param columnIndex - column number . first column is 1, second column is 2....
77      * @return returns the column value of the current row, if the value is null then 0
78      * is returned.
79      * @throws throws an SQL exception if an access error occurs.
80      */

81     public long getLong(int columnIndex) throws SQLException JavaDoc;
82
83     /**
84      * Retrieves the value of the designated column in the current row of this DataSet
85      * object as a float in the Java programming language.
86      * @param columnIndex - column number . first column is 1, second column is 2....
87      * @return returns the column value of the current row, if the value is null then 0
88      * is returned.
89      * @throws throws an SQL exception if an access error occurs.
90      */

91     public float getFloat(int columnIndex) throws SQLException JavaDoc;
92
93     /**
94      * Retrieves the value of the designated column in the current row of this DataSet
95      * object as a double in the Java programming language.
96      * @param columnIndex - column number . first column is 1, second column is 2....
97      * @return returns the column value of the current row, if the value is null then 0
98      * is returned.
99      * @throws throws an SQL exception if an access error occurs.
100      */

101     public double getDouble(int columnIndex) throws SQLException JavaDoc;
102
103     /**
104      * Retrieves the value of the designated column in the current row of this DataSet
105      * object as a String in the Java programming language.
106      * @param columnIndex - column number . first column is 1, second column is 2....
107      * @return returns the column value of the current row, if the value is null then a null
108      * is returned.
109      * @throws throws an SQL exception if an access error occurs.
110      */

111     public String JavaDoc getString(int columnIndex) throws SQLException JavaDoc;
112
113     /**
114      * Retrieves the value of the designated column in the current row of this DataSet
115      * object as a Date in the Java programming language.
116      * @param columnIndex - column number . first column is 1, second column is 2....
117      * @return returns the column value of the current row, if the value is null then null
118      * is returned.
119      * @throws throws an SQL exception if an access error occurs.
120      */

121     public Date JavaDoc getDate(int columnIndex) throws SQLException JavaDoc;
122
123     /**
124      * Retrieves the value of the designated column in the current row of this ResultSet
125      * object as a byte array in the Java programming language. The bytes represent the
126      * raw values returned by the driver.
127      * @param columnIndex - index number of the column
128      * @return returns the column value; if the value is SQL NULL, the value returned is null
129      * @throws throws an SQLException - if a database access error occurs
130      */

131     public byte[] getBytes(int columnIndex) throws SQLException JavaDoc;
132
133     /**
134      * Updates the designated column with a boolean value. The updater methods are used to
135      * update column values in the current row or the insert row. The updater methods do
136      * not update the underlying data source; instead the updateRow or insertRow methods are called
137      * to update the underlying data source.
138      * @param columnIndex - index number of the column. first column is 1, second column is 2......
139      * @param x - new column value
140      * @throws throws an SQL exception if an access error occurs.
141      */

142     public void updateBoolean(int columnIndex, boolean x) throws SQLException JavaDoc;
143
144     /**
145      * Updates the designated column with a int value. The updater methods are used to
146      * update column values in the current row or the insert row. The updater methods do
147      * not update the underlying data source; instead the updateRow or insertRow methods are called
148      * to update the underlying data source.
149      * @param columnIndex - index number of the column. first column is 1, second column is 2......
150      * @param x - new column value
151      * @throws throws an SQL exception if an access error occurs.
152      */

153     public void updateInt(int columnIndex, int x) throws SQLException JavaDoc;
154
155     /**
156      * Updates the designated column with a long value. The updater methods are used to
157      * update column values in the current row or the insert row. The updater methods do
158      * not update the underlying data source; instead the updateRow or insertRow methods are called
159      * to update the underlying data source.
160      * @param columnIndex - index number of the column. first column is 1, second column is 2......
161      * @param x - new column value
162      * @throws throws an SQL exception if an access error occurs.
163      */

164     public void updateLong(int columnIndex, long x) throws SQLException JavaDoc;
165
166     /**
167      * Updates the designated column with a float value. The updater methods are used to
168      * update column values in the current row or the insert row. The updater methods do
169      * not update the underlying data source; instead the updateRow or insertRow methods are called
170      * to update the underlying data source.
171      * @param columnIndex - index number of the column. first column is 1, second column is 2......
172      * @param x - new column value
173      * @throws throws an SQL exception if an access error occurs.
174      */

175     public void updateFloat(int columnIndex, float x) throws SQLException JavaDoc;
176
177     /**
178      * Updates the designated column with a double value. The updater methods are used to
179      * update column values in the current row or the insert row. The updater methods do
180      * not update the underlying data source; instead the updateRow or insertRow methods are called
181      * to update the underlying data source.
182      * @param columnIndex - index number of the column. first column is 1, second column is 2......
183      * @param x - new column value
184      * @throws throws an SQL exception if an access error occurs.
185      */

186     public void updateDouble(int columnIndex, double x) throws SQLException JavaDoc;
187
188     /**
189      * Updates the designated column with a String value. The updater methods are used to
190      * update column values in the current row or the insert row. The updater methods do
191      * not update the underlying data source; instead the updateRow or insertRow methods are called
192      * to update the underlying data source.
193      * @param columnIndex - index number of the column. first column is 1, second column is 2......
194      * @param x - new column value
195      * @throws throws an SQL exception if an access error occurs.
196      */

197     public void updateString(int columnIndex, String JavaDoc x) throws SQLException JavaDoc;
198
199     /**
200      * Updates the designated column with a Date value. The updater methods are used to
201      * update column values in the current row or the insert row. The updater methods do
202      * not update the underlying data source; instead the updateRow or insertRow methods are called
203      * to update the underlying data source.
204      * @param columnIndex - index number of the column. first column is 1, second column is 2......
205      * @param x - new column value
206      * @throws throws an SQL exception if an access error occurs.
207      */

208     public void updateDate(int columnIndex, Date JavaDoc x) throws SQLException JavaDoc;
209
210     /**
211      * Updates the designated column with a null value. The updater methods are used to
212      * update column values in the current row or the insert row. The updater methods do
213      * not update the underlying data source; instead the updateRow or insertRow methods are called
214      * to update the underlying data source.
215      * @param columnIndex - index number of the column. first column is 1, second column is 2......
216      * @throws throws an SQL exception if an access error occurs.
217      */

218     public void updateNull(int columnIndex) throws SQLException JavaDoc;
219
220     /**
221      * Updates the designated column with a byte array value. The updater methods are
222      * used to update column values in the current row or the insert row. The updater
223      * methods do not update the underlying database; instead the updateRow or insertRow
224      * methods are called to update the database.
225      * @param columnIndex - the index number of the column
226      * @param x - the new column value
227      * @throws throws an SQLException - if a database access error occurs
228      */

229     public void updateBytes(int columnIndex, byte[] x) throws SQLException JavaDoc;
230     
231     /**
232      * Retrieves the value of the designated column in the current row of this DataSet
233      * object as a boolean in the Java programming language.
234      * @param columnName - name of the column
235      * @return returns the column value of the current row, if the value is null then a false
236      * is returned.
237      * @throws throws an SQL exception if an access error occurs.
238      */

239     public boolean getBoolean(String JavaDoc columnName) throws SQLException JavaDoc;
240
241     /**
242      * Retrieves the value of the designated column in the current row of this DataSet
243      * object as a int in the Java programming language.
244      * @param columnName - name of the column
245      * @return returns the column value of the current row, if the value is null then 0
246      * is returned.
247      * @throws throws an SQL exception if an access error occurs.
248      */

249     public int getInt(String JavaDoc columnName) throws SQLException JavaDoc;
250
251     /**
252      * Retrieves the value of the designated column in the current row of this DataSet
253      * object as a long in the Java programming language.
254      * @param columnName - name of the column
255      * @return returns the column value of the current row, if the value is null then 0
256      * is returned.
257      * @throws throws an SQL exception if an access error occurs.
258      */

259     public long getLong(String JavaDoc columnName) throws SQLException JavaDoc;
260
261     /**
262      * Retrieves the value of the designated column in the current row of this DataSet
263      * object as a float in the Java programming language.
264      * @param columnName - name of the column
265      * @return returns the column value of the current row, if the value is null then 0
266      * is returned.
267      * @throws throws an SQL exception if an access error occurs.
268      */

269     public float getFloat(String JavaDoc columnName) throws SQLException JavaDoc;
270
271     /**
272      * Retrieves the value of the designated column in the current row of this DataSet
273      * object as a double in the Java programming language.
274      * @param columnName - name of the column
275      * @return returns the column value of the current row, if the value is null then 0
276      * is returned.
277      * @throws throws an SQL exception if an access error occurs.
278      */

279     public double getDouble(String JavaDoc columnName) throws SQLException JavaDoc;
280
281     /**
282      * Retrieves the value of the designated column in the current row of this DataSet
283      * object as a String in the Java programming language.
284      * @param columnName - name of the column
285      * @return returns the column value of the current row, if the value is null then a null
286      * is returned.
287      * @throws throws an SQL exception if an access error occurs.
288      */

289     public String JavaDoc getString(String JavaDoc columnName) throws SQLException JavaDoc;
290
291     /**
292      * Retrieves the value of the designated column in the current row of this DataSet
293      * object as a Date in the Java programming language.
294      * @param columnName - name of the column
295      * @return returns the column value of the current row, if the value is null then a null
296      * is returned.
297      * @throws throws an SQL exception if an access error occurs.
298      */

299     public Date JavaDoc getDate(String JavaDoc columnName) throws SQLException JavaDoc;
300     
301     /**
302      * Retrieves the value of the designated column in the current row of this ResultSet
303      * object as a byte array in the Java programming language. The bytes represent the
304      * raw values returned by the driver.
305      * @param columnName - the SQL name of the column
306      * @return returns the column value; if the value is SQL NULL, the value returned is null
307      * @throws throws an SQLException - if a database access error occurs
308      */

309     public byte[] getBytes(String JavaDoc columnName) throws SQLException JavaDoc;
310
311     /**
312      * Updates the designated column with a boolean value. The updater methods are used to
313      * update column values in the current row or the insert row. The updater methods do
314      * not update the underlying data source; instead the updateRow or insertRow methods are called
315      * to update the underlying data source.
316      * @param columnName - name of the column
317      * @param x - new column value
318      * @throws throws an SQL exception if an access error occurs.
319      */

320     public void updateBoolean(String JavaDoc columnName, boolean x) throws SQLException JavaDoc;
321
322     /**
323      * Updates the designated column with a int value. The updater methods are used to
324      * update column values in the current row or the insert row. The updater methods do
325      * not update the underlying data source; instead the updateRow or insertRow methods are called
326      * to update the underlying data source.
327      * @param columnName - name of the column
328      * @param x - new column value
329      * @throws throws an SQL exception if an access error occurs.
330      */

331     public void updateInt(String JavaDoc columnName, int x) throws SQLException JavaDoc;
332
333     /**
334      * Updates the designated column with a long value. The updater methods are used to
335      * update column values in the current row or the insert row. The updater methods do
336      * not update the underlying data source; instead the updateRow or insertRow methods are called
337      * to update the underlying data source.
338      * @param columnName - name of the column
339      * @param x - new column value
340      * @throws throws an SQL exception if an access error occurs.
341      */

342     public void updateLong(String JavaDoc columnName, long x) throws SQLException JavaDoc;
343
344     /**
345      * Updates the designated column with a float value. The updater methods are used to
346      * update column values in the current row or the insert row. The updater methods do
347      * not update the underlying data source; instead the updateRow or insertRow methods are called
348      * to update the underlying data source.
349      * @param columnName - name of the column
350      * @param x - new column value
351      * @throws throws an SQL exception if an access error occurs.
352      */

353     public void updateFloat(String JavaDoc columnName, float x) throws SQLException JavaDoc;
354
355     /**
356      * Updates the designated column with a double value. The updater methods are used to
357      * update column values in the current row or the insert row. The updater methods do
358      * not update the underlying data source; instead the updateRow or insertRow methods are called
359      * to update the underlying data source.
360      * @param columnName - name of the column
361      * @param x - new column value
362      * @throws throws an SQL exception if an access error occurs.
363      */

364     public void updateDouble(String JavaDoc columnName, double x) throws SQLException JavaDoc;
365
366     /**
367      * Updates the designated column with a String value. The updater methods are used to
368      * update column values in the current row or the insert row. The updater methods do
369      * not update the underlying data source; instead the updateRow or insertRow methods are called
370      * to update the underlying data source.
371      * @param columnName - name of the column
372      * @param x - new column value
373      * @throws throws an SQL exception if an access error occurs.
374      */

375     public void updateString(String JavaDoc columnName, String JavaDoc x) throws SQLException JavaDoc;
376
377     /**
378      * Updates the designated column with a Date value. The updater methods are used to
379      * update column values in the current row or the insert row. The updater methods do
380      * not update the underlying data source; instead the updateRow or insertRow methods are called
381      * to update the underlying data source.
382      * @param columnName - name of the column
383      * @param x - new column value
384      * @throws throws an SQL exception if an access error occurs.
385      */

386     public void updateDate(String JavaDoc columnName, Date JavaDoc x) throws SQLException JavaDoc;
387     
388     /**
389      * Updates the designated column with a byte array value. The updater methods are
390      * used to update column values in the current row or the insert row. The updater
391      * methods do not update the underlying database; instead the updateRow or insertRow
392      * methods are called to update the database.
393      * @param columnName - the name of the column
394      * @param x - the new column value
395      * @throws throws an SQLException - if a database access error occurs
396      */

397     public void updateBytes(String JavaDoc columnName, byte[] x) throws SQLException JavaDoc;
398
399     /**
400      * Updates the designated column with a null value. The updater methods are used to
401      * update column values in the current row or the insert row. The updater methods do
402      * not update the underlying data source; instead the updateRow or insertRow methods are called
403      * to update the underlying data source.
404      * @param columnName - name of the column
405      * @throws throws an SQL exception if an access error occurs.
406      */

407     public void updateNull(String JavaDoc columnName) throws SQLException JavaDoc;
408
409     /**
410      * The listener will be notified whenever an event occurs on this RowSet object.
411      *
412      * Note: if the RowSetListener object is null, this method silently discards the null
413      * value and does not add a null reference to the set of listeners.
414      *
415      * Note: if the listener is already set, and the new RowSetListerner instance is added
416      * to the set of listeners already registered to receive event notifications from this
417      * RowSet
418      *
419      * @param listener - an object that has implemented the javax.sql.RowSetListener interface
420      * and wants to be notified of any events that occur on this RowSet object; May be null
421      */

422     public void addRowSetListener(RowSetListener JavaDoc listener);
423
424     /**
425      * Removes the designated object from this RowSet object's list of listeners. If the given
426      * argument is not a registered listener, this method does nothing.
427      * Note: if the RowSetListener object is null, this method silently discards the null value
428      * @param listener - a RowSetListener object that is on the list of listeners for this RowSet object
429      */

430     public void removeRowSetListener(RowSetListener JavaDoc listener);
431
432     /**
433      * Maps the given column name to its column index
434      * @param columnIndex - column number first column is 1, second column is 2 .....
435      * @return the column name of the given column index
436      * @throws SQLException - if the object does not contain columnIndex or a access
437      * error occurs
438      */

439     public String JavaDoc getColumnName(int columnIndex) throws SQLException JavaDoc;
440
441
442     /**
443      * Get the designated column's index
444      * @param columnName - name of the column
445      * @return returns the corresponding column index.
446      * @throws SQLException - if a data access error
447      */

448     public int getColumnIndex(String JavaDoc columnName) throws SQLException JavaDoc;
449
450     /**
451      * Retrieves the designated column's type
452      * @param columnName - name of the column
453      * @return SQL type from java.sql.Types
454      * @throws SQLException - if a data access error occurs
455      */

456     public int getColumnType(String JavaDoc columnName) throws SQLException JavaDoc;
457
458     /**
459      * Retrieves the designated column's type
460      * @param columnIndex - column number first column is 1, second column is 2 .....
461      * @return SQL type from java.sql.Types
462      * @throws SQLException - if a data access error occurs
463      */

464     public int getColumnType(int columnIndex) throws SQLException JavaDoc;
465
466     /**
467      * Retrieves the current row number. The first row is number 1, the second number 2,
468      * and so on.
469      * @return the current row number; 0 if there is no current row
470      * @throws SQLException - if a data access error occurs
471      */

472     public int getRow() throws SQLException JavaDoc;
473
474     /**
475      * Returns the number of columns in this ResultSet object
476      * @return the number of columns
477      * @throws SQLException - if a data access error occurs
478      */

479     public int getColumnCount() throws SQLException JavaDoc;
480
481     /**
482      * Moves the cursor down one row from its current position. A ResultSet cursor is
483      * initially positioned before the first row; the first call to the method next makes the
484      * first row the current row; the second call makes the second row the current row,
485      * and so on.
486      * If an input stream is open for the current row, a call to the method next will
487      * implicitly close it. A ResultSet object's warning chain is cleared when a new row
488      * is read.
489      * @return true if the new current row is valid; false if there are no more rows
490      * @throws SQLException - if a data access error occurs
491      */

492     public boolean next() throws SQLException JavaDoc;
493
494     /**
495      * Moves the cursor to the previous row in this ResultSet object.
496      * @return true if the cursor is on a valid row; false if it is off the result set
497      * @throws SQLException - if a data access error occurs
498      */

499     public boolean previous() throws SQLException JavaDoc;
500
501     /**
502      * Moves the cursor to the last row in this ResultSet object.
503      * @return true if the cursor is on a valid row; false if there are no rows in the
504      * result set
505      * @throws SQLException - if a data access error occurs
506      */

507     public boolean last() throws SQLException JavaDoc;
508
509     /**
510      * Moves the cursor to the first row in this ResultSet object.
511      * @return true if the cursor is on a valid row; false if there are no rows in the
512      * result set
513      * @throws SQLException - if a data access error occurs
514      */

515     public boolean first() throws SQLException JavaDoc;
516
517     /**
518      * Retrieves whether the cursor is on the first row of this ResultSet object.
519      * @return true if the cursor is on the first row; false otherwise
520      * @throws SQLException - if a data access error occurs
521      */

522     public boolean isFirst() throws SQLException JavaDoc;
523
524     /**
525      * Retrieves whether the cursor is on the last row of this ResultSet object.
526      * Note: Calling the method isLast may be expensive because the JDBC driver might
527      * need to fetch ahead one row in order to determine whether the current row is the
528      * last row in the result set.
529      * @return true if the cursor is on the last row; false otherwise
530      * @throws SQLException - if a data access error occurs
531      */

532     public boolean isLast() throws SQLException JavaDoc;
533
534     /**
535      * Moves the cursor to the front of this ResultSet object, just before the first row.
536      * This method has no effect if the result set contains no rows.
537      * @throws SQLException - if a data access error occurs
538      */

539     public void beforeFirst() throws SQLException JavaDoc;
540
541     /**
542      *<pre>
543      * Moves the cursor to the given row number in this ResultSet object.
544      * If the row number is positive, the cursor moves to the given row number with
545      * respect to the beginning of the result set. The first row is row 1, the second is
546      * row 2, and so on.
547      * If the given row number is negative, the cursor moves to an absolute row position
548      * with respect to the end of the result set. For example, calling the method absolute(-1)
549      * positions the cursor on the last row; calling the method absolute(-2) moves the cursor
550      * to the next-to-last row, and so on.
551      * An attempt to position the cursor beyond the first/last row in the result set leaves
552      * the cursor before the first row or after the last row.
553      *</pre>
554      * @param row - the number of the row to which the cursor should move.
555      * @return true if the cursor is on the result set; false otherwise
556      * @throws SQLException - if a database access error occurs
557      */

558     public boolean absolute(int row) throws SQLException JavaDoc;
559
560     /**
561      * Updates the underlying database with the new contents of the current row of this
562      * ResultSet object. This method cannot be called when the cursor is on the insert row.
563      * @throws SQLException - if a data access error occurs or if this method is called when
564      * the cursor is on the insert row
565      */

566     public void updateRow() throws SQLException JavaDoc;
567
568     /**
569      * Moves the cursor to the remembered cursor position, usually the current row.
570      * This method has no effect if the cursor is not on the insert row.
571      * @throws SQLException - if a data access error occurs
572      */

573     public void moveToCurrentRow() throws SQLException JavaDoc;
574
575     /**
576      * Moves the cursor to the insert row. The current cursor position is remembered
577      * while the cursor is positioned on the insert row. The insert row is a special
578      * row associated with an updatable result set. It is essentially a buffer where
579      * a new row may be constructed by calling the updater methods prior to inserting
580      * the row into the result set. Only the updater, getter, and insertRow methods may
581      * be called when the cursor is on the insert row. All of the columns in a result
582      * set must be given a value each time this method is called before calling insertRow.
583      * An updater method must be called before a getter method can be called on a column
584      * value.
585      * @throws SQLException - if a data access error occurs
586      */

587     public void moveToInsertRow() throws SQLException JavaDoc;
588
589     /**
590      * Inserts the contents of the insert row into this ResultSet object and into the
591      * database. The cursor must be on the insert row when this method is called.
592      * @throws SQLException - if a data access error occurs,if this method is called when
593      * the cursor is not on the insert row, or if not all of non-nullable columns in the
594      * insert row have been given a value
595      */

596     public void insertRow() throws SQLException JavaDoc;
597
598     /**
599      * Deletes the current row from this ResultSet object and from the underlying
600      * database. This method cannot be called when the cursor is on the insert row.
601      * @throws SQLException - if a data access error occurs or if this method is called
602      * when the cursor is on the insert row
603      */

604     public void deleteRow() throws SQLException JavaDoc;
605
606     /**
607      * Refreshes the current row with its most recent value in the database. This
608      * method cannot be called when the cursor is on the insert row.
609      * The refreshRow method provides a way for an application to explicitly tell the
610      * JDBC driver to refetch a row(s) from the database. An application may want to
611      * call refreshRow when caching or prefetching is being done by the JDBC driver to
612      * fetch the latest value of a row from the database. The JDBC driver may actually
613      * refresh multiple rows at once if the fetch size is greater than one.
614      * All values are refetched subject to the transaction isolation level and cursor
615      * sensitivity. If refreshRow is called after calling an updater method, but before
616      * calling the method updateRow, then the updates made to the row are lost. Calling
617      * the method refreshRow frequently will likely slow performance
618      * @throws SQLException - if a data access error occurs or if this method is called
619      * when the cursor is on the insert row
620      */

621     public void refreshRow() throws SQLException JavaDoc;
622
623
624     /**
625      * Cancels the updates made to the current row in this ResultSet object. This method
626      * may be called after calling an updater method(s) and before calling the method
627      * updateRow to roll back the updates made to a row. If no updates have been made or
628      * updateRow has already been called, this method has no effect
629      * @throws SQLException - if a data access error occurs or if this method is called when
630      * the cursor is on the insert row
631      */

632     public void cancelRowUpdates() throws SQLException JavaDoc;
633
634     /**
635      * Fills this RowSet object with data.
636      * If the required properties have not been set, an exception is thrown. If this
637      * method is successful, the current contents of the rowset are discarded. If there
638      * are outstanding updates, they are ignored.
639      * @throws SQLException - if a data access error occurs or any of the properties necessary
640      * for making a connection have not been set
641      */

642     public void execute() throws SQLException JavaDoc;
643
644  }
645
646 /*
647  * $Log: SSRowSet.java,v $
648  * Revision 1.6 2005/02/09 23:04:01 yoda2
649  * JavaDoc cleanup.
650  *
651  * Revision 1.5 2005/02/04 22:49:10 yoda2
652  * API cleanup & updated Copyright info.
653  *
654  * Revision 1.4 2005/01/18 20:58:15 prasanth
655  * Added function to get & set bytes.
656  *
657  * Revision 1.3 2004/11/11 14:45:57 yoda2
658  * Using TextPad, converted all tabs to "soft" tabs comprised of four actual spaces.
659  *
660  * Revision 1.2 2004/11/01 15:53:19 yoda2
661  * Fixed various JavaDoc errors.
662  *
663  * Revision 1.1 2004/10/25 21:47:50 prasanth
664  * Initial Commit
665  *
666  */
Popular Tags