1 19 20 package org.webdocwf.util.i18njdbc; 21 22 import java.io.ByteArrayInputStream ; 23 import java.io.IOException ; 24 import java.io.InputStream ; 25 import java.io.Reader ; 26 import java.io.StringReader ; 27 import java.math.BigDecimal ; 28 import java.net.URL ; 29 import java.sql.*; 30 import java.util.Calendar ; 31 import java.util.Enumeration ; 32 import java.util.Map ; 33 34 40 public class I18nResultSet implements ResultSet { 41 42 43 protected ResultSetMetaData resultSetMetaData; 44 45 46 protected I18nProperties properties; 47 48 49 protected String tableName; 50 51 52 protected String [] columnNames; 53 54 protected String [] columnTypes; 55 56 protected String [] whereColumnNames; 57 58 protected String [] whereColumnValues; 59 60 61 protected int lastIndexRead = -1; 62 63 64 protected InputStream is; 65 66 protected Enumeration en; 67 68 private String currKey = ""; 69 70 protected I18nConnection connection; 71 72 73 82 protected I18nResultSet(I18nStatement statement, 83 String tableName, 84 String [] columnNames, 85 String [] columnWhereNames, 86 String [] columnWhereValues) throws SQLException { 87 88 try { 89 this.connection = (I18nConnection) statement.getConnection(); 90 } catch (SQLException e) { 91 throw e; 92 } 93 this.tableName = tableName; 94 this.columnNames = columnNames; 95 this.whereColumnNames = columnWhereNames; 96 this.whereColumnValues = columnWhereValues; 97 this.properties = statement.getProperties(); 98 this.en = statement.getProperties().keys(); 99 100 if (columnNames[0].equals("*")) { 101 this.columnNames = this.connection.getColumnNames(); 102 } 103 } 104 113 protected I18nResultSet(I18nPreparedStatement statement, 114 String tableName, 115 String [] columnNames, 116 String [] columnWhereNames, 117 String [] columnWhereValues) throws SQLException { 118 try { 119 this.connection = (I18nConnection) statement.getConnection(); 120 } catch (SQLException e) { 121 throw e; 122 } 123 this.tableName = tableName; 124 this.columnNames = columnNames; 125 this.whereColumnNames = columnWhereNames; 126 this.whereColumnValues = columnWhereValues; 127 this.properties = statement.getProperties(); 128 this.en = statement.getProperties().keys(); 129 130 if (columnNames[0].equals("*")) { 131 this.columnNames = this.connection.getColumnNames(); 132 } 133 } 134 150 public boolean next() throws SQLException { 151 152 boolean retVal = false; 153 mainLoop : while (en.hasMoreElements()) { 154 this.currKey = en.nextElement().toString(); 155 retVal = true; 156 out : for (int i = 0; i < this.whereColumnNames.length; i++) { 157 if (whereColumnValues[i] == null || whereColumnValues[i].equals("null")) 158 whereColumnValues[i] = ""; 159 if (this.whereColumnNames[i].equalsIgnoreCase(this.connection.getNameColumn())) { 160 if (!this.currKey.equals(this.whereColumnValues[i])) { 161 retVal = false; 162 break out; 163 } 164 } else if (this.whereColumnNames[i].equalsIgnoreCase(this.connection.getValueColumn())) { 165 if (!(properties.getProperty(this.currKey).equals(this.whereColumnValues[i]))) { 166 retVal = false; 167 break out; 168 } 169 } 170 } 171 if (retVal == true) 172 return true; 173 } 174 return false; 175 } 176 177 193 public void close() throws SQLException { 194 } 196 197 209 public boolean wasNull() throws SQLException { 210 if (lastIndexRead >= 0) { 211 return getString(lastIndexRead) == null; 212 } else { 213 throw new SQLException("No previous getter method called"); 214 } 215 } 216 217 221 231 public String getString(int columnIndex) throws SQLException { 232 String retValue = ""; 234 preAccessor(columnIndex); 235 if (columnIndex < 1 || columnIndex > columnNames.length) { 236 throw new SQLException("Column not found: invalid index: " + columnIndex); 237 } else if (columnIndex >= 1) { 238 String colName = this.connection.getNameColumn(); 240 String colValue = this.connection.getValueColumn(); 241 String column = columnNames[columnIndex - 1]; 242 if (column.equalsIgnoreCase(colName)) { 243 retValue = this.currKey; 244 } else if (column.equalsIgnoreCase(colValue)) { 245 retValue = properties.getProperty(this.currKey); 246 } 247 248 } 249 return retValue; 250 251 } 252 253 263 public boolean getBoolean(int columnIndex) throws SQLException { 264 String str = getString(columnIndex); 265 return (str == null) ? false : Boolean.valueOf(str).booleanValue(); 266 } 267 268 278 public byte getByte(int columnIndex) throws SQLException { 279 String str = getString(columnIndex); 280 return (str == null) ? 0 : Byte.parseByte(str); 281 } 282 283 293 public short getShort(int columnIndex) throws SQLException { 294 String str = getString(columnIndex); 295 return (str == null) ? 0 : Short.parseShort(str); 296 } 297 298 308 public int getInt(int columnIndex) throws SQLException { 309 String str = getString(columnIndex); 310 return (str == null) ? 0 : Integer.parseInt(str); 311 } 312 313 323 public long getLong(int columnIndex) throws SQLException { 324 String str = getString(columnIndex); 325 return (str == null) ? 0L : Long.parseLong(str); 326 } 327 328 338 public float getFloat(int columnIndex) throws SQLException { 339 String str = getString(columnIndex); 340 return (str == null) ? 0F : Float.parseFloat(str); 341 } 342 343 353 public double getDouble(int columnIndex) throws SQLException { 354 String str = getString(columnIndex); 355 return (str == null) ? 0D : Double.parseDouble(str); 356 } 357 358 370 public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException { 371 return getBigDecimal(columnIndex); 373 } 374 375 386 public byte[] getBytes(int columnIndex) throws SQLException { 387 String str = getString(columnIndex); 388 return (str == null || str.equals("")) ? null : Utils.hexStringToBytes(str); 389 } 390 391 401 public Date getDate(int columnIndex) throws SQLException { 402 String str = getString(columnIndex); 403 return (str == null) ? null : Date.valueOf(str); 404 } 405 406 416 public Time getTime(int columnIndex) throws SQLException { 417 String str = getString(columnIndex); 418 return (str == null) ? null : Time.valueOf(str); 419 } 420 421 431 public Timestamp getTimestamp(int columnIndex) throws SQLException { 432 String str = getString(columnIndex); 433 return (str == null) ? null : Timestamp.valueOf(str); 434 } 435 436 458 public InputStream getAsciiStream(int columnIndex) throws SQLException { 459 String str = getString(columnIndex); 460 is = new ByteArrayInputStream (str.getBytes()); 461 return (str == null) ? null : is; 462 } 463 464 493 public InputStream getUnicodeStream(int columnIndex) throws SQLException { 494 return getAsciiStream(columnIndex); 496 } 497 498 519 public InputStream getBinaryStream(int columnIndex) throws SQLException { 520 return getAsciiStream(columnIndex); 522 } 523 524 528 538 public String getString(String columnName) throws SQLException { 539 preAccessor(columnName); 541 String colName = this.connection.getNameColumn(); 542 String colValue = this.connection.getValueColumn(); 543 String retValue = ""; 544 if (columnName.equalsIgnoreCase(colName)) { 545 retValue = this.currKey; 546 } else if (columnName.equalsIgnoreCase(colValue)) { 547 retValue = properties.getProperty(this.currKey); 548 } 549 return retValue; 550 } 551 552 562 public boolean getBoolean(String columnName) throws SQLException { 563 String str = getString(columnName); 564 return (str == null) ? false : Boolean.valueOf(str).booleanValue(); 565 } 566 567 577 public byte getByte(String columnName) throws SQLException { 578 String str = getString(columnName); 579 return (str == null) ? 0 : Byte.parseByte(str); 580 } 581 582 592 public short getShort(String columnName) throws SQLException { 593 String str = getString(columnName); 594 return (str == null) ? 0 : Short.parseShort(str); 595 } 596 597 607 public int getInt(String columnName) throws SQLException { 608 String str = getString(columnName); 609 return (str == null) ? 0 : Integer.parseInt(str); 610 } 611 612 622 public long getLong(String columnName) throws SQLException { 623 String str = getString(columnName); 624 return (str == null) ? 0L : Long.parseLong(str); 625 } 626 627 637 public float getFloat(String columnName) throws SQLException { 638 String str = getString(columnName); 639 return (str == null) ? 0F : Float.parseFloat(str); 640 } 641 642 652 public double getDouble(String columnName) throws SQLException { 653 String str = getString(columnName); 654 return (str == null) ? 0D : Double.parseDouble(str); 655 } 656 657 669 public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException { 670 return getBigDecimal(columnName); 672 } 673 674 685 public byte[] getBytes(String columnName) throws SQLException { 686 String str = getString(columnName); 687 return (str == null) ? null : Utils.hexStringToBytes(str); 688 } 689 690 700 public Date getDate(String columnName) throws SQLException { 701 String str = getString(columnName); 702 return (str == null) ? null : Date.valueOf(str); 703 } 704 705 716 public Time getTime(String columnName) throws SQLException { 717 String str = getString(columnName); 718 return (str == null) ? null : Time.valueOf(str); 719 } 720 721 731 public Timestamp getTimestamp(String columnName) throws SQLException { 732 String str = getString(columnName); 733 return (str == null) ? null : Timestamp.valueOf(str); 734 } 735 736 758 public InputStream getAsciiStream(String columnName) throws SQLException { 759 String str = getString(columnName); 760 is = new ByteArrayInputStream (str.getBytes()); 761 return (str == null) ? null : is; 762 } 763 764 791 public InputStream getUnicodeStream(String columnName) throws SQLException { 792 return getAsciiStream(columnName); 794 } 795 796 817 public InputStream getBinaryStream(String columnName) throws SQLException { 818 return getAsciiStream(columnName); 820 } 821 822 826 849 public SQLWarning getWarnings() throws SQLException { 850 throw new UnsupportedOperationException ("ResultSet.getWarnings() unsupported"); 851 } 852 853 861 public void clearWarnings() throws SQLException { 862 throw new UnsupportedOperationException ("ResultSet.clearWarnings() unsupported"); 863 } 864 865 888 public String getCursorName() throws SQLException { 889 throw new UnsupportedOperationException ("ResultSet.getCursorName() unsupported"); 890 } 891 892 899 public ResultSetMetaData getMetaData() throws SQLException { 900 if (resultSetMetaData == null) { 901 resultSetMetaData = new I18nResultSetMetaData(tableName, columnNames, columnTypes); 902 } 903 return resultSetMetaData; 904 } 905 906 932 public Object getObject(int columnIndex) throws SQLException { 933 return getString(columnIndex); 936 } 937 963 public Object getObject(String columnName) throws SQLException { 964 return getString(columnName); 965 } 966 967 976 public int findColumn(String columnName) throws SQLException { 977 int index = -1; 978 for (int i = 0; i < this.columnNames.length; i++) { 979 if (this.columnNames[i].equalsIgnoreCase(columnName)) { 980 index = i + 1; 981 break; 982 } 983 } 984 if (index == -1) 985 throw new SQLException("Column " + columnName + " does not exist in result set!"); 986 return index; 987 } 988 989 991 995 1006 public Reader getCharacterStream(int columnIndex) throws SQLException { 1007 String str = getString(columnIndex); 1008 return (str == null) ? null : new StringReader (str); 1009 } 1010 1011 1022 public Reader getCharacterStream(String columnName) throws SQLException { 1023 String str = getString(columnName); 1024 return (str == null) ? null : new StringReader (str); 1025 } 1026 1027 1038 public BigDecimal getBigDecimal(int columnIndex) throws SQLException { 1039 BigDecimal retval = null; 1040 String str = getString(columnIndex); 1041 if (str != null) { 1042 try { 1043 retval = new BigDecimal (str); 1044 } catch (NumberFormatException e) { 1045 throw new SQLException("Could not convert '" + str + "' to " + "a java.math.BigDecimal object"); 1046 } 1047 } 1048 return retval; 1049 } 1050 1051 1062 public BigDecimal getBigDecimal(String columnName) throws SQLException { 1063 BigDecimal retval = null; 1064 String str = getString(columnName); 1065 if (str != null) { 1066 try { 1067 retval = new BigDecimal (str); 1068 } catch (NumberFormatException e) { 1069 throw new SQLException("Could not convert '" + str + "' to " + "a java.math.BigDecimal object"); 1070 } 1071 } 1072 return retval; 1073 } 1074 1075 1079 1088 public boolean isBeforeFirst() throws SQLException { 1089 throw new UnsupportedOperationException ("ResultSet.isBeforeFirst() unsupported"); 1090 } 1091 1092 1101 public boolean isAfterLast() throws SQLException { 1102 throw new UnsupportedOperationException ("ResultSet.isAfterLast() unsupported"); 1103 } 1104 1105 1113 public boolean isFirst() throws SQLException { 1114 throw new UnsupportedOperationException ("ResultSet.isFirst() unsupported"); 1115 } 1116 1117 1129 public boolean isLast() throws SQLException { 1130 throw new UnsupportedOperationException ("ResultSet.isLast() unsupported"); 1131 } 1132 1133 1141 public void beforeFirst() throws SQLException { 1142 throw new UnsupportedOperationException ("ResultSet.beforeFirst() unsupported"); 1143 } 1144 1145 1152 public void afterLast() throws SQLException { 1153 throw new UnsupportedOperationException ("ResultSet.afterLast() unsupported"); 1154 } 1155 1156 1165 public boolean first() throws SQLException { 1166 throw new UnsupportedOperationException ("ResultSet.first() unsupported"); 1167 } 1168 1169 1178 public boolean last() throws SQLException { 1179 throw new UnsupportedOperationException ("ResultSet.last() unsupported"); 1180 } 1181 1182 1189 public int getRow() throws SQLException { 1190 throw new UnsupportedOperationException ("ResultSet.getRow() unsupported"); 1191 } 1192 1193 1226 public boolean absolute(int row) throws SQLException { 1227 throw new UnsupportedOperationException ("ResultSet.absolute() unsupported"); 1228 } 1229 1230 1251 public boolean relative(int rows) throws SQLException { 1252 throw new UnsupportedOperationException ("ResultSet.relative() unsupported"); 1253 } 1254 1255 1264 public boolean previous() throws SQLException { 1265 throw new UnsupportedOperationException ("ResultSet.previous() unsupported"); 1266 } 1267 1268 1272 1287 public void setFetchDirection(int direction) throws SQLException { 1288 throw new UnsupportedOperationException ("ResultSet.setFetchDirection(int) unsupported"); 1289 } 1290 1291 1300 public int getFetchDirection() throws SQLException { 1301 throw new UnsupportedOperationException ("ResultSet.getFetchDirection() unsupported"); 1302 } 1303 1304 1317 public void setFetchSize(int rows) throws SQLException { 1318 throw new UnsupportedOperationException ("ResultSet.setFetchSize(int) unsupported"); 1319 } 1320 1321 1329 public int getFetchSize() throws SQLException { 1330 throw new UnsupportedOperationException ("ResultSet.getFetchSize() unsupported"); 1331 } 1332 1333 1343 public int getType() throws SQLException { 1344 throw new UnsupportedOperationException ("ResultSet.getType() unsupported"); 1345 } 1346 1347 1357 public int getConcurrency() throws SQLException { 1358 return CONCUR_READ_ONLY; 1359 } 1360 1361 1365 1374 public boolean rowUpdated() throws SQLException { 1375 throw new UnsupportedOperationException ("ResultSet.rowUpdated() unsupported"); 1376 } 1377 1378 1389 public boolean rowInserted() throws SQLException { 1390 throw new UnsupportedOperationException ("ResultSet.rowInserted() unsupported"); 1391 } 1392 1393 1405 public boolean rowDeleted() throws SQLException { 1406 throw new UnsupportedOperationException ("ResultSet.rowDeleted() unsupported"); 1407 } 1408 1409 1420 public void updateNull(int columnIndex) throws SQLException { 1421 throw new UnsupportedOperationException ("ResultSet.updateNull() unsupported"); 1422 } 1423 1424 1435 public void updateBoolean(int columnIndex, boolean x) throws SQLException { 1436 throw new UnsupportedOperationException ("ResultSet.updateBoolean() unsupported"); 1437 } 1438 1439 1451 public void updateByte(int columnIndex, byte x) throws SQLException { 1452 throw new UnsupportedOperationException ("ResultSet.updateByte() unsupported"); 1453 } 1454 1455 1466 public void updateShort(int columnIndex, short x) throws SQLException { 1467 throw new UnsupportedOperationException ("ResultSet.updateShort() unsupported"); 1468 } 1469 1470 1481 public void updateInt(int columnIndex, int x) throws SQLException { 1482 throw new UnsupportedOperationException ("ResultSet.updateInt() unsupported"); 1483 } 1484 1485 1496 public void updateLong(int columnIndex, long x) throws SQLException { 1497 throw new UnsupportedOperationException ("ResultSet.updateLong(int, long) unsupported"); 1498 } 1499 1500 1511 public void updateFloat(int columnIndex, float x) throws SQLException { 1512 throw new UnsupportedOperationException ("ResultSet.updateFloat(int, float) unsupported"); 1513 } 1514 1515 1526 public void updateDouble(int columnIndex, double x) throws SQLException { 1527 throw new UnsupportedOperationException ("ResultSet.updateDouble(int, double) unsupported"); 1528 } 1529 1530 1542 public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException { 1543 throw new UnsupportedOperationException ("ResultSet.updateBigDecimal(int, BigDecimal) unsupported"); 1544 } 1545 1546 1557 public void updateString(int columnIndex, String x) throws SQLException { 1558 throw new UnsupportedOperationException ("ResultSet.updateString(int, String) unsupported"); 1559 } 1560 1561 1572 public void updateBytes(int columnIndex, byte[] x) throws SQLException { 1573 throw new UnsupportedOperationException ("ResultSet.updateBytes(int, byte[]) unsupported"); 1574 } 1575 1576 1587 public void updateDate(int columnIndex, Date x) throws SQLException { 1588 throw new UnsupportedOperationException ("ResultSet.updateDate(int, Date) unsupported"); 1589 } 1590 1591 1602 public void updateTime(int columnIndex, Time x) throws SQLException { 1603 throw new UnsupportedOperationException ("ResultSet.updateTime(int, Time) unsupported"); 1604 } 1605 1606 1618 public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException { 1619 throw new UnsupportedOperationException ("ResultSet.updateTimestamp(int, Timestamp) unsupported"); 1620 } 1621 1622 1634 public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException { 1635 throw new UnsupportedOperationException ("ResultSet.updateAsciiStream " + "(int, InputStream, int) unsupported"); 1636 } 1637 1638 1650 public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException { 1651 throw new UnsupportedOperationException ("ResultSet.updateBinaryStream" + "(int, InputStream, int) unsupported"); 1652 } 1653 1654 1666 public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException { 1667 throw new UnsupportedOperationException ("ResultSet.updateCharacterStr" + "eam(int, Reader, int) unsupported"); 1668 } 1669 1670 1685 public void updateObject(int columnIndex, Object x, int scale) throws SQLException { 1686 throw new UnsupportedOperationException ("ResultSet.udpateObject(int, Object) unsupported"); 1687 } 1688 1689 1700 public void updateObject(int columnIndex, Object x) throws SQLException { 1701 throw new UnsupportedOperationException ("ResultSet.updateObject(int, Object, int) unsupported"); 1702 } 1703 1704 1714 public void updateNull(String columnName) throws SQLException { 1715 throw new UnsupportedOperationException ("ResultSet.updateNull(String) unsupported"); 1716 } 1717 1718 1729 public void updateBoolean(String columnName, boolean x) throws SQLException { 1730 throw new UnsupportedOperationException ("ResultSet.updateBoolean(String, boolean) unsupported"); 1731 } 1732 1733 1744 public void updateByte(String columnName, byte x) throws SQLException { 1745 throw new UnsupportedOperationException ("ResultSet.updateByte(String, byte) unsupported"); 1746 } 1747 1748 1759 public void updateShort(String columnName, short x) throws SQLException { 1760 throw new UnsupportedOperationException ("ResultSet.updateShort(String, short) unsupported"); 1761 } 1762 1763 1774 public void updateInt(String columnName, int x) throws SQLException { 1775 throw new UnsupportedOperationException ("ResultSet.updateInt(String, int) unsupported"); 1776 } 1777 1778 1789 public void updateLong(String columnName, long x) throws SQLException { 1790 throw new UnsupportedOperationException ("ResultSet.updateLong(String, long) unsupported"); 1791 } 1792 1793 1804 public void updateFloat(String columnName, float x) throws SQLException { 1805 throw new UnsupportedOperationException ("ResultSet.updateFloat(String, float) unsupported"); 1806 } 1807 1808 1819 public void updateDouble(String columnName, double x) throws SQLException { 1820 throw new UnsupportedOperationException ("ResultSet.updateDouble(String, double) unsupported"); 1821 } 1822 1823 1835 public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException { 1836 throw new UnsupportedOperationException ("ResultSet.updateBigDecimal(String, BigDecimal) unsupported"); 1837 } 1838 1839 1850 public void updateString(String columnName, String x) throws SQLException { 1851 throw new UnsupportedOperationException ("ResultSet.updateString(String, String) unsupported"); 1852 } 1853 1854 1866 public void updateBytes(String columnName, byte[] x) throws SQLException { 1867 throw new UnsupportedOperationException ("ResultSet.updateBytes(String, byte[]) unsupported"); 1868 } 1869 1870 1881 public void updateDate(String columnName, Date x) throws SQLException { 1882 throw new UnsupportedOperationException ("ResultSet.updateDate(String, Date) unsupported"); 1883 } 1884 1885 1896 public void updateTime(String columnName, Time x) throws SQLException { 1897 throw new UnsupportedOperationException ("ResultSet.updateTime(String, Time) unsupported"); 1898 } 1899 1900 1912 public void updateTimestamp(String columnName, Timestamp x) throws SQLException { 1913 throw new UnsupportedOperationException ("ResultSet.updateTimestamp(String, Timestamp) unsupported"); 1914 } 1915 1916 1928 public void updateAsciiStream(String columnName, InputStream x, int length) throws SQLException { 1929 throw new UnsupportedOperationException ("ResultSet.updateAsciiStream" + "(String, InputStream, int) unsupported"); 1930 } 1931 1932 1944 public void updateBinaryStream(String columnName, InputStream x, int length) throws SQLException { 1945 throw new UnsupportedOperationException ("ResultSet.updateBinaryStream" + "(String, InputStream, int) unsupported"); 1946 } 1947 1948 1961 public void updateCharacterStream(String columnName, Reader reader, int length) throws SQLException { 1962 throw new UnsupportedOperationException ("ResultSet.updateCharacterStr" + "eam(String, Reader, int) unsupported"); 1963 } 1964 1965 1980 public void updateObject(String columnName, Object x, int scale) throws SQLException { 1981 throw new UnsupportedOperationException ("ResultSet.updateObject(String, Object, int) unsupported"); 1982 } 1983 1984 1995 public void updateObject(String columnName, Object x) throws SQLException { 1996 throw new UnsupportedOperationException ("ResultSet.updateObject(String, Object) unsupported"); 1997 } 1998 1999 2009 public void insertRow() throws SQLException { 2010 throw new UnsupportedOperationException ("ResultSet.insertRow() unsupported"); 2011 } 2012 2013 2021 public void updateRow() throws SQLException { 2022 throw new UnsupportedOperationException ("ResultSet.updateRow() unsupported"); 2023 } 2024 2025 2033 public void deleteRow() throws SQLException { 2034 throw new UnsupportedOperationException ("ResultSet.deleteRow() unsupported"); 2035 } 2036 2037 2061 public void refreshRow() throws SQLException { 2062 throw new UnsupportedOperationException ("ResultSet.refreshRow() unsupported"); 2063 } 2064 2065 2079 public void cancelRowUpdates() throws SQLException { 2080 throw new UnsupportedOperationException ("ResultSet.cancelRowUpdates() unsupported"); 2081 } 2082 2083 2103 public void moveToInsertRow() throws SQLException { 2104 throw new UnsupportedOperationException ("ResultSet.moveToInsertRow() unsupported"); 2105 } 2106 2107 2115 public void moveToCurrentRow() throws SQLException { 2116 throw new UnsupportedOperationException ("ResultSet.moveToeCurrentRow() unsupported"); 2117 } 2118 2119 2131 public Statement getStatement() throws SQLException { 2132 throw new SQLException("Not implemented!"); 2133 } 2134 2135 2152 public Object getObject(int i, Map map) throws SQLException { 2153 throw new UnsupportedOperationException ("ResultSet.getObject(int, Map) unsupported"); 2154 } 2155 2156 2166 public Ref getRef(int i) throws SQLException { 2167 throw new UnsupportedOperationException ("ResultSet.getRef(int) unsupported"); 2168 } 2169 2170 2180 public Blob getBlob(int i) throws SQLException { 2181 throw new UnsupportedOperationException ("ResultSet.getBlob(int) unsupported"); 2182 } 2183 2184 2194 public Clob getClob(int i) throws SQLException { 2195 throw new UnsupportedOperationException ("ResultSet.getClob(int) unsupported"); 2196 } 2197 2198 2208 public Array getArray(int i) throws SQLException { 2209 throw new UnsupportedOperationException ("ResultSet.getArray(int) unsupported"); 2210 } 2211 2212 2228 public Object getObject(String colName, Map map) throws SQLException { 2229 throw new UnsupportedOperationException ("ResultSet.getObject(String, Map) unsupported"); 2230 } 2231 2232 2242 public Ref getRef(String colName) throws SQLException { 2243 throw new UnsupportedOperationException ("ResultSet.getRef(String) unsupported"); 2244 } 2245 2246 2256 public Blob getBlob(String colName) throws SQLException { 2257 throw new UnsupportedOperationException ("ResultSet.getBlob(String) unsupported"); 2258 } 2259 2260 2270 public Clob getClob(String colName) throws SQLException { 2271 throw new UnsupportedOperationException ("ResultSet.getClob(String) unsupported"); 2272 } 2273 2274 2284 public Array getArray(String colName) throws SQLException { 2285 throw new UnsupportedOperationException ("ResultSet.getArray(String) unsupported"); 2286 } 2287 2288 2304 public Date getDate(int columnIndex, Calendar cal) throws SQLException { 2305 throw new UnsupportedOperationException ("ResultSet.getDate(int, Calendar) unsupported"); 2306 } 2307 2308 2325 public Date getDate(String columnName, Calendar cal) throws SQLException { 2326 throw new UnsupportedOperationException ("ResultSet.getDate(String, Calendar) unsupported"); 2327 } 2328 2329 2345 public Time getTime(int columnIndex, Calendar cal) throws SQLException { 2346 throw new UnsupportedOperationException ("ResultSet.getTime(int, Calendar) unsupported"); 2347 } 2348 2349 2365 public Time getTime(String columnName, Calendar cal) throws SQLException { 2366 throw new UnsupportedOperationException ("ResultSet.getTime(String, Calendar) unsupported"); 2367 } 2368 2369 2385 public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException { 2386 throw new UnsupportedOperationException ("ResultSet.getTimestamp(int, Calendar) unsupported"); 2387 } 2388 2389 2405 public Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException { 2406 throw new UnsupportedOperationException ("ResultSet.getTimestamp(String, Calendar) unsupported"); 2407 } 2408 2409 2413 2418 private void preAccessor(int columnIndex) throws SQLException { 2419 lastIndexRead = columnIndex; 2421 if (is != null) { 2423 try { 2424 is.close(); 2425 } catch (IOException e) { 2426 throw new SQLException("Could not close InputStream: " + e); 2427 } 2428 is = null; 2429 } 2430 } 2431 2432 2437 private void preAccessor(String columnName) throws SQLException { 2438 for (int i = 0; i < columnNames.length; i++) { 2440 if (columnName.equalsIgnoreCase(columnNames[i])) { 2441 preAccessor(i + 1); 2442 } 2443 } 2444 } 2445 2446 2450 public URL getURL(int columnIndex) throws SQLException { 2451 throw new UnsupportedOperationException ("ResultSet.getURL(int) unsupported"); 2452 } 2453 2454 public URL getURL(String columnName) throws SQLException { 2455 throw new UnsupportedOperationException ("ResultSet.getURL(String) unsupported"); 2456 } 2457 2458 public void updateRef(int columnIndex, Ref x) throws SQLException { 2459 throw new UnsupportedOperationException ("ResultSet.updateRef(int,java.sql.Ref) unsupported"); 2460 } 2461 2462 public void updateRef(String columnName, Ref x) throws SQLException { 2463 throw new UnsupportedOperationException ("ResultSet.updateRef(String,java.sql.Ref) unsupported"); 2464 } 2465 2466 public void updateBlob(int columnIndex, Blob x) throws SQLException { 2467 throw new UnsupportedOperationException ("ResultSet.updateBlob(int,java.sql.Blob) unsupported"); 2468 } 2469 2470 public void updateBlob(String columnName, Blob x) throws SQLException { 2471 throw new UnsupportedOperationException ("ResultSet.updateBlob(String,java.sql.Blob) unsupported"); 2472 } 2473 2474 public void updateClob(int columnIndex, Clob x) throws SQLException { 2475 throw new UnsupportedOperationException ("ResultSet.updateClob(int,java.sql.Clob) unsupported"); 2476 } 2477 2478 public void updateClob(String columnName, Clob x) throws SQLException { 2479 throw new UnsupportedOperationException ("ResultSet.updateClob(String,java.sql.Clob) unsupported"); 2480 } 2481 2482 public void updateArray(int columnIndex, Array x) throws SQLException { 2483 throw new UnsupportedOperationException ("ResultSet.updateArray(int,java.sql.Array) unsupported"); 2484 } 2485 2486 public void updateArray(String columnName, Array x) throws SQLException { 2487 throw new UnsupportedOperationException ("ResultSet.updateArray(String,java.sql.Array) unsupported"); 2488 } 2489 2490 2506} 2507 | Popular Tags |