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