View Javadoc

1   /*
2    * ModeShape (http://www.modeshape.org)
3    * See the COPYRIGHT.txt file distributed with this work for information
4    * regarding copyright ownership.  Some portions may be licensed
5    * to Red Hat, Inc. under one or more contributor license agreements.
6    * See the AUTHORS.txt file in the distribution for a full listing of 
7    * individual contributors.
8    *
9    * ModeShape is free software. Unless otherwise indicated, all code in ModeShape
10   * is licensed to you under the terms of the GNU Lesser General Public License as
11   * published by the Free Software Foundation; either version 2.1 of
12   * the License, or (at your option) any later version.
13   * 
14   * ModeShape is distributed in the hope that it will be useful,
15   * but WITHOUT ANY WARRANTY; without even the implied warranty of
16   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17   * Lesser General Public License for more details.
18   *
19   * You should have received a copy of the GNU Lesser General Public
20   * License along with this software; if not, write to the Free
21   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
23   */
24  package org.modeshape.jdbc;
25  
26  import java.io.IOException;
27  import java.io.InputStream;
28  import java.io.Reader;
29  import java.math.BigDecimal;
30  import java.net.URL;
31  import java.sql.Array;
32  import java.sql.Blob;
33  import java.sql.Clob;
34  import java.sql.Date;
35  import java.sql.NClob;
36  import java.sql.Ref;
37  import java.sql.ResultSet;
38  import java.sql.ResultSetMetaData;
39  import java.sql.RowId;
40  import java.sql.SQLException;
41  import java.sql.SQLFeatureNotSupportedException;
42  import java.sql.SQLWarning;
43  import java.sql.SQLXML;
44  import java.sql.Statement;
45  import java.sql.Time;
46  import java.sql.Timestamp;
47  import java.util.Calendar;
48  import java.util.Collections;
49  import java.util.HashMap;
50  import java.util.Map;
51  import javax.jcr.ItemNotFoundException;
52  import javax.jcr.PathNotFoundException;
53  import javax.jcr.PropertyType;
54  import javax.jcr.RepositoryException;
55  import javax.jcr.Value;
56  import javax.jcr.ValueFormatException;
57  import javax.jcr.query.QueryResult;
58  import javax.jcr.query.Row;
59  import javax.jcr.query.RowIterator;
60  import org.modeshape.jdbc.util.IoUtil;
61  import org.modeshape.jdbc.util.TimestampWithTimezone;
62  
63  /**
64   * 
65   */
66  public class JcrResultSet implements ResultSet {
67  
68      private boolean closed;
69      private JcrStatement statement;
70      private QueryResult jcrResults;
71      private ResultSetMetaData metadata;
72      private RowIterator rowIter;
73      private Row row;    
74      
75      // the object which was last read from Results
76      private Object currentValue = null;
77  
78      private Map<String, Integer> columnIndexesByName;
79  
80      private String[] columnIDs = null;
81      
82      /** default Calendar instance for converting date/time/timestamp values */
83      private Calendar defaultCalendar;
84  
85  
86      protected JcrResultSet( JcrStatement statement,
87                              QueryResult jcrResults,
88                              ResultSetMetaData resultSetMetaData ) throws SQLException {
89          this.statement = statement;
90          this.jcrResults = jcrResults;
91          assert this.statement != null;
92          assert this.jcrResults != null;
93  
94          if (resultSetMetaData != null) {
95              this.metadata = resultSetMetaData;
96          } else {
97              this.metadata = new JcrResultSetMetaData(this.statement.connection(), this.jcrResults);
98          }
99          int index = 1; // not zero-based
100         int colCnt = this.metadata.getColumnCount();
101 
102         // add 1 because using 1 based location, not zero based, JDBC spec
103         columnIDs = new String[colCnt + 1];
104         columnIndexesByName = new HashMap<String, Integer>(colCnt);
105         while (index <= colCnt) {
106             String name = this.metadata.getColumnName(index);
107             columnIndexesByName.put(name, index);
108             columnIDs[index] = name;
109             index++;
110         }
111 
112         assert !columnIndexesByName.isEmpty();
113         this.columnIndexesByName = Collections.unmodifiableMap(columnIndexesByName);
114 
115         try {
116             this.rowIter = this.jcrResults.getRows();
117         } catch (RepositoryException e) {
118             throw new SQLException(e.getLocalizedMessage(), e);
119         }
120     }  
121 
122     /**
123      * no-arg CTOR is used to create an empty result set
124      * 
125      * @see JcrStatement#getGeneratedKeys()
126      */
127     protected JcrResultSet() {
128         closed = true;
129         columnIndexesByName = Collections.emptyMap();
130     }
131     
132     
133     Calendar getDefaultCalendar() {
134         if (defaultCalendar == null) {
135             defaultCalendar = TimestampWithTimezone.getCalendar(); 
136         }
137         return defaultCalendar;
138     }
139      
140     /**
141      * {@inheritDoc}
142      * 
143      * @see java.sql.ResultSet#isClosed()
144      */
145     @Override
146     public boolean isClosed() {
147         return closed || statement.isClosed();
148     }
149 
150     /**
151      * {@inheritDoc}
152      * 
153      * @see java.sql.ResultSet#close()
154      */
155     @Override
156     public void close() {
157         if (!closed) {
158             closed = true;
159         	this.statement.close();
160         }
161     }
162 
163     byte[] convertToByteArray( final Value value ) throws SQLException {
164         if (value == null) return null;
165         InputStream is = null;
166         boolean error = false;
167         try {
168             switch (value.getType()) {
169                 case PropertyType.STRING:
170                 case PropertyType.BOOLEAN:
171                 case PropertyType.DOUBLE:
172 
173                     String v = value.getString();
174                     return (v != null ? v.getBytes() : null);
175 
176                 case PropertyType.BINARY:
177                     is = value.getBinary().getStream();
178                     return IoUtil.readBytes(is);
179                 default:
180                     return null;
181             }
182 
183         } catch (IOException ioe) {
184             error = true;
185             throw new SQLException(ioe.getLocalizedMessage(), ioe);
186         } catch (IllegalStateException ie) {
187             error = true;
188             throw new SQLException(ie.getLocalizedMessage(), ie);
189         } catch (RepositoryException e) {
190             error = true;
191             throw new SQLException(e.getLocalizedMessage(), e);
192         } finally {
193             try {
194                 if (is != null) is.close();
195             } catch (Exception e) {
196                 if (!error) throw new SQLException(e.getLocalizedMessage(), e);
197             }
198         }
199     }
200 
201     protected final void notClosed() throws SQLException {
202         if (isClosed()) throw new SQLException(JdbcI18n.resultSetIsClosed.text());
203     }
204 
205     protected final void noUpdates() throws SQLException {
206         throw new SQLFeatureNotSupportedException(JdbcI18n.updatesNotSupported.text());
207     }
208 
209     protected final void forwardOnly() throws SQLException {
210         throw new SQLException(JdbcI18n.resultSetIsForwardOnly.text());
211     }
212 
213     protected final void itemNotFoundUsingColunName( String columnName ) throws SQLException {
214         throw new SQLException(JdbcI18n.noSuchColumn.text(columnName));
215     }
216 
217     protected final void itemNotFoundUsingColunIndex( int idx ) throws SQLException {
218         throw new SQLException(JdbcI18n.noSuchColumn.text(String.valueOf(idx)));
219     }
220 
221     /**
222      * {@inheritDoc}
223      * 
224      * @see java.sql.ResultSet#getMetaData()
225      */
226     @Override
227     public ResultSetMetaData getMetaData() throws SQLException {
228         notClosed();
229         return metadata;
230     }
231 
232     /**
233      * {@inheritDoc}
234      * 
235      * @see java.sql.ResultSet#getStatement()
236      */
237     @Override
238     public Statement getStatement() throws SQLException {
239         notClosed();
240         return statement;
241     }
242 
243     /**
244      * {@inheritDoc}
245      * <p>
246      * This driver only supports {@link ResultSet#TYPE_FORWARD_ONLY}.
247      * </p>
248      * 
249      * @see java.sql.ResultSet#getType()
250      */
251     @Override
252     public int getType() throws SQLException {
253         notClosed();
254         return ResultSet.TYPE_FORWARD_ONLY;
255     }
256 
257     /**
258      * {@inheritDoc}
259      * <p>
260      * This driver only supports {@link ResultSet#FETCH_FORWARD}.
261      * </p>
262      * 
263      * @see java.sql.ResultSet#getFetchDirection()
264      */
265     @Override
266     public int getFetchDirection() throws SQLException {
267         notClosed();
268         return ResultSet.FETCH_FORWARD;
269     }
270 
271     /**
272      * {@inheritDoc}
273      * <p>
274      * This method, when called on an open result set, will have no effect on the fetch direction because this driver only
275      * supports {@link ResultSet#FETCH_FORWARD}.
276      * </p>
277      * 
278      * @see java.sql.ResultSet#setFetchDirection(int)
279      */
280     @Override
281     public void setFetchDirection( int direction ) throws SQLException {
282     	throw new SQLFeatureNotSupportedException();
283     }
284 
285     /**
286      * {@inheritDoc}
287      * <p>
288      * This method, when called on an open result set, always throws {@link SQLException} because this driver only supports
289      * {@link ResultSet#FETCH_FORWARD}.
290      * </p>
291      * 
292      * @see java.sql.ResultSet#absolute(int)
293      */
294     @Override
295     public boolean absolute( int row ) throws SQLException {
296         notClosed();
297         forwardOnly();
298 
299         return false;
300     }
301 
302     /**
303      * {@inheritDoc}
304      * <p>
305      * This method, when called on an open result set, always throws {@link SQLException} because this driver only supports
306      * {@link ResultSet#FETCH_FORWARD}.
307      * </p>
308      * 
309      * @see java.sql.ResultSet#afterLast()
310      */
311     @Override
312     public void afterLast() throws SQLException {
313         notClosed();
314         forwardOnly();
315     }
316 
317     /**
318      * {@inheritDoc}
319      * <p>
320      * This method, when called on an open result set, always throws {@link SQLException} because this driver only supports
321      * {@link ResultSet#FETCH_FORWARD}.
322      * </p>
323      * 
324      * @see java.sql.ResultSet#beforeFirst()
325      */
326     @Override
327     public void beforeFirst() throws SQLException {
328         notClosed();
329         forwardOnly();
330 
331     }
332 
333     /**
334      * {@inheritDoc}
335      * 
336      * @see java.sql.ResultSet#cancelRowUpdates()
337      */
338     @Override
339     public void cancelRowUpdates() throws SQLException {
340         notClosed();
341         noUpdates();
342     }
343 
344     /**
345      * {@inheritDoc}
346      * 
347      * @see java.sql.ResultSet#clearWarnings()
348      */
349     @Override
350     public void clearWarnings() throws SQLException {
351         notClosed();
352     }
353 
354     /**
355      * {@inheritDoc}
356      * 
357      * @see java.sql.ResultSet#deleteRow()
358      */
359     @Override
360     public void deleteRow() throws SQLException {
361         notClosed();
362         noUpdates();
363     }
364 
365     /**
366      * {@inheritDoc}
367      * 
368      * @see java.sql.ResultSet#findColumn(java.lang.String)
369      */
370     @Override
371     public int findColumn( String columnLabel ) throws SQLException {
372         notClosed();
373         final Integer result = columnLabel != null ? columnIndexesByName.get(columnLabel) : null;
374 
375         if (result == null) {
376             this.itemNotFoundUsingColunName(columnLabel);
377         }
378         assert result != null;
379         return result.intValue();
380     }
381 
382     private String findColumn( int columnIndex ) throws SQLException {
383         if (columnIndex > 0 && columnIndex < this.columnIDs.length) {
384             return columnIDs[columnIndex];
385         }
386 
387         throw new SQLException(JdbcI18n.invalidColumnIndex.text(new Object[] {columnIndex, this.columnIDs.length}));
388     }
389 
390     /**
391      * {@inheritDoc}
392      * <p>
393      * This method, when called on an open result set, always throws {@link SQLException} because this driver only supports
394      * {@link ResultSet#FETCH_FORWARD}.
395      * </p>
396      * 
397      * @see java.sql.ResultSet#first()
398      */
399     @Override
400     public boolean first() throws SQLException {
401         notClosed();
402         forwardOnly();
403 
404         return false;
405     }
406 
407     /**
408      * {@inheritDoc}
409      * 
410      * @see java.sql.ResultSet#getRow()
411      */
412     @Override
413     public int getRow() throws SQLException {
414         notClosed();
415         return (int)this.rowIter.getPosition();
416     }
417 
418     /**
419      * {@inheritDoc}
420      * <p>
421      * This method will always throw {@link SQLFeatureNotSupportedException}
422      * </p>
423      * 
424      * @see java.sql.ResultSet#getRowId(int)
425      */
426     @Override
427     public RowId getRowId( final int columnIndex ) throws SQLException {
428         throw new SQLFeatureNotSupportedException();
429     }
430 
431     /**
432      * {@inheritDoc}
433      * 
434      * @see java.sql.ResultSet#getRowId(java.lang.String)
435      */
436     @Override
437     public RowId getRowId( String columnLabel ) throws SQLException {
438         throw new SQLFeatureNotSupportedException();
439     }
440 
441     /**
442      * {@inheritDoc}
443      * 
444      * @see java.sql.ResultSet#getCursorName()
445      */
446     @Override
447     public String getCursorName() throws SQLException {
448         throw new SQLFeatureNotSupportedException();
449     }
450 
451     /**
452      * {@inheritDoc}
453      * 
454      * @see java.sql.ResultSet#getFetchSize()
455      */
456     @Override
457     public int getFetchSize() throws SQLException {
458         notClosed();
459         return statement.getFetchSize();
460     }
461 
462     /**
463      * {@inheritDoc}
464      * 
465      * @see java.sql.ResultSet#getArray(int)
466      */
467     @Override
468     public Array getArray( int columnIndex ) throws SQLException {
469         throw new SQLFeatureNotSupportedException();
470     }
471 
472     /**
473      * {@inheritDoc}
474      * 
475      * @see java.sql.ResultSet#getArray(java.lang.String)
476      */
477     @Override
478     public Array getArray( String columnLabel ) throws SQLException {
479         throw new SQLFeatureNotSupportedException();
480     }
481 
482     /**
483      * {@inheritDoc}
484      * 
485      * @see java.sql.ResultSet#getAsciiStream(int)
486      */
487     @Override
488     public InputStream getAsciiStream( int columnIndex ) throws SQLException {
489         throw new SQLFeatureNotSupportedException();
490     }
491 
492     /**
493      * {@inheritDoc}
494      * 
495      * @see java.sql.ResultSet#getAsciiStream(java.lang.String)
496      */
497     @Override
498     public InputStream getAsciiStream( String columnLabel ) throws SQLException {
499         throw new SQLFeatureNotSupportedException();
500     }
501 
502     /**
503      * {@inheritDoc}
504      * 
505      * @see java.sql.ResultSet#getBigDecimal(int)
506      */
507     @Override
508     public BigDecimal getBigDecimal( int columnIndex ) throws SQLException {
509         throw new SQLFeatureNotSupportedException();
510     }
511 
512     /**
513      * {@inheritDoc}
514      * 
515      * @see java.sql.ResultSet#getBigDecimal(java.lang.String)
516      */
517     @Override
518     public BigDecimal getBigDecimal( String columnLabel ) throws SQLException {
519         throw new SQLFeatureNotSupportedException();
520     }
521 
522     /**
523      * {@inheritDoc}
524      * 
525      * @see java.sql.ResultSet#getBigDecimal(int, int)
526      */
527     @Override
528     public BigDecimal getBigDecimal( int columnIndex,
529                                      int scale ) throws SQLException {
530         throw new SQLFeatureNotSupportedException();
531     }
532 
533     /**
534      * {@inheritDoc}
535      * 
536      * @see java.sql.ResultSet#getBigDecimal(java.lang.String, int)
537      */
538     @Override
539     public BigDecimal getBigDecimal( String columnLabel,
540                                      int scale ) throws SQLException {
541         throw new SQLFeatureNotSupportedException();
542     }
543 
544     /**
545      * {@inheritDoc}
546      * 
547      * @see java.sql.ResultSet#getBinaryStream(int)
548      */
549     @Override
550     public InputStream getBinaryStream( int columnIndex ) throws SQLException {
551         return getBinaryStream(findColumn(columnIndex));
552     }
553 
554     /**
555      * {@inheritDoc}
556      * 
557      * @see java.sql.ResultSet#getBinaryStream(java.lang.String)
558      */
559     @Override
560     public InputStream getBinaryStream( String columnLabel ) throws SQLException {
561     	Object o = getValueReturn(columnLabel, PropertyType.BINARY);
562     	if (o != null) {
563     		return (InputStream) o;
564     	}
565     	return null;
566     }
567 
568     /**
569      * {@inheritDoc}
570      * 
571      * @see java.sql.ResultSet#getBlob(int)
572      */
573     @Override
574     public Blob getBlob( int columnIndex ) throws SQLException {
575         throw new SQLFeatureNotSupportedException();
576     }
577 
578     /**
579      * {@inheritDoc}
580      * 
581      * @see java.sql.ResultSet#getBlob(java.lang.String)
582      */
583     @Override
584     public Blob getBlob( String columnLabel ) throws SQLException {
585         throw new SQLFeatureNotSupportedException();
586     }
587 
588     /**
589      * {@inheritDoc}
590      * 
591      * @see java.sql.ResultSet#getBoolean(int)
592      */
593     @Override
594     public boolean getBoolean( int columnIndex ) throws SQLException {
595         return getBoolean(findColumn(columnIndex));
596     }
597 
598     /**
599      * {@inheritDoc}
600      * 
601      * @see java.sql.ResultSet#getBoolean(java.lang.String)
602      */
603     @Override
604     public boolean getBoolean( String columnLabel ) throws SQLException {
605     	
606     	Object o = getValueReturn(columnLabel, PropertyType.BOOLEAN);
607     	if (o != null) {
608     		return ((Boolean) o).booleanValue();
609     	}
610     	return Boolean.FALSE.booleanValue();
611     }
612 
613     /**
614      * {@inheritDoc}
615      * 
616      * @see java.sql.ResultSet#getByte(int)
617      */
618     @Override
619     public byte getByte( int columnIndex ) throws SQLException {
620         throw new SQLFeatureNotSupportedException();
621     }
622 
623     /**
624      * {@inheritDoc}
625      * 
626      * @see java.sql.ResultSet#getByte(java.lang.String)
627      */
628     @Override
629     public byte getByte( String columnLabel ) throws SQLException {
630         throw new SQLFeatureNotSupportedException();
631     }
632 
633     /**
634      * {@inheritDoc}
635      * 
636      * @see java.sql.ResultSet#getBytes(int)
637      */
638     @Override
639     public byte[] getBytes( int columnIndex ) throws SQLException {
640         return getBytes(findColumn(columnIndex));
641     }
642 
643     /**
644      * {@inheritDoc}
645      * 
646      * @see java.sql.ResultSet#getBytes(java.lang.String)
647      */
648     @Override
649     public byte[] getBytes( String columnLabel ) throws SQLException {
650         notClosed();
651         isRowSet();
652 
653         this.currentValue = null;
654         try {
655             Value value = row.getValue(columnLabel);
656             byte[] rtnbytes = convertToByteArray(value);
657             this.currentValue = rtnbytes;
658             return rtnbytes;
659         } catch (PathNotFoundException pnfe) {
660             // do nothing, return null
661         } catch (ItemNotFoundException e) {
662             itemNotFoundUsingColunName(columnLabel);
663         } catch (RepositoryException e) {
664             throw new SQLException(e.getLocalizedMessage(), e);
665         }
666         return null;
667     }
668 
669     /**
670      * {@inheritDoc}
671      * 
672      * @see java.sql.ResultSet#getCharacterStream(int)
673      */
674     @Override
675     public Reader getCharacterStream( int columnIndex ) throws SQLException {
676         throw new SQLFeatureNotSupportedException();
677     }
678 
679     /**
680      * {@inheritDoc}
681      * 
682      * @see java.sql.ResultSet#getCharacterStream(java.lang.String)
683      */
684     @Override
685     public Reader getCharacterStream( String columnLabel ) throws SQLException {
686         throw new SQLFeatureNotSupportedException();
687     }
688 
689     /**
690      * {@inheritDoc}
691      * 
692      * @see java.sql.ResultSet#getClob(int)
693      */
694     @Override
695     public Clob getClob( int columnIndex ) throws SQLException {
696         throw new SQLFeatureNotSupportedException();
697     }
698 
699     /**
700      * {@inheritDoc}
701      * 
702      * @see java.sql.ResultSet#getClob(java.lang.String)
703      */
704     @Override
705     public Clob getClob( String columnLabel ) throws SQLException {
706         throw new SQLFeatureNotSupportedException();
707     }
708 
709     /**
710      * {@inheritDoc}
711      * 
712      * @see java.sql.ResultSet#getConcurrency()
713      */
714     @Override
715     public int getConcurrency() throws SQLException {
716         notClosed();
717         return 0;
718     }
719 
720     /**
721      * {@inheritDoc}
722      * 
723      * @see java.sql.ResultSet#getDate(int)
724      */
725     @Override
726     public Date getDate( int columnIndex ) throws SQLException {
727         return getDate(findColumn(columnIndex));
728     }
729 
730     /**
731      * {@inheritDoc}
732      * 
733      * @see java.sql.ResultSet#getDate(java.lang.String)
734      */
735     @Override
736     public Date getDate( String columnLabel ) throws SQLException {
737     	Calendar calv = (Calendar)getValueReturn(columnLabel, PropertyType.DATE); 
738     	if (calv == null) return null;
739     	
740     	return TimestampWithTimezone.createDate(calv);
741     }
742 
743     /**
744      * {@inheritDoc}
745      * 
746      * @see java.sql.ResultSet#getDate(int, java.util.Calendar)
747      */
748     @Override
749     public Date getDate( int columnIndex,
750                          Calendar cal ) throws SQLException {
751     	 return getDate(findColumn(columnIndex), cal);
752     }
753 
754     /**
755      * {@inheritDoc}
756      * 
757      * @see java.sql.ResultSet#getDate(java.lang.String, java.util.Calendar)
758      */
759     @Override
760     public Date getDate( String columnLabel,
761                          Calendar cal ) throws SQLException {
762     	
763         Calendar actual = (Calendar)getValueReturn(columnLabel, PropertyType.DATE);
764 
765         if (actual == null) return null; 
766               
767     	return TimestampWithTimezone.createDate(actual, cal);
768         
769     }
770 
771     /**
772      * {@inheritDoc}
773      * 
774      * @see java.sql.ResultSet#getDouble(int)
775      */
776     @Override
777     public double getDouble( int columnIndex ) throws SQLException {
778         return getDouble(findColumn(columnIndex));
779     }
780 
781     /**
782      * {@inheritDoc}
783      * 
784      * @see java.sql.ResultSet#getDouble(java.lang.String)
785      */
786     @Override
787     public double getDouble( String columnLabel ) throws SQLException {
788     	Object o = getValueReturn(columnLabel, PropertyType.DOUBLE);
789     	if (o != null) {
790     		return ((Double) o).doubleValue();
791     	}    	
792     	return 0;
793     }
794 
795     /**
796      * {@inheritDoc}
797      * 
798      * @see java.sql.ResultSet#getFloat(int)
799      */
800     @Override
801     public float getFloat( int columnIndex ) throws SQLException {
802         throw new SQLFeatureNotSupportedException();
803     }
804 
805     /**
806      * {@inheritDoc}
807      * 
808      * @see java.sql.ResultSet#getFloat(java.lang.String)
809      */
810     @Override
811     public float getFloat( String columnLabel ) throws SQLException {
812         throw new SQLFeatureNotSupportedException();
813     }
814 
815     /**
816      * {@inheritDoc}
817      * <p>
818      * According to 1.6 javadocs, holdability should be set to either {@link ResultSet#CLOSE_CURSORS_AT_COMMIT} or
819      * {@link ResultSet#HOLD_CURSORS_OVER_COMMIT}. However, JDBC 4.0 spec says the default holdability is implementation defined.
820      * Therefore, the default value will be 0.
821      * 
822      * @see java.sql.ResultSet#getHoldability()
823      */
824     @Override
825     public int getHoldability() throws SQLException {
826         notClosed();
827         return 0;
828     }
829 
830     /**
831      * {@inheritDoc}
832      * 
833      * @see java.sql.ResultSet#getInt(int)
834      */
835     @Override
836     public int getInt( int columnIndex ) throws SQLException {
837         return getInt(findColumn(columnIndex));
838     }
839 
840     /**
841      * {@inheritDoc}
842      * 
843      * @see java.sql.ResultSet#getInt(java.lang.String)
844      */
845     @Override
846     public int getInt( String columnLabel ) throws SQLException {
847         notClosed();        
848         return (int)getLong(columnLabel);
849     }
850 
851     /**
852      * {@inheritDoc}
853      * 
854      * @see java.sql.ResultSet#getLong(int)
855      */
856     @Override
857     public long getLong( int columnIndex ) throws SQLException {
858         return getLong(findColumn(columnIndex));
859     }
860 
861     /**
862      * {@inheritDoc}
863      * 
864      * @see java.sql.ResultSet#getLong(java.lang.String)
865      */
866     @Override
867     public long getLong( String columnLabel ) throws SQLException {  
868     	Object o = getValueReturn(columnLabel, PropertyType.LONG);
869     	if (o != null) {
870     		return ( (Long) o).longValue();
871     	}
872     	return 0L;
873     }
874 
875     /**
876      * {@inheritDoc}
877      * 
878      * @see java.sql.ResultSet#getNCharacterStream(int)
879      */
880     @Override
881     public Reader getNCharacterStream( int columnIndex ) throws SQLException {
882         throw new SQLFeatureNotSupportedException();
883     }
884 
885     /**
886      * {@inheritDoc}
887      * 
888      * @see java.sql.ResultSet#getNCharacterStream(java.lang.String)
889      */
890     @Override
891     public Reader getNCharacterStream( String columnLabel ) throws SQLException {
892         throw new SQLFeatureNotSupportedException();
893     }
894 
895     /**
896      * {@inheritDoc}
897      * 
898      * @see java.sql.ResultSet#getNClob(int)
899      */
900     @Override
901     public NClob getNClob( int columnIndex ) throws SQLException {
902         throw new SQLFeatureNotSupportedException();
903     }
904 
905     /**
906      * {@inheritDoc}
907      * 
908      * @see java.sql.ResultSet#getNClob(java.lang.String)
909      */
910     @Override
911     public NClob getNClob( String columnLabel ) throws SQLException {
912         throw new SQLFeatureNotSupportedException();
913     }
914 
915     /**
916      * {@inheritDoc}
917      * 
918      * @see java.sql.ResultSet#getNString(int)
919      */
920     @Override
921     public String getNString( int columnIndex ) throws SQLException {
922         throw new SQLFeatureNotSupportedException();
923     }
924 
925     /**
926      * {@inheritDoc}
927      * 
928      * @see java.sql.ResultSet#getNString(java.lang.String)
929      * @throws SQLFeatureNotSupportedException();
930      */
931     @Override
932     public String getNString( String columnLabel ) throws SQLException {
933         throw new SQLFeatureNotSupportedException();
934     }
935 
936     /**
937      * {@inheritDoc}
938      * 
939      * @see java.sql.ResultSet#getObject(int)
940      */
941     @Override
942     public Object getObject( int columnIndex ) throws SQLException {
943         return getObject(findColumn(columnIndex));
944     }
945 
946     /**
947      * {@inheritDoc}
948      * 
949      * @see java.sql.ResultSet#getObject(java.lang.String)
950      */
951     @Override
952     public Object getObject( String columnLabel ) throws SQLException {
953         return getColumnTranslatedToJDBC(columnLabel);
954     }
955 
956     /**
957      * {@inheritDoc}
958      * 
959      * @see java.sql.ResultSet#getObject(int, java.util.Map)
960      */
961     @Override
962     public Object getObject( int columnIndex,
963                              Map<String, Class<?>> map ) throws SQLException {
964         throw new SQLFeatureNotSupportedException();
965     }
966 
967     /**
968      * {@inheritDoc}
969      * 
970      * @see java.sql.ResultSet#getObject(java.lang.String, java.util.Map)
971      */
972     @Override
973     public Object getObject( String columnLabel,
974                              Map<String, Class<?>> map ) throws SQLException {
975         throw new SQLFeatureNotSupportedException();
976 
977     }
978 
979     /**
980      * {@inheritDoc}
981      * 
982      * @see java.sql.ResultSet#getRef(int)
983      */
984     @Override
985     public Ref getRef( int columnIndex ) throws SQLException {
986         throw new SQLFeatureNotSupportedException();
987     }
988 
989     /**
990      * {@inheritDoc}
991      * 
992      * @see java.sql.ResultSet#getRef(java.lang.String)
993      */
994     @Override
995     public Ref getRef( String columnLabel ) throws SQLException {
996         throw new SQLFeatureNotSupportedException();
997     }
998 
999     /**
1000      * {@inheritDoc}
1001      * 
1002      * @see java.sql.ResultSet#getSQLXML(int)
1003      */
1004     @Override
1005     public SQLXML getSQLXML( int columnIndex ) throws SQLException {
1006         throw new SQLFeatureNotSupportedException();
1007     }
1008 
1009     /**
1010      * {@inheritDoc}
1011      * 
1012      * @see java.sql.ResultSet#getSQLXML(java.lang.String)
1013      */
1014     @Override
1015     public SQLXML getSQLXML( String columnLabel ) throws SQLException {
1016         throw new SQLFeatureNotSupportedException();
1017     }
1018 
1019     /**
1020      * {@inheritDoc}
1021      * 
1022      * @see java.sql.ResultSet#getShort(int)
1023      */
1024     @Override
1025     public short getShort( int columnIndex ) throws SQLException {
1026         throw new SQLFeatureNotSupportedException();
1027     }
1028 
1029     /**
1030      * {@inheritDoc}
1031      * 
1032      * @see java.sql.ResultSet#getShort(java.lang.String)
1033      */
1034     @Override
1035     public short getShort( String columnLabel ) throws SQLException {
1036         throw new SQLFeatureNotSupportedException();
1037     }
1038 
1039     /**
1040      * {@inheritDoc}
1041      * 
1042      * @see java.sql.ResultSet#getString(int)
1043      */
1044     @Override
1045     public String getString( int columnIndex ) throws SQLException {
1046         return getString(findColumn(columnIndex));
1047     }
1048 
1049     /**
1050      * {@inheritDoc}
1051      * 
1052      * @see java.sql.ResultSet#getString(java.lang.String)
1053      */
1054     @Override
1055     public String getString( String columnLabel ) throws SQLException {
1056     	Object o = getValueReturn(columnLabel, PropertyType.STRING);
1057     	if (o != null) {
1058     		return (String) o;
1059     	}    
1060     	return null;
1061     }
1062 
1063     /**
1064      * {@inheritDoc}
1065      * 
1066      * @see java.sql.ResultSet#getTime(int)
1067      */
1068     @Override
1069     public Time getTime( int columnIndex ) throws SQLException {
1070         return getTime(findColumn(columnIndex));
1071     }
1072 
1073     /**
1074      * {@inheritDoc}
1075      * 
1076      * @see java.sql.ResultSet#getTime(java.lang.String)
1077      */
1078     @Override
1079     public Time getTime( String columnLabel ) throws SQLException {
1080     	Calendar calv = (Calendar)getValueReturn(columnLabel, PropertyType.DATE);
1081     	if (calv == null) return null;  	
1082     	
1083     	return TimestampWithTimezone.createTime(calv);
1084     }
1085 
1086     /**
1087      * {@inheritDoc}
1088      * 
1089      * @see java.sql.ResultSet#getTime(int, java.util.Calendar)
1090      */
1091     @Override
1092     public Time getTime( int columnIndex,
1093                          Calendar cal ) throws SQLException {
1094         return getTime(findColumn(columnIndex), cal);
1095     }
1096 
1097     /**
1098      * {@inheritDoc}
1099      * 
1100      * @see java.sql.ResultSet#getTime(java.lang.String, java.util.Calendar)
1101      */
1102     @Override
1103     public Time getTime( String columnLabel,
1104                          Calendar cal ) throws SQLException {
1105     	
1106         Calendar actual = (Calendar)getValueReturn(columnLabel, PropertyType.DATE);
1107 
1108         if (actual == null) return null; 
1109 
1110         // if cal is null, it will be supplied in TimestampWithTimezone
1111         return TimestampWithTimezone.createTime(actual, cal);  
1112  
1113     }
1114 
1115     /**
1116      * {@inheritDoc}
1117      * 
1118      * @see java.sql.ResultSet#getTimestamp(int)
1119      */
1120     @Override
1121     public Timestamp getTimestamp( int columnIndex ) throws SQLException {
1122         return getTimestamp(findColumn(columnIndex));
1123     }
1124 
1125     /**
1126      * {@inheritDoc}
1127      * 
1128      * @see java.sql.ResultSet#getTimestamp(java.lang.String)
1129      */
1130     @Override
1131     public Timestamp getTimestamp( String columnLabel ) throws SQLException {
1132     	Calendar calv = (Calendar)getValueReturn(columnLabel, PropertyType.DATE);
1133     	if (calv == null) return null;
1134     	return TimestampWithTimezone.createTimestamp(calv);
1135 
1136     }
1137 
1138     /**
1139      * {@inheritDoc}
1140      * 
1141      * @see java.sql.ResultSet#getTimestamp(int, java.util.Calendar)
1142      */
1143     @Override
1144     public Timestamp getTimestamp( int columnIndex,
1145                                    Calendar cal ) throws SQLException {  	
1146     	 return getTimestamp(findColumn(columnIndex), cal);
1147     }
1148 
1149     /**
1150      * {@inheritDoc}
1151      * 
1152      * @see java.sql.ResultSet#getTimestamp(java.lang.String, java.util.Calendar)
1153      */
1154     @Override
1155     public Timestamp getTimestamp( String columnLabel,
1156                                    Calendar cal ) throws SQLException {
1157     	
1158         Calendar actual = (Calendar)getValueReturn(columnLabel, PropertyType.DATE);
1159 
1160         if (actual == null) return null;         
1161         
1162         // if cal is null, it will be supplied in TimestampWithTimezone
1163         return TimestampWithTimezone.createTimestamp(actual, cal);    	
1164     }
1165 
1166     /**
1167      * {@inheritDoc}
1168      * 
1169      * @see java.sql.ResultSet#getURL(int)
1170      */
1171     @Override
1172     public URL getURL( int columnIndex ) throws SQLException {
1173         throw new SQLFeatureNotSupportedException();
1174     }
1175 
1176     /**
1177      * {@inheritDoc}
1178      * 
1179      * @see java.sql.ResultSet#getURL(java.lang.String)
1180      */
1181     @Override
1182     public URL getURL( String columnLabel ) throws SQLException {
1183         throw new SQLFeatureNotSupportedException();
1184     }
1185 
1186     /**
1187      * {@inheritDoc}
1188      * 
1189      * @see java.sql.ResultSet#getUnicodeStream(int)
1190      */
1191     @Override
1192     public InputStream getUnicodeStream( int columnIndex ) throws SQLException {
1193         throw new SQLFeatureNotSupportedException();
1194     }
1195 
1196     /**
1197      * {@inheritDoc}
1198      * 
1199      * @see java.sql.ResultSet#getUnicodeStream(java.lang.String)
1200      */
1201     @Override
1202     public InputStream getUnicodeStream( String columnLabel ) throws SQLException {
1203         throw new SQLFeatureNotSupportedException();
1204     }
1205 
1206     public Value getValue( int columnIndex ) throws SQLException {
1207         return getValue(findColumn(columnIndex));
1208 
1209     }
1210 
1211     public Value getValue( String columnLabel ) throws SQLException {
1212         notClosed();
1213         isRowSet();
1214 
1215         try {
1216             return row.getValue(columnLabel);
1217         } catch (PathNotFoundException pnfe) {
1218             return null;
1219         } catch (RepositoryException e) {
1220             throw new SQLException(e.getLocalizedMessage(), e);
1221         }
1222 
1223     }
1224 
1225     /**
1226      * This is called when the calling method controls what datatype to be returned. Another reason for centralizing this logic so
1227      * that the {@link #currentValue} can be maintained
1228      * 
1229      * @param columnName
1230      * @param type is the {@link PropertyType datatype} to be returned
1231      * @return Object
1232      * @throws SQLException
1233      */
1234     private Object getValueReturn( String columnName,
1235                                    int type ) throws SQLException {
1236         notClosed();
1237         isRowSet();
1238 
1239         this.currentValue = null;
1240         try {
1241 
1242             final Value value = row.getValue(columnName);
1243             this.currentValue = getValueObject(value, type);
1244 
1245         } catch (PathNotFoundException pnfe) {
1246         	// do nothing
1247         } catch (ItemNotFoundException e) {
1248             itemNotFoundUsingColunName(columnName);
1249         } catch (RepositoryException e) {
1250             throw new SQLException(e.getLocalizedMessage(), e);
1251         }
1252         return this.currentValue;
1253     }
1254 
1255     /**
1256      * Helper method for returning an object from <code>value</code> based on <code>type</code>
1257      * 
1258      * @param value
1259      * @param type indicates {@link PropertyType} used to derive return object type
1260      * @return Object
1261      * @throws SQLException
1262      */
1263     private Object getValueObject( Value value,
1264                                    int type ) throws SQLException {
1265         if (value == null) return null;
1266 
1267         try {
1268             switch (type) {
1269 
1270                 case PropertyType.STRING:
1271                     return value.getString();
1272                 case PropertyType.BOOLEAN:
1273                     return value.getBoolean();
1274                 case PropertyType.DATE:       
1275                 	return value.getDate();
1276                 case PropertyType.DOUBLE:
1277                     return value.getDouble();
1278                 case PropertyType.LONG:
1279                     return value.getLong();
1280                 case PropertyType.BINARY:
1281                     return value.getBinary().getStream();
1282             }
1283 
1284         } catch (ValueFormatException ve) {
1285             throw new SQLException(ve.getLocalizedMessage(), ve);
1286         } catch (IllegalStateException ie) {
1287             throw new SQLException(ie.getLocalizedMessage(), ie);
1288         } catch (RepositoryException e) {
1289             throw new SQLException(e.getLocalizedMessage(), e);
1290         }
1291         return value.toString();
1292     }
1293 
1294     /**
1295      * This method transforms a {@link Value} into a JDBC type based on {@link JcrType} mappings
1296      * 
1297      * @param columnName
1298      * @return Object
1299      * @throws SQLException
1300      */
1301     private Object getColumnTranslatedToJDBC( String columnName ) throws SQLException {
1302         notClosed();
1303         isRowSet();
1304 
1305         Value value = null;
1306         this.currentValue = null;
1307 
1308         try {
1309             value = row.getValue(columnName);
1310         } catch (javax.jcr.PathNotFoundException pnf) {
1311             // do nothing
1312         } catch (RepositoryException e) {
1313             throw new SQLException(e.getLocalizedMessage(), e);
1314         }
1315 
1316         if (value == null) return null;
1317 
1318         this.currentValue = JcrType.translateValueToJDBC(value);
1319         return this.currentValue;
1320     }
1321 
1322     /**
1323      * {@inheritDoc}
1324      * 
1325      * @see java.sql.ResultSet#getWarnings()
1326      */
1327     @Override
1328     public SQLWarning getWarnings() /*throws SQLException*/{
1329         return null;
1330     }
1331 
1332     protected boolean hasNext() {
1333         return rowIter.hasNext();
1334     }
1335 
1336     /**
1337      * {@inheritDoc}
1338      * 
1339      * @see java.sql.ResultSet#insertRow()
1340      */
1341     @Override
1342     public void insertRow() throws SQLException {
1343         this.notClosed();
1344         this.noUpdates();
1345     }
1346 
1347     /**
1348      * {@inheritDoc}
1349      * 
1350      * @see java.sql.ResultSet#isAfterLast()
1351      */
1352     @Override
1353     public boolean isAfterLast() throws SQLException {
1354         this.notClosed();
1355         if (this.row == null && !this.rowIter.hasNext() && this.rowIter.getPosition() == this.rowIter.getSize()) {
1356             return true;
1357         }
1358         return false;
1359 
1360     }
1361 
1362     /**
1363      * {@inheritDoc}
1364      * 
1365      * @see java.sql.ResultSet#isBeforeFirst()
1366      */
1367     @Override
1368     public boolean isBeforeFirst() throws SQLException {
1369         this.notClosed();
1370         if (this.rowIter.getPosition() == 0) {
1371             return true;
1372         }
1373         return false;
1374     }
1375 
1376     /**
1377      * {@inheritDoc}
1378      * 
1379      * @see java.sql.ResultSet#isFirst()
1380      */
1381     @Override
1382     public boolean isFirst() throws SQLException {
1383         this.notClosed();
1384         if (this.rowIter.getPosition() == 1) {
1385             return true;
1386         }
1387         return false;
1388     }
1389 
1390     /**
1391      * {@inheritDoc}
1392      * 
1393      * @see java.sql.ResultSet#isLast()
1394      */
1395     @Override
1396     public boolean isLast() throws SQLException {
1397         this.notClosed();
1398 
1399         if (this.row != null && !this.rowIter.hasNext() && this.rowIter.getPosition() == this.rowIter.getSize()) {
1400             return true;
1401         }
1402         return false;
1403     }
1404 
1405     protected final void isRowSet() throws SQLException {
1406         if (this.row != null) return;
1407 
1408         throw new SQLException(JdbcI18n.currentRowNotSet.text());
1409     }
1410 
1411     /**
1412      * {@inheritDoc}
1413      * <p>
1414      * This method, when called on an open result set, always throws {@link SQLException} because this driver only supports
1415      * {@link ResultSet#FETCH_FORWARD}.
1416      * </p>
1417      * 
1418      * @see java.sql.ResultSet#last()
1419      */
1420     @Override
1421     public boolean last() throws SQLException {
1422         notClosed();
1423         forwardOnly();
1424         return false;
1425     }
1426 
1427     /**
1428      * {@inheritDoc}
1429      * <p>
1430      * This method, when called on an open result set, always throws {@link SQLException} because this driver only supports
1431      * {@link ResultSet#FETCH_FORWARD}.
1432      * </p>
1433      * 
1434      * @see java.sql.ResultSet#moveToCurrentRow()
1435      */
1436     @Override
1437     public void moveToCurrentRow() throws SQLException {
1438         notClosed();
1439         forwardOnly();
1440     }
1441 
1442     /**
1443      * {@inheritDoc}
1444      * 
1445      * @see java.sql.ResultSet#moveToInsertRow()
1446      */
1447     @Override
1448     public void moveToInsertRow() throws SQLException {
1449         this.noUpdates();
1450     }
1451 
1452     /**
1453      * {@inheritDoc}
1454      * <p>
1455      * This method, when cursor position is after the last row, will return <code>false</code>
1456      * </p>
1457      * 
1458      * @see java.sql.ResultSet#next()
1459      */
1460     @Override
1461     public boolean next() throws SQLException {
1462         notClosed();
1463         if (!this.hasNext()) {
1464             this.row = null;
1465             this.currentValue = null;
1466             return false;
1467         }
1468 
1469         this.row = rowIter.nextRow();
1470         return true;
1471     }
1472 
1473     /**
1474      * {@inheritDoc}
1475      * <p>
1476      * This method, when called on an open result set, always throws {@link SQLException} because this driver only supports
1477      * {@link ResultSet#FETCH_FORWARD}.
1478      * </p>
1479      * 
1480      * @see java.sql.ResultSet#previous()
1481      */
1482     @Override
1483     public boolean previous() throws SQLException {
1484         notClosed();
1485         this.forwardOnly();
1486         return false;
1487     }
1488 
1489     /**
1490      * {@inheritDoc}
1491      * <p>
1492      * This method, when called on an open result set, always throws {@link SQLException} because this driver only supports
1493      * {@link ResultSet#FETCH_FORWARD}.
1494      * </p>
1495      * 
1496      * @see java.sql.ResultSet#refreshRow()
1497      */
1498     @Override
1499     public void refreshRow() throws SQLException {
1500         notClosed();
1501         this.forwardOnly();
1502     }
1503 
1504     /**
1505      * {@inheritDoc}
1506      * <p>
1507      * This method, when called on an open result set, always throws {@link SQLException} because this driver only supports
1508      * {@link ResultSet#FETCH_FORWARD}.
1509      * </p>
1510      * 
1511      * @see java.sql.ResultSet#relative(int)
1512      */
1513     @Override
1514     public boolean relative( int rows ) throws SQLException {
1515     	throw new SQLFeatureNotSupportedException();
1516     }
1517 
1518     /**
1519      * {@inheritDoc}
1520      * <p>
1521      * This method always returns false since this JDBC driver does not support any updates.
1522      * </p>
1523      * 
1524      * @see java.sql.ResultSet#rowDeleted()
1525      */
1526     @Override
1527     public boolean rowDeleted() throws SQLException {
1528     	throw new SQLFeatureNotSupportedException();
1529     }
1530 
1531     /**
1532      * {@inheritDoc}
1533      * <p>
1534      * This method always returns false since this JDBC driver does not support any updates.
1535      * </p>
1536      * 
1537      * @see java.sql.ResultSet#rowInserted()
1538      */
1539     @Override
1540     public boolean rowInserted() throws SQLException {
1541     	throw new SQLFeatureNotSupportedException();
1542     }
1543 
1544     /**
1545      * {@inheritDoc}
1546      * <p>
1547      * This method always returns false since this JDBC driver does not support any updates.
1548      * </p>
1549      * 
1550      * @see java.sql.ResultSet#rowUpdated()
1551      */
1552     @Override
1553     public boolean rowUpdated() throws SQLException {
1554     	throw new SQLFeatureNotSupportedException();
1555     }
1556 
1557     /**
1558      * {@inheritDoc}
1559      * 
1560      * @see java.sql.ResultSet#setFetchSize(int)
1561      */
1562     @Override
1563     public void setFetchSize( int rows ) /*throws SQLException*/{
1564         // does nothing
1565     }
1566 
1567     /**
1568      * {@inheritDoc}
1569      * <p>
1570      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1571      * driver does not support any updates.
1572      * </p>
1573      * 
1574      * @see java.sql.ResultSet#updateArray(int, java.sql.Array)
1575      */
1576     @Override
1577     public void updateArray( int columnIndex,
1578                              Array x ) throws SQLException {
1579         notClosed();
1580         noUpdates();
1581     }
1582 
1583     /**
1584      * {@inheritDoc}
1585      * <p>
1586      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1587      * driver does not support any updates.
1588      * </p>
1589      * 
1590      * @see java.sql.ResultSet#updateArray(java.lang.String, java.sql.Array)
1591      */
1592     @Override
1593     public void updateArray( String columnLabel,
1594                              Array x ) throws SQLException {
1595         notClosed();
1596         noUpdates();
1597     }
1598 
1599     /**
1600      * {@inheritDoc}
1601      * <p>
1602      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1603      * driver does not support any updates.
1604      * </p>
1605      * 
1606      * @see java.sql.ResultSet#updateAsciiStream(int, java.io.InputStream)
1607      */
1608     @Override
1609     public void updateAsciiStream( int columnIndex,
1610                                    InputStream x ) throws SQLException {
1611         notClosed();
1612         noUpdates();
1613     }
1614 
1615     /**
1616      * {@inheritDoc}
1617      * <p>
1618      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1619      * driver does not support any updates.
1620      * </p>
1621      * 
1622      * @see java.sql.ResultSet#updateAsciiStream(java.lang.String, java.io.InputStream)
1623      */
1624     @Override
1625     public void updateAsciiStream( String columnLabel,
1626                                    InputStream x ) throws SQLException {
1627         notClosed();
1628         noUpdates();
1629     }
1630 
1631     /**
1632      * {@inheritDoc}
1633      * <p>
1634      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1635      * driver does not support any updates.
1636      * </p>
1637      * 
1638      * @see java.sql.ResultSet#updateAsciiStream(int, java.io.InputStream, int)
1639      */
1640     @Override
1641     public void updateAsciiStream( int columnIndex,
1642                                    InputStream x,
1643                                    int length ) throws SQLException {
1644         notClosed();
1645         noUpdates();
1646     }
1647 
1648     /**
1649      * {@inheritDoc}
1650      * <p>
1651      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1652      * driver does not support any updates.
1653      * </p>
1654      * 
1655      * @see java.sql.ResultSet#updateAsciiStream(java.lang.String, java.io.InputStream, int)
1656      */
1657     @Override
1658     public void updateAsciiStream( String columnLabel,
1659                                    InputStream x,
1660                                    int length ) throws SQLException {
1661         notClosed();
1662         noUpdates();
1663     }
1664 
1665     /**
1666      * {@inheritDoc}
1667      * <p>
1668      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1669      * driver does not support any updates.
1670      * </p>
1671      * 
1672      * @see java.sql.ResultSet#updateAsciiStream(int, java.io.InputStream, long)
1673      */
1674     @Override
1675     public void updateAsciiStream( int columnIndex,
1676                                    InputStream x,
1677                                    long length ) throws SQLException {
1678         notClosed();
1679         noUpdates();
1680     }
1681 
1682     /**
1683      * {@inheritDoc}
1684      * <p>
1685      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1686      * driver does not support any updates.
1687      * </p>
1688      * 
1689      * @see java.sql.ResultSet#updateAsciiStream(java.lang.String, java.io.InputStream, long)
1690      */
1691     @Override
1692     public void updateAsciiStream( String columnLabel,
1693                                    InputStream x,
1694                                    long length ) throws SQLException {
1695         notClosed();
1696         noUpdates();
1697     }
1698 
1699     /**
1700      * {@inheritDoc}
1701      * <p>
1702      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1703      * driver does not support any updates.
1704      * </p>
1705      * 
1706      * @see java.sql.ResultSet#updateBigDecimal(int, java.math.BigDecimal)
1707      */
1708     @Override
1709     public void updateBigDecimal( int columnIndex,
1710                                   BigDecimal x ) throws SQLException {
1711         notClosed();
1712         noUpdates();
1713     }
1714 
1715     /**
1716      * {@inheritDoc}
1717      * <p>
1718      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1719      * driver does not support any updates.
1720      * </p>
1721      * 
1722      * @see java.sql.ResultSet#updateBigDecimal(java.lang.String, java.math.BigDecimal)
1723      */
1724     @Override
1725     public void updateBigDecimal( String columnLabel,
1726                                   BigDecimal x ) throws SQLException {
1727         notClosed();
1728         noUpdates();
1729     }
1730 
1731     /**
1732      * {@inheritDoc}
1733      * <p>
1734      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1735      * driver does not support any updates.
1736      * </p>
1737      * 
1738      * @see java.sql.ResultSet#updateBinaryStream(int, java.io.InputStream)
1739      */
1740     @Override
1741     public void updateBinaryStream( int columnIndex,
1742                                     InputStream x ) throws SQLException {
1743         notClosed();
1744         noUpdates();
1745     }
1746 
1747     /**
1748      * {@inheritDoc}
1749      * <p>
1750      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1751      * driver does not support any updates.
1752      * </p>
1753      * 
1754      * @see java.sql.ResultSet#updateBinaryStream(java.lang.String, java.io.InputStream)
1755      */
1756     @Override
1757     public void updateBinaryStream( String columnLabel,
1758                                     InputStream x ) throws SQLException {
1759         notClosed();
1760         noUpdates();
1761     }
1762 
1763     /**
1764      * {@inheritDoc}
1765      * <p>
1766      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1767      * driver does not support any updates.
1768      * </p>
1769      * 
1770      * @see java.sql.ResultSet#updateBinaryStream(int, java.io.InputStream, int)
1771      */
1772     @Override
1773     public void updateBinaryStream( int columnIndex,
1774                                     InputStream x,
1775                                     int length ) throws SQLException {
1776         notClosed();
1777         noUpdates();
1778     }
1779 
1780     /**
1781      * {@inheritDoc}
1782      * <p>
1783      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1784      * driver does not support any updates.
1785      * </p>
1786      * 
1787      * @see java.sql.ResultSet#updateBinaryStream(java.lang.String, java.io.InputStream, int)
1788      */
1789     @Override
1790     public void updateBinaryStream( String columnLabel,
1791                                     InputStream x,
1792                                     int length ) throws SQLException {
1793         notClosed();
1794         noUpdates();
1795     }
1796 
1797     /**
1798      * {@inheritDoc}
1799      * <p>
1800      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1801      * driver does not support any updates.
1802      * </p>
1803      * 
1804      * @see java.sql.ResultSet#updateBinaryStream(int, java.io.InputStream, long)
1805      */
1806     @Override
1807     public void updateBinaryStream( int columnIndex,
1808                                     InputStream x,
1809                                     long length ) throws SQLException {
1810         notClosed();
1811         noUpdates();
1812     }
1813 
1814     /**
1815      * {@inheritDoc}
1816      * <p>
1817      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1818      * driver does not support any updates.
1819      * </p>
1820      * 
1821      * @see java.sql.ResultSet#updateBinaryStream(java.lang.String, java.io.InputStream, long)
1822      */
1823     @Override
1824     public void updateBinaryStream( String columnLabel,
1825                                     InputStream x,
1826                                     long length ) throws SQLException {
1827         notClosed();
1828         noUpdates();
1829     }
1830 
1831     /**
1832      * {@inheritDoc}
1833      * <p>
1834      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1835      * driver does not support any updates.
1836      * </p>
1837      * 
1838      * @see java.sql.ResultSet#updateBlob(int, java.sql.Blob)
1839      */
1840     @Override
1841     public void updateBlob( int columnIndex,
1842                             Blob x ) throws SQLException {
1843         notClosed();
1844         noUpdates();
1845     }
1846 
1847     /**
1848      * {@inheritDoc}
1849      * <p>
1850      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1851      * driver does not support any updates.
1852      * </p>
1853      * 
1854      * @see java.sql.ResultSet#updateBlob(java.lang.String, java.sql.Blob)
1855      */
1856     @Override
1857     public void updateBlob( String columnLabel,
1858                             Blob x ) throws SQLException {
1859         notClosed();
1860         noUpdates();
1861     }
1862 
1863     /**
1864      * {@inheritDoc}
1865      * <p>
1866      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1867      * driver does not support any updates.
1868      * </p>
1869      * 
1870      * @see java.sql.ResultSet#updateBlob(int, java.io.InputStream)
1871      */
1872     @Override
1873     public void updateBlob( int columnIndex,
1874                             InputStream inputStream ) throws SQLException {
1875         notClosed();
1876         noUpdates();
1877     }
1878 
1879     /**
1880      * {@inheritDoc}
1881      * <p>
1882      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1883      * driver does not support any updates.
1884      * </p>
1885      * 
1886      * @see java.sql.ResultSet#updateBlob(java.lang.String, java.io.InputStream)
1887      */
1888     @Override
1889     public void updateBlob( String columnLabel,
1890                             InputStream inputStream ) throws SQLException {
1891         notClosed();
1892         noUpdates();
1893     }
1894 
1895     /**
1896      * {@inheritDoc}
1897      * <p>
1898      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1899      * driver does not support any updates.
1900      * </p>
1901      * 
1902      * @see java.sql.ResultSet#updateBlob(int, java.io.InputStream, long)
1903      */
1904     @Override
1905     public void updateBlob( int columnIndex,
1906                             InputStream inputStream,
1907                             long length ) throws SQLException {
1908         notClosed();
1909         noUpdates();
1910     }
1911 
1912     /**
1913      * {@inheritDoc}
1914      * <p>
1915      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1916      * driver does not support any updates.
1917      * </p>
1918      * 
1919      * @see java.sql.ResultSet#updateBlob(java.lang.String, java.io.InputStream, long)
1920      */
1921     @Override
1922     public void updateBlob( String columnLabel,
1923                             InputStream inputStream,
1924                             long length ) throws SQLException {
1925         notClosed();
1926         noUpdates();
1927     }
1928 
1929     /**
1930      * {@inheritDoc}
1931      * <p>
1932      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1933      * driver does not support any updates.
1934      * </p>
1935      * 
1936      * @see java.sql.ResultSet#updateBoolean(int, boolean)
1937      */
1938     @Override
1939     public void updateBoolean( int columnIndex,
1940                                boolean x ) throws SQLException {
1941         notClosed();
1942         noUpdates();
1943     }
1944 
1945     /**
1946      * {@inheritDoc}
1947      * <p>
1948      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1949      * driver does not support any updates.
1950      * </p>
1951      * 
1952      * @see java.sql.ResultSet#updateBoolean(java.lang.String, boolean)
1953      */
1954     @Override
1955     public void updateBoolean( String columnLabel,
1956                                boolean x ) throws SQLException {
1957         notClosed();
1958         noUpdates();
1959     }
1960 
1961     /**
1962      * {@inheritDoc}
1963      * <p>
1964      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1965      * driver does not support any updates.
1966      * </p>
1967      * 
1968      * @see java.sql.ResultSet#updateByte(int, byte)
1969      */
1970     @Override
1971     public void updateByte( int columnIndex,
1972                             byte x ) throws SQLException {
1973         notClosed();
1974         noUpdates();
1975     }
1976 
1977     /**
1978      * {@inheritDoc}
1979      * <p>
1980      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1981      * driver does not support any updates.
1982      * </p>
1983      * 
1984      * @see java.sql.ResultSet#updateByte(java.lang.String, byte)
1985      */
1986     @Override
1987     public void updateByte( String columnLabel,
1988                             byte x ) throws SQLException {
1989         notClosed();
1990         noUpdates();
1991     }
1992 
1993     /**
1994      * {@inheritDoc}
1995      * <p>
1996      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
1997      * driver does not support any updates.
1998      * </p>
1999      * 
2000      * @see java.sql.ResultSet#updateBytes(int, byte[])
2001      */
2002     @Override
2003     public void updateBytes( int columnIndex,
2004                              byte[] x ) throws SQLException {
2005         notClosed();
2006         noUpdates();
2007     }
2008 
2009     /**
2010      * {@inheritDoc}
2011      * <p>
2012      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2013      * driver does not support any updates.
2014      * </p>
2015      * 
2016      * @see java.sql.ResultSet#updateBytes(java.lang.String, byte[])
2017      */
2018     @Override
2019     public void updateBytes( String columnLabel,
2020                              byte[] x ) throws SQLException {
2021         notClosed();
2022         noUpdates();
2023     }
2024 
2025     /**
2026      * {@inheritDoc}
2027      * <p>
2028      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2029      * driver does not support any updates.
2030      * </p>
2031      * 
2032      * @see java.sql.ResultSet#updateCharacterStream(int, java.io.Reader)
2033      */
2034     @Override
2035     public void updateCharacterStream( int columnIndex,
2036                                        Reader x ) throws SQLException {
2037         notClosed();
2038         noUpdates();
2039     }
2040 
2041     /**
2042      * {@inheritDoc}
2043      * <p>
2044      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2045      * driver does not support any updates.
2046      * </p>
2047      * 
2048      * @see java.sql.ResultSet#updateCharacterStream(java.lang.String, java.io.Reader)
2049      */
2050     @Override
2051     public void updateCharacterStream( String columnLabel,
2052                                        Reader reader ) throws SQLException {
2053         notClosed();
2054         noUpdates();
2055     }
2056 
2057     /**
2058      * {@inheritDoc}
2059      * <p>
2060      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2061      * driver does not support any updates.
2062      * </p>
2063      * 
2064      * @see java.sql.ResultSet#updateCharacterStream(int, java.io.Reader, int)
2065      */
2066     @Override
2067     public void updateCharacterStream( int columnIndex,
2068                                        Reader x,
2069                                        int length ) throws SQLException {
2070         notClosed();
2071         noUpdates();
2072     }
2073 
2074     /**
2075      * {@inheritDoc}
2076      * <p>
2077      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2078      * driver does not support any updates.
2079      * </p>
2080      * 
2081      * @see java.sql.ResultSet#updateCharacterStream(java.lang.String, java.io.Reader, int)
2082      */
2083     @Override
2084     public void updateCharacterStream( String columnLabel,
2085                                        Reader reader,
2086                                        int length ) throws SQLException {
2087         notClosed();
2088         noUpdates();
2089     }
2090 
2091     /**
2092      * {@inheritDoc}
2093      * <p>
2094      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2095      * driver does not support any updates.
2096      * </p>
2097      * 
2098      * @see java.sql.ResultSet#updateCharacterStream(int, java.io.Reader, long)
2099      */
2100     @Override
2101     public void updateCharacterStream( int columnIndex,
2102                                        Reader x,
2103                                        long length ) throws SQLException {
2104         notClosed();
2105         noUpdates();
2106     }
2107 
2108     /**
2109      * {@inheritDoc}
2110      * <p>
2111      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2112      * driver does not support any updates.
2113      * </p>
2114      * 
2115      * @see java.sql.ResultSet#updateCharacterStream(java.lang.String, java.io.Reader, long)
2116      */
2117     @Override
2118     public void updateCharacterStream( String columnLabel,
2119                                        Reader reader,
2120                                        long length ) throws SQLException {
2121         notClosed();
2122         noUpdates();
2123     }
2124 
2125     /**
2126      * {@inheritDoc}
2127      * <p>
2128      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2129      * driver does not support any updates.
2130      * </p>
2131      * 
2132      * @see java.sql.ResultSet#updateClob(int, java.sql.Clob)
2133      */
2134     @Override
2135     public void updateClob( int columnIndex,
2136                             Clob x ) throws SQLException {
2137         notClosed();
2138         noUpdates();
2139     }
2140 
2141     /**
2142      * {@inheritDoc}
2143      * <p>
2144      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2145      * driver does not support any updates.
2146      * </p>
2147      * 
2148      * @see java.sql.ResultSet#updateClob(java.lang.String, java.sql.Clob)
2149      */
2150     @Override
2151     public void updateClob( String columnLabel,
2152                             Clob x ) throws SQLException {
2153         notClosed();
2154         noUpdates();
2155     }
2156 
2157     /**
2158      * {@inheritDoc}
2159      * <p>
2160      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2161      * driver does not support any updates.
2162      * </p>
2163      * 
2164      * @see java.sql.ResultSet#updateClob(int, java.io.Reader)
2165      */
2166     @Override
2167     public void updateClob( int columnIndex,
2168                             Reader reader ) throws SQLException {
2169         notClosed();
2170         noUpdates();
2171     }
2172 
2173     /**
2174      * {@inheritDoc}
2175      * <p>
2176      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2177      * driver does not support any updates.
2178      * </p>
2179      * 
2180      * @see java.sql.ResultSet#updateClob(java.lang.String, java.io.Reader)
2181      */
2182     @Override
2183     public void updateClob( String columnLabel,
2184                             Reader reader ) throws SQLException {
2185         notClosed();
2186         noUpdates();
2187     }
2188 
2189     /**
2190      * {@inheritDoc}
2191      * <p>
2192      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2193      * driver does not support any updates.
2194      * </p>
2195      * 
2196      * @see java.sql.ResultSet#updateClob(int, java.io.Reader, long)
2197      */
2198     @Override
2199     public void updateClob( int columnIndex,
2200                             Reader reader,
2201                             long length ) throws SQLException {
2202         notClosed();
2203         noUpdates();
2204     }
2205 
2206     /**
2207      * {@inheritDoc}
2208      * <p>
2209      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2210      * driver does not support any updates.
2211      * </p>
2212      * 
2213      * @see java.sql.ResultSet#updateClob(java.lang.String, java.io.Reader, long)
2214      */
2215     @Override
2216     public void updateClob( String columnLabel,
2217                             Reader reader,
2218                             long length ) throws SQLException {
2219         notClosed();
2220         noUpdates();
2221     }
2222 
2223     /**
2224      * {@inheritDoc}
2225      * <p>
2226      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2227      * driver does not support any updates.
2228      * </p>
2229      * 
2230      * @see java.sql.ResultSet#updateDate(int, java.sql.Date)
2231      */
2232     @Override
2233     public void updateDate( int columnIndex,
2234                             Date x ) throws SQLException {
2235         notClosed();
2236         noUpdates();
2237     }
2238 
2239     /**
2240      * {@inheritDoc}
2241      * <p>
2242      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2243      * driver does not support any updates.
2244      * </p>
2245      * 
2246      * @see java.sql.ResultSet#updateDate(java.lang.String, java.sql.Date)
2247      */
2248     @Override
2249     public void updateDate( String columnLabel,
2250                             Date x ) throws SQLException {
2251         notClosed();
2252         noUpdates();
2253     }
2254 
2255     /**
2256      * {@inheritDoc}
2257      * <p>
2258      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2259      * driver does not support any updates.
2260      * </p>
2261      * 
2262      * @see java.sql.ResultSet#updateDouble(int, double)
2263      */
2264     @Override
2265     public void updateDouble( int columnIndex,
2266                               double x ) throws SQLException {
2267         notClosed();
2268         noUpdates();
2269     }
2270 
2271     /**
2272      * {@inheritDoc}
2273      * <p>
2274      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2275      * driver does not support any updates.
2276      * </p>
2277      * 
2278      * @see java.sql.ResultSet#updateDouble(java.lang.String, double)
2279      */
2280     @Override
2281     public void updateDouble( String columnLabel,
2282                               double x ) throws SQLException {
2283         notClosed();
2284         noUpdates();
2285     }
2286 
2287     /**
2288      * {@inheritDoc}
2289      * <p>
2290      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2291      * driver does not support any updates.
2292      * </p>
2293      * 
2294      * @see java.sql.ResultSet#updateFloat(int, float)
2295      */
2296     @Override
2297     public void updateFloat( int columnIndex,
2298                              float x ) throws SQLException {
2299         notClosed();
2300         noUpdates();
2301     }
2302 
2303     /**
2304      * {@inheritDoc}
2305      * <p>
2306      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2307      * driver does not support any updates.
2308      * </p>
2309      * 
2310      * @see java.sql.ResultSet#updateFloat(java.lang.String, float)
2311      */
2312     @Override
2313     public void updateFloat( String columnLabel,
2314                              float x ) throws SQLException {
2315         notClosed();
2316         noUpdates();
2317     }
2318 
2319     /**
2320      * {@inheritDoc}
2321      * <p>
2322      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2323      * driver does not support any updates.
2324      * </p>
2325      * 
2326      * @see java.sql.ResultSet#updateInt(int, int)
2327      */
2328     @Override
2329     public void updateInt( int columnIndex,
2330                            int x ) throws SQLException {
2331         notClosed();
2332         noUpdates();
2333     }
2334 
2335     /**
2336      * {@inheritDoc}
2337      * <p>
2338      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2339      * driver does not support any updates.
2340      * </p>
2341      * 
2342      * @see java.sql.ResultSet#updateInt(java.lang.String, int)
2343      */
2344     @Override
2345     public void updateInt( String columnLabel,
2346                            int x ) throws SQLException {
2347         notClosed();
2348         noUpdates();
2349     }
2350 
2351     /**
2352      * {@inheritDoc}
2353      * <p>
2354      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2355      * driver does not support any updates.
2356      * </p>
2357      * 
2358      * @see java.sql.ResultSet#updateLong(int, long)
2359      */
2360     @Override
2361     public void updateLong( int columnIndex,
2362                             long x ) throws SQLException {
2363         notClosed();
2364         noUpdates();
2365     }
2366 
2367     /**
2368      * {@inheritDoc}
2369      * <p>
2370      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2371      * driver does not support any updates.
2372      * </p>
2373      * 
2374      * @see java.sql.ResultSet#updateLong(java.lang.String, long)
2375      */
2376     @Override
2377     public void updateLong( String columnLabel,
2378                             long x ) throws SQLException {
2379         notClosed();
2380         noUpdates();
2381     }
2382 
2383     /**
2384      * {@inheritDoc}
2385      * <p>
2386      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2387      * driver does not support any updates.
2388      * </p>
2389      * 
2390      * @see java.sql.ResultSet#updateNCharacterStream(int, java.io.Reader)
2391      */
2392     @Override
2393     public void updateNCharacterStream( int columnIndex,
2394                                         Reader x ) throws SQLException {
2395         notClosed();
2396         noUpdates();
2397     }
2398 
2399     /**
2400      * {@inheritDoc}
2401      * <p>
2402      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2403      * driver does not support any updates.
2404      * </p>
2405      * 
2406      * @see java.sql.ResultSet#updateNCharacterStream(java.lang.String, java.io.Reader)
2407      */
2408     @Override
2409     public void updateNCharacterStream( String columnLabel,
2410                                         Reader reader ) throws SQLException {
2411         notClosed();
2412         noUpdates();
2413     }
2414 
2415     /**
2416      * {@inheritDoc}
2417      * <p>
2418      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2419      * driver does not support any updates.
2420      * </p>
2421      * 
2422      * @see java.sql.ResultSet#updateNCharacterStream(int, java.io.Reader, long)
2423      */
2424     @Override
2425     public void updateNCharacterStream( int columnIndex,
2426                                         Reader x,
2427                                         long length ) throws SQLException {
2428         notClosed();
2429         noUpdates();
2430     }
2431 
2432     /**
2433      * {@inheritDoc}
2434      * <p>
2435      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2436      * driver does not support any updates.
2437      * </p>
2438      * 
2439      * @see java.sql.ResultSet#updateNCharacterStream(java.lang.String, java.io.Reader, long)
2440      */
2441     @Override
2442     public void updateNCharacterStream( String columnLabel,
2443                                         Reader reader,
2444                                         long length ) throws SQLException {
2445         notClosed();
2446         noUpdates();
2447     }
2448 
2449     /**
2450      * {@inheritDoc}
2451      * <p>
2452      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2453      * driver does not support any updates.
2454      * </p>
2455      * 
2456      * @see java.sql.ResultSet#updateNClob(int, java.sql.NClob)
2457      */
2458     @Override
2459     public void updateNClob( int columnIndex,
2460                              NClob clob ) throws SQLException {
2461         notClosed();
2462         noUpdates();
2463     }
2464 
2465     /**
2466      * {@inheritDoc}
2467      * <p>
2468      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2469      * driver does not support any updates.
2470      * </p>
2471      * 
2472      * @see java.sql.ResultSet#updateNClob(java.lang.String, java.sql.NClob)
2473      */
2474     @Override
2475     public void updateNClob( String columnLabel,
2476                              NClob clob ) throws SQLException {
2477         notClosed();
2478         noUpdates();
2479     }
2480 
2481     /**
2482      * {@inheritDoc}
2483      * <p>
2484      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2485      * driver does not support any updates.
2486      * </p>
2487      * 
2488      * @see java.sql.ResultSet#updateNClob(int, java.io.Reader)
2489      */
2490     @Override
2491     public void updateNClob( int columnIndex,
2492                              Reader reader ) throws SQLException {
2493         notClosed();
2494         noUpdates();
2495     }
2496 
2497     /**
2498      * {@inheritDoc}
2499      * <p>
2500      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2501      * driver does not support any updates.
2502      * </p>
2503      * 
2504      * @see java.sql.ResultSet#updateNClob(java.lang.String, java.io.Reader)
2505      */
2506     @Override
2507     public void updateNClob( String columnLabel,
2508                              Reader reader ) throws SQLException {
2509         notClosed();
2510         noUpdates();
2511     }
2512 
2513     /**
2514      * {@inheritDoc}
2515      * <p>
2516      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2517      * driver does not support any updates.
2518      * </p>
2519      * 
2520      * @see java.sql.ResultSet#updateNClob(int, java.io.Reader, long)
2521      */
2522     @Override
2523     public void updateNClob( int columnIndex,
2524                              Reader reader,
2525                              long length ) throws SQLException {
2526         notClosed();
2527         noUpdates();
2528     }
2529 
2530     /**
2531      * {@inheritDoc}
2532      * <p>
2533      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2534      * driver does not support any updates.
2535      * </p>
2536      * 
2537      * @see java.sql.ResultSet#updateNClob(java.lang.String, java.io.Reader, long)
2538      */
2539     @Override
2540     public void updateNClob( String columnLabel,
2541                              Reader reader,
2542                              long length ) throws SQLException {
2543         notClosed();
2544         noUpdates();
2545     }
2546 
2547     /**
2548      * {@inheritDoc}
2549      * <p>
2550      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2551      * driver does not support any updates.
2552      * </p>
2553      * 
2554      * @see java.sql.ResultSet#updateNString(int, java.lang.String)
2555      */
2556     @Override
2557     public void updateNString( int columnIndex,
2558                                String string ) throws SQLException {
2559         notClosed();
2560         noUpdates();
2561     }
2562 
2563     /**
2564      * {@inheritDoc}
2565      * <p>
2566      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2567      * driver does not support any updates.
2568      * </p>
2569      * 
2570      * @see java.sql.ResultSet#updateNString(java.lang.String, java.lang.String)
2571      */
2572     @Override
2573     public void updateNString( String columnLabel,
2574                                String string ) throws SQLException {
2575         notClosed();
2576         noUpdates();
2577     }
2578 
2579     /**
2580      * {@inheritDoc}
2581      * <p>
2582      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2583      * driver does not support any updates.
2584      * </p>
2585      * 
2586      * @see java.sql.ResultSet#updateNull(int)
2587      */
2588     @Override
2589     public void updateNull( int columnIndex ) throws SQLException {
2590         notClosed();
2591         noUpdates();
2592     }
2593 
2594     /**
2595      * {@inheritDoc}
2596      * <p>
2597      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2598      * driver does not support any updates.
2599      * </p>
2600      * 
2601      * @see java.sql.ResultSet#updateNull(java.lang.String)
2602      */
2603     @Override
2604     public void updateNull( String columnLabel ) throws SQLException {
2605         notClosed();
2606         noUpdates();
2607     }
2608 
2609     /**
2610      * {@inheritDoc}
2611      * <p>
2612      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2613      * driver does not support any updates.
2614      * </p>
2615      * 
2616      * @see java.sql.ResultSet#updateObject(int, java.lang.Object)
2617      */
2618     @Override
2619     public void updateObject( int columnIndex,
2620                               Object x ) throws SQLException {
2621         notClosed();
2622         noUpdates();
2623     }
2624 
2625     /**
2626      * {@inheritDoc}
2627      * <p>
2628      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2629      * driver does not support any updates.
2630      * </p>
2631      * 
2632      * @see java.sql.ResultSet#updateObject(java.lang.String, java.lang.Object)
2633      */
2634     @Override
2635     public void updateObject( String columnLabel,
2636                               Object x ) throws SQLException {
2637         notClosed();
2638         noUpdates();
2639     }
2640 
2641     /**
2642      * {@inheritDoc}
2643      * <p>
2644      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2645      * driver does not support any updates.
2646      * </p>
2647      * 
2648      * @see java.sql.ResultSet#updateObject(int, java.lang.Object, int)
2649      */
2650     @Override
2651     public void updateObject( int columnIndex,
2652                               Object x,
2653                               int scaleOrLength ) throws SQLException {
2654         notClosed();
2655         noUpdates();
2656     }
2657 
2658     /**
2659      * {@inheritDoc}
2660      * <p>
2661      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2662      * driver does not support any updates.
2663      * </p>
2664      * 
2665      * @see java.sql.ResultSet#updateObject(java.lang.String, java.lang.Object, int)
2666      */
2667     @Override
2668     public void updateObject( String columnLabel,
2669                               Object x,
2670                               int scaleOrLength ) throws SQLException {
2671         notClosed();
2672         noUpdates();
2673     }
2674 
2675     /**
2676      * {@inheritDoc}
2677      * <p>
2678      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2679      * driver does not support any updates.
2680      * </p>
2681      * 
2682      * @see java.sql.ResultSet#updateRef(int, java.sql.Ref)
2683      */
2684     @Override
2685     public void updateRef( int columnIndex,
2686                            Ref x ) throws SQLException {
2687         notClosed();
2688         noUpdates();
2689     }
2690 
2691     /**
2692      * {@inheritDoc}
2693      * <p>
2694      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2695      * driver does not support any updates.
2696      * </p>
2697      * 
2698      * @see java.sql.ResultSet#updateRef(java.lang.String, java.sql.Ref)
2699      */
2700     @Override
2701     public void updateRef( String columnLabel,
2702                            Ref x ) throws SQLException {
2703         notClosed();
2704         noUpdates();
2705     }
2706 
2707     /**
2708      * {@inheritDoc}
2709      * <p>
2710      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2711      * driver does not support any updates.
2712      * </p>
2713      * 
2714      * @see java.sql.ResultSet#updateRow()
2715      */
2716     @Override
2717     public void updateRow() throws SQLException {
2718         notClosed();
2719         noUpdates();
2720     }
2721 
2722     /**
2723      * {@inheritDoc}
2724      * <p>
2725      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2726      * driver does not support any updates.
2727      * </p>
2728      * 
2729      * @see java.sql.ResultSet#updateRowId(int, java.sql.RowId)
2730      */
2731     @Override
2732     public void updateRowId( int columnIndex,
2733                              RowId x ) throws SQLException {
2734         notClosed();
2735         noUpdates();
2736     }
2737 
2738     /**
2739      * {@inheritDoc}
2740      * <p>
2741      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2742      * driver does not support any updates.
2743      * </p>
2744      * 
2745      * @see java.sql.ResultSet#updateRowId(java.lang.String, java.sql.RowId)
2746      */
2747     @Override
2748     public void updateRowId( String columnLabel,
2749                              RowId x ) throws SQLException {
2750         notClosed();
2751         noUpdates();
2752     }
2753 
2754     /**
2755      * {@inheritDoc}
2756      * <p>
2757      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2758      * driver does not support any updates.
2759      * </p>
2760      * 
2761      * @see java.sql.ResultSet#updateSQLXML(int, java.sql.SQLXML)
2762      */
2763     @Override
2764     public void updateSQLXML( int columnIndex,
2765                               SQLXML xmlObject ) throws SQLException {
2766         notClosed();
2767         noUpdates();
2768     }
2769 
2770     /**
2771      * {@inheritDoc}
2772      * <p>
2773      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2774      * driver does not support any updates.
2775      * </p>
2776      * 
2777      * @see java.sql.ResultSet#updateSQLXML(java.lang.String, java.sql.SQLXML)
2778      */
2779     @Override
2780     public void updateSQLXML( String columnLabel,
2781                               SQLXML xmlObject ) throws SQLException {
2782         notClosed();
2783         noUpdates();
2784     }
2785 
2786     /**
2787      * {@inheritDoc}
2788      * <p>
2789      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2790      * driver does not support any updates.
2791      * </p>
2792      * 
2793      * @see java.sql.ResultSet#updateShort(int, short)
2794      */
2795     @Override
2796     public void updateShort( int columnIndex,
2797                              short x ) throws SQLException {
2798         notClosed();
2799         noUpdates();
2800     }
2801 
2802     /**
2803      * {@inheritDoc}
2804      * <p>
2805      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2806      * driver does not support any updates.
2807      * </p>
2808      * 
2809      * @see java.sql.ResultSet#updateShort(java.lang.String, short)
2810      */
2811     @Override
2812     public void updateShort( String columnLabel,
2813                              short x ) throws SQLException {
2814         notClosed();
2815         noUpdates();
2816     }
2817 
2818     /**
2819      * {@inheritDoc}
2820      * <p>
2821      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2822      * driver does not support any updates.
2823      * </p>
2824      * 
2825      * @see java.sql.ResultSet#updateString(int, java.lang.String)
2826      */
2827     @Override
2828     public void updateString( int columnIndex,
2829                               String x ) throws SQLException {
2830         notClosed();
2831         noUpdates();
2832     }
2833 
2834     /**
2835      * {@inheritDoc}
2836      * <p>
2837      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2838      * driver does not support any updates.
2839      * </p>
2840      * 
2841      * @see java.sql.ResultSet#updateString(java.lang.String, java.lang.String)
2842      */
2843     @Override
2844     public void updateString( String columnLabel,
2845                               String x ) throws SQLException {
2846         notClosed();
2847         noUpdates();
2848     }
2849 
2850     /**
2851      * {@inheritDoc}
2852      * <p>
2853      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2854      * driver does not support any updates.
2855      * </p>
2856      * 
2857      * @see java.sql.ResultSet#updateTime(int, java.sql.Time)
2858      */
2859     @Override
2860     public void updateTime( int columnIndex,
2861                             Time x ) throws SQLException {
2862         notClosed();
2863         noUpdates();
2864     }
2865 
2866     /**
2867      * {@inheritDoc}
2868      * <p>
2869      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2870      * driver does not support any updates.
2871      * </p>
2872      * 
2873      * @see java.sql.ResultSet#updateTime(java.lang.String, java.sql.Time)
2874      */
2875     @Override
2876     public void updateTime( String columnLabel,
2877                             Time x ) throws SQLException {
2878         notClosed();
2879         noUpdates();
2880     }
2881 
2882     /**
2883      * {@inheritDoc}
2884      * <p>
2885      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2886      * driver does not support any updates.
2887      * </p>
2888      * 
2889      * @see java.sql.ResultSet#updateTimestamp(int, java.sql.Timestamp)
2890      */
2891     @Override
2892     public void updateTimestamp( int columnIndex,
2893                                  Timestamp x ) throws SQLException {
2894         notClosed();
2895         noUpdates();
2896     }
2897 
2898     /**
2899      * {@inheritDoc}
2900      * <p>
2901      * This method, when called on an open result set, always throws {@link SQLFeatureNotSupportedException} since this JDBC
2902      * driver does not support any updates.
2903      * </p>
2904      * 
2905      * @see java.sql.ResultSet#updateTimestamp(java.lang.String, java.sql.Timestamp)
2906      */
2907     @Override
2908     public void updateTimestamp( String columnLabel,
2909                                  Timestamp x ) throws SQLException {
2910         notClosed();
2911         noUpdates();
2912     }
2913 
2914     /**
2915      * {@inheritDoc}
2916      * 
2917      * @see java.sql.ResultSet#wasNull()
2918      */
2919     @Override
2920     public boolean wasNull() throws SQLException {
2921         notClosed();
2922 
2923         return currentValue == null;
2924     }
2925 
2926     /**
2927      * {@inheritDoc}
2928      * 
2929      * @see java.sql.Wrapper#isWrapperFor(java.lang.Class)
2930      */
2931     @Override
2932     public boolean isWrapperFor( Class<?> iface ) {
2933         return iface.isInstance(this);
2934     }
2935 
2936     /**
2937      * {@inheritDoc}
2938      * 
2939      * @see java.sql.Wrapper#unwrap(java.lang.Class)
2940      */
2941     @Override
2942     public <T> T unwrap( Class<T> iface ) throws SQLException {
2943         if (iface.isInstance(this)) {
2944             return iface.cast(this);
2945         }
2946 
2947         throw new SQLException(JdbcI18n.classDoesNotImplementInterface.text());
2948     }
2949 
2950 }