KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openharmonise > commons > dsi > CachedResultSet


1 /*
2  * The contents of this file are subject to the
3  * Mozilla Public License Version 1.1 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at http://www.mozilla.org/MPL/
6  *
7  * Software distributed under the License is distributed on an "AS IS"
8  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
9  * See the License for the specific language governing rights and
10  * limitations under the License.
11  *
12  * The Initial Developer of the Original Code is Simulacra Media Ltd.
13  * Portions created by Simulacra Media Ltd are Copyright (C) Simulacra Media Ltd, 2004.
14  *
15  * All Rights Reserved.
16  *
17  * Contributor(s):
18  */

19 package org.openharmonise.commons.dsi;
20
21 import java.io.InputStream JavaDoc;
22 import java.io.Reader JavaDoc;
23 import java.math.BigDecimal JavaDoc;
24 import java.net.URL JavaDoc;
25 import java.sql.*;
26 import java.sql.Date JavaDoc;
27
28 import java.util.*;
29
30
31 /**
32  * A result set that caches the data retrieved from a SQL query. Unlike the
33  * <code>java.sql.ResultSet<code> the order of data access does not matter
34  * and can be accessed more than once.
35  *
36  * <b>Warning: only the most commonly used get methods have been implemented.</b>
37  *
38  * @author Michael Bell
39  * @version $Revision: 1.2 $
40  *
41  */

42 public class CachedResultSet implements ResultSet, Cloneable JavaDoc {
43     
44     /**
45      * List of column names
46      */

47     protected List m_colNames = new Vector();
48     
49     /**
50      * List of column data types
51      */

52     protected List m_colTypes = new Vector();
53     
54     /**
55      * List of rows of result set
56      */

57     protected List m_rows = new Vector();
58     
59     /**
60      * Current row of data
61      */

62     protected List m_currentrow = null; //vector of values
63

64     /**
65      * List of rows read
66      */

67     protected List m_readMarks = new Vector();
68     
69     /**
70      * Index of current row in list of rows
71      */

72     protected int m_mark = -1;
73     
74     /**
75      * Number of rows
76      */

77     protected int m_resultTotal = -1;
78
79     /**
80      * Constructs empty result set
81      *
82      */

83     public CachedResultSet() {
84     }
85
86     /**
87      * Constructs cached result set from the given <code>ResultSet</code>.
88      *
89      * @param rs the result set to cache
90      * @throws DataStoreException if an error occurs loading data
91      */

92     public CachedResultSet(ResultSet rs) throws DataStoreException {
93         loadResultSet(rs, -1);
94     }
95
96     /**
97      * Constructs a cached result set from the given <code>ResultSet</code>,
98      * caching only the number of rows specified.
99      *
100      * @param rs the result set to cache
101      * @param numrows the number of rows to cache
102      * @throws DataStoreException if an error occurs loading data
103      */

104     public CachedResultSet(ResultSet rs, int numrows) throws DataStoreException {
105         loadResultSet(rs, numrows);
106     }
107
108
109     /* (non-Javadoc)
110      * @see java.lang.Object#clone()
111      */

112     public Object JavaDoc clone() {
113         try {
114             return super.clone();
115         } catch (CloneNotSupportedException JavaDoc e) {
116             return null;
117         } catch (Exception JavaDoc e) {
118             //not sure what we should do here
119
return null;
120         }
121     }
122
123     /**
124      * Caches the given <code>ResultSet</code>.
125      *
126      * @param rs the result set to cache
127      * @throws DataStoreException if an error occurs loading the data
128      */

129     public void cacheResultSet(ResultSet rs) throws DataStoreException {
130         initialise();
131         loadResultSet(rs, -1);
132     }
133
134     /**
135      * Cache the specified number of rows from the given <code>ResultSet</code>.
136      *
137      * @param rs the result set to cache
138      * @param numrows the number of rows to cache
139      * @throws DataStoreException if an error occurs loading data
140      */

141     public void cacheResultSet(ResultSet rs, int numrows)
142                         throws DataStoreException {
143         initialise();
144         loadResultSet(rs, numrows);
145     }
146
147     
148     /* (non-Javadoc)
149      * @see java.sql.ResultSet#next()
150      */

151     public boolean next() {
152         return setCurrentRow(++m_mark);
153     }
154
155     /* (non-Javadoc)
156      * @see java.sql.ResultSet#previous()
157      */

158     public boolean previous() {
159         return setCurrentRow(--m_mark);
160     }
161
162     /**
163      * Sets the current row.
164      *
165      * @param nIndex the index of the current row
166      */

167     public void setStartRow(int nIndex) {
168         m_mark = nIndex - 1;
169     }
170
171     /**
172      * Marks the current row as read.
173      */

174     public void markCurrentRowAsRead() {
175         if ((m_mark >= 0) && (m_mark < this.m_readMarks.size())) {
176             this.m_readMarks.set(m_mark,new Boolean JavaDoc(true));
177         }
178     }
179
180     /**
181      * Clears the current row.
182      *
183      */

184     public void clearRow() {
185         for (int i = 0; i < m_currentrow.size(); i++) {
186             m_currentrow.set(i,null);
187         }
188     }
189
190     /**
191      * Clears the current row, except for the specified column.
192      *
193      * @param columnToLeave the name of the column to retain
194      */

195     public void clearRow(String JavaDoc columnToLeave) {
196         for (int i = 0; i < m_currentrow.size(); i++) {
197             String JavaDoc sCol = (String JavaDoc) m_colNames.get(i);
198
199             if (sCol.equals(columnToLeave) == false) {
200                 m_currentrow.set(i,null);
201             }
202         }
203     }
204
205     /**
206      * Clears the current row, except for the specified columns.
207      *
208      * @param columnsToLeave list of names of columns to retain
209      */

210     public void clearRow(List columnsToLeave) {
211         for (int i = 0; i < m_currentrow.size(); i++) {
212             String JavaDoc sCol = (String JavaDoc) m_colNames.get(i);
213
214             if (columnsToLeave.contains(sCol) == false) {
215                 m_currentrow.set(i,null);
216             }
217         }
218     }
219     
220     /**
221      * Removes result set row from this result set.
222      *
223      * @param index the index of the row to remove
224      */

225     public void removeRow(int index) {
226         if ((index >= 0) && (index < m_rows.size())) {
227             m_rows.remove(index);
228             m_readMarks.remove(index);
229             m_resultTotal--;
230
231             if (m_mark == index) {
232                 m_mark--;
233                 this.m_currentrow = (List)m_rows.get(m_mark);
234             }
235         }
236     }
237
238     /**
239      * Returns <code>true</code> if the current row has been read.
240      *
241      * @return <code>true</code> if the current row has been read.
242      */

243     public boolean hasCurrentRowBeenRead() {
244         boolean bReturn = false;
245
246         if ((m_mark >= 0) && (m_mark < this.m_readMarks.size())) {
247             bReturn = ((Boolean JavaDoc) m_readMarks.get(m_mark)).booleanValue();
248         }
249
250         return bReturn;
251     }
252
253     
254     /* (non-Javadoc)
255      * @see java.sql.ResultSet#getInt(java.lang.String)
256      */

257     public int getInt(String JavaDoc sName) {
258         int nReturn = -1;
259         Integer JavaDoc Ival = (Integer JavaDoc) getColumnValue(sName);
260
261         if (Ival != null) {
262             nReturn = Ival.intValue();
263         }
264
265         return nReturn;
266     }
267
268     /* (non-Javadoc)
269      * @see java.sql.ResultSet#getInt(int)
270      */

271     public int getInt(int nIndex) {
272         int nReturn = -1;
273         Integer JavaDoc Ival = (Integer JavaDoc) getColumnValue(nIndex);
274
275         if (Ival != null) {
276             nReturn = Ival.intValue();
277         }
278
279         return nReturn;
280     }
281
282     /* (non-Javadoc)
283      * @see java.sql.ResultSet#getString(java.lang.String)
284      */

285     public String JavaDoc getString(String JavaDoc sName) {
286         return (String JavaDoc) getColumnValue(sName);
287     }
288
289     /* (non-Javadoc)
290      * @see java.sql.ResultSet#getString(int)
291      */

292     public String JavaDoc getString(int nIndex) {
293         return (String JavaDoc) getColumnValue(nIndex);
294     }
295
296     /* (non-Javadoc)
297      * @see java.sql.ResultSet#getDate(java.lang.String)
298      */

299     public java.sql.Date JavaDoc getDate(String JavaDoc sName) {
300         return (java.sql.Date JavaDoc) getColumnValue(sName);
301     }
302
303
304     /* (non-Javadoc)
305      * @see java.sql.ResultSet#getDate(int)
306      */

307     public java.sql.Date JavaDoc getDate(int nIndex) {
308         return (java.sql.Date JavaDoc) getColumnValue(nIndex);
309     }
310
311     /* (non-Javadoc)
312      * @see java.sql.ResultSet#getBoolean(java.lang.String)
313      */

314     public boolean getBoolean(String JavaDoc sName) {
315         boolean bReturn = false;
316         Boolean JavaDoc Bval = null;
317         Object JavaDoc obj = getColumnValue(sName);
318
319         if (obj instanceof Boolean JavaDoc) {
320             Bval = (Boolean JavaDoc) obj;
321
322             if (Bval != null) {
323                 bReturn = Bval.booleanValue();
324             }
325         } else if (obj instanceof Integer JavaDoc) {
326             if (((Integer JavaDoc) obj).intValue() > 0) {
327                 bReturn = true;
328             } else {
329                 bReturn = false;
330             }
331         }
332
333         return bReturn;
334     }
335
336     /* (non-Javadoc)
337      * @see java.sql.ResultSet#getBoolean(int)
338      */

339     public boolean getBoolean(int nIndex) {
340         boolean bReturn = false;
341
342         Boolean JavaDoc Bval = (Boolean JavaDoc) getColumnValue(nIndex);
343
344         if (Bval != null) {
345             bReturn = Bval.booleanValue();
346         }
347
348         return bReturn;
349     }
350
351     /**
352      * Returns the number of rows in this result set.
353      *
354      * @return the number of rows in this result set
355      */

356     public int getResultTotal() {
357         return m_rows.size();
358     }
359
360     /**
361      * Sets the current row.
362      *
363      * @param nIndex the index of the current row
364      * @return <code>true</code> if the operation was successful
365      */

366     private boolean setCurrentRow(int nIndex) {
367         boolean bReturn = false;
368
369         if (m_rows.size() > nIndex) {
370             bReturn = true;
371             m_currentrow = (Vector) m_rows.get(nIndex);
372         }
373
374         return bReturn;
375     }
376
377     /**
378      * Returns the value of the specified column in the current row.
379      *
380      * @param sName the name of the column
381      * @return the value of the column in the current row
382      */

383     private Object JavaDoc getColumnValue(String JavaDoc sName) {
384         Object JavaDoc obj = null;
385         int nIndex = this.m_colNames.indexOf(sName.toLowerCase());
386
387         if (nIndex >= 0) {
388             obj = m_currentrow.get(nIndex);
389         }
390
391         return obj;
392     }
393
394     /**
395      * Returns the value of the specified column in the current row.
396      *
397      * @param nIndex the index of the column
398      * @return value of the specified column in the current row
399      */

400     private Object JavaDoc getColumnValue(int nIndex) {
401         Object JavaDoc obj = null;
402
403         if ((nIndex >= 0) && (nIndex < m_currentrow.size())) {
404             obj = m_currentrow.get(nIndex - 1);
405         }
406
407         return obj;
408     }
409
410     /**
411      * Loads the given result set in to this result set.
412      *
413      * @param rs the result set to load
414      * @param numRowsToLoad the number of row to load
415      * @throws DataStoreException if an error occurs loading the data
416      */

417     private void loadResultSet(ResultSet rs, int numRowsToLoad)
418                         throws DataStoreException {
419         try {
420             ResultSetMetaData meta = rs.getMetaData();
421             
422             for (int i = 0; i < meta.getColumnCount(); i++) {
423                 int colNum = i + 1;
424                 m_colNames.add(meta.getColumnName(colNum).toLowerCase());
425                 m_colTypes.add(new Integer JavaDoc(meta.getColumnType(colNum)));
426             }
427             
428             int nCount = 0;
429             boolean bLoop = true;
430             
431             while (rs.next() && bLoop) {
432                 Vector row = new Vector(m_colNames.size());
433             
434                 for (int i = 0; i < m_colNames.size(); i++) {
435                     int colType = ((Integer JavaDoc) m_colTypes.get(i)).intValue();
436                     int colNum = i + 1;
437             
438                     if (colType == Types.INTEGER) {
439                         row.add(new Integer JavaDoc(rs.getInt(colNum)));
440                     } else if (colType == Types.NUMERIC) {
441                         row.add(new Integer JavaDoc(rs.getInt(colNum)));
442                     } else if ((colType == Types.VARCHAR) ||
443                     (colType == Types.LONGVARCHAR) || colType == Types.CHAR) {
444                         row.add(rs.getString(colNum));
445                     } else if (colType == Types.BIT || colType == Types.SMALLINT) {
446                         row.add(new Boolean JavaDoc(rs.getBoolean(colNum)));
447                     } else if ((colType == Types.DATE) ||
448                                    (colType == Types.TIME) ||
449                                    (colType == Types.TIMESTAMP)) {
450                         row.add(rs.getDate(colNum));
451                     } else {
452                         throw new DataStoreException(
453                                 "Unknown data type for column: " + colType);
454                     }
455                 }
456             
457                 if (row.size() != m_colNames.size()) {
458                     throw new DataStoreException("Not cached all columns (" +
459                                                  row.size() +
460                                                  " in cached row to " +
461                                                  m_colNames.size() +
462                                                  " in source row)");
463                 }
464             
465                 this.m_rows.add(row);
466                 this.m_readMarks.add(new Boolean JavaDoc(false));
467                 nCount++;
468             
469                 if (numRowsToLoad > 0) {
470                     if (nCount >= numRowsToLoad) {
471                         bLoop = false;
472                     }
473                 }
474             }
475         } catch (SQLException e) {
476             throw new DataStoreException(e);
477         }
478
479         //System.out.println("Cached result set:\n" + this.toString());
480
}
481
482     /**
483      * Initialises this result set.
484      *
485      */

486     private void initialise() {
487         m_colNames.clear();
488         m_colTypes.clear();
489         m_rows.clear();
490
491         Vector m_currentrow = null;
492     }
493
494     /* (non-Javadoc)
495      * @see java.lang.Object#toString()
496      */

497     public String JavaDoc toString() {
498         StringBuffer JavaDoc sbuf = new StringBuffer JavaDoc();
499
500         sbuf.append("columns:");
501
502         for (int i = 0; i < this.m_colNames.size(); i++) {
503             if (i > 0) {
504                 sbuf.append(",");
505             }
506
507             sbuf.append((String JavaDoc) m_colNames.get(i)).append("(")
508                 .append(m_colTypes.get(i)).append(")");
509         }
510
511         sbuf.append("\n");
512         sbuf.append("num rows:" + this.m_rows.size());
513         sbuf.append("\n").append("current row:" + this.m_mark);
514
515         return sbuf.toString();
516     }
517
518     /* (non-Javadoc)
519      * @see java.sql.ResultSet#close()
520      */

521     public void close() throws SQLException {
522         //do nothing as this a cached result set with
523
//no live connection
524
}
525
526     /* (non-Javadoc)
527      * @see java.sql.ResultSet#wasNull()
528      */

529     public boolean wasNull() throws SQLException {
530         throw new UnsupportedOperationException JavaDoc();
531     }
532
533     /* (non-Javadoc)
534      * @see java.sql.ResultSet#getByte(int)
535      */

536     public byte getByte(int arg0) throws SQLException {
537         throw new UnsupportedOperationException JavaDoc();
538     }
539
540     /* (non-Javadoc)
541      * @see java.sql.ResultSet#getShort(int)
542      */

543     public short getShort(int arg0) throws SQLException {
544         throw new UnsupportedOperationException JavaDoc();
545     }
546
547     /* (non-Javadoc)
548      * @see java.sql.ResultSet#getLong(int)
549      */

550     public long getLong(int arg0) throws SQLException {
551         throw new UnsupportedOperationException JavaDoc();
552     }
553
554     /* (non-Javadoc)
555      * @see java.sql.ResultSet#getFloat(int)
556      */

557     public float getFloat(int arg0) throws SQLException {
558         throw new UnsupportedOperationException JavaDoc();
559     }
560
561     /* (non-Javadoc)
562      * @see java.sql.ResultSet#getDouble(int)
563      */

564     public double getDouble(int arg0) throws SQLException {
565         throw new UnsupportedOperationException JavaDoc();
566     }
567
568     /* (non-Javadoc)
569      * @see java.sql.ResultSet#getBigDecimal(int, int)
570      */

571     public BigDecimal JavaDoc getBigDecimal(int arg0, int arg1) throws SQLException {
572         throw new UnsupportedOperationException JavaDoc();
573     }
574
575     /* (non-Javadoc)
576      * @see java.sql.ResultSet#getBytes(int)
577      */

578     public byte[] getBytes(int arg0) throws SQLException {
579         throw new UnsupportedOperationException JavaDoc();
580     }
581
582     /* (non-Javadoc)
583      * @see java.sql.ResultSet#getTime(int)
584      */

585     public Time getTime(int arg0) throws SQLException {
586         throw new UnsupportedOperationException JavaDoc();
587     }
588
589     /* (non-Javadoc)
590      * @see java.sql.ResultSet#getTimestamp(int)
591      */

592     public Timestamp getTimestamp(int arg0) throws SQLException {
593         Timestamp val = null;
594         Date JavaDoc dt = getDate(arg0);
595         
596         if(dt != null) {
597             val = new Timestamp(dt.getTime());
598         }
599         
600         return val;
601     }
602
603     /* (non-Javadoc)
604      * @see java.sql.ResultSet#getAsciiStream(int)
605      */

606     public InputStream JavaDoc getAsciiStream(int arg0) throws SQLException {
607         throw new UnsupportedOperationException JavaDoc();
608     }
609
610     /* (non-Javadoc)
611      * @see java.sql.ResultSet#getUnicodeStream(int)
612      */

613     public InputStream JavaDoc getUnicodeStream(int arg0) throws SQLException {
614         throw new UnsupportedOperationException JavaDoc();
615     }
616
617     /* (non-Javadoc)
618      * @see java.sql.ResultSet#getBinaryStream(int)
619      */

620     public InputStream JavaDoc getBinaryStream(int arg0) throws SQLException {
621         throw new UnsupportedOperationException JavaDoc();
622     }
623
624     /* (non-Javadoc)
625      * @see java.sql.ResultSet#getByte(java.lang.String)
626      */

627     public byte getByte(String JavaDoc arg0) throws SQLException {
628         throw new UnsupportedOperationException JavaDoc();
629     }
630
631     /* (non-Javadoc)
632      * @see java.sql.ResultSet#getShort(java.lang.String)
633      */

634     public short getShort(String JavaDoc arg0) throws SQLException {
635         throw new UnsupportedOperationException JavaDoc();
636     }
637
638     /* (non-Javadoc)
639      * @see java.sql.ResultSet#getLong(java.lang.String)
640      */

641     public long getLong(String JavaDoc arg0) throws SQLException {
642         throw new UnsupportedOperationException JavaDoc();
643     }
644
645     /* (non-Javadoc)
646      * @see java.sql.ResultSet#getFloat(java.lang.String)
647      */

648     public float getFloat(String JavaDoc arg0) throws SQLException {
649         throw new UnsupportedOperationException JavaDoc();
650     }
651
652     /* (non-Javadoc)
653      * @see java.sql.ResultSet#getDouble(java.lang.String)
654      */

655     public double getDouble(String JavaDoc arg0) throws SQLException {
656         throw new UnsupportedOperationException JavaDoc();
657     }
658
659     /* (non-Javadoc)
660      * @see java.sql.ResultSet#getBigDecimal(java.lang.String, int)
661      */

662     public BigDecimal JavaDoc getBigDecimal(String JavaDoc arg0, int arg1) throws SQLException {
663         throw new UnsupportedOperationException JavaDoc();
664     }
665
666     /* (non-Javadoc)
667      * @see java.sql.ResultSet#getBytes(java.lang.String)
668      */

669     public byte[] getBytes(String JavaDoc arg0) throws SQLException {
670         throw new UnsupportedOperationException JavaDoc();
671     }
672
673     /* (non-Javadoc)
674      * @see java.sql.ResultSet#getTime(java.lang.String)
675      */

676     public Time getTime(String JavaDoc arg0) throws SQLException {
677         throw new UnsupportedOperationException JavaDoc();
678     }
679
680     /* (non-Javadoc)
681      * @see java.sql.ResultSet#getTimestamp(java.lang.String)
682      */

683     public Timestamp getTimestamp(String JavaDoc arg0) throws SQLException {
684         Timestamp val = null;
685         Date JavaDoc dt = getDate(arg0);
686         
687         if(dt != null) {
688             val = new Timestamp(dt.getTime());
689         }
690         
691         return val;
692     }
693
694     /* (non-Javadoc)
695      * @see java.sql.ResultSet#getAsciiStream(java.lang.String)
696      */

697     public InputStream JavaDoc getAsciiStream(String JavaDoc arg0) throws SQLException {
698         throw new UnsupportedOperationException JavaDoc();
699     }
700
701     /* (non-Javadoc)
702      * @see java.sql.ResultSet#getUnicodeStream(java.lang.String)
703      */

704     public InputStream JavaDoc getUnicodeStream(String JavaDoc arg0) throws SQLException {
705         throw new UnsupportedOperationException JavaDoc();
706     }
707
708     /* (non-Javadoc)
709      * @see java.sql.ResultSet#getBinaryStream(java.lang.String)
710      */

711     public InputStream JavaDoc getBinaryStream(String JavaDoc arg0) throws SQLException {
712         throw new UnsupportedOperationException JavaDoc();
713     }
714
715     /* (non-Javadoc)
716      * @see java.sql.ResultSet#getWarnings()
717      */

718     public SQLWarning getWarnings() throws SQLException {
719         throw new UnsupportedOperationException JavaDoc();
720     }
721
722     /* (non-Javadoc)
723      * @see java.sql.ResultSet#clearWarnings()
724      */

725     public void clearWarnings() throws SQLException {
726         //do nothing - there was no warnings
727
}
728
729     /* (non-Javadoc)
730      * @see java.sql.ResultSet#getCursorName()
731      */

732     public String JavaDoc getCursorName() throws SQLException {
733         throw new UnsupportedOperationException JavaDoc();
734     }
735
736     /* (non-Javadoc)
737      * @see java.sql.ResultSet#getMetaData()
738      */

739     public ResultSetMetaData getMetaData() throws SQLException {
740         throw new UnsupportedOperationException JavaDoc();
741     }
742
743     /* (non-Javadoc)
744      * @see java.sql.ResultSet#getObject(int)
745      */

746     public Object JavaDoc getObject(int arg0) throws SQLException {
747         throw new UnsupportedOperationException JavaDoc();
748     }
749
750     /* (non-Javadoc)
751      * @see java.sql.ResultSet#getObject(java.lang.String)
752      */

753     public Object JavaDoc getObject(String JavaDoc arg0) throws SQLException {
754         throw new UnsupportedOperationException JavaDoc();
755     }
756
757     /* (non-Javadoc)
758      * @see java.sql.ResultSet#findColumn(java.lang.String)
759      */

760     public int findColumn(String JavaDoc arg0) throws SQLException {
761         throw new UnsupportedOperationException JavaDoc();
762     }
763
764     /* (non-Javadoc)
765      * @see java.sql.ResultSet#getCharacterStream(int)
766      */

767     public Reader JavaDoc getCharacterStream(int arg0) throws SQLException {
768         throw new UnsupportedOperationException JavaDoc();
769     }
770
771     /* (non-Javadoc)
772      * @see java.sql.ResultSet#getCharacterStream(java.lang.String)
773      */

774     public Reader JavaDoc getCharacterStream(String JavaDoc arg0) throws SQLException {
775         throw new UnsupportedOperationException JavaDoc();
776     }
777
778     /* (non-Javadoc)
779      * @see java.sql.ResultSet#getBigDecimal(int)
780      */

781     public BigDecimal JavaDoc getBigDecimal(int arg0) throws SQLException {
782         throw new UnsupportedOperationException JavaDoc();
783     }
784
785     /* (non-Javadoc)
786      * @see java.sql.ResultSet#getBigDecimal(java.lang.String)
787      */

788     public BigDecimal JavaDoc getBigDecimal(String JavaDoc arg0) throws SQLException {
789         throw new UnsupportedOperationException JavaDoc();
790     }
791
792     /* (non-Javadoc)
793      * @see java.sql.ResultSet#isBeforeFirst()
794      */

795     public boolean isBeforeFirst() throws SQLException {
796         throw new UnsupportedOperationException JavaDoc();
797     }
798
799     /* (non-Javadoc)
800      * @see java.sql.ResultSet#isAfterLast()
801      */

802     public boolean isAfterLast() throws SQLException {
803         throw new UnsupportedOperationException JavaDoc();
804     }
805
806     /* (non-Javadoc)
807      * @see java.sql.ResultSet#isFirst()
808      */

809     public boolean isFirst() throws SQLException {
810         throw new UnsupportedOperationException JavaDoc();
811     }
812
813     /* (non-Javadoc)
814      * @see java.sql.ResultSet#isLast()
815      */

816     public boolean isLast() throws SQLException {
817         throw new UnsupportedOperationException JavaDoc();
818     }
819
820     /* (non-Javadoc)
821      * @see java.sql.ResultSet#beforeFirst()
822      */

823     public void beforeFirst() throws SQLException {
824         throw new UnsupportedOperationException JavaDoc();
825     }
826
827     /* (non-Javadoc)
828      * @see java.sql.ResultSet#afterLast()
829      */

830     public void afterLast() throws SQLException {
831         throw new UnsupportedOperationException JavaDoc();
832     }
833
834     /* (non-Javadoc)
835      * @see java.sql.ResultSet#first()
836      */

837     public boolean first() throws SQLException {
838         throw new UnsupportedOperationException JavaDoc();
839     }
840
841     /* (non-Javadoc)
842      * @see java.sql.ResultSet#last()
843      */

844     public boolean last() throws SQLException {
845         throw new UnsupportedOperationException JavaDoc();
846     }
847
848     /* (non-Javadoc)
849      * @see java.sql.ResultSet#getRow()
850      */

851     public int getRow() throws SQLException {
852         throw new UnsupportedOperationException JavaDoc();
853     }
854
855     /* (non-Javadoc)
856      * @see java.sql.ResultSet#absolute(int)
857      */

858     public boolean absolute(int arg0) throws SQLException {
859         throw new UnsupportedOperationException JavaDoc();
860     }
861
862     /* (non-Javadoc)
863      * @see java.sql.ResultSet#relative(int)
864      */

865     public boolean relative(int arg0) throws SQLException {
866         throw new UnsupportedOperationException JavaDoc();
867     }
868
869     /* (non-Javadoc)
870      * @see java.sql.ResultSet#setFetchDirection(int)
871      */

872     public void setFetchDirection(int arg0) throws SQLException {
873         throw new UnsupportedOperationException JavaDoc();
874     }
875
876     /* (non-Javadoc)
877      * @see java.sql.ResultSet#getFetchDirection()
878      */

879     public int getFetchDirection() throws SQLException {
880         throw new UnsupportedOperationException JavaDoc();
881     }
882
883     /* (non-Javadoc)
884      * @see java.sql.ResultSet#setFetchSize(int)
885      */

886     public void setFetchSize(int arg0) throws SQLException {
887         throw new UnsupportedOperationException JavaDoc();
888     }
889
890     /* (non-Javadoc)
891      * @see java.sql.ResultSet#getFetchSize()
892      */

893     public int getFetchSize() throws SQLException {
894         throw new UnsupportedOperationException JavaDoc();
895     }
896
897     /* (non-Javadoc)
898      * @see java.sql.ResultSet#getType()
899      */

900     public int getType() throws SQLException {
901         throw new UnsupportedOperationException JavaDoc();
902     }
903
904     /* (non-Javadoc)
905      * @see java.sql.ResultSet#getConcurrency()
906      */

907     public int getConcurrency() throws SQLException {
908         throw new UnsupportedOperationException JavaDoc();
909     }
910
911     /* (non-Javadoc)
912      * @see java.sql.ResultSet#rowUpdated()
913      */

914     public boolean rowUpdated() throws SQLException {
915         throw new UnsupportedOperationException JavaDoc();
916     }
917
918     /* (non-Javadoc)
919      * @see java.sql.ResultSet#rowInserted()
920      */

921     public boolean rowInserted() throws SQLException {
922         throw new UnsupportedOperationException JavaDoc();
923     }
924
925     /* (non-Javadoc)
926      * @see java.sql.ResultSet#rowDeleted()
927      */

928     public boolean rowDeleted() throws SQLException {
929         throw new UnsupportedOperationException JavaDoc();
930     }
931
932     /* (non-Javadoc)
933      * @see java.sql.ResultSet#updateNull(int)
934      */

935     public void updateNull(int arg0) throws SQLException {
936         throw new UnsupportedOperationException JavaDoc();
937     }
938
939     /* (non-Javadoc)
940      * @see java.sql.ResultSet#updateBoolean(int, boolean)
941      */

942     public void updateBoolean(int arg0, boolean arg1) throws SQLException {
943         throw new UnsupportedOperationException JavaDoc();
944     }
945
946     /* (non-Javadoc)
947      * @see java.sql.ResultSet#updateByte(int, byte)
948      */

949     public void updateByte(int arg0, byte arg1) throws SQLException {
950         throw new UnsupportedOperationException JavaDoc();
951     }
952
953     /* (non-Javadoc)
954      * @see java.sql.ResultSet#updateShort(int, short)
955      */

956     public void updateShort(int arg0, short arg1) throws SQLException {
957         throw new UnsupportedOperationException JavaDoc();
958     }
959
960     /* (non-Javadoc)
961      * @see java.sql.ResultSet#updateInt(int, int)
962      */

963     public void updateInt(int arg0, int arg1) throws SQLException {
964         throw new UnsupportedOperationException JavaDoc();
965     }
966
967     /* (non-Javadoc)
968      * @see java.sql.ResultSet#updateLong(int, long)
969      */

970     public void updateLong(int arg0, long arg1) throws SQLException {
971         throw new UnsupportedOperationException JavaDoc();
972     }
973
974     /* (non-Javadoc)
975      * @see java.sql.ResultSet#updateFloat(int, float)
976      */

977     public void updateFloat(int arg0, float arg1) throws SQLException {
978         throw new UnsupportedOperationException JavaDoc();
979     }
980
981     /* (non-Javadoc)
982      * @see java.sql.ResultSet#updateDouble(int, double)
983      */

984     public void updateDouble(int arg0, double arg1) throws SQLException {
985         throw new UnsupportedOperationException JavaDoc();
986     }
987
988     /* (non-Javadoc)
989      * @see java.sql.ResultSet#updateBigDecimal(int, java.math.BigDecimal)
990      */

991     public void updateBigDecimal(int arg0, BigDecimal JavaDoc arg1) throws SQLException {
992         throw new UnsupportedOperationException JavaDoc();
993     }
994
995     /* (non-Javadoc)
996      * @see java.sql.ResultSet#updateString(int, java.lang.String)
997      */

998     public void updateString(int arg0, String JavaDoc arg1) throws SQLException {
999         throw new UnsupportedOperationException JavaDoc();
1000    }
1001
1002    /* (non-Javadoc)
1003     * @see java.sql.ResultSet#updateBytes(int, byte[])
1004     */

1005    public void updateBytes(int arg0, byte[] arg1) throws SQLException {
1006        throw new UnsupportedOperationException JavaDoc();
1007    }
1008
1009    /* (non-Javadoc)
1010     * @see java.sql.ResultSet#updateDate(int, java.sql.Date)
1011     */

1012    public void updateDate(int arg0, Date JavaDoc arg1) throws SQLException {
1013        throw new UnsupportedOperationException JavaDoc();
1014    }
1015
1016    /* (non-Javadoc)
1017     * @see java.sql.ResultSet#updateTime(int, java.sql.Time)
1018     */

1019    public void updateTime(int arg0, Time arg1) throws SQLException {
1020        throw new UnsupportedOperationException JavaDoc();
1021    }
1022
1023    /* (non-Javadoc)
1024     * @see java.sql.ResultSet#updateTimestamp(int, java.sql.Timestamp)
1025     */

1026    public void updateTimestamp(int arg0, Timestamp arg1) throws SQLException {
1027        throw new UnsupportedOperationException JavaDoc();
1028    }
1029
1030    /* (non-Javadoc)
1031     * @see java.sql.ResultSet#updateAsciiStream(int, java.io.InputStream, int)
1032     */

1033    public void updateAsciiStream(int arg0, InputStream JavaDoc arg1, int arg2) throws SQLException {
1034        throw new UnsupportedOperationException JavaDoc();
1035    }
1036
1037    /* (non-Javadoc)
1038     * @see java.sql.ResultSet#updateBinaryStream(int, java.io.InputStream, int)
1039     */

1040    public void updateBinaryStream(int arg0, InputStream JavaDoc arg1, int arg2) throws SQLException {
1041        throw new UnsupportedOperationException JavaDoc();
1042    }
1043
1044    /* (non-Javadoc)
1045     * @see java.sql.ResultSet#updateCharacterStream(int, java.io.Reader, int)
1046     */

1047    public void updateCharacterStream(int arg0, Reader JavaDoc arg1, int arg2) throws SQLException {
1048        throw new UnsupportedOperationException JavaDoc();
1049    }
1050
1051    /* (non-Javadoc)
1052     * @see java.sql.ResultSet#updateObject(int, java.lang.Object, int)
1053     */

1054    public void updateObject(int arg0, Object JavaDoc arg1, int arg2) throws SQLException {
1055        throw new UnsupportedOperationException JavaDoc();
1056    }
1057
1058    /* (non-Javadoc)
1059     * @see java.sql.ResultSet#updateObject(int, java.lang.Object)
1060     */

1061    public void updateObject(int arg0, Object JavaDoc arg1) throws SQLException {
1062        throw new UnsupportedOperationException JavaDoc();
1063    }
1064
1065    /* (non-Javadoc)
1066     * @see java.sql.ResultSet#updateNull(java.lang.String)
1067     */

1068    public void updateNull(String JavaDoc arg0) throws SQLException {
1069        throw new UnsupportedOperationException JavaDoc();
1070    }
1071
1072    /* (non-Javadoc)
1073     * @see java.sql.ResultSet#updateBoolean(java.lang.String, boolean)
1074     */

1075    public void updateBoolean(String JavaDoc arg0, boolean arg1) throws SQLException {
1076        throw new UnsupportedOperationException JavaDoc();
1077    }
1078
1079    /* (non-Javadoc)
1080     * @see java.sql.ResultSet#updateByte(java.lang.String, byte)
1081     */

1082    public void updateByte(String JavaDoc arg0, byte arg1) throws SQLException {
1083        throw new UnsupportedOperationException JavaDoc();
1084    }
1085
1086    /* (non-Javadoc)
1087     * @see java.sql.ResultSet#updateShort(java.lang.String, short)
1088     */

1089    public void updateShort(String JavaDoc arg0, short arg1) throws SQLException {
1090        throw new UnsupportedOperationException JavaDoc();
1091    }
1092
1093    /* (non-Javadoc)
1094     * @see java.sql.ResultSet#updateInt(java.lang.String, int)
1095     */

1096    public void updateInt(String JavaDoc arg0, int arg1) throws SQLException {
1097        throw new UnsupportedOperationException JavaDoc();
1098    }
1099
1100    /* (non-Javadoc)
1101     * @see java.sql.ResultSet#updateLong(java.lang.String, long)
1102     */

1103    public void updateLong(String JavaDoc arg0, long arg1) throws SQLException {
1104        throw new UnsupportedOperationException JavaDoc();
1105    }
1106
1107    /* (non-Javadoc)
1108     * @see java.sql.ResultSet#updateFloat(java.lang.String, float)
1109     */

1110    public void updateFloat(String JavaDoc arg0, float arg1) throws SQLException {
1111        throw new UnsupportedOperationException JavaDoc();
1112    }
1113
1114    /* (non-Javadoc)
1115     * @see java.sql.ResultSet#updateDouble(java.lang.String, double)
1116     */

1117    public void updateDouble(String JavaDoc arg0, double arg1) throws SQLException {
1118        throw new UnsupportedOperationException JavaDoc();
1119    }
1120
1121    /* (non-Javadoc)
1122     * @see java.sql.ResultSet#updateBigDecimal(java.lang.String, java.math.BigDecimal)
1123     */

1124    public void updateBigDecimal(String JavaDoc arg0, BigDecimal JavaDoc arg1) throws SQLException {
1125        throw new UnsupportedOperationException JavaDoc();
1126    }
1127
1128    /* (non-Javadoc)
1129     * @see java.sql.ResultSet#updateString(java.lang.String, java.lang.String)
1130     */

1131    public void updateString(String JavaDoc arg0, String JavaDoc arg1) throws SQLException {
1132        throw new UnsupportedOperationException JavaDoc();
1133    }
1134
1135    /* (non-Javadoc)
1136     * @see java.sql.ResultSet#updateBytes(java.lang.String, byte[])
1137     */

1138    public void updateBytes(String JavaDoc arg0, byte[] arg1) throws SQLException {
1139        throw new UnsupportedOperationException JavaDoc();
1140    }
1141
1142    /* (non-Javadoc)
1143     * @see java.sql.ResultSet#updateDate(java.lang.String, java.sql.Date)
1144     */

1145    public void updateDate(String JavaDoc arg0, Date JavaDoc arg1) throws SQLException {
1146        throw new UnsupportedOperationException JavaDoc();
1147    }
1148
1149    /* (non-Javadoc)
1150     * @see java.sql.ResultSet#updateTime(java.lang.String, java.sql.Time)
1151     */

1152    public void updateTime(String JavaDoc arg0, Time arg1) throws SQLException {
1153        throw new UnsupportedOperationException JavaDoc();
1154    }
1155
1156    /* (non-Javadoc)
1157     * @see java.sql.ResultSet#updateTimestamp(java.lang.String, java.sql.Timestamp)
1158     */

1159    public void updateTimestamp(String JavaDoc arg0, Timestamp arg1) throws SQLException {
1160        throw new UnsupportedOperationException JavaDoc();
1161    }
1162
1163    /* (non-Javadoc)
1164     * @see java.sql.ResultSet#updateAsciiStream(java.lang.String, java.io.InputStream, int)
1165     */

1166    public void updateAsciiStream(String JavaDoc arg0, InputStream JavaDoc arg1, int arg2) throws SQLException {
1167        throw new UnsupportedOperationException JavaDoc();
1168    }
1169
1170    /* (non-Javadoc)
1171     * @see java.sql.ResultSet#updateBinaryStream(java.lang.String, java.io.InputStream, int)
1172     */

1173    public void updateBinaryStream(String JavaDoc arg0, InputStream JavaDoc arg1, int arg2) throws SQLException {
1174        throw new UnsupportedOperationException JavaDoc();
1175    }
1176
1177    /* (non-Javadoc)
1178     * @see java.sql.ResultSet#updateCharacterStream(java.lang.String, java.io.Reader, int)
1179     */

1180    public void updateCharacterStream(String JavaDoc arg0, Reader JavaDoc arg1, int arg2) throws SQLException {
1181        throw new UnsupportedOperationException JavaDoc();
1182    }
1183
1184    /* (non-Javadoc)
1185     * @see java.sql.ResultSet#updateObject(java.lang.String, java.lang.Object, int)
1186     */

1187    public void updateObject(String JavaDoc arg0, Object JavaDoc arg1, int arg2) throws SQLException {
1188        throw new UnsupportedOperationException JavaDoc();
1189    }
1190
1191    /* (non-Javadoc)
1192     * @see java.sql.ResultSet#updateObject(java.lang.String, java.lang.Object)
1193     */

1194    public void updateObject(String JavaDoc arg0, Object JavaDoc arg1) throws SQLException {
1195        throw new UnsupportedOperationException JavaDoc();
1196    }
1197
1198    /* (non-Javadoc)
1199     * @see java.sql.ResultSet#insertRow()
1200     */

1201    public void insertRow() throws SQLException {
1202        throw new UnsupportedOperationException JavaDoc();
1203    }
1204
1205    /* (non-Javadoc)
1206     * @see java.sql.ResultSet#updateRow()
1207     */

1208    public void updateRow() throws SQLException {
1209        throw new UnsupportedOperationException JavaDoc();
1210    }
1211
1212    /* (non-Javadoc)
1213     * @see java.sql.ResultSet#deleteRow()
1214     */

1215    public void deleteRow() throws SQLException {
1216        throw new UnsupportedOperationException JavaDoc();
1217    }
1218
1219    /* (non-Javadoc)
1220     * @see java.sql.ResultSet#refreshRow()
1221     */

1222    public void refreshRow() throws SQLException {
1223        throw new UnsupportedOperationException JavaDoc();
1224    }
1225
1226    /* (non-Javadoc)
1227     * @see java.sql.ResultSet#cancelRowUpdates()
1228     */

1229    public void cancelRowUpdates() throws SQLException {
1230        throw new UnsupportedOperationException JavaDoc();
1231    }
1232
1233    /* (non-Javadoc)
1234     * @see java.sql.ResultSet#moveToInsertRow()
1235     */

1236    public void moveToInsertRow() throws SQLException {
1237        throw new UnsupportedOperationException JavaDoc();
1238    }
1239
1240    /* (non-Javadoc)
1241     * @see java.sql.ResultSet#moveToCurrentRow()
1242     */

1243    public void moveToCurrentRow() throws SQLException {
1244        throw new UnsupportedOperationException JavaDoc();
1245    }
1246
1247    /* (non-Javadoc)
1248     * @see java.sql.ResultSet#getStatement()
1249     */

1250    public Statement getStatement() throws SQLException {
1251        throw new UnsupportedOperationException JavaDoc();
1252    }
1253
1254    /* (non-Javadoc)
1255     * @see java.sql.ResultSet#getObject(int, java.util.Map)
1256     */

1257    public Object JavaDoc getObject(int arg0, Map arg1) throws SQLException {
1258        throw new UnsupportedOperationException JavaDoc();
1259    }
1260
1261    /* (non-Javadoc)
1262     * @see java.sql.ResultSet#getRef(int)
1263     */

1264    public Ref getRef(int arg0) throws SQLException {
1265        throw new UnsupportedOperationException JavaDoc();
1266    }
1267
1268    /* (non-Javadoc)
1269     * @see java.sql.ResultSet#getBlob(int)
1270     */

1271    public Blob getBlob(int arg0) throws SQLException {
1272        throw new UnsupportedOperationException JavaDoc();
1273    }
1274
1275    /* (non-Javadoc)
1276     * @see java.sql.ResultSet#getClob(int)
1277     */

1278    public Clob getClob(int arg0) throws SQLException {
1279        throw new UnsupportedOperationException JavaDoc();
1280    }
1281
1282    /* (non-Javadoc)
1283     * @see java.sql.ResultSet#getArray(int)
1284     */

1285    public Array getArray(int arg0) throws SQLException {
1286        throw new UnsupportedOperationException JavaDoc();
1287    }
1288
1289    /* (non-Javadoc)
1290     * @see java.sql.ResultSet#getObject(java.lang.String, java.util.Map)
1291     */

1292    public Object JavaDoc getObject(String JavaDoc arg0, Map arg1) throws SQLException {
1293        throw new UnsupportedOperationException JavaDoc();
1294    }
1295
1296    /* (non-Javadoc)
1297     * @see java.sql.ResultSet#getRef(java.lang.String)
1298     */

1299    public Ref getRef(String JavaDoc arg0) throws SQLException {
1300        throw new UnsupportedOperationException JavaDoc();
1301    }
1302
1303    /* (non-Javadoc)
1304     * @see java.sql.ResultSet#getBlob(java.lang.String)
1305     */

1306    public Blob getBlob(String JavaDoc arg0) throws SQLException {
1307        throw new UnsupportedOperationException JavaDoc();
1308    }
1309
1310    /* (non-Javadoc)
1311     * @see java.sql.ResultSet#getClob(java.lang.String)
1312     */

1313    public Clob getClob(String JavaDoc arg0) throws SQLException {
1314        throw new UnsupportedOperationException JavaDoc();
1315    }
1316
1317    /* (non-Javadoc)
1318     * @see java.sql.ResultSet#getArray(java.lang.String)
1319     */

1320    public Array getArray(String JavaDoc arg0) throws SQLException {
1321        throw new UnsupportedOperationException JavaDoc();
1322    }
1323
1324    /* (non-Javadoc)
1325     * @see java.sql.ResultSet#getDate(int, java.util.Calendar)
1326     */

1327    public Date JavaDoc getDate(int arg0, Calendar arg1) throws SQLException {
1328        throw new UnsupportedOperationException JavaDoc();
1329    }
1330
1331    /* (non-Javadoc)
1332     * @see java.sql.ResultSet#getDate(java.lang.String, java.util.Calendar)
1333     */

1334    public Date JavaDoc getDate(String JavaDoc arg0, Calendar arg1) throws SQLException {
1335        throw new UnsupportedOperationException JavaDoc();
1336    }
1337
1338    /* (non-Javadoc)
1339     * @see java.sql.ResultSet#getTime(int, java.util.Calendar)
1340     */

1341    public Time getTime(int arg0, Calendar arg1) throws SQLException {
1342        throw new UnsupportedOperationException JavaDoc();
1343    }
1344
1345    /* (non-Javadoc)
1346     * @see java.sql.ResultSet#getTime(java.lang.String, java.util.Calendar)
1347     */

1348    public Time getTime(String JavaDoc arg0, Calendar arg1) throws SQLException {
1349        throw new UnsupportedOperationException JavaDoc();
1350    }
1351
1352    /* (non-Javadoc)
1353     * @see java.sql.ResultSet#getTimestamp(int, java.util.Calendar)
1354     */

1355    public Timestamp getTimestamp(int arg0, Calendar arg1) throws SQLException {
1356        throw new UnsupportedOperationException JavaDoc();
1357    }
1358
1359    /* (non-Javadoc)
1360     * @see java.sql.ResultSet#getTimestamp(java.lang.String, java.util.Calendar)
1361     */

1362    public Timestamp getTimestamp(String JavaDoc arg0, Calendar arg1) throws SQLException {
1363        throw new UnsupportedOperationException JavaDoc();
1364    }
1365
1366    /* (non-Javadoc)
1367     * @see java.sql.ResultSet#getURL(int)
1368     */

1369    public URL JavaDoc getURL(int arg0) throws SQLException {
1370        throw new UnsupportedOperationException JavaDoc();
1371    }
1372
1373    /* (non-Javadoc)
1374     * @see java.sql.ResultSet#getURL(java.lang.String)
1375     */

1376    public URL JavaDoc getURL(String JavaDoc arg0) throws SQLException {
1377        throw new UnsupportedOperationException JavaDoc();
1378    }
1379
1380    /* (non-Javadoc)
1381     * @see java.sql.ResultSet#updateRef(int, java.sql.Ref)
1382     */

1383    public void updateRef(int arg0, Ref arg1) throws SQLException {
1384        throw new UnsupportedOperationException JavaDoc();
1385    }
1386
1387    /* (non-Javadoc)
1388     * @see java.sql.ResultSet#updateRef(java.lang.String, java.sql.Ref)
1389     */

1390    public void updateRef(String JavaDoc arg0, Ref arg1) throws SQLException {
1391        throw new UnsupportedOperationException JavaDoc();
1392    }
1393
1394    /* (non-Javadoc)
1395     * @see java.sql.ResultSet#updateBlob(int, java.sql.Blob)
1396     */

1397    public void updateBlob(int arg0, Blob arg1) throws SQLException {
1398        throw new UnsupportedOperationException JavaDoc();
1399    }
1400
1401    /* (non-Javadoc)
1402     * @see java.sql.ResultSet#updateBlob(java.lang.String, java.sql.Blob)
1403     */

1404    public void updateBlob(String JavaDoc arg0, Blob arg1) throws SQLException {
1405        throw new UnsupportedOperationException JavaDoc();
1406    }
1407
1408    /* (non-Javadoc)
1409     * @see java.sql.ResultSet#updateClob(int, java.sql.Clob)
1410     */

1411    public void updateClob(int arg0, Clob arg1) throws SQLException {
1412        throw new UnsupportedOperationException JavaDoc();
1413    }
1414
1415    /* (non-Javadoc)
1416     * @see java.sql.ResultSet#updateClob(java.lang.String, java.sql.Clob)
1417     */

1418    public void updateClob(String JavaDoc arg0, Clob arg1) throws SQLException {
1419        throw new UnsupportedOperationException JavaDoc();
1420    }
1421
1422    /* (non-Javadoc)
1423     * @see java.sql.ResultSet#updateArray(int, java.sql.Array)
1424     */

1425    public void updateArray(int arg0, Array arg1) throws SQLException {
1426        throw new UnsupportedOperationException JavaDoc();
1427    }
1428
1429    /* (non-Javadoc)
1430     * @see java.sql.ResultSet#updateArray(java.lang.String, java.sql.Array)
1431     */

1432    public void updateArray(String JavaDoc arg0, Array arg1) throws SQLException {
1433        throw new UnsupportedOperationException JavaDoc();
1434    }
1435}
Popular Tags