001    package railo.runtime.cfx;
002    
003    
004    import java.io.InputStream;
005    import java.io.Reader;
006    import java.lang.reflect.Method;
007    import java.math.BigDecimal;
008    import java.net.URL;
009    import java.sql.Array;
010    import java.sql.Blob;
011    import java.sql.Clob;
012    import java.sql.Date;
013    import java.sql.NClob;
014    import java.sql.Ref;
015    import java.sql.ResultSetMetaData;
016    import java.sql.RowId;
017    import java.sql.SQLException;
018    import java.sql.SQLWarning;
019    import java.sql.SQLXML;
020    import java.sql.Statement;
021    import java.sql.Time;
022    import java.sql.Timestamp;
023    import java.util.Calendar;
024    import java.util.Iterator;
025    import java.util.Map;
026    
027    import railo.runtime.PageContext;
028    import railo.runtime.dump.DumpData;
029    import railo.runtime.dump.DumpProperties;
030    import railo.runtime.exp.PageException;
031    import railo.runtime.type.Collection;
032    import railo.runtime.type.Collection.Key;
033    
034    import com.allaire.cfx.Query;
035    
036    /**
037     * Implementation of the Query Interface
038     */
039    public class QueryWrap implements Query {
040            
041    
042            private railo.runtime.type.Query rst;
043            private String name;
044    
045            /**
046             * constructor of the class
047             * @param rst runtime Query
048             */
049            public QueryWrap(railo.runtime.type.Query rst) {
050                    this.rst=rst;
051                    this.name=rst.getName();
052            }
053            /**
054             * constructor of the class
055             * @param rst runtime Query
056             * @param name name of the query (otherwise rst.getName())
057             */
058            public QueryWrap(railo.runtime.type.Query rst, String name) {
059                    this.rst=rst;
060                    this.name=name;
061            }
062    
063            /**
064             * @see com.allaire.cfx.Query#addRow()
065             */
066            public int addRow() {
067                    return rst.addRow();
068            }
069    
070            /**
071             * @see com.allaire.cfx.Query#getColumnIndex(java.lang.String)
072             */
073            public int getColumnIndex(String coulmnName) {
074                    return rst.getColumnIndex(coulmnName);
075            }
076    
077            /**
078             * @see com.allaire.cfx.Query#getColumns()
079             */
080            public String[] getColumns() {
081                    return rst.getColumns();
082            }
083            
084            public Collection.Key[] getColumnNames() {
085            return rst.getColumnNames();
086        }
087        
088    
089            public String[] getColumnNamesAsString() {
090                    return rst.getColumnNamesAsString();
091            }
092    
093            /**
094             * @see com.allaire.cfx.Query#getData(int, int)
095             */
096            public String getData(int row, int col) throws IndexOutOfBoundsException {
097                    return rst.getData(row,col);
098            }
099    
100            /**
101             * @see com.allaire.cfx.Query#getName()
102             */
103            public String getName() {
104                    return name;
105            }
106    
107            /**
108             * @see com.allaire.cfx.Query#getRowCount()
109             */
110            public int getRowCount() {
111                    return rst.getRowCount();
112            }
113    
114            /**
115             * @see com.allaire.cfx.Query#setData(int, int, java.lang.String)
116             */
117            public void setData(int row, int col, String value) throws IndexOutOfBoundsException {
118                rst.setData(row,col,value);
119            }
120            
121            
122            /**
123             * @see java.sql.ResultSet#absolute(int)
124             */
125            public boolean absolute(int row) throws SQLException {  
126                    return rst.absolute(row);
127            }
128            /**
129             * @see java.sql.ResultSet#afterLast()
130             */
131            public void afterLast() throws SQLException {
132                    rst.afterLast();
133            }
134            /**
135             * @see java.sql.ResultSet#beforeFirst()
136             */
137            public void beforeFirst() throws SQLException { 
138                    rst.beforeFirst();
139            }
140            /**
141             * @see java.sql.ResultSet#cancelRowUpdates()
142             */
143            public void cancelRowUpdates() throws SQLException {    
144                    rst.cancelRowUpdates();
145            }
146            /**
147             * @see java.sql.ResultSet#clearWarnings()
148             */
149            public void clearWarnings() throws SQLException {
150                    rst.clearWarnings();
151            }
152            
153            /**
154             * @see java.lang.Object#clone()
155             */
156            public Object clone() { 
157                    return rst.clone();
158            }
159            /**
160             * @see java.sql.ResultSet#close()
161             */
162            public void close() throws SQLException {       
163                    rst.close();
164            }
165            /**
166             * @see java.sql.ResultSet#deleteRow()
167             */
168            public void deleteRow() throws SQLException {   
169                    rst.deleteRow();
170            }
171            /**
172             * @see java.sql.ResultSet#findColumn(java.lang.String)
173             */
174            public int findColumn(String columnName) throws SQLException {
175                    return rst.findColumn(columnName);
176            }
177            /**
178             * @see java.sql.ResultSet#first()
179             */
180            public boolean first() throws SQLException {    
181                    return rst.first();
182            }
183            /**
184             * @see java.sql.ResultSet#getArray(int)
185             */
186            public Array getArray(int i) throws SQLException {
187                    return rst.getArray(i);
188            }
189            /**
190             * @see java.sql.ResultSet#getArray(java.lang.String)
191             */
192            public Array getArray(String colName) throws SQLException {
193                    return rst.getArray(colName);
194            }
195            /**
196             * @see java.sql.ResultSet#getAsciiStream(int)
197             */
198            public InputStream getAsciiStream(int columnIndex) throws SQLException {
199                    return rst.getAsciiStream(columnIndex);
200            }
201            /**
202             * @see java.sql.ResultSet#getAsciiStream(java.lang.String)
203             */
204            public InputStream getAsciiStream(String columnName) throws SQLException {      
205                    return rst.getAsciiStream(columnName);
206            }
207            /**
208             * @see java.sql.ResultSet#getBigDecimal(int, int)
209             */
210            public BigDecimal getBigDecimal(int columnIndex, int scale)throws SQLException {
211                    return rst.getBigDecimal(columnIndex, scale);
212            }
213            /**
214             * @see java.sql.ResultSet#getBigDecimal(int)
215             */
216            public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
217                    return rst.getBigDecimal(columnIndex);
218            }
219            /**
220             * @see java.sql.ResultSet#getBigDecimal(java.lang.String, int)
221             */
222            public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException {
223                    return rst.getBigDecimal(columnName, scale);
224            }
225            /**
226             * @see java.sql.ResultSet#getBigDecimal(java.lang.String)
227             */
228            public BigDecimal getBigDecimal(String columnName) throws SQLException {
229                    return rst.getBigDecimal(columnName);
230            }
231            /**
232             * @see java.sql.ResultSet#getBinaryStream(int)
233             */
234            public InputStream getBinaryStream(int columnIndex) throws SQLException {
235                    return rst.getBinaryStream(columnIndex);
236            }
237            /**
238             * @see java.sql.ResultSet#getBinaryStream(java.lang.String)
239             */
240            public InputStream getBinaryStream(String columnName) throws SQLException {
241                    return rst.getBinaryStream(columnName);
242            }
243            /**
244             * @see java.sql.ResultSet#getBlob(int)
245             */
246            public Blob getBlob(int i) throws SQLException {
247                    return rst.getBlob(i);
248            }
249            /**
250             * @see java.sql.ResultSet#getBlob(java.lang.String)
251             */
252            public Blob getBlob(String colName) throws SQLException {
253                    return rst.getBlob(colName);
254            }
255            /**
256             * @see java.sql.ResultSet#getBoolean(int)
257             */
258            public boolean getBoolean(int columnIndex) throws SQLException {
259                    return rst.getBoolean(columnIndex);
260            }
261            /**
262             * @see java.sql.ResultSet#getBoolean(java.lang.String)
263             */
264            public boolean getBoolean(String columnName) throws SQLException {
265                    return rst.getBoolean(columnName);
266            }
267            /**
268             * @see java.sql.ResultSet#getByte(int)
269             */
270            public byte getByte(int columnIndex) throws SQLException {
271                    return rst.getByte(columnIndex);
272            }
273            /**
274             * @see java.sql.ResultSet#getByte(java.lang.String)
275             */
276            public byte getByte(String columnName) throws SQLException {
277                    return rst.getByte(columnName);
278            }
279            /**
280             * @see java.sql.ResultSet#getBytes(int)
281             */
282            public byte[] getBytes(int columnIndex) throws SQLException {
283                    return rst.getBytes(columnIndex);
284            }
285            /**
286             * @see java.sql.ResultSet#getBytes(java.lang.String)
287             */
288            public byte[] getBytes(String columnName) throws SQLException {
289                    return rst.getBytes(columnName);
290            }
291            /**
292             * @see java.sql.ResultSet#getCharacterStream(int)
293             */
294            public Reader getCharacterStream(int columnIndex) throws SQLException { 
295                    return rst.getCharacterStream(columnIndex);
296            }
297            /**
298             * @see java.sql.ResultSet#getCharacterStream(java.lang.String)
299             */
300            public Reader getCharacterStream(String columnName) throws SQLException {
301                    return rst.getCharacterStream(columnName);
302            }
303            /**
304             * @see java.sql.ResultSet#getClob(int)
305             */
306            public Clob getClob(int i) throws SQLException {        
307                    return rst.getClob(i);
308            }
309            /**
310             * @see java.sql.ResultSet#getClob(java.lang.String)
311             */
312            public Clob getClob(String colName) throws SQLException {
313                    return rst.getClob(colName);
314            }
315            /**
316             * @see java.sql.ResultSet#getConcurrency()
317             */
318            public int getConcurrency() throws SQLException {       
319                    return rst.getConcurrency();
320            }
321            /**
322             * @see java.sql.ResultSet#getCursorName()
323             */
324            public String getCursorName() throws SQLException {
325                    return rst.getCursorName();
326            }
327            /**
328             * @see java.sql.ResultSet#getDate(int, java.util.Calendar)
329             */
330            public Date getDate(int columnIndex, Calendar cal) throws SQLException {
331                    return rst.getDate(columnIndex, cal);
332            }
333            /**
334             * @see java.sql.ResultSet#getDate(int)
335             */
336            public Date getDate(int columnIndex) throws SQLException {
337                    return rst.getDate(columnIndex);
338            }
339            /**
340             * @see java.sql.ResultSet#getDate(java.lang.String, java.util.Calendar)
341             */
342            public Date getDate(String columnName, Calendar cal) throws SQLException {
343                    return rst.getDate(columnName, cal);
344            }
345            /**
346             * @see java.sql.ResultSet#getDate(java.lang.String)
347             */
348            public Date getDate(String columnName) throws SQLException {
349                    return rst.getDate(columnName);
350            }
351            /**
352             * @see java.sql.ResultSet#getDouble(int)
353             */
354            public double getDouble(int columnIndex) throws SQLException {
355                    return rst.getDouble(columnIndex);
356            }
357            /**
358             * @see java.sql.ResultSet#getDouble(java.lang.String)
359             */
360            public double getDouble(String columnName) throws SQLException {
361                    return rst.getDouble(columnName);
362            }
363            /**
364             * @see java.sql.ResultSet#getFetchDirection()
365             */
366            public int getFetchDirection() throws SQLException {
367                    return rst.getFetchDirection();
368            }
369            /**
370             * @see java.sql.ResultSet#getFetchSize()
371             */
372            public int getFetchSize() throws SQLException {
373                    return rst.getFetchSize();
374            }
375            /**
376             * @see java.sql.ResultSet#getFloat(int)
377             */
378            public float getFloat(int columnIndex) throws SQLException {
379                    return rst.getFloat(columnIndex);
380            }
381            /**
382             * @see java.sql.ResultSet#getFloat(java.lang.String)
383             */
384            public float getFloat(String columnName) throws SQLException {
385                    return rst.getFloat(columnName);
386            }
387            /**
388             * @see java.sql.ResultSet#getInt(int)
389             */
390            public int getInt(int columnIndex) throws SQLException {
391                    return rst.getInt(columnIndex);
392            }
393            /**
394             * @see java.sql.ResultSet#getInt(java.lang.String)
395             */
396            public int getInt(String columnName) throws SQLException {
397                    return rst.getInt(columnName);
398            }
399            /**
400             * @see java.sql.ResultSet#getLong(int)
401             */
402            public long getLong(int columnIndex) throws SQLException {
403                    return rst.getLong(columnIndex);
404            }
405            /**
406             * @see java.sql.ResultSet#getLong(java.lang.String)
407             */
408            public long getLong(String columnName) throws SQLException {
409                    return rst.getLong(columnName);
410            }
411            /**
412             * @see java.sql.ResultSet#getMetaData()
413             */
414            public ResultSetMetaData getMetaData() throws SQLException {    
415                    return rst.getMetaData();
416            }
417            /**
418             * @see java.sql.ResultSet#getObject(int, java.util.Map)
419             */
420            public Object getObject(int i, Map map) throws SQLException {
421                    return rst.getObject(i, map);
422            }
423            /**
424             * @see java.sql.ResultSet#getObject(int)
425             */
426            public Object getObject(int columnIndex) throws SQLException {
427                    return rst.getObject(columnIndex);
428            }
429            /**
430             * @see java.sql.ResultSet#getObject(java.lang.String, java.util.Map)
431             */
432            public Object getObject(String colName, Map map) throws SQLException {
433                    return rst.getObject(colName, map);
434            }
435            /**
436             * @see java.sql.ResultSet#getObject(java.lang.String)
437             */
438            public Object getObject(String columnName) throws SQLException {
439                    return rst.getObject(columnName);
440            }
441            /**
442             * @return recordcount of the query
443             */
444            public int getRecordcount() {
445                    return rst.getRecordcount();
446            }
447            /**
448             * @see java.sql.ResultSet#getRef(int)
449             */
450            public Ref getRef(int i) throws SQLException {
451                    return rst.getRef(i);
452            }
453            /**
454             * @see java.sql.ResultSet#getRef(java.lang.String)
455             */
456            public Ref getRef(String colName) throws SQLException {
457                    return rst.getRef(colName);
458            }
459            /**
460             * @see java.sql.ResultSet#getRow()
461             */
462            public int getRow() throws SQLException {
463                    return rst.getRow();
464            }
465            /**
466             * @see java.sql.ResultSet#getShort(int)
467             */
468            public short getShort(int columnIndex) throws SQLException {
469                    return rst.getShort(columnIndex);
470            }
471            /**
472             * @see java.sql.ResultSet#getShort(java.lang.String)
473             */
474            public short getShort(String columnName) throws SQLException {  
475                    return rst.getShort(columnName);
476            }
477            /**
478             * @see java.sql.ResultSet#getStatement()
479             */
480            public Statement getStatement() throws SQLException {
481                    return rst.getStatement();
482            }
483            /**
484             * @see java.sql.ResultSet#getString(int)
485             */
486            public String getString(int columnIndex) throws SQLException {
487                    return rst.getString(columnIndex);
488            }
489            /**
490             * @see java.sql.ResultSet#getString(java.lang.String)
491             */
492            public String getString(String columnName) throws SQLException {
493                    return rst.getString(columnName);
494            }
495            /**
496             * @see java.sql.ResultSet#getTime(int, java.util.Calendar)
497             */
498            public Time getTime(int columnIndex, Calendar cal) throws SQLException {
499                    return rst.getTime(columnIndex, cal);
500            }
501            /**
502             * @see java.sql.ResultSet#getTime(int)
503             */
504            public Time getTime(int columnIndex) throws SQLException {
505                    return rst.getTime(columnIndex);
506            }
507            /**
508             * @see java.sql.ResultSet#getTime(java.lang.String, java.util.Calendar)
509             */
510            public Time getTime(String columnName, Calendar cal) throws SQLException {
511                    return rst.getTime(columnName, cal);
512            }
513            /**
514             * @see java.sql.ResultSet#getTime(java.lang.String)
515             */
516            public Time getTime(String columnName) throws SQLException {
517                    return rst.getTime(columnName);
518            }
519            /**
520             * @see java.sql.ResultSet#getTimestamp(int, java.util.Calendar)
521             */
522            public Timestamp getTimestamp(int columnIndex, Calendar cal)throws SQLException {       
523                    return rst.getTimestamp(columnIndex, cal);
524            }
525            /**
526             * @see java.sql.ResultSet#getTimestamp(int)
527             */
528            public Timestamp getTimestamp(int columnIndex) throws SQLException {
529                    return rst.getTimestamp(columnIndex);
530            }
531            /**
532             * @see java.sql.ResultSet#getTimestamp(java.lang.String, java.util.Calendar)
533             */
534            public Timestamp getTimestamp(String columnName, Calendar cal)
535                            throws SQLException {
536                    return rst.getTimestamp(columnName, cal);
537            }
538            /**
539             * @see java.sql.ResultSet#getTimestamp(java.lang.String)
540             */
541            public Timestamp getTimestamp(String columnName) throws SQLException {
542                    return rst.getTimestamp(columnName);
543            }
544            /**
545             * @see java.sql.ResultSet#getType()
546             */
547            public int getType() throws SQLException {      
548                    return rst.getType();
549            }
550            /**
551             * @see java.sql.ResultSet#getUnicodeStream(int)
552             */
553            public InputStream getUnicodeStream(int columnIndex) throws SQLException {
554                    return rst.getUnicodeStream(columnIndex);
555            }
556            /**
557             * @see java.sql.ResultSet#getUnicodeStream(java.lang.String)
558             */
559            public InputStream getUnicodeStream(String columnName) throws SQLException {
560                    return rst.getUnicodeStream(columnName);
561            }
562            /**
563             * @see java.sql.ResultSet#getURL(int)
564             */
565            public URL getURL(int columnIndex) throws SQLException {
566                    return rst.getURL(columnIndex);
567            }
568            /**
569             * @see java.sql.ResultSet#getURL(java.lang.String)
570             */
571            public URL getURL(String columnName) throws SQLException {
572                    return rst.getURL(columnName);
573            }
574            /**
575             * @see java.sql.ResultSet#getWarnings()
576             */
577            public SQLWarning getWarnings() throws SQLException {
578                    return rst.getWarnings();
579            }
580            /**
581             * @see java.sql.ResultSet#insertRow()
582             */
583            public void insertRow() throws SQLException {
584                    rst.insertRow();
585            }
586            /**
587             * @see java.sql.ResultSet#isAfterLast()
588             */
589            public boolean isAfterLast() throws SQLException {
590                    
591                    return rst.isAfterLast();
592            }
593            /**
594             * @see java.sql.ResultSet#isBeforeFirst()
595             */
596            public boolean isBeforeFirst() throws SQLException {
597                    return rst.isBeforeFirst();
598            }
599            /**
600             * @return is cached
601             */
602            public boolean isCached() {
603                    return rst.isCached();
604            }
605            /**
606             * @return has records
607             */
608            public boolean isEmpty() {
609                    return rst.isEmpty();
610            }
611            /**
612             * @see java.sql.ResultSet#isFirst()
613             */
614            public boolean isFirst() throws SQLException {
615                    return rst.isFirst();
616            }
617            /**
618             * @see java.sql.ResultSet#isLast()
619             */
620            public boolean isLast() throws SQLException {
621                    return rst.isLast();
622            }
623            
624            /**
625             * @return iterator for he keys
626             */
627            public Iterator<Collection.Key> keyIterator() {
628                    return rst.keyIterator();
629            }
630            
631            /**
632             * @return all keys of the Query
633             */
634            public Key[] keys() {
635                    return rst.keys();
636            }
637            /**
638             * @see java.sql.ResultSet#last()
639             */
640            public boolean last() throws SQLException {
641                    
642                    return rst.last();
643            }
644            
645            
646            
647            /**
648             * @see java.sql.ResultSet#moveToCurrentRow()
649             */
650            public void moveToCurrentRow() throws SQLException {
651                    rst.moveToCurrentRow();
652            }
653            /**
654             * @see java.sql.ResultSet#moveToInsertRow()
655             */
656            public void moveToInsertRow() throws SQLException {
657                    rst.moveToInsertRow();
658            }
659            /**
660             * @see java.sql.ResultSet#next()
661             */
662            public boolean next() {
663                    return rst.next();
664            }
665            /**
666             * @see java.sql.ResultSet#previous()
667             */
668            public boolean previous()  throws SQLException{
669                    return rst.previous();
670            }
671            /**
672             * @see java.sql.ResultSet#refreshRow()
673             */
674            public void refreshRow() throws SQLException {
675                    rst.refreshRow();
676            }
677            /**
678             * @see java.sql.ResultSet#relative(int)
679             */
680            public boolean relative(int rows) throws SQLException {
681                    return rst.relative(rows);
682            }
683            /**
684             * @see java.sql.ResultSet#rowDeleted()
685             */
686            public boolean rowDeleted() throws SQLException {
687                    return rst.rowDeleted();
688            }
689            /**
690             * @see java.sql.ResultSet#rowInserted()
691             */
692            public boolean rowInserted() throws SQLException {
693                    return rst.rowInserted();
694            }
695            /**
696             * @see java.sql.ResultSet#rowUpdated()
697             */
698            public boolean rowUpdated() throws SQLException {
699                    return rst.rowUpdated();
700            }
701            
702            /**
703             * @see java.sql.ResultSet#setFetchDirection(int)
704             */
705            public void setFetchDirection(int direction) throws SQLException {
706                    rst.setFetchDirection(direction);
707            }
708            /**
709             * @see java.sql.ResultSet#setFetchSize(int)
710             */
711            public void setFetchSize(int rows) throws SQLException {
712                    rst.setFetchSize(rows);
713            }
714            
715            /**
716             * @return the size of the query
717             */
718            public int size() {     
719                    return rst.size();
720            }
721            /**
722             * @param keyColumn
723             * @param order
724             * @throws PageException
725             */
726            public synchronized void sort(Key keyColumn, int order)
727                            throws PageException {
728                    
729                    rst.sort(keyColumn, order);
730            }
731            /**
732             * @param column
733             * @throws PageException
734             */
735            public void sort(Key column) throws PageException {
736                    
737                    rst.sort(column);
738            }
739            /**
740             * @param strColumn
741             * @param order
742             * @throws PageException
743             */
744            public synchronized void sort(String strColumn, int order)
745                            throws PageException {
746                    
747                    rst.sort(strColumn, order);
748            }
749            /**
750             * @param column
751             * @throws PageException
752             */
753            public void sort(String column) throws PageException {
754                    
755                    rst.sort(column);
756            }
757            /**
758             * @param pageContext
759             * @param maxlevel
760             * @param dp
761             * @return generated DumpData
762             */
763            public DumpData toDumpData(PageContext pageContext, int maxlevel,DumpProperties dp) {
764                    return rst.toDumpData(pageContext, maxlevel, dp);
765            }
766            /**
767             * @see java.lang.Object#toString()
768             */
769            public String toString() {
770                    return rst.toString();
771            }
772            /**
773             * @see java.sql.ResultSet#updateArray(int, java.sql.Array)
774             */
775            public void updateArray(int columnIndex, Array x) throws SQLException {
776                    rst.updateArray(columnIndex, x);
777            }
778            /**
779             * @see java.sql.ResultSet#updateArray(java.lang.String, java.sql.Array)
780             */
781            public void updateArray(String columnName, Array x) throws SQLException {
782                    rst.updateArray(columnName, x);
783            }
784            /**
785             * @see java.sql.ResultSet#updateAsciiStream(int, java.io.InputStream, int)
786             */
787            public void updateAsciiStream(int columnIndex, InputStream x, int length)
788                            throws SQLException {
789                    rst.updateAsciiStream(columnIndex, x, length);
790            }
791            /**
792             * @see java.sql.ResultSet#updateAsciiStream(java.lang.String, java.io.InputStream, int)
793             */
794            public void updateAsciiStream(String columnName, InputStream x, int length)
795                            throws SQLException {
796                    
797                    rst.updateAsciiStream(columnName, x, length);
798            }
799            /**
800             * @see java.sql.ResultSet#updateBigDecimal(int, java.math.BigDecimal)
801             */
802            public void updateBigDecimal(int columnIndex, BigDecimal x)
803                            throws SQLException {
804                    
805                    rst.updateBigDecimal(columnIndex, x);
806            }
807            /**
808             * @see java.sql.ResultSet#updateBigDecimal(java.lang.String, java.math.BigDecimal)
809             */
810            public void updateBigDecimal(String columnName, BigDecimal x)
811                            throws SQLException {
812                    
813                    rst.updateBigDecimal(columnName, x);
814            }
815            /**
816             * @see java.sql.ResultSet#updateBinaryStream(int, java.io.InputStream, int)
817             */
818            public void updateBinaryStream(int columnIndex, InputStream x, int length)
819                            throws SQLException {
820                    
821                    rst.updateBinaryStream(columnIndex, x, length);
822            }
823            /**
824             * @see java.sql.ResultSet#updateBinaryStream(java.lang.String, java.io.InputStream, int)
825             */
826            public void updateBinaryStream(String columnName, InputStream x, int length)
827                            throws SQLException {
828                    
829                    rst.updateBinaryStream(columnName, x, length);
830            }
831            /**
832             * @see java.sql.ResultSet#updateBlob(int, java.sql.Blob)
833             */
834            public void updateBlob(int columnIndex, Blob x) throws SQLException {
835                    
836                    rst.updateBlob(columnIndex, x);
837            }
838            /**
839             * @see java.sql.ResultSet#updateBlob(java.lang.String, java.sql.Blob)
840             */
841            public void updateBlob(String columnName, Blob x) throws SQLException {
842                    
843                    rst.updateBlob(columnName, x);
844            }
845            /**
846             * @see java.sql.ResultSet#updateBoolean(int, boolean)
847             */
848            public void updateBoolean(int columnIndex, boolean x) throws SQLException {
849                    
850                    rst.updateBoolean(columnIndex, x);
851            }
852            /**
853             * @see java.sql.ResultSet#updateBoolean(java.lang.String, boolean)
854             */
855            public void updateBoolean(String columnName, boolean x) throws SQLException {
856                    
857                    rst.updateBoolean(columnName, x);
858            }
859            /**
860             * @see java.sql.ResultSet#updateByte(int, byte)
861             */
862            public void updateByte(int columnIndex, byte x) throws SQLException {
863                    
864                    rst.updateByte(columnIndex, x);
865            }
866            /**
867             * @see java.sql.ResultSet#updateByte(java.lang.String, byte)
868             */
869            public void updateByte(String columnName, byte x) throws SQLException {
870                    
871                    rst.updateByte(columnName, x);
872            }
873            /**
874             * @see java.sql.ResultSet#updateBytes(int, byte[])
875             */
876            public void updateBytes(int columnIndex, byte[] x) throws SQLException {
877                    
878                    rst.updateBytes(columnIndex, x);
879            }
880            /**
881             * @see java.sql.ResultSet#updateBytes(java.lang.String, byte[])
882             */
883            public void updateBytes(String columnName, byte[] x) throws SQLException {
884                    rst.updateBytes(columnName, x);
885            }
886            /**
887             * @see java.sql.ResultSet#updateCharacterStream(int, java.io.Reader, int)
888             */
889            public void updateCharacterStream(int columnIndex, Reader reader, int length)
890                            throws SQLException {
891                    
892                    rst.updateCharacterStream(columnIndex, reader, length);
893            }
894            /**
895             * @see java.sql.ResultSet#updateCharacterStream(java.lang.String, java.io.Reader, int)
896             */
897            public void updateCharacterStream(String columnName, Reader reader,
898                            int length) throws SQLException {
899                    rst.updateCharacterStream(columnName, reader, length);
900            }
901            /**
902             * @see java.sql.ResultSet#updateClob(int, java.sql.Clob)
903             */
904            public void updateClob(int columnIndex, Clob x) throws SQLException {
905                    rst.updateClob(columnIndex, x);
906            }
907            /**
908             * @see java.sql.ResultSet#updateClob(java.lang.String, java.sql.Clob)
909             */
910            public void updateClob(String columnName, Clob x) throws SQLException {
911                    rst.updateClob(columnName, x);
912            }
913            /**
914             * @see java.sql.ResultSet#updateDate(int, java.sql.Date)
915             */
916            public void updateDate(int columnIndex, Date x) throws SQLException {   
917                    rst.updateDate(columnIndex, x);
918            }
919            /**
920             * @see java.sql.ResultSet#updateDate(java.lang.String, java.sql.Date)
921             */
922            public void updateDate(String columnName, Date x) throws SQLException {
923                    rst.updateDate(columnName, x);
924            }
925            /**
926             * @see java.sql.ResultSet#updateDouble(int, double)
927             */
928            public void updateDouble(int columnIndex, double x) throws SQLException {
929                    rst.updateDouble(columnIndex, x);
930            }
931            /**
932             * @see java.sql.ResultSet#updateDouble(java.lang.String, double)
933             */
934            public void updateDouble(String columnName, double x) throws SQLException {
935                    rst.updateDouble(columnName, x);
936            }
937            /**
938             * @see java.sql.ResultSet#updateFloat(int, float)
939             */
940            public void updateFloat(int columnIndex, float x) throws SQLException {
941                    rst.updateFloat(columnIndex, x);
942            }
943            /**
944             * @see java.sql.ResultSet#updateFloat(java.lang.String, float)
945             */
946            public void updateFloat(String columnName, float x) throws SQLException {
947                    rst.updateFloat(columnName, x);
948            }
949            /**
950             * @see java.sql.ResultSet#updateInt(int, int)
951             */
952            public void updateInt(int columnIndex, int x) throws SQLException {
953                    rst.updateInt(columnIndex, x);
954            }
955            /**
956             * @see java.sql.ResultSet#updateInt(java.lang.String, int)
957             */
958            public void updateInt(String columnName, int x) throws SQLException {
959                    rst.updateInt(columnName, x);
960            }
961            /**
962             * @see java.sql.ResultSet#updateLong(int, long)
963             */
964            public void updateLong(int columnIndex, long x) throws SQLException {
965                    rst.updateLong(columnIndex, x);
966            }
967            /**
968             * @see java.sql.ResultSet#updateLong(java.lang.String, long)
969             */
970            public void updateLong(String columnName, long x) throws SQLException {
971                    rst.updateLong(columnName, x);
972            }
973            /**
974             * @see java.sql.ResultSet#updateNull(int)
975             */
976            public void updateNull(int columnIndex) throws SQLException {
977                    rst.updateNull(columnIndex);
978            }
979            /**
980             * @see java.sql.ResultSet#updateNull(java.lang.String)
981             */
982            public void updateNull(String columnName) throws SQLException {
983                    rst.updateNull(columnName);
984            }
985            /**
986             * @see java.sql.ResultSet#updateObject(int, java.lang.Object, int)
987             */
988            public void updateObject(int columnIndex, Object x, int scale)
989                            throws SQLException {
990                    rst.updateObject(columnIndex, x, scale);
991            }
992            /**
993             * @see java.sql.ResultSet#updateObject(int, java.lang.Object)
994             */
995            public void updateObject(int columnIndex, Object x) throws SQLException {
996                    rst.updateObject(columnIndex, x);
997            }
998            /**
999             * @see java.sql.ResultSet#updateObject(java.lang.String, java.lang.Object, int)
1000             */
1001            public void updateObject(String columnName, Object x, int scale)
1002                            throws SQLException {
1003                    rst.updateObject(columnName, x, scale);
1004            }
1005            /**
1006             * @see java.sql.ResultSet#updateObject(java.lang.String, java.lang.Object)
1007             */
1008            public void updateObject(String columnName, Object x) throws SQLException {
1009                    rst.updateObject(columnName, x);
1010            }
1011            /**
1012             * @see java.sql.ResultSet#updateRef(int, java.sql.Ref)
1013             */
1014            public void updateRef(int columnIndex, Ref x) throws SQLException {
1015                    rst.updateRef(columnIndex, x);
1016            }
1017            /**
1018             * @see java.sql.ResultSet#updateRef(java.lang.String, java.sql.Ref)
1019             */
1020            public void updateRef(String columnName, Ref x) throws SQLException {
1021                    rst.updateRef(columnName, x);
1022            }
1023            /**
1024             * @see java.sql.ResultSet#updateRow()
1025             */
1026            public void updateRow() throws SQLException {
1027                    rst.updateRow();
1028            }
1029            /**
1030             * @see java.sql.ResultSet#updateShort(int, short)
1031             */
1032            public void updateShort(int columnIndex, short x) throws SQLException {
1033                    rst.updateShort(columnIndex, x);
1034            }
1035            /**
1036             * @see java.sql.ResultSet#updateShort(java.lang.String, short)
1037             */
1038            public void updateShort(String columnName, short x) throws SQLException {
1039                    rst.updateShort(columnName, x);
1040            }
1041            /**
1042             * @see java.sql.ResultSet#updateString(int, java.lang.String)
1043             */
1044            public void updateString(int columnIndex, String x) throws SQLException {
1045                    rst.updateString(columnIndex, x);
1046            }
1047            /**
1048             * @see java.sql.ResultSet#updateString(java.lang.String, java.lang.String)
1049             */
1050            public void updateString(String columnName, String x) throws SQLException {
1051                    rst.updateString(columnName, x);
1052            }
1053            /**
1054             * @see java.sql.ResultSet#updateTime(int, java.sql.Time)
1055             */
1056            public void updateTime(int columnIndex, Time x) throws SQLException {
1057                    rst.updateTime(columnIndex, x);
1058            }
1059            /**
1060             * @see java.sql.ResultSet#updateTime(java.lang.String, java.sql.Time)
1061             */
1062            public void updateTime(String columnName, Time x) throws SQLException {
1063                    rst.updateTime(columnName, x);
1064            }
1065            /**
1066             * @see java.sql.ResultSet#updateTimestamp(int, java.sql.Timestamp)
1067             */
1068            public void updateTimestamp(int columnIndex, Timestamp x)
1069                            throws SQLException {
1070                    rst.updateTimestamp(columnIndex, x);
1071            }
1072            /**
1073             * @see java.sql.ResultSet#updateTimestamp(java.lang.String, java.sql.Timestamp)
1074             */
1075            public void updateTimestamp(String columnName, Timestamp x)
1076                            throws SQLException {
1077                    rst.updateTimestamp(columnName, x);
1078            }
1079            /**
1080             * @see java.sql.ResultSet#wasNull()
1081             */
1082            public boolean wasNull()  throws SQLException{
1083                    return rst.wasNull();
1084            }
1085            public railo.runtime.type.Query getQuery() {
1086                    return rst;
1087            }
1088            public int getHoldability() throws SQLException {
1089                    throw notSupported();
1090            }
1091            public Reader getNCharacterStream(int arg0) throws SQLException {
1092                    throw notSupported();
1093            }
1094            public Reader getNCharacterStream(String arg0) throws SQLException {
1095                    throw notSupported();
1096            }
1097            public String getNString(int arg0) throws SQLException {
1098                    throw notSupported();
1099            }
1100            public String getNString(String arg0) throws SQLException {
1101                    throw notSupported();
1102            }
1103            public boolean isClosed() throws SQLException {
1104                    throw notSupported();
1105            }
1106            public void updateAsciiStream(int arg0, InputStream arg1)throws SQLException {
1107                    throw notSupported();
1108            }
1109            public void updateAsciiStream(String arg0, InputStream arg1)throws SQLException {
1110                    throw notSupported();
1111            }
1112            public void updateAsciiStream(int arg0, InputStream arg1, long arg2)
1113                            throws SQLException {
1114                    throw notSupported();
1115            }
1116            public void updateAsciiStream(String arg0, InputStream arg1, long arg2)
1117                            throws SQLException {
1118                    throw notSupported();
1119            }
1120            public void updateBinaryStream(int arg0, InputStream arg1)
1121                            throws SQLException {
1122                    throw notSupported();
1123            }
1124            public void updateBinaryStream(String arg0, InputStream arg1)
1125                            throws SQLException {
1126                    throw notSupported();
1127            }
1128            public void updateBinaryStream(int arg0, InputStream arg1, long arg2)
1129                            throws SQLException {
1130                    throw notSupported();
1131            }
1132            public void updateBinaryStream(String arg0, InputStream arg1, long arg2)
1133                            throws SQLException {
1134                    throw notSupported();
1135            }
1136            public void updateBlob(int arg0, InputStream arg1) throws SQLException {
1137                    throw notSupported();
1138            }
1139            public void updateBlob(String arg0, InputStream arg1) throws SQLException {
1140                    throw notSupported();
1141            }
1142            public void updateBlob(int arg0, InputStream arg1, long arg2)
1143                            throws SQLException {
1144                    throw notSupported();
1145            }
1146            public void updateBlob(String arg0, InputStream arg1, long arg2)
1147                            throws SQLException {
1148                    throw notSupported();
1149            }
1150            public void updateCharacterStream(int arg0, Reader arg1)
1151                            throws SQLException {
1152                    throw notSupported();
1153            }
1154            public void updateCharacterStream(String arg0, Reader arg1)
1155                            throws SQLException {
1156                    throw notSupported();
1157            }
1158            public void updateCharacterStream(int arg0, Reader arg1, long arg2)
1159                            throws SQLException {
1160                    throw notSupported();
1161            }
1162            public void updateCharacterStream(String arg0, Reader arg1, long arg2)
1163                            throws SQLException {
1164                    throw notSupported();
1165            }
1166            public void updateClob(int arg0, Reader arg1) throws SQLException {
1167                    throw notSupported();
1168            }
1169            public void updateClob(String arg0, Reader arg1) throws SQLException {
1170                    throw notSupported();
1171            }
1172            public void updateClob(int arg0, Reader arg1, long arg2)
1173                            throws SQLException {
1174                    throw notSupported();
1175            }
1176            public void updateClob(String arg0, Reader arg1, long arg2)
1177                            throws SQLException {
1178                    throw notSupported();
1179            }
1180            public void updateNCharacterStream(int arg0, Reader arg1)
1181                            throws SQLException {
1182                    throw notSupported();
1183            }
1184            public void updateNCharacterStream(String arg0, Reader arg1)
1185                            throws SQLException {
1186                    throw notSupported();
1187            }
1188            public void updateNCharacterStream(int arg0, Reader arg1, long arg2)
1189                            throws SQLException {
1190                    throw notSupported();
1191            }
1192            public void updateNCharacterStream(String arg0, Reader arg1, long arg2)
1193                            throws SQLException {
1194                    throw notSupported();
1195            }
1196            public void updateNClob(int arg0, Reader arg1) throws SQLException {
1197                    throw notSupported();
1198            }
1199            public void updateNClob(String arg0, Reader arg1) throws SQLException {
1200                    throw notSupported();
1201            }
1202            public void updateNClob(int arg0, Reader arg1, long arg2)
1203                            throws SQLException {
1204                    throw notSupported();
1205            }
1206            public void updateNClob(String arg0, Reader arg1, long arg2)
1207                            throws SQLException {
1208                    throw notSupported();
1209            }
1210            public void updateNString(int arg0, String arg1) throws SQLException {
1211                    throw notSupported();
1212            }
1213            public void updateNString(String arg0, String arg1) throws SQLException {
1214                    throw notSupported();
1215            }
1216            public boolean isWrapperFor(Class<?> arg0) throws SQLException {
1217                    throw notSupported();
1218            }
1219            public <T> T unwrap(Class<T> arg0) throws SQLException {
1220                    throw notSupported();
1221            }
1222    
1223            //JDK6: uncomment this for compiling with JDK6 
1224            public NClob getNClob(int arg0) throws SQLException {
1225                    return rst.getNClob(arg0);
1226            }
1227            public NClob getNClob(String arg0) throws SQLException {
1228                    return rst.getNClob(arg0);
1229            }
1230            public RowId getRowId(int arg0) throws SQLException {
1231                    return rst.getRowId(arg0);
1232            }
1233            public RowId getRowId(String arg0) throws SQLException {
1234                    return rst.getRowId(arg0);
1235            }
1236            public SQLXML getSQLXML(int arg0) throws SQLException {
1237                    return rst.getSQLXML(arg0);
1238            }
1239            public SQLXML getSQLXML(String arg0) throws SQLException {
1240                    return rst.getSQLXML(arg0);
1241            }
1242            public void updateNClob(int arg0, NClob arg1) throws SQLException {
1243                    rst.updateNClob(arg0, arg1);
1244            }
1245            public void updateNClob(String arg0, NClob arg1) throws SQLException {
1246                    rst.updateNClob(arg0, arg1);
1247            }
1248            public void updateRowId(int arg0, RowId arg1) throws SQLException {
1249                    rst.updateRowId(arg0, arg1);
1250            }
1251            public void updateRowId(String arg0, RowId arg1) throws SQLException {
1252                    rst.updateRowId(arg0, arg1);
1253            }
1254            public void updateSQLXML(int arg0, SQLXML arg1) throws SQLException {
1255                    rst.updateSQLXML(arg0, arg1);
1256            }
1257            public void updateSQLXML(String arg0, SQLXML arg1) throws SQLException {
1258                    rst.updateSQLXML(arg0, arg1);
1259            }
1260            
1261            
1262    
1263    
1264            public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
1265            try {
1266                    Method m = rst.getClass().getMethod("getObject", new Class[]{int.class,Class.class});
1267                    return (T) m.invoke(rst, new Object[]{columnIndex,type});
1268                    } 
1269            catch (Throwable t) {}
1270            throw notSupported();
1271            }
1272            
1273            public <T> T getObject(String columnLabel, Class<T> type) throws SQLException {
1274            try {
1275                    Method m = rst.getClass().getMethod("getObject", new Class[]{String.class,Class.class});
1276                    return (T) m.invoke(rst, new Object[]{columnLabel,type});
1277                    } 
1278            catch (Throwable t) {}
1279            throw notSupported();
1280            }
1281    
1282            private SQLException notSupported() {
1283                    return new SQLException("this feature is not supported");
1284            }
1285            private RuntimeException notSupportedEL() {
1286                    return new RuntimeException(new SQLException("this feature is not supported"));
1287            }
1288    }