0001: /*
0002:
0003: Derby - Class org.apache.derbyTesting.functionTests.tests.lang.TableVTI
0004:
0005: Licensed to the Apache Software Foundation (ASF) under one or more
0006: contributor license agreements. See the NOTICE file distributed with
0007: this work for additional information regarding copyright ownership.
0008: The ASF licenses this file to You under the Apache License, Version 2.0
0009: (the "License"); you may not use this file except in compliance with
0010: the License. You may obtain a copy of the License at
0011:
0012: http://www.apache.org/licenses/LICENSE-2.0
0013:
0014: Unless required by applicable law or agreed to in writing, software
0015: distributed under the License is distributed on an "AS IS" BASIS,
0016: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0017: See the License for the specific language governing permissions and
0018: limitations under the License.
0019:
0020: */
0021:
0022: package org.apache.derbyTesting.functionTests.tests.lang;
0023:
0024: import java.sql.Connection;
0025: import java.sql.Statement;
0026: import java.sql.ResultSet;
0027: import java.sql.ResultSetMetaData;
0028: import java.sql.SQLException;
0029: import java.sql.SQLWarning;
0030: import java.math.BigDecimal;
0031: import java.sql.DriverManager;
0032: import java.net.URL;
0033: import java.util.Calendar;
0034: import java.sql.Ref;
0035: import java.sql.Blob;
0036: import java.sql.Clob;
0037: import java.sql.Array;
0038:
0039: /**
0040: This class has been adapted from org.apache.derby.vti.VTITemplate
0041: because we do not want a test to depend on an engine class.
0042:
0043: This class implements most of the methods of the JDBC 1.2 interface java.sql.ResultSet,
0044: each one throwing a SQLException with the name of the method.
0045: A concrete subclass can then just implement the methods not implemented here
0046: and override any methods it needs to implement for correct functionality.
0047: <P>
0048: The methods not implemented here are
0049: <UL>
0050: <LI>next()
0051: <LI>close()
0052: <LI>getMetaData()
0053: </UL>
0054: <P>
0055:
0056: For virtual tables the database engine only calls methods defined
0057: in the JDBC 1.2 definition of java.sql.ResultSet.
0058: <BR>
0059: Classes that implement a JDBC 2.0 conformant java.sql.ResultSet can be used
0060: as virtual tables.
0061: */
0062: public abstract class TableVTI implements ResultSet {
0063:
0064: private String tableName;
0065: private ResultSetMetaData rsmd;
0066: private int[] map;
0067:
0068: public TableVTI(String tableName) throws SQLException {
0069: this .tableName = tableName;
0070: init();
0071: }
0072:
0073: protected void init() throws SQLException {
0074: Connection conn = DriverManager
0075: .getConnection("jdbc:default:connection");
0076: Statement s = conn.createStatement();
0077: ResultSet rs = s.executeQuery("select * from " + tableName
0078: + " where 1 = 0 ");
0079: rsmd = rs.getMetaData();
0080: rs.close();
0081: s.close();
0082:
0083: map = getColumnMap(getVTIColumnNames());
0084: }
0085:
0086: public final ResultSetMetaData getMetaData() {
0087: return rsmd;
0088: }
0089:
0090: public final void close() {
0091: }
0092:
0093: protected int[] getColumnMap(String[] vtiNames) throws SQLException {
0094:
0095: if (vtiNames == null)
0096: return null;
0097:
0098: int[] map = new int[vtiNames.length];
0099: int count = rsmd.getColumnCount();
0100:
0101: outer: for (int i = 0; i < vtiNames.length; i++) {
0102:
0103: String vtiCol = vtiNames[i];
0104: if (vtiCol == null)
0105: continue outer;
0106: ;
0107:
0108: for (int j = 1; j <= count; j++) {
0109: if (vtiCol.equalsIgnoreCase(rsmd.getColumnName(j))) {
0110: map[i] = j;
0111: continue outer;
0112: }
0113: }
0114: }
0115:
0116: return map;
0117: }
0118:
0119: protected String[] getVTIColumnNames() {
0120: return null;
0121: }
0122:
0123: //
0124: // java.sql.ResultSet calls, passed through to our result set.
0125: //
0126:
0127: /**
0128: * @see java.sql.ResultSet
0129: *
0130: * @exception SQLException on unexpected JDBC error
0131: */
0132: public boolean wasNull() throws SQLException {
0133: throw new SQLException("wasNull");
0134: }
0135:
0136: /**
0137: * @see java.sql.ResultSet
0138: *
0139: * @exception SQLException on unexpected JDBC error
0140: */
0141: public String getString(int columnIndex) throws SQLException {
0142: throw new SQLException("getString");
0143: }
0144:
0145: /**
0146: * @see java.sql.ResultSet
0147: *
0148: * @exception SQLException on unexpected JDBC error
0149: */
0150: public boolean getBoolean(int columnIndex) throws SQLException {
0151: throw new SQLException("getBoolean");
0152: }
0153:
0154: /**
0155: * @see java.sql.ResultSet
0156: *
0157: * @exception SQLException on unexpected JDBC error
0158: */
0159: public byte getByte(int columnIndex) throws SQLException {
0160: throw new SQLException("getByte");
0161: }
0162:
0163: /**
0164: * @see java.sql.ResultSet
0165: *
0166: * @exception SQLException on unexpected JDBC error
0167: */
0168: public short getShort(int columnIndex) throws SQLException {
0169: throw new SQLException("getShort");
0170: }
0171:
0172: /**
0173: * @see java.sql.ResultSet
0174: *
0175: * @exception SQLException on unexpected JDBC error
0176: */
0177: public int getInt(int columnIndex) throws SQLException {
0178: throw new SQLException("getInt");
0179: }
0180:
0181: /**
0182: * @see java.sql.ResultSet
0183: *
0184: * @exception SQLException on unexpected JDBC error
0185: */
0186: public long getLong(int columnIndex) throws SQLException {
0187: throw new SQLException("getLong");
0188: }
0189:
0190: /**
0191: * @see java.sql.ResultSet
0192: *
0193: * @exception SQLException on unexpected JDBC error
0194: */
0195: public float getFloat(int columnIndex) throws SQLException {
0196: throw new SQLException("getFloat");
0197: }
0198:
0199: /**
0200: * @see java.sql.ResultSet
0201: *
0202: * @exception SQLException on unexpected JDBC error
0203: */
0204: public double getDouble(int columnIndex) throws SQLException {
0205: throw new SQLException("getDouble");
0206: }
0207:
0208: /**
0209: * @see java.sql.ResultSet
0210: *
0211: * @exception SQLException on unexpected JDBC error
0212: */
0213: public BigDecimal getBigDecimal(int columnIndex, int scale)
0214: throws SQLException {
0215: throw new SQLException("getBigDecimal");
0216: }
0217:
0218: /**
0219: * @see java.sql.ResultSet
0220: *
0221: * @exception SQLException on unexpected JDBC error
0222: */
0223: public byte[] getBytes(int columnIndex) throws SQLException {
0224: throw new SQLException("getBytes");
0225: }
0226:
0227: /**
0228: * @see java.sql.ResultSet
0229: *
0230: * @exception SQLException on unexpected JDBC error
0231: */
0232: public java.sql.Date getDate(int columnIndex) throws SQLException {
0233: throw new SQLException("getDate");
0234: }
0235:
0236: /**
0237: * @see java.sql.ResultSet
0238: *
0239: * @exception SQLException on unexpected JDBC error
0240: */
0241: public java.sql.Time getTime(int columnIndex) throws SQLException {
0242: throw new SQLException("getTime");
0243: }
0244:
0245: /**
0246: * @see java.sql.ResultSet
0247: *
0248: * @exception SQLException on unexpected JDBC error
0249: */
0250: public java.sql.Timestamp getTimestamp(int columnIndex)
0251: throws SQLException {
0252: throw new SQLException("getTimestamp");
0253: }
0254:
0255: /**
0256: * @see java.sql.ResultSet
0257: *
0258: * @exception SQLException on unexpected JDBC error
0259: */
0260: public java.io.InputStream getAsciiStream(int columnIndex)
0261: throws SQLException {
0262: throw new SQLException("getAsciiStream");
0263: }
0264:
0265: /**
0266: * @see java.sql.ResultSet
0267: *
0268: * @exception SQLException on unexpected JDBC error
0269: */
0270: public java.io.InputStream getUnicodeStream(int columnIndex)
0271: throws SQLException {
0272: throw new SQLException("getUnicodeStream");
0273: }
0274:
0275: /**
0276: * @see java.sql.ResultSet
0277: *
0278: * @exception SQLException on unexpected JDBC error
0279: */
0280: public java.io.InputStream getBinaryStream(int columnIndex)
0281: throws SQLException {
0282: throw new SQLException("getBinaryStream");
0283: }
0284:
0285: /**
0286: * @see java.sql.ResultSet
0287: *
0288: * @exception SQLException on unexpected JDBC error
0289: */
0290: public String getString(String columnName) throws SQLException {
0291: return getString(findColumn(columnName));
0292: }
0293:
0294: /**
0295: * @see java.sql.ResultSet
0296: *
0297: * @exception SQLException on unexpected JDBC error
0298: */
0299: public boolean getBoolean(String columnName) throws SQLException {
0300: return getBoolean(findColumn(columnName));
0301: }
0302:
0303: /**
0304: * @see java.sql.ResultSet
0305: *
0306: * @exception SQLException on unexpected JDBC error
0307: */
0308: public byte getByte(String columnName) throws SQLException {
0309: return getByte(findColumn(columnName));
0310: }
0311:
0312: /**
0313: * @see java.sql.ResultSet
0314: *
0315: * @exception SQLException on unexpected JDBC error
0316: */
0317: public short getShort(String columnName) throws SQLException {
0318: return getShort(findColumn(columnName));
0319: }
0320:
0321: /**
0322: * @see java.sql.ResultSet
0323: *
0324: * @exception SQLException on unexpected JDBC error
0325: */
0326: public int getInt(String columnName) throws SQLException {
0327: return getInt(findColumn(columnName));
0328: }
0329:
0330: /**
0331: * @see java.sql.ResultSet
0332: *
0333: * @exception SQLException on unexpected JDBC error
0334: */
0335: public long getLong(String columnName) throws SQLException {
0336: return getLong(findColumn(columnName));
0337: }
0338:
0339: /**
0340: * @see java.sql.ResultSet
0341: *
0342: * @exception SQLException on unexpected JDBC error
0343: */
0344: public float getFloat(String columnName) throws SQLException {
0345: return getFloat(findColumn(columnName));
0346: }
0347:
0348: /**
0349: * @see java.sql.ResultSet
0350: *
0351: * @exception SQLException on unexpected JDBC error
0352: */
0353: public double getDouble(String columnName) throws SQLException {
0354: return getDouble(findColumn(columnName));
0355: }
0356:
0357: /**
0358: * @see java.sql.ResultSet
0359: *
0360: * @exception SQLException on unexpected JDBC error
0361: */
0362: public BigDecimal getBigDecimal(String columnName, int scale)
0363: throws SQLException {
0364: return getBigDecimal(findColumn(columnName), scale);
0365: }
0366:
0367: /**
0368: * @see java.sql.ResultSet
0369: *
0370: * @exception SQLException on unexpected JDBC error
0371: */
0372: public byte[] getBytes(String columnName) throws SQLException {
0373: return getBytes(findColumn(columnName));
0374: }
0375:
0376: /**
0377: * @see java.sql.ResultSet
0378: *
0379: * @exception SQLException on unexpected JDBC error
0380: */
0381: public java.sql.Date getDate(String columnName) throws SQLException {
0382: return getDate(findColumn(columnName));
0383: }
0384:
0385: /**
0386: * @see java.sql.ResultSet
0387: *
0388: * @exception SQLException on unexpected JDBC error
0389: */
0390: public java.sql.Time getTime(String columnName) throws SQLException {
0391: return getTime(findColumn(columnName));
0392: }
0393:
0394: /**
0395: * @see java.sql.ResultSet
0396: *
0397: * @exception SQLException on unexpected JDBC error
0398: */
0399: public java.sql.Timestamp getTimestamp(String columnName)
0400: throws SQLException {
0401: return getTimestamp(findColumn(columnName));
0402: }
0403:
0404: /**
0405: * @see java.sql.ResultSet
0406: *
0407: * @exception SQLException on unexpected JDBC error
0408: */
0409: public java.io.InputStream getAsciiStream(String columnName)
0410: throws SQLException {
0411: throw new SQLException("getAsciiStream");
0412: }
0413:
0414: /**
0415: * @see java.sql.ResultSet
0416: *
0417: * @exception SQLException on unexpected JDBC error
0418: */
0419: public java.io.InputStream getUnicodeStream(String columnName)
0420: throws SQLException {
0421: throw new SQLException("getUnicodeStream");
0422: }
0423:
0424: /**
0425: * @see java.sql.ResultSet
0426: *
0427: * @exception SQLException on unexpected JDBC error
0428: */
0429: public java.io.InputStream getBinaryStream(String columnName)
0430: throws SQLException {
0431: throw new SQLException("getBinaryStream");
0432: }
0433:
0434: /**
0435: * @exception SQLException if there is an error
0436: */
0437: public SQLWarning getWarnings() throws SQLException {
0438: return null;
0439: }
0440:
0441: /**
0442: * @exception SQLException if there is an error
0443: */
0444: public void clearWarnings() throws SQLException {
0445: }
0446:
0447: /**
0448: * @see java.sql.ResultSet
0449: *
0450: * @exception SQLException on unexpected JDBC error
0451: */
0452: public String getCursorName() throws SQLException {
0453: throw new SQLException("getCursorName");
0454: }
0455:
0456: /**
0457: * @see java.sql.ResultSet
0458: *
0459: * @exception SQLException on unexpected JDBC error
0460: */
0461: public Object getObject(int columnIndex) throws SQLException {
0462: throw new SQLException("getObject");
0463: }
0464:
0465: /**
0466: * @see java.sql.ResultSet
0467: *
0468: * @exception SQLException on unexpected JDBC error
0469: */
0470: public Object getObject(String columnName) throws SQLException {
0471: return getObject(findColumn(columnName));
0472: }
0473:
0474: /**
0475: * @see java.sql.ResultSet
0476: *
0477: * @exception SQLException on unexpected JDBC error
0478: */
0479: public int findColumn(String columnName) throws SQLException {
0480: throw new SQLException("findColumn");
0481: }
0482:
0483: /*
0484: ** JDBC 2.0 methods
0485: */
0486:
0487: /**
0488: * @see java.sql.ResultSet
0489: *
0490: * @exception SQLException on unexpected JDBC error
0491: */
0492: public java.io.Reader getCharacterStream(int columnIndex)
0493: throws SQLException {
0494: throw new SQLException("getCharacterStream");
0495: }
0496:
0497: /**
0498: * @see java.sql.ResultSet
0499: *
0500: * @exception SQLException on unexpected JDBC error
0501: */
0502: public java.io.Reader getCharacterStream(String columnName)
0503: throws SQLException {
0504: throw new SQLException("getCharacterStream");
0505: }
0506:
0507: /**
0508: * @see java.sql.ResultSet
0509: *
0510: * @exception SQLException on unexpected JDBC error
0511: */
0512: public BigDecimal getBigDecimal(int columnIndex)
0513: throws SQLException {
0514: throw new SQLException("getBigDecimal");
0515: }
0516:
0517: /**
0518: * @see java.sql.ResultSet
0519: *
0520: * @exception SQLException on unexpected JDBC error
0521: */
0522: public BigDecimal getBigDecimal(String columnName)
0523: throws SQLException {
0524: return getBigDecimal(findColumn(columnName));
0525: }
0526:
0527: /**
0528: * @see java.sql.ResultSet
0529: *
0530: * @exception SQLException on unexpected JDBC error
0531: */
0532: public boolean isBeforeFirst() throws SQLException {
0533: throw new SQLException("isBeforeFirst");
0534: }
0535:
0536: /**
0537: * @see java.sql.ResultSet
0538: *
0539: * @exception SQLException on unexpected JDBC error
0540: */
0541: public boolean isAfterLast() throws SQLException {
0542: throw new SQLException("isAfterLast");
0543: }
0544:
0545: /**
0546: * @see java.sql.ResultSet
0547: *
0548: * @exception SQLException on unexpected JDBC error
0549: */
0550: public boolean isFirst() throws SQLException {
0551: throw new SQLException("isFirst");
0552: }
0553:
0554: /**
0555: * @see java.sql.ResultSet
0556: *
0557: * @exception SQLException on unexpected JDBC error
0558: */
0559: public boolean isLast() throws SQLException {
0560: throw new SQLException("isLast");
0561: }
0562:
0563: /**
0564: * @see java.sql.ResultSet
0565: *
0566: * @exception SQLException on unexpected JDBC error
0567: */
0568: public void beforeFirst() throws SQLException {
0569: throw new SQLException("beforeFirst");
0570: }
0571:
0572: /**
0573: * @see java.sql.ResultSet
0574: *
0575: * @exception SQLException on unexpected JDBC error
0576: */
0577: public void afterLast() throws SQLException {
0578: throw new SQLException("afterLast");
0579: }
0580:
0581: /**
0582: * @see java.sql.ResultSet
0583: *
0584: * @exception SQLException on unexpected JDBC error
0585: */
0586: public boolean first() throws SQLException {
0587: throw new SQLException("first");
0588: }
0589:
0590: /**
0591: * @see java.sql.ResultSet
0592: *
0593: * @exception SQLException on unexpected JDBC error
0594: */
0595: public boolean last() throws SQLException {
0596: throw new SQLException("last");
0597: }
0598:
0599: /**
0600: * @see java.sql.ResultSet
0601: *
0602: * @exception SQLException on unexpected JDBC error
0603: */
0604: public int getRow() throws SQLException {
0605: throw new SQLException("getRow");
0606: }
0607:
0608: /**
0609: * @see java.sql.ResultSet
0610: *
0611: * @exception SQLException on unexpected JDBC error
0612: */
0613: public boolean absolute(int row) throws SQLException {
0614: throw new SQLException("absolute");
0615: }
0616:
0617: /**
0618: * @see java.sql.ResultSet
0619: *
0620: * @exception SQLException on unexpected JDBC error
0621: */
0622: public boolean relative(int rows) throws SQLException {
0623: throw new SQLException("relative");
0624: }
0625:
0626: /**
0627: * @see java.sql.ResultSet
0628: *
0629: * @exception SQLException on unexpected JDBC error
0630: */
0631: public boolean previous() throws SQLException {
0632: throw new SQLException("previous");
0633: }
0634:
0635: /**
0636: * @see java.sql.ResultSet
0637: *
0638: * @exception SQLException on unexpected JDBC error
0639: */
0640: public void setFetchDirection(int direction) throws SQLException {
0641: throw new SQLException("setFetchDirection");
0642: }
0643:
0644: /**
0645: * @see java.sql.ResultSet
0646: *
0647: * @exception SQLException on unexpected JDBC error
0648: */
0649: public int getFetchDirection() throws SQLException {
0650: throw new SQLException("getFetchDirection");
0651: }
0652:
0653: /**
0654: * @see java.sql.ResultSet
0655: *
0656: * @exception SQLException on unexpected JDBC error
0657: */
0658: public void setFetchSize(int rows) throws SQLException {
0659: throw new SQLException("setFetchSize");
0660: }
0661:
0662: /**
0663: * @see java.sql.ResultSet
0664: *
0665: * @exception SQLException on unexpected JDBC error
0666: */
0667: public int getFetchSize() throws SQLException {
0668: throw new SQLException("getFetchSize");
0669: }
0670:
0671: /**
0672: * @see java.sql.ResultSet
0673: *
0674: * @exception SQLException on unexpected JDBC error
0675: */
0676: public int getType() throws SQLException {
0677: throw new SQLException("getType");
0678: }
0679:
0680: /**
0681: * @see java.sql.ResultSet
0682: *
0683: * @exception SQLException on unexpected JDBC error
0684: */
0685: public int getConcurrency() throws SQLException {
0686: throw new SQLException("getConcurrency");
0687: }
0688:
0689: /**
0690: * @see java.sql.ResultSet
0691: *
0692: * @exception SQLException on unexpected JDBC error
0693: */
0694: public boolean rowUpdated() throws SQLException {
0695: throw new SQLException("rowUpdated");
0696: }
0697:
0698: /**
0699: * @see java.sql.ResultSet
0700: *
0701: * @exception SQLException on unexpected JDBC error
0702: */
0703: public boolean rowInserted() throws SQLException {
0704: throw new SQLException("rowInserted");
0705: }
0706:
0707: /**
0708: * @see java.sql.ResultSet
0709: *
0710: * @exception SQLException on unexpected JDBC error
0711: */
0712: public boolean rowDeleted() throws SQLException {
0713: throw new SQLException("rowDeleted");
0714: }
0715:
0716: /**
0717: * @see java.sql.ResultSet
0718: *
0719: * @exception SQLException on unexpected JDBC error
0720: */
0721: public void updateNull(int columnIndex) throws SQLException {
0722: throw new SQLException("updateNull");
0723: }
0724:
0725: /**
0726: * @see java.sql.ResultSet
0727: *
0728: * @exception SQLException on unexpected JDBC error
0729: */
0730: public void updateBoolean(int columnIndex, boolean x)
0731: throws SQLException {
0732: throw new SQLException("updateBoolean");
0733: }
0734:
0735: /**
0736: * @see java.sql.ResultSet
0737: *
0738: * @exception SQLException on unexpected JDBC error
0739: */
0740: public void updateByte(int columnIndex, byte x) throws SQLException {
0741: throw new SQLException("updateByte");
0742: }
0743:
0744: /**
0745: * @see java.sql.ResultSet
0746: *
0747: * @exception SQLException on unexpected JDBC error
0748: */
0749: public void updateShort(int columnIndex, short x)
0750: throws SQLException {
0751: throw new SQLException("updateShort");
0752: }
0753:
0754: /**
0755: * @see java.sql.ResultSet
0756: *
0757: * @exception SQLException on unexpected JDBC error
0758: */
0759: public void updateInt(int columnIndex, int x) throws SQLException {
0760: throw new SQLException("updateInt");
0761: }
0762:
0763: /**
0764: * @see java.sql.ResultSet
0765: *
0766: * @exception SQLException on unexpected JDBC error
0767: */
0768: public void updateLong(int columnIndex, long x) throws SQLException {
0769: throw new SQLException("updateLong");
0770: }
0771:
0772: /**
0773: * @see java.sql.ResultSet
0774: *
0775: * @exception SQLException on unexpected JDBC error
0776: */
0777: public void updateFloat(int columnIndex, float x)
0778: throws SQLException {
0779: throw new SQLException("updateFloat");
0780: }
0781:
0782: /**
0783: * @see java.sql.ResultSet
0784: *
0785: * @exception SQLException on unexpected JDBC error
0786: */
0787: public void updateDouble(int columnIndex, double x)
0788: throws SQLException {
0789: throw new SQLException("updateDouble");
0790: }
0791:
0792: /**
0793: * @see java.sql.ResultSet
0794: *
0795: * @exception SQLException on unexpected JDBC error
0796: */
0797: public void updateBigDecimal(int columnIndex, BigDecimal x)
0798: throws SQLException {
0799: throw new SQLException("updateBigDecimal");
0800: }
0801:
0802: /**
0803: * @see java.sql.ResultSet
0804: *
0805: * @exception SQLException on unexpected JDBC error
0806: */
0807: public void updateString(int columnIndex, String x)
0808: throws SQLException {
0809: throw new SQLException("updateString");
0810: }
0811:
0812: /**
0813: * @see java.sql.ResultSet
0814: *
0815: * @exception SQLException on unexpected JDBC error
0816: */
0817: public void updateBytes(int columnIndex, byte[] x)
0818: throws SQLException {
0819: throw new SQLException("updateBytes");
0820: }
0821:
0822: /**
0823: * @see java.sql.ResultSet
0824: *
0825: * @exception SQLException on unexpected JDBC error
0826: */
0827: public void updateDate(int columnIndex, java.sql.Date x)
0828: throws SQLException {
0829: throw new SQLException("updateDate");
0830: }
0831:
0832: /**
0833: * @see java.sql.ResultSet
0834: *
0835: * @exception SQLException on unexpected JDBC error
0836: */
0837: public void updateTime(int columnIndex, java.sql.Time x)
0838: throws SQLException {
0839: throw new SQLException("updateTime");
0840: }
0841:
0842: /**
0843: * @see java.sql.ResultSet
0844: *
0845: * @exception SQLException on unexpected JDBC error
0846: */
0847: public void updateTimestamp(int columnIndex, java.sql.Timestamp x)
0848: throws SQLException {
0849: throw new SQLException("updateTimestamp");
0850: }
0851:
0852: /**
0853: * @see java.sql.ResultSet
0854: *
0855: * @exception SQLException on unexpected JDBC error
0856: */
0857: public void updateAsciiStream(int columnIndex,
0858: java.io.InputStream x, int length) throws SQLException {
0859: throw new SQLException("updateAsciiStream");
0860: }
0861:
0862: /**
0863: * @see java.sql.ResultSet
0864: *
0865: * @exception SQLException on unexpected JDBC error
0866: */
0867: public void updateBinaryStream(int columnIndex,
0868: java.io.InputStream x, int length) throws SQLException {
0869: throw new SQLException("updateBinaryStream");
0870: }
0871:
0872: /**
0873: * @see java.sql.ResultSet
0874: *
0875: * @exception SQLException on unexpected JDBC error
0876: */
0877: public void updateCharacterStream(int columnIndex,
0878: java.io.Reader x, int length) throws SQLException {
0879: throw new SQLException("updateCharacterStream");
0880: }
0881:
0882: /**
0883: * @see java.sql.ResultSet
0884: *
0885: * @exception SQLException on unexpected JDBC error
0886: */
0887: public void updateObject(int columnIndex, Object x, int scale)
0888: throws SQLException {
0889: throw new SQLException("updateObject");
0890: }
0891:
0892: /**
0893: * @see java.sql.ResultSet
0894: *
0895: * @exception SQLException on unexpected JDBC error
0896: */
0897: public void updateObject(int columnIndex, Object x)
0898: throws SQLException {
0899: throw new SQLException("updateObject");
0900: }
0901:
0902: /**
0903: * @see java.sql.ResultSet
0904: *
0905: * @exception SQLException on unexpected JDBC error
0906: */
0907: public void updateNull(String columnName) throws SQLException {
0908: throw new SQLException("updateNull");
0909: }
0910:
0911: /**
0912: * @see java.sql.ResultSet
0913: *
0914: * @exception SQLException on unexpected JDBC error
0915: */
0916: public void updateBoolean(String columnName, boolean x)
0917: throws SQLException {
0918: throw new SQLException("updateBoolean");
0919: }
0920:
0921: /**
0922: * @see java.sql.ResultSet
0923: *
0924: * @exception SQLException on unexpected JDBC error
0925: */
0926: public void updateByte(String columnName, byte x)
0927: throws SQLException {
0928: throw new SQLException("updateByte");
0929: }
0930:
0931: /**
0932: * @see java.sql.ResultSet
0933: *
0934: * @exception SQLException on unexpected JDBC error
0935: */
0936: public void updateShort(String columnName, short x)
0937: throws SQLException {
0938: throw new SQLException("updateShort");
0939: }
0940:
0941: /**
0942: * @see java.sql.ResultSet
0943: *
0944: * @exception SQLException on unexpected JDBC error
0945: */
0946: public void updateInt(String columnName, int x) throws SQLException {
0947: throw new SQLException("updateInt");
0948: }
0949:
0950: /**
0951: * @see java.sql.ResultSet
0952: *
0953: * @exception SQLException on unexpected JDBC error
0954: */
0955: public void updateLong(String columnName, long x)
0956: throws SQLException {
0957: throw new SQLException("updateLong");
0958: }
0959:
0960: /**
0961: * @see java.sql.ResultSet
0962: *
0963: * @exception SQLException on unexpected JDBC error
0964: */
0965: public void updateFloat(String columnName, float x)
0966: throws SQLException {
0967: throw new SQLException("updateFloat");
0968: }
0969:
0970: /**
0971: * @see java.sql.ResultSet
0972: *
0973: * @exception SQLException on unexpected JDBC error
0974: */
0975: public void updateDouble(String columnName, double x)
0976: throws SQLException {
0977: throw new SQLException("updateDouble");
0978: }
0979:
0980: /**
0981: * @see java.sql.ResultSet
0982: *
0983: * @exception SQLException on unexpected JDBC error
0984: */
0985: public void updateBigDecimal(String columnName, BigDecimal x)
0986: throws SQLException {
0987: throw new SQLException("updateBigDecimal");
0988: }
0989:
0990: /**
0991: * @see java.sql.ResultSet
0992: *
0993: * @exception SQLException on unexpected JDBC error
0994: */
0995: public void updateString(String columnName, String x)
0996: throws SQLException {
0997: throw new SQLException("updateString");
0998: }
0999:
1000: /**
1001: * @see java.sql.ResultSet
1002: *
1003: * @exception SQLException on unexpected JDBC error
1004: */
1005: public void updateBytes(String columnName, byte[] x)
1006: throws SQLException {
1007: throw new SQLException("updateBytes");
1008: }
1009:
1010: /**
1011: * @see java.sql.ResultSet
1012: *
1013: * @exception SQLException on unexpected JDBC error
1014: */
1015: public void updateDate(String columnName, java.sql.Date x)
1016: throws SQLException {
1017: throw new SQLException("updateDate");
1018: }
1019:
1020: /**
1021: * @see java.sql.ResultSet
1022: *
1023: * @exception SQLException on unexpected JDBC error
1024: */
1025: public void updateTime(String columnName, java.sql.Time x)
1026: throws SQLException {
1027: throw new SQLException("updateTime");
1028: }
1029:
1030: /**
1031: * @see java.sql.ResultSet
1032: *
1033: * @exception SQLException on unexpected JDBC error
1034: */
1035: public void updateTimestamp(String columnName, java.sql.Timestamp x)
1036: throws SQLException {
1037: throw new SQLException("updateTimestamp");
1038: }
1039:
1040: /**
1041: * @see java.sql.ResultSet
1042: *
1043: * @exception SQLException on unexpected JDBC error
1044: */
1045: public void updateAsciiStream(String columnName,
1046: java.io.InputStream x, int length) throws SQLException {
1047: throw new SQLException("updateAsciiStream");
1048: }
1049:
1050: /**
1051: * @see java.sql.ResultSet
1052: *
1053: * @exception SQLException on unexpected JDBC error
1054: */
1055: public void updateBinaryStream(String columnName,
1056: java.io.InputStream x, int length) throws SQLException {
1057: throw new SQLException("updateBinaryStream");
1058: }
1059:
1060: /**
1061: * @see java.sql.ResultSet
1062: *
1063: * @exception SQLException on unexpected JDBC error
1064: */
1065: public void updateCharacterStream(String columnName,
1066: java.io.Reader x, int length) throws SQLException {
1067: throw new SQLException("updateCharacterStream");
1068: }
1069:
1070: /**
1071: * @see java.sql.ResultSet
1072: *
1073: * @exception SQLException on unexpected JDBC error
1074: */
1075: public void updateObject(String columnName, Object x, int scale)
1076: throws SQLException {
1077: throw new SQLException("updateObject");
1078: }
1079:
1080: /**
1081: * @see java.sql.ResultSet
1082: *
1083: * @exception SQLException on unexpected JDBC error
1084: */
1085: public void updateObject(String columnName, Object x)
1086: throws SQLException {
1087: throw new SQLException("updateObject");
1088: }
1089:
1090: /**
1091: * @see java.sql.ResultSet
1092: *
1093: * @exception SQLException on unexpected JDBC error
1094: */
1095: public void insertRow() throws SQLException {
1096: throw new SQLException("insertRow");
1097: }
1098:
1099: /**
1100: * @see java.sql.ResultSet
1101: *
1102: * @exception SQLException on unexpected JDBC error
1103: */
1104: public void updateRow() throws SQLException {
1105: throw new SQLException("updateRow");
1106: }
1107:
1108: /**
1109: * @see java.sql.ResultSet
1110: *
1111: * @exception SQLException on unexpected JDBC error
1112: */
1113: public void deleteRow() throws SQLException {
1114: throw new SQLException("deleteRow");
1115: }
1116:
1117: /**
1118: * @see java.sql.ResultSet
1119: *
1120: * @exception SQLException on unexpected JDBC error
1121: */
1122: public void refreshRow() throws SQLException {
1123: throw new SQLException("refreshRow");
1124: }
1125:
1126: /**
1127: * @see java.sql.ResultSet
1128: *
1129: * @exception SQLException on unexpected JDBC error
1130: */
1131: public void cancelRowUpdates() throws SQLException {
1132: throw new SQLException("cancelRowUpdates");
1133: }
1134:
1135: /**
1136: * @see java.sql.ResultSet
1137: *
1138: * @exception SQLException on unexpected JDBC error
1139: */
1140: public void moveToInsertRow() throws SQLException {
1141: throw new SQLException("moveToInsertRow");
1142: }
1143:
1144: /**
1145: * @see java.sql.ResultSet
1146: *
1147: * @exception SQLException on unexpected JDBC error
1148: */
1149: public void moveToCurrentRow() throws SQLException {
1150: throw new SQLException("moveToCurrentRow");
1151: }
1152:
1153: /**
1154: * @see java.sql.ResultSet
1155: *
1156: * @exception SQLException on unexpected JDBC error
1157: */
1158: public Statement getStatement() throws SQLException {
1159: throw new SQLException("getStatement");
1160: }
1161:
1162: /**
1163: * @see java.sql.ResultSet
1164: *
1165: * @exception SQLException on unexpected JDBC error
1166: */
1167: public java.sql.Date getDate(int columnIndex, Calendar cal)
1168: throws SQLException {
1169: throw new SQLException("getDate");
1170: }
1171:
1172: /**
1173: * @see java.sql.ResultSet
1174: *
1175: * @exception SQLException on unexpected JDBC error
1176: */
1177: public java.sql.Date getDate(String columnName, Calendar cal)
1178: throws SQLException {
1179: throw new SQLException("getDate");
1180: }
1181:
1182: /**
1183: * @see java.sql.ResultSet
1184: *
1185: * @exception SQLException on unexpected JDBC error
1186: */
1187: public java.sql.Time getTime(int columnIndex, Calendar cal)
1188: throws SQLException {
1189: throw new SQLException("getTime");
1190: }
1191:
1192: /**
1193: * @see java.sql.ResultSet
1194: *
1195: * @exception SQLException on unexpected JDBC error
1196: */
1197: public java.sql.Time getTime(String columnName, Calendar cal)
1198: throws SQLException {
1199: throw new SQLException("getTime");
1200: }
1201:
1202: /**
1203: * @see java.sql.ResultSet
1204: *
1205: * @exception SQLException on unexpected JDBC error
1206: */
1207: public java.sql.Timestamp getTimestamp(int columnIndex, Calendar cal)
1208: throws SQLException {
1209: throw new SQLException("getTimestamp");
1210: }
1211:
1212: /**
1213: * @see java.sql.ResultSet
1214: *
1215: * @exception SQLException on unexpected JDBC error
1216: */
1217: public java.sql.Timestamp getTimestamp(String columnName,
1218: Calendar cal) throws SQLException {
1219: throw new SQLException("getTimestamp");
1220: }
1221:
1222: /*
1223: ** JDBC 3.0 methods
1224: */
1225:
1226: /**
1227: * @see java.sql.ResultSet
1228: *
1229: * @exception SQLException on unexpected JDBC error
1230: */
1231: public URL getURL(int columnIndex) throws SQLException {
1232: throw new SQLException("getURL");
1233: }
1234:
1235: /**
1236: * @see java.sql.ResultSet
1237: *
1238: * @exception SQLException on unexpected JDBC error
1239: */
1240: public URL getURL(String columnName) throws SQLException {
1241: throw new SQLException("getURL");
1242: }
1243:
1244: /**
1245: * @see java.sql.ResultSet
1246: *
1247: * @exception SQLException on unexpected JDBC error
1248: */
1249: public Object getObject(int i, java.util.Map map)
1250: throws SQLException {
1251: throw new SQLException("getObject");
1252: }
1253:
1254: /**
1255: * @see java.sql.ResultSet
1256: *
1257: * @exception SQLException on unexpected JDBC error
1258: */
1259: public Ref getRef(int i) throws SQLException {
1260: throw new SQLException("getRef");
1261: }
1262:
1263: /**
1264: * @see java.sql.ResultSet
1265: *
1266: * @exception SQLException on unexpected JDBC error
1267: */
1268: public Blob getBlob(int i) throws SQLException {
1269: throw new SQLException("getBlob");
1270: }
1271:
1272: /**
1273: * @see java.sql.ResultSet
1274: *
1275: * @exception SQLException on unexpected JDBC error
1276: */
1277: public Clob getClob(int i) throws SQLException {
1278: throw new SQLException("getClob");
1279: }
1280:
1281: /**
1282: * @see java.sql.ResultSet
1283: *
1284: * @exception SQLException on unexpected JDBC error
1285: */
1286: public Array getArray(int i) throws SQLException {
1287: throw new SQLException("getArray");
1288: }
1289:
1290: /**
1291: * @see java.sql.ResultSet
1292: *
1293: * @exception SQLException on unexpected JDBC error
1294: */
1295: public Object getObject(String colName, java.util.Map map)
1296: throws SQLException {
1297: throw new SQLException("getObject");
1298: }
1299:
1300: /**
1301: * @see java.sql.ResultSet
1302: *
1303: * @exception SQLException on unexpected JDBC error
1304: */
1305: public Ref getRef(String colName) throws SQLException {
1306: throw new SQLException("getRef");
1307: }
1308:
1309: /**
1310: * @see java.sql.ResultSet
1311: *
1312: * @exception SQLException on unexpected JDBC error
1313: */
1314: public Blob getBlob(String colName) throws SQLException {
1315: throw new SQLException("getBlob");
1316: }
1317:
1318: /**
1319: * @see java.sql.ResultSet
1320: *
1321: * @exception SQLException on unexpected JDBC error
1322: */
1323: public Clob getClob(String colName) throws SQLException {
1324: throw new SQLException("getClob");
1325: }
1326:
1327: /**
1328: * @see java.sql.ResultSet
1329: *
1330: * @exception SQLException on unexpected JDBC error
1331: */
1332: public Array getArray(String colName) throws SQLException {
1333: throw new SQLException("getArray");
1334: }
1335:
1336: // JDBC 3.0 methods - not implemented
1337:
1338: /**
1339: * @see java.sql.ResultSet
1340: *
1341: * @exception SQLException on unexpected JDBC error
1342: */
1343: public void updateRef(int columnIndex, Ref x) throws SQLException {
1344: throw new SQLException("updateRef");
1345: }
1346:
1347: /**
1348: * @see java.sql.ResultSet
1349: *
1350: * @exception SQLException on unexpected JDBC error
1351: */
1352: public void updateRef(String columnName, Ref x) throws SQLException {
1353: throw new SQLException("updateRef");
1354: }
1355:
1356: /**
1357: * @see java.sql.ResultSet
1358: *
1359: * @exception SQLException on unexpected JDBC error
1360: */
1361: public void updateBlob(int columnIndex, Blob x) throws SQLException {
1362: throw new SQLException("updateBlob");
1363: }
1364:
1365: /**
1366: * @see java.sql.ResultSet
1367: *
1368: * @exception SQLException on unexpected JDBC error
1369: */
1370: public void updateBlob(String columnName, Blob x)
1371: throws SQLException {
1372: throw new SQLException("updateBlob");
1373: }
1374:
1375: /**
1376: * @see java.sql.ResultSet
1377: *
1378: * @exception SQLException on unexpected JDBC error
1379: */
1380: public void updateClob(int columnIndex, Clob x) throws SQLException {
1381: throw new SQLException("updateClob");
1382: }
1383:
1384: /**
1385: * @see java.sql.ResultSet
1386: *
1387: * @exception SQLException on unexpected JDBC error
1388: */
1389: public void updateClob(String columnName, Clob x)
1390: throws SQLException {
1391: throw new SQLException("updateClob");
1392: }
1393:
1394: /**
1395: * @see java.sql.ResultSet
1396: *
1397: * @exception SQLException on unexpected JDBC error
1398: */
1399: public void updateArray(int columnIndex, Array x)
1400: throws SQLException {
1401: throw new SQLException("updateArray");
1402: }
1403:
1404: /**
1405: * @see java.sql.ResultSet
1406: *
1407: * @exception SQLException on unexpected JDBC error
1408: */
1409: public void updateArray(String columnName, Array x)
1410: throws SQLException {
1411: throw new SQLException("updateArray");
1412: }
1413: }
|