001: /*
002: * $Id: BaseAxionResultSetDecorator.java,v 1.2 2007/11/13 19:04:01 rwald Exp $
003: * =======================================================================
004: * Copyright (c) 2005 Axion Development Team. All rights reserved.
005: *
006: * Redistribution and use in source and binary forms, with or without
007: * modification, are permitted provided that the following conditions
008: * are met:
009: *
010: * 1. Redistributions of source code must retain the above
011: * copyright notice, this list of conditions and the following
012: * disclaimer.
013: *
014: * 2. Redistributions in binary form must reproduce the above copyright
015: * notice, this list of conditions and the following disclaimer in
016: * the documentation and/or other materials provided with the
017: * distribution.
018: *
019: * 3. The names "Tigris", "Axion", nor the names of its contributors may
020: * not be used to endorse or promote products derived from this
021: * software without specific prior written permission.
022: *
023: * 4. Products derived from this software may not be called "Axion", nor
024: * may "Tigris" or "Axion" appear in their names without specific prior
025: * written permission.
026: *
027: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
028: * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
029: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
030: * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
031: * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
032: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
033: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
034: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
035: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
036: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
037: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
038: * =======================================================================
039: */
040: package org.axiondb.jdbc;
041:
042: import java.io.InputStream;
043: import java.io.Reader;
044: import java.math.BigDecimal;
045: import java.net.URL;
046: import java.sql.Array;
047: import java.sql.Blob;
048: import java.sql.Clob;
049: import java.sql.Date;
050: import java.sql.Ref;
051: import java.sql.ResultSet;
052: import java.sql.ResultSetMetaData;
053: import java.sql.SQLException;
054: import java.sql.SQLWarning;
055: import java.sql.Statement;
056: import java.sql.Time;
057: import java.sql.Timestamp;
058: import java.util.Calendar;
059: import java.util.Map;
060:
061: /**
062: * Decorator for AxionResultSet to disable update and other
063: *
064: * @author Jonathan Giron
065: * @version $Revision: 1.2 $
066: */
067: public abstract class BaseAxionResultSetDecorator implements ResultSet {
068:
069: protected BaseAxionResultSetDecorator(ResultSet rs) {
070: _rs = rs;
071: }
072:
073: public boolean absolute(int row) throws SQLException {
074: return _rs.absolute(row);
075: }
076:
077: public void afterLast() throws SQLException {
078: _rs.afterLast();
079: }
080:
081: public void beforeFirst() throws SQLException {
082: _rs.beforeFirst();
083: }
084:
085: public void cancelRowUpdates() throws SQLException {
086: _rs.cancelRowUpdates();
087: }
088:
089: public void clearWarnings() throws SQLException {
090: _rs.clearWarnings();
091: }
092:
093: public void close() throws SQLException {
094: _rs.close();
095: }
096:
097: public void deleteRow() throws SQLException {
098: _rs.deleteRow();
099: }
100:
101: public int findColumn(String columnName) throws SQLException {
102: return _rs.findColumn(columnName);
103: }
104:
105: public boolean first() throws SQLException {
106: return _rs.first();
107: }
108:
109: public Array getArray(int i) throws SQLException {
110: return _rs.getArray(i);
111: }
112:
113: public Array getArray(String colName) throws SQLException {
114: return _rs.getArray(colName);
115: }
116:
117: public InputStream getAsciiStream(int columnIndex)
118: throws SQLException {
119: return _rs.getAsciiStream(columnIndex);
120: }
121:
122: public InputStream getAsciiStream(String columnName)
123: throws SQLException {
124: return _rs.getAsciiStream(columnName);
125: }
126:
127: public BigDecimal getBigDecimal(int columnIndex)
128: throws SQLException {
129: return _rs.getBigDecimal(columnIndex);
130: }
131:
132: public BigDecimal getBigDecimal(int columnIndex, int scale)
133: throws SQLException {
134: return _rs.getBigDecimal(columnIndex, scale);
135: }
136:
137: public BigDecimal getBigDecimal(String columnName)
138: throws SQLException {
139: return _rs.getBigDecimal(columnName);
140: }
141:
142: public BigDecimal getBigDecimal(String columnName, int scale)
143: throws SQLException {
144: return _rs.getBigDecimal(columnName, scale);
145: }
146:
147: public InputStream getBinaryStream(int columnIndex)
148: throws SQLException {
149: return _rs.getBinaryStream(columnIndex);
150: }
151:
152: public InputStream getBinaryStream(String columnName)
153: throws SQLException {
154: return _rs.getBinaryStream(columnName);
155: }
156:
157: public Blob getBlob(int i) throws SQLException {
158: return _rs.getBlob(i);
159: }
160:
161: public Blob getBlob(String colName) throws SQLException {
162: return _rs.getBlob(colName);
163: }
164:
165: public boolean getBoolean(int columnIndex) throws SQLException {
166: return _rs.getBoolean(columnIndex);
167: }
168:
169: public boolean getBoolean(String columnName) throws SQLException {
170: return _rs.getBoolean(columnName);
171: }
172:
173: public byte getByte(int columnIndex) throws SQLException {
174: return _rs.getByte(columnIndex);
175: }
176:
177: public byte getByte(String columnName) throws SQLException {
178: return _rs.getByte(columnName);
179: }
180:
181: public byte[] getBytes(int columnIndex) throws SQLException {
182: return _rs.getBytes(columnIndex);
183: }
184:
185: public byte[] getBytes(String columnName) throws SQLException {
186: return _rs.getBytes(columnName);
187: }
188:
189: public Reader getCharacterStream(int columnIndex)
190: throws SQLException {
191: return _rs.getCharacterStream(columnIndex);
192: }
193:
194: public Reader getCharacterStream(String columnName)
195: throws SQLException {
196: return _rs.getCharacterStream(columnName);
197: }
198:
199: public Clob getClob(int i) throws SQLException {
200: return _rs.getClob(i);
201: }
202:
203: public Clob getClob(String colName) throws SQLException {
204: return _rs.getClob(colName);
205: }
206:
207: public int getConcurrency() throws SQLException {
208: return _rs.getConcurrency();
209: }
210:
211: public String getCursorName() throws SQLException {
212: return _rs.getCursorName();
213: }
214:
215: public Date getDate(int columnIndex) throws SQLException {
216: return _rs.getDate(columnIndex);
217: }
218:
219: public Date getDate(int columnIndex, Calendar cal)
220: throws SQLException {
221: return _rs.getDate(columnIndex, cal);
222: }
223:
224: public Date getDate(String columnName) throws SQLException {
225: return _rs.getDate(columnName);
226: }
227:
228: public Date getDate(String columnName, Calendar cal)
229: throws SQLException {
230: return _rs.getDate(columnName, cal);
231: }
232:
233: public double getDouble(int columnIndex) throws SQLException {
234: return _rs.getDouble(columnIndex);
235: }
236:
237: public double getDouble(String columnName) throws SQLException {
238: return _rs.getDouble(columnName);
239: }
240:
241: public int getFetchDirection() throws SQLException {
242: return _rs.getFetchDirection();
243: }
244:
245: public int getFetchSize() throws SQLException {
246: return _rs.getFetchSize();
247: }
248:
249: public float getFloat(int columnIndex) throws SQLException {
250: return _rs.getFloat(columnIndex);
251: }
252:
253: public float getFloat(String columnName) throws SQLException {
254: return _rs.getFloat(columnName);
255: }
256:
257: public int getInt(int columnIndex) throws SQLException {
258: return _rs.getInt(columnIndex);
259: }
260:
261: public int getInt(String columnName) throws SQLException {
262: return _rs.getInt(columnName);
263: }
264:
265: public long getLong(int columnIndex) throws SQLException {
266: return _rs.getLong(columnIndex);
267: }
268:
269: public long getLong(String columnName) throws SQLException {
270: return _rs.getLong(columnName);
271: }
272:
273: public ResultSetMetaData getMetaData() throws SQLException {
274: return _rs.getMetaData();
275: }
276:
277: public Object getObject(int columnIndex) throws SQLException {
278: return _rs.getObject(columnIndex);
279: }
280:
281: public Object getObject(int i, Map map) throws SQLException {
282: return _rs.getObject(i, map);
283: }
284:
285: public Object getObject(String columnName) throws SQLException {
286: return _rs.getObject(columnName);
287: }
288:
289: public Object getObject(String colName, Map map)
290: throws SQLException {
291: return _rs.getObject(colName, map);
292: }
293:
294: public Ref getRef(int i) throws SQLException {
295: return _rs.getRef(i);
296: }
297:
298: public Ref getRef(String colName) throws SQLException {
299: return _rs.getRef(colName);
300: }
301:
302: public int getRow() throws SQLException {
303: return _rs.getRow();
304: }
305:
306: public short getShort(int columnIndex) throws SQLException {
307: return _rs.getShort(columnIndex);
308: }
309:
310: public short getShort(String columnName) throws SQLException {
311: return _rs.getShort(columnName);
312: }
313:
314: public Statement getStatement() throws SQLException {
315: return _rs.getStatement();
316: }
317:
318: public String getString(int columnIndex) throws SQLException {
319: return _rs.getString(columnIndex);
320: }
321:
322: public String getString(String columnName) throws SQLException {
323: return _rs.getString(columnName);
324: }
325:
326: public Time getTime(int columnIndex) throws SQLException {
327: return _rs.getTime(columnIndex);
328: }
329:
330: public Time getTime(int columnIndex, Calendar cal)
331: throws SQLException {
332: return _rs.getTime(columnIndex, cal);
333: }
334:
335: public Time getTime(String columnName) throws SQLException {
336: return _rs.getTime(columnName);
337: }
338:
339: public Time getTime(String columnName, Calendar cal)
340: throws SQLException {
341: return _rs.getTime(columnName, cal);
342: }
343:
344: public Timestamp getTimestamp(int columnIndex) throws SQLException {
345: return _rs.getTimestamp(columnIndex);
346: }
347:
348: public Timestamp getTimestamp(int columnIndex, Calendar cal)
349: throws SQLException {
350: return _rs.getTimestamp(columnIndex, cal);
351: }
352:
353: public Timestamp getTimestamp(String columnName)
354: throws SQLException {
355: return _rs.getTimestamp(columnName);
356: }
357:
358: public Timestamp getTimestamp(String columnName, Calendar cal)
359: throws SQLException {
360: return _rs.getTimestamp(columnName, cal);
361: }
362:
363: public int getType() throws SQLException {
364: return _rs.getType();
365: }
366:
367: public InputStream getUnicodeStream(int columnIndex)
368: throws SQLException {
369: return _rs.getUnicodeStream(columnIndex);
370: }
371:
372: public InputStream getUnicodeStream(String columnName)
373: throws SQLException {
374: return _rs.getUnicodeStream(columnName);
375: }
376:
377: public URL getURL(int columnIndex) throws SQLException {
378: return _rs.getURL(columnIndex);
379: }
380:
381: public URL getURL(String columnName) throws SQLException {
382: return _rs.getURL(columnName);
383: }
384:
385: public SQLWarning getWarnings() throws SQLException {
386: return _rs.getWarnings();
387: }
388:
389: public void insertRow() throws SQLException {
390: _rs.insertRow();
391: }
392:
393: public boolean isAfterLast() throws SQLException {
394: return _rs.isAfterLast();
395: }
396:
397: public boolean isBeforeFirst() throws SQLException {
398: return _rs.isBeforeFirst();
399: }
400:
401: public boolean isFirst() throws SQLException {
402: return _rs.isFirst();
403: }
404:
405: public boolean isLast() throws SQLException {
406: return _rs.isLast();
407: }
408:
409: public boolean last() throws SQLException {
410: return _rs.last();
411: }
412:
413: public void moveToCurrentRow() throws SQLException {
414: _rs.moveToCurrentRow();
415: }
416:
417: public void moveToInsertRow() throws SQLException {
418: _rs.moveToInsertRow();
419: }
420:
421: public boolean next() throws SQLException {
422: return _rs.next();
423: }
424:
425: public boolean previous() throws SQLException {
426: return _rs.previous();
427: }
428:
429: public void refreshRow() throws SQLException {
430: _rs.refreshRow();
431: }
432:
433: public boolean relative(int rows) throws SQLException {
434: return _rs.relative(rows);
435: }
436:
437: public boolean rowDeleted() throws SQLException {
438: return _rs.rowDeleted();
439: }
440:
441: public boolean rowInserted() throws SQLException {
442: return _rs.rowInserted();
443: }
444:
445: public boolean rowUpdated() throws SQLException {
446: return _rs.rowUpdated();
447: }
448:
449: public void setFetchDirection(int direction) throws SQLException {
450: _rs.setFetchDirection(direction);
451: }
452:
453: public void setFetchSize(int rows) throws SQLException {
454: _rs.setFetchSize(rows);
455: }
456:
457: public void updateArray(int columnIndex, Array x)
458: throws SQLException {
459: _rs.updateArray(columnIndex, x);
460: }
461:
462: public void updateArray(String columnName, Array x)
463: throws SQLException {
464: _rs.updateArray(columnName, x);
465: }
466:
467: public void updateAsciiStream(int columnIndex, InputStream x,
468: int length) throws SQLException {
469: _rs.updateAsciiStream(columnIndex, x, length);
470: }
471:
472: public void updateAsciiStream(String columnName, InputStream x,
473: int length) throws SQLException {
474: _rs.updateAsciiStream(columnName, x, length);
475: }
476:
477: public void updateBigDecimal(int columnIndex, BigDecimal x)
478: throws SQLException {
479: _rs.updateBigDecimal(columnIndex, x);
480: }
481:
482: public void updateBigDecimal(String columnName, BigDecimal x)
483: throws SQLException {
484: _rs.updateBigDecimal(columnName, x);
485: }
486:
487: public void updateBinaryStream(int columnIndex, InputStream x,
488: int length) throws SQLException {
489: _rs.updateBinaryStream(columnIndex, x, length);
490: }
491:
492: public void updateBinaryStream(String columnName, InputStream x,
493: int length) throws SQLException {
494: _rs.updateBinaryStream(columnName, x, length);
495: }
496:
497: public void updateBlob(int columnIndex, Blob x) throws SQLException {
498: _rs.updateBlob(columnIndex, x);
499: }
500:
501: public void updateBlob(String columnName, Blob x)
502: throws SQLException {
503: _rs.updateBlob(columnName, x);
504: }
505:
506: public void updateBoolean(int columnIndex, boolean x)
507: throws SQLException {
508: _rs.updateBoolean(columnIndex, x);
509: }
510:
511: public void updateBoolean(String columnName, boolean x)
512: throws SQLException {
513: _rs.updateBoolean(columnName, x);
514: }
515:
516: public void updateByte(int columnIndex, byte x) throws SQLException {
517: _rs.updateByte(columnIndex, x);
518: }
519:
520: public void updateByte(String columnName, byte x)
521: throws SQLException {
522: _rs.updateByte(columnName, x);
523: }
524:
525: public void updateBytes(int columnIndex, byte[] x)
526: throws SQLException {
527: _rs.updateBytes(columnIndex, x);
528: }
529:
530: public void updateBytes(String columnName, byte[] x)
531: throws SQLException {
532: _rs.updateBytes(columnName, x);
533: }
534:
535: public void updateCharacterStream(int columnIndex, Reader x,
536: int length) throws SQLException {
537: _rs.updateCharacterStream(columnIndex, x, length);
538: }
539:
540: public void updateCharacterStream(String columnName, Reader reader,
541: int length) throws SQLException {
542: _rs.updateCharacterStream(columnName, reader, length);
543: }
544:
545: public void updateClob(int columnIndex, Clob x) throws SQLException {
546: _rs.updateClob(columnIndex, x);
547: }
548:
549: public void updateClob(String columnName, Clob x)
550: throws SQLException {
551: _rs.updateClob(columnName, x);
552: }
553:
554: public void updateDate(int columnIndex, Date x) throws SQLException {
555: _rs.updateDate(columnIndex, x);
556: }
557:
558: public void updateDate(String columnName, Date x)
559: throws SQLException {
560: _rs.updateDate(columnName, x);
561: }
562:
563: public void updateDouble(int columnIndex, double x)
564: throws SQLException {
565: _rs.updateDouble(columnIndex, x);
566: }
567:
568: public void updateDouble(String columnName, double x)
569: throws SQLException {
570: _rs.updateDouble(columnName, x);
571: }
572:
573: public void updateFloat(int columnIndex, float x)
574: throws SQLException {
575: _rs.updateFloat(columnIndex, x);
576: }
577:
578: public void updateFloat(String columnName, float x)
579: throws SQLException {
580: _rs.updateFloat(columnName, x);
581: }
582:
583: public void updateInt(int columnIndex, int x) throws SQLException {
584: _rs.updateInt(columnIndex, x);
585: }
586:
587: public void updateInt(String columnName, int x) throws SQLException {
588: _rs.updateInt(columnName, x);
589: }
590:
591: public void updateLong(int columnIndex, long x) throws SQLException {
592: _rs.updateLong(columnIndex, x);
593: }
594:
595: public void updateLong(String columnName, long x)
596: throws SQLException {
597: _rs.updateLong(columnName, x);
598: }
599:
600: public void updateNull(int columnIndex) throws SQLException {
601: _rs.updateNull(columnIndex);
602: }
603:
604: public void updateNull(String columnName) throws SQLException {
605: _rs.updateNull(columnName);
606: }
607:
608: public void updateObject(int columnIndex, Object x)
609: throws SQLException {
610: _rs.updateObject(columnIndex, x);
611: }
612:
613: public void updateObject(int columnIndex, Object x, int scale)
614: throws SQLException {
615: _rs.updateObject(columnIndex, x, scale);
616: }
617:
618: public void updateObject(String columnName, Object x)
619: throws SQLException {
620: _rs.updateObject(columnName, x);
621: }
622:
623: public void updateObject(String columnName, Object x, int scale)
624: throws SQLException {
625: _rs.updateObject(columnName, x, scale);
626: }
627:
628: public void updateRef(int columnIndex, Ref x) throws SQLException {
629: _rs.updateRef(columnIndex, x);
630: }
631:
632: public void updateRef(String columnName, Ref x) throws SQLException {
633: _rs.updateRef(columnName, x);
634: }
635:
636: public void updateRow() throws SQLException {
637: _rs.updateRow();
638: }
639:
640: public void updateShort(int columnIndex, short x)
641: throws SQLException {
642: _rs.updateShort(columnIndex, x);
643: }
644:
645: public void updateShort(String columnName, short x)
646: throws SQLException {
647: _rs.updateShort(columnName, x);
648: }
649:
650: public void updateString(int columnIndex, String x)
651: throws SQLException {
652: _rs.updateString(columnIndex, x);
653: }
654:
655: public void updateString(String columnName, String x)
656: throws SQLException {
657: _rs.updateString(columnName, x);
658: }
659:
660: public void updateTime(int columnIndex, Time x) throws SQLException {
661: _rs.updateTime(columnIndex, x);
662: }
663:
664: public void updateTime(String columnName, Time x)
665: throws SQLException {
666: _rs.updateTime(columnName, x);
667: }
668:
669: public void updateTimestamp(int columnIndex, Timestamp x)
670: throws SQLException {
671: _rs.updateTimestamp(columnIndex, x);
672: }
673:
674: public void updateTimestamp(String columnName, Timestamp x)
675: throws SQLException {
676: _rs.updateTimestamp(columnName, x);
677: }
678:
679: public boolean wasNull() throws SQLException {
680: return _rs.wasNull();
681: }
682:
683: private ResultSet _rs;
684:
685: }
|