0001: /* Copyright (c) 2001-2005, The HSQL Development Group
0002: * All rights reserved.
0003: *
0004: * Redistribution and use in source and binary forms, with or without
0005: * modification, are permitted provided that the following conditions are met:
0006: *
0007: * Redistributions of source code must retain the above copyright notice, this
0008: * list of conditions and the following disclaimer.
0009: *
0010: * Redistributions in binary form must reproduce the above copyright notice,
0011: * this list of conditions and the following disclaimer in the documentation
0012: * and/or other materials provided with the distribution.
0013: *
0014: * Neither the name of the HSQL Development Group nor the names of its
0015: * contributors may be used to endorse or promote products derived from this
0016: * software without specific prior written permission.
0017: *
0018: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
0019: * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
0020: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
0021: * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG,
0022: * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
0023: * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
0024: * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
0025: * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
0026: * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0027: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
0028: * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0029: */
0030:
0031: package org.hsqldb.jdbc;
0032:
0033: import java.math.BigDecimal;
0034: import java.sql.CallableStatement;
0035: import java.sql.Date;
0036: import java.sql.Time;
0037: import java.sql.Timestamp;
0038: import java.sql.SQLException;
0039: import java.util.Calendar;
0040:
0041: //#ifdef JAVA2
0042: import java.sql.Array;
0043: import java.sql.Blob;
0044: import java.sql.Clob;
0045: import java.sql.Ref;
0046: import java.util.Map;
0047:
0048: //#endif JAVA2
0049: import org.hsqldb.HsqlException;
0050: import org.hsqldb.Trace;
0051: import org.hsqldb.lib.IntValueHashMap;
0052:
0053: // boucherb@users patch 1.7.2 - CallableStatement impl removed
0054: // from jdbcPreparedStatement and moved here; sundry changes elsewhere to
0055: // comply
0056: // TODO: 1.7.2 Alpha N :: DONE
0057: // maybe implement set-by-parameter-name. We have an informal spec,
0058: // being "@p1" => 1, "@p2" => 2, etc. Problems: return value is "@p0"
0059: // and there is no support for registering the return value as an out
0060: // parameter.
0061: // TODO: 1.8.x
0062: // engine and client-side mechanisms for adding, retrieving,
0063: // navigating (and perhaps controlling holdability of) multiple
0064: // results generated from a single execution.
0065: // boucherb@users 2004-03/04-xx - patch 1.7.2 - some minor code cleanup
0066: // - parameter map NPE correction
0067: // - embedded SQL/SQLCLI client usability
0068: // (parameter naming changed from @n to @pn)
0069: // boucherb@users 2004-04-xx - doc 1.7.2 - javadocs added/updated
0070:
0071: /**
0072: * <!-- start generic documentation -->
0073: *
0074: * The interface used to execute SQL stored procedures. The JDBC API
0075: * provides a stored procedure SQL escape syntax that allows stored
0076: * procedures to be called in a standard way for all RDBMSs. This escape
0077: * syntax has one form that includes a result parameter and one that does
0078: * not. If used, the result parameter must be registered as an OUT parameter.
0079: * The other parameters can be used for input, output or both. Parameters
0080: * are referred to sequentially, by number, with the first parameter being 1.
0081: * <PRE>
0082: * {?= call <procedure-name>[<arg1>,<arg2>, ...]}
0083: * {call <procedure-name>[<arg1>,<arg2>, ...]}
0084: * </PRE>
0085: * <P>
0086: * IN parameter values are set using the <code>set</code> methods inherited from
0087: * {@link PreparedStatement}. The type of all OUT parameters must be
0088: * registered prior to executing the stored procedure; their values
0089: * are retrieved after execution via the <code>get</code> methods provided here.
0090: * <P>
0091: * A <code>CallableStatement</code> can return one {@link ResultSet} object or
0092: * multiple <code>ResultSet</code> objects. Multiple
0093: * <code>ResultSet</code> objects are handled using operations
0094: * inherited from {@link Statement}.
0095: * <P>
0096: * For maximum portability, a call's <code>ResultSet</code> objects and
0097: * update counts should be processed prior to getting the values of output
0098: * parameters.
0099: * <P>
0100: * <!-- end generic documentation -->
0101: * <!-- start Release-specific documentation -->
0102: * <div class="ReleaseSpecificDocumentation">
0103: * <h3>HSQLDB-Specific Information:</h3> <p>
0104: *
0105: * Since 1.7.2, the JDBC CallableStatement interface implementation has been
0106: * broken out of the jdbcPreparedStatement class into this one. <p>
0107: *
0108: * With 1.7.2, some of the previously unsupported features of this interface
0109: * are now supported, such as the parameterName-based setter methods. <p>
0110: *
0111: * More importantly, jdbcCallableStatement objects are now backed by a true
0112: * compiled parameteric representation. Hence, there are now significant
0113: * performance gains to be had by using a CallableStatement object instead of
0114: * a Statement object, if a short-running CALL statement is to be executed more
0115: * than a small number of times. Moreover, the recent work lays the foundation
0116: * for work in a subsequenct release to support CallableStatement OUT and
0117: * IN OUT style parameters, as well as the generation and retrieval of multiple
0118: * results in response to the execution of a CallableStatement object. <p>
0119: *
0120: * For a more in-depth discussion of performance issues regarding 1.7.2
0121: * prepared and callable statement objects, please see overview section of
0122: * {@link jdbcPreparedStatement jdbcPreparedStatment}.
0123: *
0124: * <hr>
0125: *
0126: * As with many DBMS, HSQLDB support for stored procedures is not provided in
0127: * a completely standard fashion. <p>
0128: *
0129: * Beyond the XOpen/ODBC extended scalar functions, stored procedures are
0130: * typically supported in ways that vary greatly from one DBMS implementation
0131: * to the next. So, it is almost guaranteed that the code for a stored
0132: * procedure written under a specific DBMS product will not work without
0133: * at least some modification in the context of another vendor's product
0134: * or even across a single vendor's product lines. Moving stored procedures
0135: * from one DBMS product line to another almost invariably involves complex
0136: * porting issues and often may not be possible at all. <em>Be warned</em>. <p>
0137: *
0138: * At present, HSQLDB stored procedures map directly onto the methods of
0139: * compiled Java classes found on the classpath of the engine at runtime. This
0140: * is done in a non-standard but fairly efficient way by issuing a class
0141: * grant (and possibly method aliases) of the form: <p>
0142: *
0143: * <PRE class="SqlCodeExample">
0144: * GRANT ALL ON CLASS "package.class" TO [<user-name> | PUBLIC]
0145: * CREATE ALIAS <call-alias> FOR "package.class.method" -- optional
0146: * </PRE>
0147: *
0148: * This has the effect of allowing the specified user(s) to access the
0149: * set of uniquely named public static methods of the specified class,
0150: * in either the role of SQL functions or stored procedures.
0151:
0152: * For example: <p>
0153: *
0154: * <PRE class="SqlCodeExample">
0155: * CONNECT <admin-user> PASSWORD <admin-user-password>;
0156: * GRANT ALL ON CLASS "org.myorg.MyClass" TO PUBLIC;
0157: * CREATE ALIAS sp_my_method FOR "org.myorg.MyClass.myMethod"
0158: * CONNECT <any-user> PASSWORD <any-user-password>;
0159: * SELECT "org.myorg.MyClass.myMethod"(column_1) FROM table_1;
0160: * SELECT sp_my_method(column_1) FROM table_1;
0161: * CALL 2 + "org.myorg.MyClass.myMethod"(-5);
0162: * CALL 2 + sp_my_method(-5);
0163: * </PRE>
0164: *
0165: * Please note the use of the term "uniquely named" above. Including
0166: * 1.7.2, no support is provided to deterministically resolve overloaded
0167: * method names, and there can be issues with inherited methods as well;
0168: * currently, it is strongly recommended that developers creating stored
0169: * procedure library classes for HSQLDB simply avoid designs such that SQL
0170: * stored procedure calls attempt to resolve to: <p>
0171: *
0172: * <ol>
0173: * <li>inherited public static methods
0174: * <li>overloaded public static methods
0175: * </ol>
0176: *
0177: * Also, please note that <code>OUT</code> and <code>IN OUT</code> parameters
0178: * are not yet supported due to some unresolved low level support issues. <p>
0179: *
0180: * Including 1.7.2, the HSQLDB stored procedure call mechanism is essentially a
0181: * thin wrap of the HSQLDB SQL function call mechanism, extended to include the
0182: * more general HSQLDB SQL expression evaluation mechanism. In addition to
0183: * stored procedure calls that resolve directly to Java method invocations, the
0184: * extention provides the ability to evaluate simple SQL expressions, possibly
0185: * containing Java method invocations, outside any <code>INSERT</code>,
0186: * <code>UPDATE</code>, <code>DELETE</code> or <code>SELECT</code> statement
0187: * context. <p>
0188: *
0189: * With HSQLDB, executing a <code>CALL</code> statement that produces an opaque
0190: * (OTHER) or known scalar object reference has virtually the same effect as:
0191: *
0192: * <PRE class="SqlCodeExample">
0193: * CREATE TABLE DUAL (dummy VARCHAR);
0194: * INSERT INTO DUAL VALUES(NULL);
0195: * SELECT <simple-expression> FROM DUAL;
0196: * </PRE>
0197: *
0198: * As a transitional measure, HSQLDB provides the ability to materialize a
0199: * general result set in response to stored procedure execution. In this case,
0200: * the stored procedure's Java method descriptor must specify a return type of
0201: * java.lang.Object for external use (although at any point in the devlopment
0202: * cycle, other, proprietary return types may accepted internally for engine
0203: * development purposes).
0204:
0205: * When HSQLDB detects that the runtime class of the resulting Object is
0206: * elligible, an automatic internal unwrapping is performed to correctly
0207: * expose the underlying result set to the client, whether local or remote. <p>
0208: *
0209: * Additionally, HSQLDB automatically detects if java.sql.Connection is
0210: * the class of the first argument of any underlying Java method(s). If so,
0211: * then the engine transparently supplies the internal Connection object
0212: * corresponding to the Session executing the call, adjusting the positions
0213: * of other arguments to suite the SQL context. <p>
0214: *
0215: * The features above are not intended to be permanent. Rather, the intention
0216: * is to offer more general and powerful mechanisms in a future release;
0217: * it is recommend to use them only as a temporary convenience. <p>
0218: *
0219: * For instance, one might be well advised to future-proof by writing
0220: * HSQLDB-specific adapter methods that in turn call the real logic of an
0221: * underlying generalized JDBC stored procedure library. <p>
0222: *
0223: * Here is a very simple example of an HSQLDB stored procedure generating a
0224: * user-defined result set:
0225: *
0226: * <pre class="JavaCodeExample">
0227: * <span class="JavaKeyWord">package</span> mypackage;
0228: *
0229: * <span class="JavaKeyWord">class</span> MyClass {
0230: *
0231: * <span class="JavaKeyWord">public static</span> Object <b>mySp</b>(Connection conn) <span class="JavaKeyWord">throws</span> SQLException {
0232: * <span class="JavaKeyWord">return</span> conn.<b>createStatement</b>().<b>executeQuery</b>(<span class="JavaStringLiteral">"select * from my_table"</span>);
0233: * }
0234: * }
0235: * </pre>
0236: *
0237: * Here is a refinement demonstrating no more than the bare essence of the idea
0238: * behind a more portable style:
0239: *
0240: * <pre class="JavaCodeExample">
0241: * <span class="JavaKeyWord">package</span> mypackage;
0242: *
0243: * <span class="JavaKeyWord">import</span> java.sql.ResultSet;
0244: * <span class="JavaKeyWord">import</span> java.sql.SQLException;
0245: *
0246: * <span class="JavaKeyWord">class</span> MyLibraryClass {
0247: *
0248: * <span class="JavaKeyWord">public static</span> ResultSet <b>mySp()</b> <span class="JavaKeyWord">throws</span> SQLException {
0249: * <span class="JavaKeyWord">return</span> ctx.<b>getConnection</b>().<b>createStatement</b>().<b>executeQuery</b>(<span class="JavaStringLiteral">"select * from my_table"</span>);
0250: * }
0251: * }
0252: *
0253: * //--
0254: *
0255: * <span class="JavaKeyWord">package</span> myadaptorpackage;
0256: *
0257: * <span class="JavaKeyWord">import</span> java.sql.Connection;
0258: * <span class="JavaKeyWord">import</span> java.sql.SQLException;
0259: *
0260: * <span class="JavaKeyWord">class</span> MyAdaptorClass {
0261: *
0262: * <span class="JavaKeyWord">public static</span> Object <b>mySp</b>(Connection conn) <span class="JavaKeyWord">throws</span> SQLException {
0263: * MyLibraryClass.<b>getCtx()</b>.<b>setConnection</b>(conn);
0264: * <span class="JavaKeyWord">return</span> MyLibraryClass.<b>mySp</b>();
0265: * }
0266: * }
0267: * </pre>
0268: *
0269: * In a future release, it is intended to provided some new features
0270: * that will support writing fairly portable JDBC-based stored procedure
0271: * code: <P>
0272: *
0273: * <ul>
0274: * <li> Support for the <span class="JavaStringLiteral">"jdbc:default:connection"</span>
0275: * standard database connection url. <p>
0276: *
0277: * <li> A well-defined specification of the behaviour of the HSQLDB execution
0278: * stack under stored procedure calls. <p>
0279: *
0280: * <li> A well-defined, pure JDBC specification for generating multiple
0281: * results from HSQLDB stored procedures for client retrieval.
0282: * </ul>
0283: *
0284: * (boucherb@users)
0285: * </div>
0286: * <!-- end Release-specific documentation -->
0287: *
0288: * @author boucherb@users
0289: * @version 1.7.2
0290: * @since 1.7.2
0291: * @see jdbcConnection#prepareCall
0292: * @see jdbcResultSet
0293: */
0294: public class jdbcCallableStatement extends jdbcPreparedStatement
0295: implements CallableStatement {
0296:
0297: /** parameter name => parameter index */
0298: private IntValueHashMap parameterNameMap;
0299:
0300: /** parameter index => registered OUT type */
0301:
0302: // private IntKeyIntValueHashMap outRegistrationMap;
0303: /**
0304: * Constructs a new jdbcCallableStatement with the specified connection and
0305: * result type.
0306: *
0307: * @param c the connection on which this statement will execute
0308: * @param sql the SQL statement this object represents
0309: * @param type the type of result this statement will produce
0310: * @throws HsqlException if the statement is not accepted by the database
0311: * @throws SQLException if preprocessing by driver fails
0312: */
0313: public jdbcCallableStatement(jdbcConnection c, String sql, int type)
0314: throws HsqlException, SQLException {
0315:
0316: super (c, sql, type);
0317:
0318: String[] names;
0319: String name;
0320:
0321: // outRegistrationMap = new IntKeyIntValueHashMap();
0322: parameterNameMap = new IntValueHashMap();
0323:
0324: if (pmdDescriptor != null && pmdDescriptor.metaData != null) {
0325: names = pmdDescriptor.metaData.colNames;
0326:
0327: for (int i = 0; i < names.length; i++) {
0328: name = names[i];
0329:
0330: // PRE: should never happen in practice
0331: if (name == null || name.length() == 0) {
0332: continue; // throw?
0333: }
0334:
0335: parameterNameMap.put(name, i);
0336: }
0337: }
0338: }
0339:
0340: /**
0341: * Retrieves the parameter index corresponding to the given
0342: * parameter name. <p>
0343: *
0344: * @param parameterName to look up
0345: * @throws SQLException if not found
0346: * @return index for name
0347: */
0348: int findParameterIndex(String parameterName) throws SQLException {
0349:
0350: checkClosed();
0351:
0352: int index = parameterNameMap.get(parameterName, -1);
0353:
0354: if (index >= 0) {
0355: return index + 1;
0356: }
0357:
0358: throw Util.sqlException(Trace.COLUMN_NOT_FOUND, parameterName);
0359: }
0360:
0361: /**
0362: * Does the specialized work required to free this object's resources and
0363: * that of it's parent classes. <p>
0364: *
0365: * @throws SQLException if a database access error occurs
0366: */
0367: public void close() throws SQLException {
0368:
0369: if (isClosed()) {
0370: return;
0371: }
0372:
0373: // outRegistrationMap = null;
0374: parameterNameMap = null;
0375:
0376: super .close();
0377: }
0378:
0379: /**
0380: * Performs an internal check for OUT or IN OUT column index validity. <p>
0381: *
0382: * @param i the one-based column index to check
0383: * @throws SQLException if there is no such OUT or IN OUT column
0384: */
0385: private void checkGetParameterIndex(int i) throws SQLException {
0386:
0387: checkClosed();
0388:
0389: if (i < 1 || i > parameterModes.length) {
0390: String msg = "Parameter index out of bounds: " + i;
0391:
0392: throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg);
0393: }
0394: /*
0395: int mode = parameterModes[i - 1];
0396:
0397: switch (mode) {
0398:
0399: default :
0400: String msg = "Not OUT or IN OUT mode: " + mode
0401: + " for parameter: " + i;
0402:
0403: throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg);
0404: case Expression.PARAM_IN_OUT :
0405: case Expression.PARAM_OUT :
0406: break;
0407:
0408: // this is OK
0409: }
0410: */
0411: }
0412:
0413: /**
0414: * Checks if the parameter of the given index has been successfully
0415: * registered as an OUT parameter. <p>
0416: *
0417: * @param parameterIndex to check
0418: * @throws SQLException if not registered
0419: */
0420: /*
0421: private void checkIsRegisteredParameterIndex(int parameterIndex)
0422: throws SQLException {
0423:
0424: int type;
0425: String msg;
0426:
0427: checkClosed();
0428:
0429: type = outRegistrationMap.get(parameterIndex, Integer.MIN_VALUE);
0430:
0431: if (type == Integer.MIN_VALUE) {
0432: msg = "Parameter not registered: " + parameterIndex;
0433:
0434: throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, msg);
0435: }
0436: }
0437: */
0438:
0439: // ----------------------------------- JDBC 1 ----------------------------------
0440: /**
0441: * <!-- start generic documentation -->
0442: * Registers the OUT parameter in ordinal position
0443: * <code>parameterIndex</code> to the JDBC type
0444: * <code>sqlType</code>. All OUT parameters must be registered
0445: * before a stored procedure is executed.
0446: * <p>
0447: * The JDBC type specified by <code>sqlType</code> for an OUT
0448: * parameter determines the Java type that must be used
0449: * in the <code>get</code> method to read the value of that parameter.
0450: * <p>
0451: * If the JDBC type expected to be returned to this output parameter
0452: * is specific to this particular database, <code>sqlType</code>
0453: * should be <code>java.sql.Types.OTHER</code>. The method
0454: * {@link #getObject} retrieves the value. <p>
0455: * <!-- end generic documentation -->
0456: *
0457: * <!-- start release-specific documentation -->
0458: * <div class="ReleaseSpecificDocumentation">
0459: * <h3>HSQLDB-Specific Information:</h3> <p>
0460: *
0461: * HSQLDB 1.7.2 does not support this feature. <p>
0462: *
0463: * Calling this method always throws an <code>SQLException</code>.
0464: * </div>
0465: * <!-- end release-specific documentation -->
0466: *
0467: * @param parameterIndex the first parameter is 1, the second is 2,
0468: * and so on
0469: * @param sqlType the JDBC type code defined by <code>java.sql.Types</code>.
0470: * If the parameter is of JDBC type <code>NUMERIC</code>
0471: * or <code>DECIMAL</code>, the version of
0472: * <code>registerOutParameter</code> that accepts a scale value
0473: * should be used.
0474: * @exception SQLException if a database access error occurs
0475: * @see java.sql.Types
0476: */
0477: public void registerOutParameter(int parameterIndex, int sqlType)
0478: throws SQLException {
0479: throw Util.notSupported();
0480: }
0481:
0482: /**
0483: * <!-- start generic documentation -->
0484: * Registers the parameter in ordinal position
0485: * <code>parameterIndex</code> to be of JDBC type
0486: * <code>sqlType</code>. This method must be called
0487: * before a stored procedure is executed.
0488: * <p>
0489: * The JDBC type specified by <code>sqlType</code> for an OUT
0490: * parameter determines the Java type that must be used
0491: * in the <code>get</code> method to read the value of that parameter.
0492: * <p>
0493: * This version of <code>registerOutParameter</code> should be
0494: * used when the parameter is of JDBC type <code>NUMERIC</code>
0495: * or <code>DECIMAL</code>. <p>
0496: * <!-- end generic documentation -->
0497: *
0498: * <!-- start release-specific documentation -->
0499: * <div class="ReleaseSpecificDocumentation">
0500: * <h3>HSQLDB-Specific Information:</h3> <p>
0501: *
0502: * HSQLDB 1.7.2 does not support this feature. <p>
0503: *
0504: * Calling this method always throws an <code>SQLException</code>.
0505: * </div>
0506: * <!-- end release-specific documentation -->
0507: *
0508: * @param parameterIndex the first parameter is 1, the second is 2,
0509: * and so on
0510: * @param sqlType the SQL type code defined by <code>java.sql.Types</code>.
0511: * @param scale the desired number of digits to the right of the
0512: * decimal point. It must be greater than or equal to zero.
0513: * @exception SQLException if a database access error occurs
0514: * @see java.sql.Types
0515: */
0516: public void registerOutParameter(int parameterIndex, int sqlType,
0517: int scale) throws SQLException {
0518: registerOutParameter(parameterIndex, sqlType);
0519: }
0520:
0521: /**
0522: * <!-- start generic documentation -->
0523: * Retrieves whether the last OUT parameter read had the value of
0524: * SQL <code>NULL</code>. Note that this method should be called only
0525: * after calling a getter method; otherwise, there is no value to use in
0526: * determining whether it is <code>null</code> or not. <p>
0527: * <!-- end generic documentation -->
0528: *
0529: * <!-- start release-specific documentation -->
0530: * <div class="ReleaseSpecificDocumentation">
0531: * <h3>HSQLDB-Specific Information:</h3> <p>
0532: *
0533: * HSQLDB 1.7.2 does not support this feature. <p>
0534: *
0535: * Calling this method always throws an <code>SQLException</code>.
0536: * </div>
0537: * <!-- end release-specific documentation -->
0538: *
0539: * @return <code>true</code> if the last parameter read was SQL
0540: * <code>NULL</code>; <code>false</code> otherwise
0541: * @exception SQLException if a database access error occurs
0542: */
0543: public boolean wasNull() throws SQLException {
0544: throw Util.notSupported();
0545: }
0546:
0547: /**
0548: * <!-- start generic documentation -->
0549: * Retrieves the value of the designated JDBC <code>CHAR</code>,
0550: * <code>VARCHAR</code>, or <code>LONGVARCHAR</code> parameter as a
0551: * <code>String</code> in the Java programming language.
0552: * <p>
0553: * For the fixed-length type JDBC <code>CHAR</code>,
0554: * the <code>String</code> object
0555: * returned has exactly the same value the (JDBC4 clarification:) SQL
0556: * <code>CHAR</code> value had in the
0557: * database, including any padding added by the database. <p>
0558: * <!-- end generic documentation -->
0559: *
0560: * <!-- start release-specific documentation -->
0561: * <div class="ReleaseSpecificDocumentation">
0562: * <h3>HSQLDB-Specific Information:</h3> <p>
0563: *
0564: * HSQLDB 1.7.2 does not support this feature. <p>
0565: *
0566: * Calling this method always throws an <code>SQLException</code>.
0567: * </div>
0568: * <!-- end release-specific documentation -->
0569: *
0570: * @param parameterIndex the first parameter is 1, the second is 2,
0571: * and so on
0572: * @return the parameter value. If the value is SQL <code>NULL</code>,
0573: * the result
0574: * is <code>null</code>.
0575: * @exception SQLException if a database access error occurs
0576: * @see #setString
0577: */
0578: public String getString(int parameterIndex) throws SQLException {
0579: throw Util.notSupported();
0580: }
0581:
0582: /**
0583: * <!-- start generic documentation -->
0584: * Retrieves the value of the designated JDBC <code>BIT</code> parameter
0585: * as a <code>boolean</code> in the Java programming language. <p>
0586: * <!-- end generic documentation -->
0587: *
0588: * <!-- start release-specific documentation -->
0589: * <div class="ReleaseSpecificDocumentation">
0590: * <h3>HSQLDB-Specific Information:</h3> <p>
0591: *
0592: * HSQLDB 1.7.2 does not support this feature. <p>
0593: *
0594: * Calling this method always throws an <code>SQLException</code>.
0595: * </div>
0596: * <!-- end release-specific documentation -->
0597: *
0598: * @param parameterIndex the first parameter is 1, the second is 2,
0599: * and so on
0600: * @return the parameter value. If the value is SQL <code>NULL</code>,
0601: * the result is <code>false</code>.
0602: * @exception SQLException if a database access error occurs
0603: * @see #setBoolean
0604: */
0605: public boolean getBoolean(int parameterIndex) throws SQLException {
0606: throw Util.notSupported();
0607: }
0608:
0609: /**
0610: * <!-- start generic documentation -->
0611: * Retrieves the value of the designated JDBC <code>TINYINT</code>
0612: * parameter as a <code>byte</code> in the Java programming language. <p>
0613: * <!-- end generic documentation -->
0614: *
0615: * <!-- start release-specific documentation -->
0616: * <div class="ReleaseSpecificDocumentation">
0617: * <h3>HSQLDB-Specific Information:</h3> <p>
0618: *
0619: * HSQLDB 1.7.2 does not support this feature. <p>
0620: *
0621: * Calling this method always throws an <code>SQLException</code>.
0622: * </div>
0623: * <!-- end release-specific documentation -->
0624: *
0625: * @param parameterIndex the first parameter is 1, the second is 2,
0626: * and so on
0627: * @return the parameter value. If the value is SQL <code>NULL</code>,
0628: * the result is <code>0</code>.
0629: * @exception SQLException if a database access error occurs
0630: * @see #setByte
0631: */
0632: public byte getByte(int parameterIndex) throws SQLException {
0633: throw Util.notSupported();
0634: }
0635:
0636: /**
0637: * <!-- start generic documentation -->
0638: * Retrieves the value of the designated JDBC <code>SMALLINT</code>
0639: * parameter as a <code>short</code> in the Java programming language. <p>
0640: * <!-- end generic documentation -->
0641: *
0642: * <!-- start release-specific documentation -->
0643: * <div class="ReleaseSpecificDocumentation">
0644: * <h3>HSQLDB-Specific Information:</h3> <p>
0645: *
0646: * HSQLDB 1.7.2 does not support this feature. <p>
0647: *
0648: * Calling this method always throws an <code>SQLException</code>.
0649: * </div>
0650: * <!-- end release-specific documentation -->
0651: *
0652: * @param parameterIndex the first parameter is 1, the second is 2,
0653: * and so on
0654: * @return the parameter value. If the value is SQL <code>NULL</code>,
0655: * the result is <code>0</code>.
0656: * @exception SQLException if a database access error occurs
0657: * @see #setShort
0658: */
0659: public short getShort(int parameterIndex) throws SQLException {
0660: throw Util.notSupported();
0661: }
0662:
0663: /**
0664: * <!-- start generic documentation -->
0665: * Retrieves the value of the designated JDBC <code>INTEGER</code>
0666: * parameter as an <code>int</code> in the Java programming language. <p>
0667: * <!-- end generic documentation -->
0668: *
0669: * <!-- start release-specific documentation -->
0670: * <div class="ReleaseSpecificDocumentation">
0671: * <h3>HSQLDB-Specific Information:</h3> <p>
0672: *
0673: * HSQLDB 1.7.2 does not support this feature. <p>
0674: *
0675: * Calling this method always throws an <code>SQLException</code>.
0676: * </div>
0677: * <!-- end release-specific documentation -->
0678: *
0679: * @param parameterIndex the first parameter is 1, the second is 2,
0680: * and so on
0681: * @return the parameter value. If the value is SQL <code>NULL</code>,
0682: * the result is <code>0</code>.
0683: * @exception SQLException if a database access error occurs
0684: * @see #setInt
0685: */
0686: public int getInt(int parameterIndex) throws SQLException {
0687: throw Util.notSupported();
0688: }
0689:
0690: /**
0691: * <!-- start generic documentation -->
0692: * Retrieves the value of the designated JDBC <code>BIGINT</code>
0693: * parameter as a <code>long</code> in the Java programming language. <p>
0694: * <!-- end generic documentation -->
0695: *
0696: * <!-- start release-specific documentation -->
0697: * <div class="ReleaseSpecificDocumentation">
0698: * <h3>HSQLDB-Specific Information:</h3> <p>
0699: *
0700: * HSQLDB 1.7.2 does not support this feature. <p>
0701: *
0702: * Calling this method always throws an <code>SQLException</code>.
0703: * </div>
0704: * <!-- end release-specific documentation -->
0705: *
0706: * @param parameterIndex the first parameter is 1, the second is 2,
0707: * and so on
0708: * @return the parameter value. If the value is SQL <code>NULL</code>,
0709: * the result is <code>0</code>.
0710: * @exception SQLException if a database access error occurs
0711: * @see #setLong
0712: */
0713: public long getLong(int parameterIndex) throws SQLException {
0714: throw Util.notSupported();
0715: }
0716:
0717: /**
0718: * <!-- start generic documentation -->
0719: * Retrieves the value of the designated JDBC <code>FLOAT</code>
0720: * parameter as a <code>float</code> in the Java programming language. <p>
0721: * <!-- end generic documentation -->
0722: *
0723: * <!-- start release-specific documentation -->
0724: * <div class="ReleaseSpecificDocumentation">
0725: * <h3>HSQLDB-Specific Information:</h3> <p>
0726: *
0727: * HSQLDB 1.7.2 does not support this feature. <p>
0728: *
0729: * Calling this method always throws an <code>SQLException</code>.
0730: * </div>
0731: * <!-- end release-specific documentation -->
0732: *
0733: * @param parameterIndex the first parameter is 1, the second is 2,
0734: * and so on
0735: * @return the parameter value. If the value is SQL <code>NULL</code>, the
0736: * result is <code>0</code>.
0737: * @exception SQLException if a database access error occurs
0738: * @see #setFloat
0739: */
0740: public float getFloat(int parameterIndex) throws SQLException {
0741: throw Util.notSupported();
0742: }
0743:
0744: /**
0745: * <!-- start generic documentation -->
0746: * Retrieves the value of the designated JDBC <code>DOUBLE</code>
0747: * parameter as a <code>double</code> in the Java programming language. <p>
0748: * <!-- end generic documentation -->
0749: *
0750: * <!-- start release-specific documentation -->
0751: * <div class="ReleaseSpecificDocumentation">
0752: * <h3>HSQLDB-Specific Information:</h3> <p>
0753: *
0754: * HSQLDB 1.7.2 does not support this feature. <p>
0755: *
0756: * Calling this method always throws an <code>SQLException</code>.
0757: * </div>
0758: * <!-- end release-specific documentation -->
0759: *
0760: * @param parameterIndex the first parameter is 1, the second is 2,
0761: * and so on
0762: * @return the parameter value. If the value is SQL <code>NULL</code>,
0763: * the result is <code>0</code>.
0764: * @exception SQLException if a database access error occurs
0765: * @see #setDouble
0766: */
0767: public double getDouble(int parameterIndex) throws SQLException {
0768: throw Util.notSupported();
0769: }
0770:
0771: /**
0772: * <!-- start generic documentation -->
0773: * Retrieves the value of the designated JDBC <code>NUMERIC</code>
0774: * parameter as a <code>java.math.BigDecimal</code> object with
0775: * <i>scale</i> digits to the right of the decimal point. <p>
0776: * <!-- end generic documentation -->
0777: *
0778: * <!-- start release-specific documentation -->
0779: * <div class="ReleaseSpecificDocumentation">
0780: * <h3>HSQLDB-Specific Information:</h3> <p>
0781: *
0782: * HSQLDB 1.7.2 does not support this feature. <p>
0783: *
0784: * Calling this method always throws an <code>SQLException</code>.
0785: * </div>
0786: * <!-- end release-specific documentation -->
0787: *
0788: * @param parameterIndex the first parameter is 1, the second is 2,
0789: * and so on
0790: * @param scale the number of digits to the right of the decimal point
0791: * @return the parameter value. If the value is SQL <code>NULL</code>,
0792: * the result is <code>null</code>.
0793: * @exception SQLException if a database access error occurs
0794: * @deprecated use <code>getBigDecimal(int parameterIndex)</code>
0795: * or <code>getBigDecimal(String parameterName)</code>
0796: * @see #setBigDecimal
0797: */
0798:
0799: //#ifdef DEPRECATEDJDBC
0800: public BigDecimal getBigDecimal(int parameterIndex, int scale)
0801: throws SQLException {
0802: throw Util.notSupported();
0803: }
0804:
0805: //#endif
0806:
0807: /**
0808: * <!-- start generic documentation -->
0809: * Retrieves the value of the designated JDBC <code>BINARY</code> or
0810: * <code>VARBINARY</code> parameter as an array of <code>byte</code>
0811: * values in the Java programming language. <p>
0812: * <!-- end generic documentation -->
0813: *
0814: * <!-- start release-specific documentation -->
0815: * <div class="ReleaseSpecificDocumentation">
0816: * <h3>HSQLDB-Specific Information:</h3> <p>
0817: *
0818: * HSQLDB 1.7.2 does not support this feature. <p>
0819: *
0820: * Calling this method always throws an <code>SQLException</code>.
0821: * </div>
0822: * <!-- end release-specific documentation -->
0823: * @param parameterIndex the first parameter is 1, the second is 2,
0824: * and so on
0825: * @return the parameter value. If the value is SQL <code>NULL</code>,
0826: * the result is <code>null</code>.
0827: * @exception SQLException if a database access error occurs
0828: * @see #setBytes
0829: */
0830: public byte[] getBytes(int parameterIndex) throws SQLException {
0831: throw Util.notSupported();
0832: }
0833:
0834: /**
0835: * <!-- start generic documentation -->
0836: * Retrieves the value of the designated JDBC <code>DATE</code> parameter
0837: * as a <code>java.sql.Date</code> object. <p>
0838: * <!-- end generic documentation -->
0839: *
0840: * <!-- start release-specific documentation -->
0841: * <div class="ReleaseSpecificDocumentation">
0842: * <h3>HSQLDB-Specific Information:</h3> <p>
0843: *
0844: * HSQLDB 1.7.2 does not support this feature. <p>
0845: *
0846: * Calling this method always throws an <code>SQLException</code>.
0847: * </div>
0848: * <!-- end release-specific documentation -->
0849: * @param parameterIndex the first parameter is 1, the second is 2,
0850: * and so on
0851: * @return the parameter value. If the value is SQL <code>NULL</code>, the
0852: * result is <code>null</code>.
0853: * @exception SQLException if a database access error occurs
0854: * @see #setDate
0855: */
0856: public Date getDate(int parameterIndex) throws SQLException {
0857: throw Util.notSupported();
0858: }
0859:
0860: /**
0861: * <!-- start generic documentation -->
0862: * Retrieves the value of the designated JDBC <code>TIME</code> parameter
0863: * as a <code>java.sql.Time</code> object. <p>
0864: * <!-- end generic documentation -->
0865: *
0866: * <!-- start release-specific documentation -->
0867: * <div class="ReleaseSpecificDocumentation">
0868: * <h3>HSQLDB-Specific Information:</h3> <p>
0869: *
0870: * HSQLDB 1.7.2 does not support this feature. <p>
0871: *
0872: * Calling this method always throws an <code>SQLException</code>.
0873: * </div>
0874: * <!-- end release-specific documentation -->
0875: *
0876: * @param parameterIndex the first parameter is 1, the second is 2,
0877: * and so on
0878: * @return the parameter value. If the value is SQL <code>NULL</code>,
0879: * the result is <code>null</code>.
0880: * @exception SQLException if a database access error occurs
0881: * @see #setTime
0882: */
0883: public Time getTime(int parameterIndex) throws SQLException {
0884: throw Util.notSupported();
0885: }
0886:
0887: /**
0888: * <!-- start generic documentation -->
0889: * Retrieves the value of the designated JDBC <code>TIMESTAMP</code>
0890: * parameter as a <code>java.sql.Timestamp</code> object. <p>
0891: * <!-- end generic documentation -->
0892: *
0893: * <!-- start release-specific documentation -->
0894: * <div class="ReleaseSpecificDocumentation">
0895: * <h3>HSQLDB-Specific Information:</h3> <p>
0896: *
0897: * HSQLDB 1.7.2 does not support this feature. <p>
0898: *
0899: * Calling this method always throws an <code>SQLException</code>.
0900: * </div>
0901: * <!-- end release-specific documentation -->
0902: *
0903: * @param parameterIndex the first parameter is 1, the second is 2,
0904: * and so on
0905: * @return the parameter value. If the value is SQL <code>NULL</code>,
0906: * the result is <code>null</code>.
0907: * @exception SQLException if a database access error occurs
0908: * @see #setTimestamp
0909: */
0910: public Timestamp getTimestamp(int parameterIndex)
0911: throws SQLException {
0912: throw Util.notSupported();
0913: }
0914:
0915: /**
0916: * <!-- start generic documentation -->
0917: * Retrieves the value of the designated parameter as an <code>Object</code>
0918: * in the Java programming language. If the value is an SQL <code>NULL</code>,
0919: * the driver returns a Java <code>null</code>.
0920: * <p>
0921: * This method returns a Java object whose type corresponds to the JDBC
0922: * type that was registered for this parameter using the method
0923: * <code>registerOutParameter</code>. By registering the target JDBC
0924: * type as <code>java.sql.Types.OTHER</code>, this method can be used
0925: * to read database-specific abstract data types. <p>
0926: * <!-- end generic documentation -->
0927: *
0928: * <!-- start release-specific documentation -->
0929: * <div class="ReleaseSpecificDocumentation">
0930: * <h3>HSQLDB-Specific Information:</h3> <p>
0931: *
0932: * HSQLDB 1.7.2 does not support this feature. <p>
0933: * Calling this method always throws an <code>SQLException</code>.
0934: * </div>
0935: * <!-- end release-specific documentation -->
0936: *
0937: * @param parameterIndex the first parameter is 1, the second is 2,
0938: * and so on
0939: * @return A <code>java.lang.Object</code> holding the OUT parameter value
0940: * @exception SQLException if a database access error occurs
0941: * @see java.sql.Types
0942: * @see #setObject
0943: */
0944: public Object getObject(int parameterIndex) throws SQLException {
0945: throw Util.notSupported();
0946: }
0947:
0948: // ----------------------------------- JDBC 2 ----------------------------------
0949:
0950: /**
0951: * <!-- start generic documentation -->
0952: * Retrieves the value of the designated JDBC <code>NUMERIC</code>
0953: * parameter as a <code>java.math.BigDecimal</code> object with as many
0954: * digits to the right of the decimal point as the value contains. <p>
0955: * <!-- end generic documentation -->
0956: *
0957: * <!-- start release-specific documentation -->
0958: * <div class="ReleaseSpecificDocumentation">
0959: * <h3>HSQLDB-Specific Information:</h3> <p>
0960: *
0961: * HSQLDB 1.7.2 does not support this feature. <p>
0962: *
0963: * Calling this method always throws an <code>SQLException</code>.
0964: * </div>
0965: * <!-- end release-specific documentation -->
0966: *
0967: * @param parameterIndex the first parameter is 1, the second is 2,
0968: * and so on
0969: * @return the parameter value in full precision. If the value is
0970: * SQL <code>NULL</code>, the result is <code>null</code>.
0971: * @exception SQLException if a database access error occurs
0972: * @see #setBigDecimal
0973: * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for
0974: * jdbcPreparedStatement)
0975: */
0976: public BigDecimal getBigDecimal(int parameterIndex)
0977: throws SQLException {
0978: throw Util.notSupported();
0979: }
0980:
0981: /**
0982: * <!-- start generic documentation -->
0983: * Returns an object representing the value of OUT parameter
0984: * <code>parameterIndex</code> and uses <code>map</code> for the custom
0985: * mapping of the parameter value.
0986: * <p>
0987: * This method returns a Java object whose type corresponds to the
0988: * JDBC type that was registered for this parameter using the method
0989: * <code>registerOutParameter</code>. By registering the target
0990: * JDBC type as <code>java.sql.Types.OTHER</code>, this method can
0991: * be used to read database-specific abstract data types. <p>
0992: * <!-- end generic documentation -->
0993: *
0994: * <!-- start release-specific documentation -->
0995: * <div class="ReleaseSpecificDocumentation">
0996: * <h3>HSQLDB-Specific Information:</h3> <p>
0997: *
0998: * HSQLDB 1.7.2 does not support this feature. <p>
0999: *
1000: * Calling this method always throws an <code>SQLException</code>.
1001: * </div>
1002: * <!-- end release-specific documentation -->
1003: *
1004: * @param parameterIndex the first parameter is 1, the second is 2, and so on
1005: * @param map the mapping from SQL type names to Java classes
1006: * @return a <code>java.lang.Object</code> holding the OUT parameter value
1007: * @exception SQLException if a database access error occurs
1008: * @see #setObject
1009: * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for
1010: * jdbcPreparedStatement)
1011: */
1012: public Object getObject(int parameterIndex, Map map)
1013: throws SQLException {
1014: throw Util.notSupported();
1015: }
1016:
1017: /**
1018: * <!-- start generic documentation -->
1019: * Retrieves the value of the designated JDBC
1020: * <code>REF(<structured-type>)</code> parameter as a
1021: * {@link java.sql.Ref} object in the Java programming language. <p>
1022: * <!-- end generic documentation -->
1023: *
1024: * <!-- start release-specific documentation -->
1025: * <div class="ReleaseSpecificDocumentation">
1026: * <h3>HSQLDB-Specific Information:</h3> <p>
1027: *
1028: * HSQLDB 1.7.2 does not support this feature. <p>
1029: *
1030: * Calling this method always throws an <code>SQLException</code>.
1031: * </div>
1032: * <!-- end release-specific documentation -->
1033: *
1034: * @param parameterIndex the first parameter is 1, the second is 2,
1035: * and so on
1036: * @return the parameter value as a <code>Ref</code> object in the
1037: * Java programming language. If the value was SQL <code>NULL</code>,
1038: * the value <code>null</code> is returned.
1039: * @exception SQLException if a database access error occurs
1040: * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for
1041: * jdbcPreparedStatement)
1042: */
1043: public Ref getRef(int parameterIndex) throws SQLException {
1044: throw Util.notSupported();
1045: }
1046:
1047: /**
1048: * <!-- start generic documentation -->
1049: * Retrieves the value of the designated JDBC <code>BLOB</code>
1050: * parameter as a {@link java.sql.Blob} object in the Java
1051: * programming language. <p>
1052: * <!-- end generic documentation -->
1053: *
1054: * <!-- start release-specific documentation -->
1055: * <div class="ReleaseSpecificDocumentation">
1056: * <h3>HSQLDB-Specific Information:</h3> <p>
1057: *
1058: * HSQLDB 1.7.2 does not support this feature. <p>
1059: *
1060: * Calling this method always throws an <code>SQLException</code>.
1061: * </div>
1062: * <!-- end release-specific documentation -->
1063: *
1064: * @param parameterIndex the first parameter is 1, the second is 2,
1065: * and so on
1066: * @return the parameter value as a <code>Blob</code> object in the
1067: * Java programming language. If the value was SQL <code>NULL</code>,
1068: * the value <code>null</code> is returned.
1069: * @exception SQLException if a database access error occurs
1070: * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for
1071: * jdbcPreparedStatement)
1072: */
1073: public Blob getBlob(int parameterIndex) throws SQLException {
1074: throw Util.notSupported();
1075: }
1076:
1077: /**
1078: * <!-- start generic documentation -->
1079: * Retrieves the value of the designated JDBC <code>CLOB</code>
1080: * parameter as a {@link java.sql.Clob} object in the Java programming
1081: * language. <p>
1082: * <!-- end generic documentation -->
1083: *
1084: * <!-- start release-specific documentation -->
1085: * <div class="ReleaseSpecificDocumentation">
1086: * <h3>HSQLDB-Specific Information:</h3> <p>
1087: *
1088: * HSQLDB 1.7.2 does not support this feature. <p>
1089: *
1090: * Calling this method always throws an <code>SQLException</code>.
1091: * </div>
1092: * <!-- end release-specific documentation -->
1093: *
1094: * @param parameterIndex the first parameter is 1, the second is 2, and
1095: * so on
1096: * @return the parameter value as a <code>Clob</code> object in the
1097: * Java programming language. If the value was SQL <code>NULL</code>, the
1098: * value <code>null</code> is returned.
1099: * @exception SQLException if a database access error occurs
1100: * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for
1101: * jdbcPreparedStatement)
1102: */
1103: public Clob getClob(int parameterIndex) throws SQLException {
1104: throw Util.notSupported();
1105: }
1106:
1107: /**
1108: * <!-- start generic documentation -->
1109: * Retrieves the value of the designated JDBC <code>ARRAY</code>
1110: * parameter as an {@link java.sql.Array} object in the Java programming
1111: * language. <p>
1112: * <!-- end generic documentation -->
1113: *
1114: * <!-- start release-specific documentation -->
1115: * <div class="ReleaseSpecificDocumentation">
1116: * <h3>HSQLDB-Specific Information:</h3> <p>
1117: *
1118: * HSQLDB 1.7.2 does not support this feature. <p>
1119: *
1120: * Calling this method always throws an <code>SQLException</code>.
1121: * </div>
1122: * <!-- end release-specific documentation -->
1123: *
1124: * @param parameterIndex the first parameter is 1, the second is 2, and
1125: * so on
1126: * @return the parameter value as an <code>Array</code> object in
1127: * the Java programming language. If the value was SQL <code>NULL</code>,
1128: * the value <code>null</code> is returned.
1129: * @exception SQLException if a database access error occurs
1130: * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for
1131: * jdbcPreparedStatement)
1132: */
1133: public Array getArray(int parameterIndex) throws SQLException {
1134: throw Util.notSupported();
1135: }
1136:
1137: /**
1138: * <!-- start generic documentation -->
1139: * Retrieves the value of the designated JDBC <code>DATE</code>
1140: * parameter as a <code>java.sql.Date</code> object, using
1141: * the given <code>Calendar</code> object
1142: * to construct the date.
1143: * With a <code>Calendar</code> object, the driver
1144: * can calculate the date taking into account a custom timezone and
1145: * locale. If no <code>Calendar</code> object is specified, the driver
1146: * uses the default timezone and locale. <p>
1147: * <!-- end generic documentation -->
1148: *
1149: * <!-- start release-specific documentation -->
1150: * <div class="ReleaseSpecificDocumentation">
1151: * <h3>HSQLDB-Specific Information:</h3> <p>
1152: *
1153: * HSQLDB 1.7.2 does not support this feature. <p>
1154: *
1155: * Calling this method always throws an <code>SQLException</code>.
1156: * </div>
1157: * <!-- end release-specific documentation -->
1158: *
1159: * @param parameterIndex the first parameter is 1, the second is 2,
1160: * and so on
1161: * @param cal the <code>Calendar</code> object the driver will use
1162: * to construct the date
1163: * @return the parameter value. If the value is SQL <code>NULL</code>,
1164: * the result is <code>null</code>.
1165: * @exception SQLException if a database access error occurs
1166: * @see #setDate
1167: * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for
1168: * jdbcPreparedStatement)
1169: */
1170: public Date getDate(int parameterIndex, Calendar cal)
1171: throws SQLException {
1172:
1173: throw Util.notSupported();
1174:
1175: // try {
1176: // return HsqlDateTime.getDate(getString(parameterIndex), cal);
1177: // } catch (Exception e) {
1178: // throw Util.sqlException(Trace.INVALID_ESCAPE,
1179: // e.getMessage());
1180: // }
1181: }
1182:
1183: /**
1184: * <!-- start generic documentation -->
1185: * Retrieves the value of the designated JDBC <code>TIME</code>
1186: * parameter as a <code>java.sql.Time</code> object, using
1187: * the given <code>Calendar</code> object
1188: * to construct the time.
1189: * With a <code>Calendar</code> object, the driver
1190: * can calculate the time taking into account a custom timezone and locale.
1191: * If no <code>Calendar</code> object is specified, the driver uses the
1192: * default timezone and locale. <p>
1193: * <!-- end generic documentation -->
1194: *
1195: * <!-- start release-specific documentation -->
1196: * <div class="ReleaseSpecificDocumentation">
1197: * <h3>HSQLDB-Specific Information:</h3> <p>
1198: *
1199: * HSQLDB 1.7.2 does not support this feature. <p>
1200: *
1201: * Calling this method always throws an <code>SQLException</code>.
1202: * </div>
1203: * <!-- end release-specific documentation -->
1204: *
1205: * @param parameterIndex the first parameter is 1, the second is 2,
1206: * and so on
1207: * @param cal the <code>Calendar</code> object the driver will use
1208: * to construct the time
1209: * @return the parameter value; if the value is SQL <code>NULL</code>,
1210: * the result is <code>null</code>.
1211: * @exception SQLException if a database access error occurs
1212: * @see #setTime
1213: * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for
1214: * jdbcPreparedStatement)
1215: */
1216: public Time getTime(int parameterIndex, Calendar cal)
1217: throws SQLException {
1218:
1219: throw Util.notSupported();
1220:
1221: // try {
1222: // return HsqlDateTime.getTime(getString(parameterIndex), cal);
1223: // } catch (Exception e) {
1224: // throw Util.sqlException(Trace.INVALID_ESCAPE,
1225: // e.getMessage());
1226: // }
1227: }
1228:
1229: /**
1230: * <!-- start generic documentation -->
1231: * Retrieves the value of the designated JDBC <code>TIMESTAMP</code>
1232: * parameter as a <code>java.sql.Timestamp</code> object, using
1233: * the given <code>Calendar</code> object to construct
1234: * the <code>Timestamp</code> object.
1235: * With a <code>Calendar</code> object, the driver
1236: * can calculate the timestamp taking into account a custom timezone and
1237: * locale. If no <code>Calendar</code> object is specified, the driver
1238: * uses the default timezone and locale. <p>
1239: * <!-- end generic documentation -->
1240: *
1241: * <!-- start release-specific documentation -->
1242: * <div class="ReleaseSpecificDocumentation">
1243: * <h3>HSQLDB-Specific Information:</h3> <p>
1244: *
1245: * HSQLDB 1.7.2 does not support this feature. <p>
1246: *
1247: * Calling this method always throws an <code>SQLException</code>.
1248: * </div>
1249: * <!-- end release-specific documentation -->
1250: *
1251: * @param parameterIndex the first parameter is 1, the second is 2,
1252: * and so on
1253: * @param cal the <code>Calendar</code> object the driver will use
1254: * to construct the timestamp
1255: * @return the parameter value. If the value is SQL <code>NULL</code>,
1256: * the result is <code>null</code>.
1257: * @exception SQLException if a database access error occurs
1258: * @see #setTimestamp
1259: * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for
1260: * jdbcPreparedStatement)
1261: */
1262: public Timestamp getTimestamp(int parameterIndex, Calendar cal)
1263: throws SQLException {
1264:
1265: throw Util.notSupported();
1266:
1267: // try {
1268: // return HsqlDateTime.getTimestamp(getString(parameterIndex), cal);
1269: // } catch (Exception e) {
1270: // throw Util.sqlException(Trace.INVALID_ESCAPE,
1271: // e.getMessage());
1272: // }
1273: }
1274:
1275: /**
1276: * <!-- start generic documentation -->
1277: * Registers the designated output parameter. This version of
1278: * the method <code>registerOutParameter</code>
1279: * should be used for a user-defined or <code>REF</code> output parameter.
1280: * Examples of user-defined types include: <code>STRUCT</code>,
1281: * <code>DISTINCT</code>, <code>JAVA_OBJECT</code>, and named array types.
1282: * <p>
1283: * (JDBC4 claraification:) All OUT parameters must be registered
1284: * before a stored procedure is executed.
1285: * <p> For a user-defined parameter, the fully-qualified SQL
1286: * type name of the parameter should also be given, while a
1287: * <code>REF</code> parameter requires that the fully-qualified type name
1288: * of the referenced type be given. A JDBC driver that does not need the
1289: * type code and type name information may ignore it. To be portable,
1290: * however, applications should always provide these values for
1291: * user-defined and <code>REF</code> parameters.
1292: *
1293: * Although it is intended for user-defined and <code>REF</code> parameters,
1294: * this method may be used to register a parameter of any JDBC type.
1295: * If the parameter does not have a user-defined or <code>REF</code> type,
1296: * the <i>typeName</i> parameter is ignored.
1297: *
1298: * <P><B>Note:</B> When reading the value of an out parameter, you
1299: * must use the getter method whose Java type corresponds to the
1300: * parameter's registered SQL type. <p>
1301: * <!-- end generic documentation -->
1302: *
1303: * <!-- start release-specific documentation -->
1304: * <div class="ReleaseSpecificDocumentation">
1305: * <h3>HSQLDB-Specific Information:</h3> <p>
1306: *
1307: * HSQLDB 1.7.2 does not support this feature. <p>
1308: *
1309: * Calling this method always throws an <code>SQLException</code>.
1310: * </div>
1311: * <!-- end release-specific documentation -->
1312: *
1313: * @param parameterIndex the first parameter is 1, the second is 2,...
1314: * @param sqlType a value from {@link java.sql.Types}
1315: * @param typeName the fully-qualified name of an SQL structured type
1316: * @exception SQLException if a database access error occurs
1317: * @see java.sql.Types
1318: * @since JDK 1.2 (JDK 1.1.x developers: read the new overview for
1319: * jdbcPreparedStatement)
1320: *
1321: */
1322: public void registerOutParameter(int parameterIndex, int sqlType,
1323: String typeName) throws SQLException {
1324: registerOutParameter(parameterIndex, sqlType);
1325: }
1326:
1327: // ----------------------------------- JDBC 3 ----------------------------------
1328:
1329: /**
1330: * <!-- start generic documentation -->
1331: * Registers the OUT parameter named
1332: * <code>parameterName</code> to the JDBC type
1333: * <code>sqlType</code>. All OUT parameters must be registered
1334: * before a stored procedure is executed.
1335: * <p>
1336: * The JDBC type specified by <code>sqlType</code> for an OUT
1337: * parameter determines the Java type that must be used
1338: * in the <code>get</code> method to read the value of that parameter.
1339: * <p>
1340: * If the JDBC type expected to be returned to this output parameter
1341: * is specific to this particular database, <code>sqlType</code>
1342: * should be <code>java.sql.Types.OTHER</code>. The method
1343: * {@link #getObject} retrieves the value. <p>
1344: * <!-- end generic documentation -->
1345: *
1346: * <!-- start release-specific documentation -->
1347: * <div class="ReleaseSpecificDocumentation">
1348: * <h3>HSQLDB-Specific Information:</h3> <p>
1349: *
1350: * HSQLDB 1.7.2 does not support this feature. <p>
1351: *
1352: * Calling this method always throws an <code>SQLException</code>.
1353: * </div>
1354: * <!-- end release-specific documentation -->
1355: *
1356: * @param parameterName the name of the parameter
1357: * @param sqlType the JDBC type code defined by <code>java.sql.Types</code>.
1358: * If the parameter is of JDBC type <code>NUMERIC</code>
1359: * or <code>DECIMAL</code>, the version of
1360: * <code>registerOutParameter</code> that accepts a scale value
1361: * should be used.
1362: * @exception SQLException if a database access error occurs
1363: * @since JDK 1.4, HSQL 1.7.0
1364: * @see java.sql.Types
1365: */
1366: //#ifdef JDBC3
1367: public void registerOutParameter(String parameterName, int sqlType)
1368: throws SQLException {
1369: registerOutParameter(findParameterIndex(parameterName), sqlType);
1370: }
1371:
1372: //#endif JDBC3
1373:
1374: /**
1375: * <!-- start generic documentation -->
1376: * Registers the parameter named
1377: * <code>parameterName</code> to be of JDBC type
1378: * <code>sqlType</code>. (JDBC4 clarification:) All OUT parameters must be registered
1379: * before a stored procedure is executed.
1380: * <p>
1381: * The JDBC type specified by <code>sqlType</code> for an OUT
1382: * parameter determines the Java type that must be used
1383: * in the <code>get</code> method to read the value of that parameter.
1384: * <p>
1385: * This version of <code>registerOutParameter</code> should be
1386: * used when the parameter is of JDBC type <code>NUMERIC</code>
1387: * or <code>DECIMAL</code>. <p>
1388: * <!-- end generic documentation -->
1389: *
1390: * <!-- start release-specific documentation -->
1391: * <div class="ReleaseSpecificDocumentation">
1392: * <h3>HSQLDB-Specific Information:</h3> <p>
1393: *
1394: * HSQLDB 1.7.2 does not support this feature. <p>
1395: *
1396: * Calling this method always throws an <code>SQLException</code>.
1397: * </div>
1398: * <!-- end release-specific documentation -->
1399: *
1400: * @param parameterName the name of the parameter
1401: * @param sqlType SQL type code defined by <code>java.sql.Types</code>.
1402: * @param scale the desired number of digits to the right of the
1403: * decimal point. It must be greater than or equal to zero.
1404: * @exception SQLException if a database access error occurs
1405: * @since JDK 1.4, HSQLDB 1.7.0
1406: * @see java.sql.Types
1407: */
1408: //#ifdef JDBC3
1409: public void registerOutParameter(String parameterName, int sqlType,
1410: int scale) throws SQLException {
1411: registerOutParameter(findParameterIndex(parameterName), sqlType);
1412: }
1413:
1414: //#endif JDBC3
1415:
1416: /**
1417: * <!-- start generic documentation -->
1418: * Registers the designated output parameter. This version of
1419: * the method <code>registerOutParameter</code>
1420: * should be used for a user-named or REF output parameter. Examples
1421: * of user-named types include: STRUCT, DISTINCT, JAVA_OBJECT, and
1422: * named array types. <p>
1423: *
1424: * (JDBC4 clarification:) All OUT parameters must be registered
1425: * before a stored procedure is executed.
1426: * <p>
1427: * For a user-named parameter the fully-qualified SQL
1428: * type name of the parameter should also be given, while a REF
1429: * parameter requires that the fully-qualified type name of the
1430: * referenced type be given. A JDBC driver that does not need the
1431: * type code and type name information may ignore it. To be portable,
1432: * however, applications should always provide these values for
1433: * user-named and REF parameters.
1434: *
1435: * Although it is intended for user-named and REF parameters,
1436: * this method may be used to register a parameter of any JDBC type.
1437: * If the parameter does not have a user-named or REF type, the
1438: * typeName parameter is ignored.
1439: *
1440: * <P><B>Note:</B> When reading the value of an out parameter, you
1441: * must use the <code>getXXX</code> method whose Java type XXX corresponds
1442: * to the parameter's registered SQL type. <p>
1443: * <!-- end generic documentation -->
1444: *
1445: * <!-- start release-specific documentation -->
1446: * <div class="ReleaseSpecificDocumentation">
1447: * <h3>HSQLDB-Specific Information:</h3> <p>
1448: *
1449: * HSQLDB 1.7.2 does not support this feature. <p>
1450: *
1451: * Calling this method always throws an <code>SQLException</code>.
1452: * </div>
1453: * <!-- end release-specific documentation -->
1454: *
1455: * @param parameterName the name of the parameter
1456: * @param sqlType a value from {@link java.sql.Types}
1457: * @param typeName the fully-qualified name of an SQL structured type
1458: * @exception SQLException if a database access error occurs
1459: * @see java.sql.Types
1460: * @since JDK 1.4, HSQL 1.7.0
1461: */
1462: //#ifdef JDBC3
1463: public void registerOutParameter(String parameterName, int sqlType,
1464: String typeName) throws SQLException {
1465: registerOutParameter(findParameterIndex(parameterName), sqlType);
1466: }
1467:
1468: //#endif JDBC3
1469:
1470: /**
1471: * <!-- start generic documentation -->
1472: * Retrieves the value of the designated JDBC <code>DATALINK</code>
1473: * parameter as a <code>java.net.URL</code> object. <p>
1474: * <!-- end generic documentation -->
1475: *
1476: * <!-- start release-specific documentation -->
1477: * <div class="ReleaseSpecificDocumentation">
1478: * <h3>HSQLDB-Specific Information:</h3> <p>
1479: *
1480: * HSQLDB 1.7.2 does not support this feature. <p>
1481: *
1482: * Calling this method always throws an <code>SQLException</code>.
1483: * </div>
1484: * <!-- end release-specific documentation -->
1485: *
1486: * @param parameterIndex the first parameter is 1, the second is 2,...
1487: * @return a <code>java.net.URL</code> object that represents the
1488: * JDBC <code>DATALINK</code> value used as the designated
1489: * parameter
1490: * @exception SQLException if a database access error occurs,
1491: * or if the URL being returned is
1492: * not a valid URL on the Java platform
1493: * @see #setURL
1494: * @since JDK 1.4, HSQLDB 1.7.0
1495: */
1496: //#ifdef JDBC3
1497: public java.net.URL getURL(int parameterIndex) throws SQLException {
1498: throw Util.notSupported();
1499: }
1500:
1501: //#endif JDBC3
1502:
1503: /**
1504: * <!-- start generic documentation -->
1505: * Sets the designated parameter to the given <code>java.net.URL</code>
1506: * object. The driver converts this to an SQL <code>DATALINK</code>
1507: * value when it sends it to the database. <p>
1508: * <!-- end generic documentation -->
1509: *
1510: * <!-- start release-specific documentation -->
1511: * <div class="ReleaseSpecificDocumentation">
1512: * <h3>HSQLDB-Specific Information:</h3> <p>
1513: *
1514: * HSQLDB 1.7.2 does not support this feature. <p>
1515: *
1516: * Calling this method always throws an <code>SQLException</code>.
1517: * </div>
1518: * <!-- end release-specific documentation -->
1519: *
1520: * @param parameterName the name of the parameter
1521: * @param val the parameter value
1522: * @exception SQLException if a database access error occurs,
1523: * or if a URL is malformed
1524: * @see #getURL
1525: * @since JDK 1.4, HSQLDB 1.7.0
1526: */
1527: //#ifdef JDBC3
1528: public void setURL(String parameterName, java.net.URL val)
1529: throws SQLException {
1530: setURL(findParameterIndex(parameterName), val);
1531: }
1532:
1533: //#endif JDBC3
1534:
1535: /**
1536: * <!-- start generic documentation -->
1537: * Sets the designated parameter to SQL <code>NULL</code>.
1538: *
1539: * <P><B>Note:</B> You must specify the parameter's SQL type. <p>
1540: * <!-- end generic documentation -->
1541: *
1542: * <!-- start release-specific documentation -->
1543: * <div class="ReleaseSpecificDocumentation">
1544: * <h3>HSQLDB-Specific Information:</h3> <p>
1545: *
1546: * Starting with 1.7.2, HSLQDB supports this.
1547: * </div>
1548: * <!-- end release-specific documentation -->
1549: *
1550: * @param parameterName the name of the parameter
1551: * @param sqlType the SQL type code defined in <code>java.sql.Types</code>
1552: * @exception SQLException if a database access error occurs
1553: * @since JDK 1.4, HSQLDB 1.7.0
1554: */
1555: //#ifdef JDBC3
1556: public void setNull(String parameterName, int sqlType)
1557: throws SQLException {
1558: setNull(findParameterIndex(parameterName), sqlType);
1559: }
1560:
1561: //#endif JDBC3
1562:
1563: /**
1564: * <!-- start generic documentation -->
1565: * Sets the designated parameter to the given Java <code>boolean</code> value.
1566: * (JDBC4 clarification:) The driver converts this
1567: * to an SQL <code>BIT</code> or <code>BOOLEAN</code> value when it sends
1568: * it to the database. <p>
1569: * <!-- end generic documentation -->
1570: *
1571: * <!-- start release-specific documentation -->
1572: * <div class="ReleaseSpecificDocumentation">
1573: * <h3>HSQLDB-Specific Information:</h3> <p>
1574: *
1575: * Starting with 1.7.2, HSLQDB supports this.
1576: * </div>
1577: * <!-- end release-specific documentation -->
1578: *
1579: * @param parameterName the name of the parameter
1580: * @param x the parameter value
1581: * @exception SQLException if a database access error occurs
1582: * @see #getBoolean
1583: * @since JDK 1.4, HSQLDB 1.7.0
1584: */
1585: //#ifdef JDBC3
1586: public void setBoolean(String parameterName, boolean x)
1587: throws SQLException {
1588: setBoolean(findParameterIndex(parameterName), x);
1589: }
1590:
1591: //#endif JDBC3
1592:
1593: /**
1594: * <!-- start generic documentation -->
1595: * Sets the designated parameter to the given Java <code>byte</code> value.
1596: * The driver converts this to an SQL <code>TINYINT</code> value when it
1597: * sends it to the database. <p>
1598: * <!-- end generic documentation -->
1599: *
1600: * <!-- start release-specific documentation -->
1601: * <div class="ReleaseSpecificDocumentation">
1602: * <h3>HSQLDB-Specific Information:</h3> <p>
1603: *
1604: * Starting with 1.7.2, HSLQDB supports this.
1605: * </div>
1606: * <!-- end release-specific documentation -->
1607: *
1608: * @param parameterName the name of the parameter
1609: * @param x the parameter value
1610: * @exception SQLException if a database access error occurs
1611: * @see #getByte
1612: * @since JDK 1.4, HSQLDB 1.7.0
1613: */
1614: //#ifdef JDBC3
1615: public void setByte(String parameterName, byte x)
1616: throws SQLException {
1617: setByte(findParameterIndex(parameterName), x);
1618: }
1619:
1620: //#endif JDBC3
1621:
1622: /**
1623: * <!-- start generic documentation -->
1624: * Sets the designated parameter to the given Java <code>short</code> value.
1625: * The driver converts this to an SQL <code>SMALLINT</code> value when
1626: * it sends it to the database. <p>
1627: * <!-- end generic documentation -->
1628: *
1629: * <!-- start release-specific documentation -->
1630: * <div class="ReleaseSpecificDocumentation">
1631: * <h3>HSQLDB-Specific Information:</h3> <p>
1632: *
1633: * Starting with 1.7.2, HSLQDB supports this.
1634: * </div>
1635: * <!-- end release-specific documentation -->
1636: *
1637: * @param parameterName the name of the parameter
1638: * @param x the parameter value
1639: * @exception SQLException if a database access error occurs
1640: * @see #getShort
1641: * @since JDK 1.4, HSQLDB 1.7.0
1642: */
1643: //#ifdef JDBC3
1644: public void setShort(String parameterName, short x)
1645: throws SQLException {
1646: setShort(findParameterIndex(parameterName), x);
1647: }
1648:
1649: //#endif JDBC3
1650:
1651: /**
1652: * <!-- start generic documentation -->
1653: * Sets the designated parameter to the given Java <code>int</code> value.
1654: * The driver converts this to an SQL <code>INTEGER</code> value when it
1655: * sends it to the database. <p>
1656: * <!-- end generic documentation -->
1657: *
1658: * <!-- start release-specific documentation -->
1659: * <div class="ReleaseSpecificDocumentation">
1660: * <h3>HSQLDB-Specific Information:</h3> <p>
1661: *
1662: * Starting with 1.7.2, HSLQDB supports this.
1663: * </div>
1664: * <!-- end release-specific documentation -->
1665: *
1666: * @param parameterName the name of the parameter
1667: * @param x the parameter value
1668: * @exception SQLException if a database access error occurs
1669: * @see #getInt
1670: * @since JDK 1.4, HSQLDB 1.7.0
1671: */
1672: //#ifdef JDBC3
1673: public void setInt(String parameterName, int x) throws SQLException {
1674: setInt(findParameterIndex(parameterName), x);
1675: }
1676:
1677: //#endif JDBC3
1678:
1679: /**
1680: * <!-- start generic documentation -->
1681: * Sets the designated parameter to the given Java <code>long</code> value.
1682: * The driver converts this to an SQL <code>BIGINT</code> value when it
1683: * sends it to the database. <p>
1684: * <!-- end generic documentation -->
1685: *
1686: * <!-- start release-specific documentation -->
1687: * <div class="ReleaseSpecificDocumentation">
1688: * <h3>HSQLDB-Specific Information:</h3> <p>
1689: *
1690: * Starting with 1.7.2, HSLQDB supports this.
1691: * </div>
1692: * <!-- end release-specific documentation -->
1693: *
1694: * @param parameterName the name of the parameter
1695: * @param x the parameter value
1696: * @exception SQLException if a database access error occurs
1697: * @see #getLong
1698: * @since JDK 1.4, HSQLDB 1.7.0
1699: */
1700: //#ifdef JDBC3
1701: public void setLong(String parameterName, long x)
1702: throws SQLException {
1703: setLong(findParameterIndex(parameterName), x);
1704: }
1705:
1706: //#endif JDBC3
1707:
1708: /**
1709: * <!-- start generic documentation -->
1710: * Sets the designated parameter to the given Java <code>float</code> value.
1711: * The driver converts this to an SQL <code>FLOAT</code> value when it
1712: * sends it to the database. <p>
1713: * <!-- end generic documentation -->
1714: *
1715: * <!-- start release-specific documentation -->
1716: * <div class="ReleaseSpecificDocumentation">
1717: * <h3>HSQLDB-Specific Information:</h3> <p>
1718: *
1719: * Starting with 1.7.2, HSLQDB supports this.
1720: * </div>
1721: * <!-- end release-specific documentation -->
1722: *
1723: * @param parameterName the name of the parameter
1724: * @param x the parameter value
1725: * @exception SQLException if a database access error occurs
1726: * @see #getFloat
1727: * @since JDK 1.4, HSQLDB 1.7.0
1728: */
1729: //#ifdef JDBC3
1730: public void setFloat(String parameterName, float x)
1731: throws SQLException {
1732: setFloat(findParameterIndex(parameterName), x);
1733: }
1734:
1735: //#endif JDBC3
1736:
1737: /**
1738: * <!-- start generic documentation -->
1739: * Sets the designated parameter to the given Java <code>double</code> value.
1740: * The driver converts this to an SQL <code>DOUBLE</code> value when it
1741: * sends it to the database. <p>
1742: * <!-- end generic documentation -->
1743: *
1744: * <!-- start release-specific documentation -->
1745: * <div class="ReleaseSpecificDocumentation">
1746: * <h3>HSQLDB-Specific Information:</h3> <p>
1747: *
1748: * Starting with 1.7.2, HSLQDB supports this.
1749: * </div>
1750: * <!-- end release-specific documentation -->
1751: *
1752: * @param parameterName the name of the parameter
1753: * @param x the parameter value
1754: * @exception SQLException if a database access error occurs
1755: * @see #getDouble
1756: * @since JDK 1.4, HSQLDB 1.7.0
1757: */
1758: //#ifdef JDBC3
1759: public void setDouble(String parameterName, double x)
1760: throws SQLException {
1761: setDouble(findParameterIndex(parameterName), x);
1762: }
1763:
1764: //#endif JDBC3
1765:
1766: /**
1767: * <!-- start generic documentation -->
1768: * Sets the designated parameter to the given
1769: * <code>java.math.BigDecimal</code> value.
1770: * The driver converts this to an SQL <code>NUMERIC</code> value when
1771: * it sends it to the database. <p>
1772: * <!-- end generic documentation -->
1773: *
1774: * <!-- start release-specific documentation -->
1775: * <div class="ReleaseSpecificDocumentation">
1776: * <h3>HSQLDB-Specific Information:</h3> <p>
1777: *
1778: * Starting with 1.7.2, HSLQDB supports this.
1779: * </div>
1780: * <!-- end release-specific documentation -->
1781: *
1782: * @param parameterName the name of the parameter
1783: * @param x the parameter value
1784: * @exception SQLException if a database access error occurs
1785: * @see #getBigDecimal
1786: * @since JDK 1.4, HSQLDB 1.7.0
1787: */
1788: //#ifdef JDBC3
1789: public void setBigDecimal(String parameterName, BigDecimal x)
1790: throws SQLException {
1791: setBigDecimal(findParameterIndex(parameterName), x);
1792: }
1793:
1794: //#endif JDBC3
1795:
1796: /**
1797: * <!-- start generic documentation -->
1798: * Sets the designated parameter to the given Java <code>String</code>
1799: * value. The driver converts this to an SQL <code>VARCHAR</code>
1800: * or <code>LONGVARCHAR</code> value (depending on the argument's
1801: * size relative to the driver's limits on <code>VARCHAR</code> values)
1802: * when it sends it to the database. <p>
1803: * <!-- end generic documentation -->
1804: *
1805: * <!-- start release-specific documentation -->
1806: * <div class="ReleaseSpecificDocumentation">
1807: * <h3>HSQLDB-Specific Information:</h3> <p>
1808: *
1809: * Starting with 1.7.2, HSLQDB supports this.
1810: * </div>
1811: * <!-- end release-specific documentation -->
1812: *
1813: * @param parameterName the name of the parameter
1814: * @param x the parameter value
1815: * @exception SQLException if a database access error occurs
1816: * @see #getString
1817: * @since JDK 1.4, HSQLDB 1.7.0
1818: */
1819: //#ifdef JDBC3
1820: public void setString(String parameterName, String x)
1821: throws SQLException {
1822: setString(findParameterIndex(parameterName), x);
1823: }
1824:
1825: //#endif JDBC3
1826:
1827: /**
1828: * <!-- start generic documentation -->
1829: * Sets the designated parameter to the given Java array of bytes.
1830: * The driver converts this to an SQL <code>VARBINARY</code> or
1831: * <code>LONGVARBINARY</code> (depending on the argument's size relative
1832: * to the driver's limits on <code>VARBINARY</code> values) when it sends
1833: * it to the database. <p>
1834: * <!-- end generic documentation -->
1835: *
1836: * <!-- start release-specific documentation -->
1837: * <div class="ReleaseSpecificDocumentation">
1838: * <h3>HSQLDB-Specific Information:</h3> <p>
1839: *
1840: * Starting with 1.7.2, HSLQDB supports this.
1841: * </div>
1842: * <!-- end release-specific documentation -->
1843: *
1844: * @param parameterName the name of the parameter
1845: * @param x the parameter value
1846: * @exception SQLException if a database access error occurs
1847: * @see #getBytes
1848: * @since JDK 1.4, HSQLDB 1.7.0
1849: */
1850: //#ifdef JDBC3
1851: public void setBytes(String parameterName, byte[] x)
1852: throws SQLException {
1853: setBytes(findParameterIndex(parameterName), x);
1854: }
1855:
1856: //#endif JDBC3
1857:
1858: /**
1859: * <!-- start generic documentation -->
1860: * (JDBC4 clarification:) Sets the designated parameter to the given <code>java.sql.Date</code> value
1861: * using the default time zone of the virtual machine that is running
1862: * the application. The driver converts this to an SQL <code>DATE</code> value
1863: * when it sends it to the database. <p>
1864: * <!-- end generic documentation -->
1865: *
1866: * <!-- start release-specific documentation -->
1867: * <div class="ReleaseSpecificDocumentation">
1868: * <h3>HSQLDB-Specific Information:</h3> <p>
1869: *
1870: * Starting with 1.7.2, HSLQDB supports this.
1871: * </div>
1872: * <!-- end release-specific documentation -->
1873: *
1874: * @param parameterName the name of the parameter
1875: * @param x the parameter value
1876: * @exception SQLException if a database access error occurs
1877: * @see #getDate
1878: * @since JDK 1.4, HSQLDB 1.7.0
1879: */
1880: //#ifdef JDBC3
1881: public void setDate(String parameterName, Date x)
1882: throws SQLException {
1883: setDate(findParameterIndex(parameterName), x);
1884: }
1885:
1886: //#endif JDBC3
1887:
1888: /**
1889: * <!-- start generic documentation -->
1890: * Sets the designated parameter to the given <code>java.sql.Time</code>
1891: * value. The driver converts this to an SQL <code>TIME</code> value
1892: * when it sends it to the database. <p>
1893: * <!-- end generic documentation -->
1894: *
1895: * <!-- start release-specific documentation -->
1896: * <div class="ReleaseSpecificDocumentation">
1897: * <h3>HSQLDB-Specific Information:</h3> <p>
1898: *
1899: * Starting with 1.7.2, HSLQDB supports this.
1900: * </div>
1901: * <!-- end release-specific documentation -->
1902: *
1903: * @param parameterName the name of the parameter
1904: * @param x the parameter value
1905: * @exception SQLException if a database access error occurs
1906: * @see #getTime
1907: * @since JDK 1.4, HSQLDB 1.7.0
1908: */
1909: //#ifdef JDBC3
1910: public void setTime(String parameterName, Time x)
1911: throws SQLException {
1912: setTime(findParameterIndex(parameterName), x);
1913: }
1914:
1915: //#endif JDBC3
1916:
1917: /**
1918: * <!-- start generic documentation -->
1919: * Sets the designated parameter to the given
1920: * <code>java.sql.Timestamp</code> value. The driver
1921: * converts this to an SQL <code>TIMESTAMP</code> value when it
1922: * sends it to the database. <p>
1923: * <!-- end generic documentation -->
1924: *
1925: * <!-- start release-specific documentation -->
1926: * <div class="ReleaseSpecificDocumentation">
1927: * <h3>HSQLDB-Specific Information:</h3> <p>
1928: *
1929: * Starting with 1.7.2, HSLQDB supports this.
1930: * </div>
1931: * <!-- end release-specific documentation -->
1932: *
1933: * @param parameterName the name of the parameter
1934: * @param x the parameter value
1935: * @exception SQLException if a database access error occurs
1936: * @see #getTimestamp
1937: * @since JDK 1.4, HSQLDB 1.7.0
1938: */
1939: //#ifdef JDBC3
1940: public void setTimestamp(String parameterName, Timestamp x)
1941: throws SQLException {
1942: setTimestamp(findParameterIndex(parameterName), x);
1943: }
1944:
1945: //#endif JDBC3
1946:
1947: /**
1948: * <!-- start generic documentation -->
1949: * Sets the designated parameter to the given input stream, which will
1950: * have the specified number of bytes.
1951: * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
1952: * parameter, it may be more practical to send it via a
1953: * <code>java.io.InputStream</code>. Data will be read from the stream
1954: * as needed until end-of-file is reached. The JDBC driver will
1955: * do any necessary conversion from ASCII to the database char format.
1956: *
1957: * <P><B>Note:</B> This stream object can either be a standard
1958: * Java stream object or your own subclass that implements the
1959: * standard interface. <p>
1960: * <!-- end generic documentation -->
1961: *
1962: * <!-- start release-specific documentation -->
1963: * <div class="ReleaseSpecificDocumentation">
1964: * <h3>HSQLDB-Specific Information:</h3> <p>
1965: *
1966: * Starting with 1.7.2, HSLQDB supports this.
1967: * </div>
1968: * <!-- end release-specific documentation -->
1969: *
1970: * @param parameterName the name of the parameter
1971: * @param x the Java input stream that contains the ASCII parameter value
1972: * @param length the number of bytes in the stream
1973: * @exception SQLException if a database access error occurs
1974: * @since JDK 1.4, HSQLDB 1.7.0
1975: */
1976: //#ifdef JDBC3
1977: public void setAsciiStream(String parameterName,
1978: java.io.InputStream x, int length) throws SQLException {
1979: setAsciiStream(findParameterIndex(parameterName), x, length);
1980: }
1981:
1982: //#endif JDBC3
1983:
1984: /**
1985: * <!-- start generic documentation -->
1986: * Sets the designated parameter to the given input stream, which will
1987: * have the specified number of bytes.
1988: * When a very large binary value is input to a <code>LONGVARBINARY</code>
1989: * parameter, it may be more practical to send it via a
1990: * <code>java.io.InputStream</code> object. The data will be read from
1991: * the stream as needed until end-of-file is reached.
1992: *
1993: * <P><B>Note:</B> This stream object can either be a standard
1994: * Java stream object or your own subclass that implements the
1995: * standard interface. <p>
1996: * <!-- end generic documentation -->
1997: *
1998: * <!-- start release-specific documentation -->
1999: * <div class="ReleaseSpecificDocumentation">
2000: * <h3>HSQLDB-Specific Information:</h3> <p>
2001: *
2002: * Starting with 1.7.2, HSLQDB supports this.
2003: * </div>
2004: * <!-- end release-specific documentation -->
2005: *
2006: * @param parameterName the name of the parameter
2007: * @param x the java input stream which contains the binary parameter value
2008: * @param length the number of bytes in the stream
2009: * @exception SQLException if a database access error occurs
2010: * @since JDK 1.4, HSQLDB 1.7.0
2011: */
2012: //#ifdef JDBC3
2013: public void setBinaryStream(String parameterName,
2014: java.io.InputStream x, int length) throws SQLException {
2015: setBinaryStream(findParameterIndex(parameterName), x, length);
2016: }
2017:
2018: //#endif JDBC3
2019:
2020: /**
2021: * <!-- start generic documentation -->
2022: * Sets the value of the designated parameter with the given object.
2023: * The second argument must be an object type; for integral values, the
2024: * <code>java.lang</code> equivalent objects should be used.
2025: *
2026: * <p>The given Java object will be converted to the given targetSqlType
2027: * before being sent to the database.
2028: *
2029: * If the object has a custom mapping (is of a class implementing the
2030: * interface <code>SQLData</code>),
2031: * the JDBC driver should call the method <code>SQLData.writeSQL</code>
2032: * to write it to the SQL data stream.
2033: * If, on the other hand, the object is of a class implementing
2034: * <code>Ref</code>, <code>Blob</code>, <code>Clob</code>,
2035: * <code>Struct</code>, or <code>Array</code>, the driver should pass it
2036: * to the database as a value of the corresponding SQL type.
2037: * <P>
2038: * Note that this method may be used to pass datatabase-
2039: * specific abstract data types. <p>
2040: * <!-- end generic documentation -->
2041: *
2042: * <!-- start release-specific documentation -->
2043: * <div class="ReleaseSpecificDocumentation">
2044: * <h3>HSQLDB-Specific Information:</h3> <p>
2045: *
2046: * Starting with 1.7.2, HSLQDB supports this.
2047: * </div>
2048: * <!-- end release-specific documentation -->
2049: *
2050: * @param parameterName the name of the parameter
2051: * @param x the object containing the input parameter value
2052: * @param targetSqlType the SQL type (as defined in java.sql.Types) to be
2053: * sent to the database. The scale argument may further qualify this type.
2054: * @param scale for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types,
2055: * this is the number of digits after the decimal point. For all
2056: * other types, this value will be ignored.
2057: * @exception SQLException if a database access error occurs
2058: * @see java.sql.Types
2059: * @see #getObject
2060: * @since JDK 1.4, HSQLDB 1.7.0
2061: */
2062: //#ifdef JDBC3
2063: public void setObject(String parameterName, Object x,
2064: int targetSqlType, int scale) throws SQLException {
2065: setObject(findParameterIndex(parameterName), x, targetSqlType,
2066: scale);
2067: }
2068:
2069: //#endif JDBC3
2070:
2071: /**
2072: * <!-- start generic documentation -->
2073: * Sets the value of the designated parameter with the given object.
2074: * This method is like the method <code>setObject</code>
2075: * above, except that it assumes a scale of zero. <p>
2076: * <!-- end generic documentation -->
2077: *
2078: * <!-- start release-specific documentation -->
2079: * <div class="ReleaseSpecificDocumentation">
2080: * <h3>HSQLDB-Specific Information:</h3> <p>
2081: *
2082: * Starting with 1.7.2, HSLQDB supports this.
2083: * </div>
2084: * <!-- end release-specific documentation -->
2085: *
2086: * @param parameterName the name of the parameter
2087: * @param x the object containing the input parameter value
2088: * @param targetSqlType the SQL type (as defined in java.sql.Types) to be
2089: * sent to the database
2090: * @exception SQLException if a database access error occurs
2091: * @see #getObject
2092: * @since JDK 1.4, HSQLDB 1.7.0
2093: */
2094: //#ifdef JDBC3
2095: public void setObject(String parameterName, Object x,
2096: int targetSqlType) throws SQLException {
2097: setObject(findParameterIndex(parameterName), x, targetSqlType);
2098: }
2099:
2100: //#endif JDBC3
2101:
2102: /**
2103: * <!-- start generic documentation -->
2104: * Sets the value of the designated parameter with the given object.
2105: * The second parameter must be of type <code>Object</code>; therefore,
2106: * the <code>java.lang</code> equivalent objects should be used for
2107: * built-in types.
2108: *
2109: * <p>The JDBC specification specifies a standard mapping from
2110: * Java <code>Object</code> types to SQL types. The given argument
2111: * will be converted to the corresponding SQL type before being
2112: * sent to the database.
2113: *
2114: * <p>Note that this method may be used to pass datatabase-
2115: * specific abstract data types, by using a driver-specific Java
2116: * type.
2117: *
2118: * If the object is of a class implementing the interface
2119: * <code>SQLData</code>, the JDBC driver should call the method
2120: * <code>SQLData.writeSQL</code> to write it to the SQL data stream.
2121: * If, on the other hand, the object is of a class implementing
2122: * <code>Ref</code>, <code>Blob</code>, <code>Clob</code>,
2123: * <code>Struct</code>, or <code>Array</code>, the driver should pass it
2124: * to the database as a value of the corresponding SQL type.
2125: * <P>
2126: * This method throws an exception if there is an ambiguity, for example,
2127: * if the object is of a class implementing more than one of the
2128: * interfaces named above. <p>
2129: * <!-- end generic documentation -->
2130: *
2131: * <!-- start release-specific documentation -->
2132: * <div class="ReleaseSpecificDocumentation">
2133: * <h3>HSQLDB-Specific Information:</h3> <p>
2134: *
2135: * Starting with 1.7.2, HSLQDB supports this.
2136: * </div>
2137: * <!-- end release-specific documentation -->
2138: *
2139: * @param parameterName the name of the parameter
2140: * @param x the object containing the input parameter value
2141: * @exception SQLException if a database access error occurs or if the given
2142: * <code>Object</code> parameter is ambiguous
2143: * @see #getObject
2144: * @since JDK 1.4, HSQLDB 1.7.0
2145: */
2146: //#ifdef JDBC3
2147: public void setObject(String parameterName, Object x)
2148: throws SQLException {
2149: setObject(findParameterIndex(parameterName), x);
2150: }
2151:
2152: //#endif JDBC3
2153:
2154: /**
2155: * <!-- start generic documentation -->
2156: * Sets the designated parameter to the given <code>Reader</code>
2157: * object, which is the given number of characters long.
2158: * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
2159: * parameter, it may be more practical to send it via a
2160: * <code>java.io.Reader</code> object. The data will be read from the
2161: * stream as needed until end-of-file is reached. The JDBC driver will
2162: * do any necessary conversion from UNICODE to the database char format.
2163: *
2164: * <P><B>Note:</B> This stream object can either be a standard
2165: * Java stream object or your own subclass that implements the
2166: * standard interface. <p>
2167: * <!-- end generic documentation -->
2168: *
2169: * <!-- start release-specific documentation -->
2170: * <div class="ReleaseSpecificDocumentation">
2171: * <h3>HSQLDB-Specific Information:</h3> <p>
2172: *
2173: * Starting with 1.7.2, HSLQDB supports this.
2174: * </div>
2175: * <!-- end release-specific documentation -->
2176: *
2177: * @param parameterName the name of the parameter
2178: * @param reader the <code>java.io.Reader</code> object that
2179: * contains the UNICODE data used as the designated parameter
2180: * @param length the number of characters in the stream
2181: * @exception SQLException if a database access error occurs
2182: * @since JDK 1.4, HSQLDB 1.7.0
2183: */
2184: //#ifdef JDBC3
2185: public void setCharacterStream(String parameterName,
2186: java.io.Reader reader, int length) throws SQLException {
2187: setCharacterStream(findParameterIndex(parameterName), reader,
2188: length);
2189: }
2190:
2191: //#endif JDBC3
2192:
2193: /**
2194: * <!-- start generic documentation -->
2195: * Sets the designated parameter to the given <code>java.sql.Date</code>
2196: * value, using the given <code>Calendar</code> object. The driver uses
2197: * the <code>Calendar</code> object to construct an SQL <code>DATE</code>
2198: * value, which the driver then sends to the database. With a
2199: * a <code>Calendar</code> object, the driver can calculate the date
2200: * taking into account a custom timezone. If no
2201: * <code>Calendar</code> object is specified, the driver uses the default
2202: * timezone, which is that of the virtual machine running the
2203: * application. <p>
2204: * <!-- end generic documentation -->
2205: *
2206: * <!-- start release-specific documentation -->
2207: * <div class="ReleaseSpecificDocumentation">
2208: * <h3>HSQLDB-Specific Information:</h3> <p>
2209: *
2210: * Starting with 1.7.2, HSLQDB supports this.
2211: * </div>
2212: * <!-- end release-specific documentation -->
2213: *
2214: * @param parameterName the name of the parameter
2215: * @param x the parameter value
2216: * @param cal the <code>Calendar</code> object the driver will use
2217: * to construct the date
2218: * @exception SQLException if a database access error occurs
2219: * @see #getDate
2220: * @since JDK 1.4, HSQLDB 1.7.0
2221: */
2222: //#ifdef JDBC3
2223: public void setDate(String parameterName, Date x, Calendar cal)
2224: throws SQLException {
2225: setDate(findParameterIndex(parameterName), x, cal);
2226: }
2227:
2228: //#endif JDBC3
2229:
2230: /**
2231: * <!-- start generic documentation -->
2232: * Sets the designated parameter to the given <code>java.sql.Time</code>
2233: * value, using the given <code>Calendar</code> object. The driver uses
2234: * the <code>Calendar</code> object to construct an SQL <code>TIME</code>
2235: * value, which the driver then sends to the database. With a
2236: * a <code>Calendar</code> object, the driver can calculate the time
2237: * taking into account a custom timezone. If no
2238: * <code>Calendar</code> object is specified, the driver uses the default
2239: * timezone, which is that of the virtual machine running the
2240: * application. <p>
2241: * <!-- end generic documentation -->
2242: *
2243: * <!-- start release-specific documentation -->
2244: * <div class="ReleaseSpecificDocumentation">
2245: * <h3>HSQLDB-Specific Information:</h3> <p>
2246: *
2247: * Starting with 1.7.2, HSLQDB supports this.
2248: * </div>
2249: * <!-- end release-specific documentation -->
2250: *
2251: * @param parameterName the name of the parameter
2252: * @param x the parameter value
2253: * @param cal the <code>Calendar</code> object the driver will use
2254: * to construct the time
2255: * @exception SQLException if a database access error occurs
2256: * @see #getTime
2257: * @since JDK 1.4, HSQLDB 1.7.0
2258: */
2259: //#ifdef JDBC3
2260: public void setTime(String parameterName, Time x, Calendar cal)
2261: throws SQLException {
2262: setTime(findParameterIndex(parameterName), x, cal);
2263: }
2264:
2265: //#endif JDBC3
2266:
2267: /**
2268: * <!-- start generic documentation -->
2269: * Sets the designated parameter to the given
2270: * <code>java.sql.Timestamp</code> value, using the given
2271: * <code>Calendar</code> object. The driver uses the
2272: * <code>Calendar</code> object to construct an SQL
2273: * <code>TIMESTAMP</code> value, which the driver then sends to the
2274: * database. With a <code>Calendar</code> object, the driver can
2275: * calculate the timestamp taking into account a custom timezone. If no
2276: * <code>Calendar</code> object is specified, the driver uses the default
2277: * timezone, which is that of the virtual machine running the
2278: * application. <p>
2279: * <!-- end generic documentation -->
2280: *
2281: * <!-- start release-specific documentation -->
2282: * <div class="ReleaseSpecificDocumentation">
2283: * <h3>HSQLDB-Specific Information:</h3> <p>
2284: *
2285: * Starting with 1.7.2, HSLQDB supports this.
2286: * </div>
2287: * <!-- end release-specific documentation -->
2288: *
2289: * @param parameterName the name of the parameter
2290: * @param x the parameter value
2291: * @param cal the <code>Calendar</code> object the driver will use
2292: * to construct the timestamp
2293: * @exception SQLException if a database access error occurs
2294: * @see #getTimestamp
2295: * @since JDK 1.4, HSQLDB 1.7.0
2296: */
2297: //#ifdef JDBC3
2298: public void setTimestamp(String parameterName, Timestamp x,
2299: Calendar cal) throws SQLException {
2300: setTimestamp(findParameterIndex(parameterName), x, cal);
2301: }
2302:
2303: //#endif JDBC3
2304:
2305: /**
2306: * <!-- start generic documentation -->
2307: * Sets the designated parameter to SQL <code>NULL</code>.
2308: * This version of the method <code>setNull</code> should
2309: * be used for user-defined types and <code>REF</code> type parameters.
2310: * Examples of user-defined types include: <code>STRUCT</code>,
2311: * <code>DISTINCT</code>, <code>JAVA_OBJECT</code>, and
2312: * named array types.
2313: *
2314: * <P><B>Note:</B> To be portable, applications must give the
2315: * SQL type code and the fully-qualified SQL type name when specifying
2316: * a <code>NULL</code> user-defined or <code>REF</code> parameter.
2317: * In the case of a user-defined type the name is the type name of the
2318: * parameter itself. For a <code>REF</code> parameter, the name is the
2319: * type name of the referenced type. If a JDBC driver does not need
2320: * the type code or type name information, it may ignore it.
2321: *
2322: * Although it is intended for user-defined and <code>Ref</code>
2323: * parameters, this method may be used to set a null parameter of
2324: * any JDBC type. If the parameter does not have a user-defined or
2325: * <code>REF</code> type, the given <code>typeName</code> is ignored. <p>
2326: * <!-- end generic documentation -->
2327: *
2328: * <!-- start release-specific documentation -->
2329: * <div class="ReleaseSpecificDocumentation">
2330: * <h3>HSQLDB-Specific Information:</h3> <p>
2331: *
2332: * Starting with 1.7.2, HSLQDB supports this.
2333: * </div>
2334: * <!-- end release-specific documentation -->
2335: *
2336: * @param parameterName the name of the parameter
2337: * @param sqlType a value from <code>java.sql.Types</code>
2338: * @param typeName the fully-qualified name of an SQL user-defined type;
2339: * ignored if the parameter is not a user-defined type or
2340: * SQL <code>REF</code> value
2341: * @exception SQLException if a database access error occurs
2342: * @since JDK 1.4, HSQLDB 1.7.0
2343: */
2344: //#ifdef JDBC3
2345: public void setNull(String parameterName, int sqlType,
2346: String typeName) throws SQLException {
2347: setNull(findParameterIndex(parameterName), sqlType, typeName);
2348: }
2349:
2350: //#endif JDBC3
2351:
2352: /**
2353: * <!-- start generic documentation -->
2354: * Retrieves the value of a JDBC <code>CHAR</code>, <code>VARCHAR</code>,
2355: * or <code>LONGVARCHAR</code> parameter as a <code>String</code> in
2356: * the Java programming language.
2357: * <p>
2358: * For the fixed-length type JDBC <code>CHAR</code>,
2359: * the <code>String</code> object
2360: * returned has exactly the same value the (JDBC4 clarification:) SQL
2361: * <code>CHAR</code> value had in the
2362: * database, including any padding added by the database. <p>
2363: * <!-- end generic documentation -->
2364: *
2365: * <!-- start release-specific documentation -->
2366: * <div class="ReleaseSpecificDocumentation">
2367: * <h3>HSQLDB-Specific Information:</h3> <p>
2368: *
2369: * HSQLDB 1.7.2 does not support this feature. <p>
2370: *
2371: * Calling this method always throws an <code>SQLException</code>.
2372: * </div>
2373: * <!-- end release-specific documentation -->
2374: *
2375: * @param parameterName the name of the parameter
2376: * @return the parameter value. If the value is SQL <code>NULL</code>,
2377: * the result is <code>null</code>.
2378: * @exception SQLException if a database access error occurs
2379: * @see #setString
2380: * @since JDK 1.4, HSQLDB 1.7.0
2381: */
2382: //#ifdef JDBC3
2383: public String getString(String parameterName) throws SQLException {
2384: return getString(findParameterIndex(parameterName));
2385: }
2386:
2387: //#endif JDBC3
2388:
2389: /**
2390: * <!-- start generic documentation -->
2391: * (JDBC4 modified:) Retrieves the value of a JDBC <code>BIT</code> or <code>BOOLEAN</code>
2392: * parameter as a
2393: * <code>boolean</code> in the Java programming language. <p>
2394: * <!-- end generic documentation -->
2395: *
2396: * <!-- start release-specific documentation -->
2397: * <div class="ReleaseSpecificDocumentation">
2398: * <h3>HSQLDB-Specific Information:</h3> <p>
2399: *
2400: * HSQLDB 1.7.2 does not support this feature. <p>
2401: *
2402: * Calling this method always throws an <code>SQLException</code>.
2403: * </div>
2404: * <!-- end release-specific documentation -->
2405: *
2406: * @param parameterName the name of the parameter
2407: * @return the parameter value. If the value is SQL <code>NULL</code>,
2408: * the result is <code>false</code>.
2409: * @exception SQLException if a database access error occurs
2410: * @see #setBoolean
2411: * @since JDK 1.4, HSQLDB 1.7.0
2412: */
2413: //#ifdef JDBC3
2414: public boolean getBoolean(String parameterName) throws SQLException {
2415: return getBoolean(findParameterIndex(parameterName));
2416: }
2417:
2418: //#endif JDBC3
2419:
2420: /**
2421: * <!-- start generic documentation -->
2422: * Retrieves the value of a JDBC <code>TINYINT</code> parameter as a
2423: * <code>byte</code> in the Java programming language. <p>
2424: * <!-- end generic documentation -->
2425: *
2426: * <!-- start release-specific documentation -->
2427: * <div class="ReleaseSpecificDocumentation">
2428: * <h3>HSQLDB-Specific Information:</h3> <p>
2429: *
2430: * HSQLDB 1.7.2 does not support this feature. <p>
2431: *
2432: * Calling this method always throws an <code>SQLException</code>.
2433: * </div>
2434: * <!-- end release-specific documentation -->
2435: *
2436: * @param parameterName the name of the parameter
2437: * @return the parameter value. If the value is SQL <code>NULL</code>,
2438: * the result is <code>0</code>.
2439: * @exception SQLException if a database access error occurs
2440: * @see #setByte
2441: * @since JDK 1.4, HSQLDB 1.7.0
2442: */
2443: //#ifdef JDBC3
2444: public byte getByte(String parameterName) throws SQLException {
2445: return getByte(findParameterIndex(parameterName));
2446: }
2447:
2448: //#endif JDBC3
2449:
2450: /**
2451: * <!-- start generic documentation -->
2452: * Retrieves the value of a JDBC <code>SMALLINT</code> parameter as
2453: * a <code>short</code> in the Java programming language. <p>
2454: * <!-- end generic documentation -->
2455: *
2456: * <!-- start release-specific documentation -->
2457: * <div class="ReleaseSpecificDocumentation">
2458: * <h3>HSQLDB-Specific Information:</h3> <p>
2459: *
2460: * HSQLDB 1.7.2 does not support this feature. <p>
2461: *
2462: * Calling this method always throws an <code>SQLException</code>.
2463: * </div>
2464: * <!-- end release-specific documentation -->
2465: *
2466: * @param parameterName the name of the parameter
2467: * @return the parameter value. If the value is SQL <code>NULL</code>,
2468: * the result is <code>0</code>.
2469: * @exception SQLException if a database access error occurs
2470: * @see #setShort
2471: * @since JDK 1.4, HSQLDB 1.7.0
2472: */
2473: //#ifdef JDBC3
2474: public short getShort(String parameterName) throws SQLException {
2475: return getShort(findParameterIndex(parameterName));
2476: }
2477:
2478: //#endif JDBC3
2479:
2480: /**
2481: * <!-- start generic documentation -->
2482: * Retrieves the value of a JDBC <code>INTEGER</code> parameter as
2483: * an <code>int</code> in the Java programming language. <p>
2484: * <!-- end generic documentation -->
2485: *
2486: * <!-- start release-specific documentation -->
2487: * <div class="ReleaseSpecificDocumentation">
2488: * <h3>HSQLDB-Specific Information:</h3> <p>
2489: *
2490: * HSQLDB 1.7.2 does not support this feature. <p>
2491: *
2492: * Calling this method always throws an <code>SQLException</code>.
2493: * </div>
2494: * <!-- end release-specific documentation -->
2495: *
2496: * @param parameterName the name of the parameter
2497: * @return the parameter value. If the value is SQL <code>NULL</code>,
2498: * the result is <code>0</code>.
2499: * @exception SQLException if a database access error occurs
2500: * @see #setInt
2501: * @since JDK 1.4, HSQLDB 1.7.0
2502: */
2503: //#ifdef JDBC3
2504: public int getInt(String parameterName) throws SQLException {
2505: return getInt(findParameterIndex(parameterName));
2506: }
2507:
2508: //#endif JDBC3
2509:
2510: /**
2511: * <!-- start generic documentation -->
2512: * Retrieves the value of a JDBC <code>BIGINT</code> parameter as
2513: * a <code>long</code> in the Java programming language. <p>
2514: * <!-- end generic documentation -->
2515: *
2516: * <!-- start release-specific documentation -->
2517: * <div class="ReleaseSpecificDocumentation">
2518: * <h3>HSQLDB-Specific Information:</h3> <p>
2519: *
2520: * HSQLDB 1.7.2 does not support this feature. <p>
2521: *
2522: * Calling this method always throws an <code>SQLException</code>.
2523: * </div>
2524: * <!-- end release-specific documentation -->
2525: *
2526: * @param parameterName the name of the parameter
2527: * @return the parameter value. If the value is SQL <code>NULL</code>,
2528: * the result is <code>0</code>.
2529: * @exception SQLException if a database access error occurs
2530: * @see #setLong
2531: * @since JDK 1.4, HSQLDB 1.7.0
2532: */
2533: //#ifdef JDBC3
2534: public long getLong(String parameterName) throws SQLException {
2535: return getLong(findParameterIndex(parameterName));
2536: }
2537:
2538: //#endif JDBC3
2539:
2540: /**
2541: * <!-- start generic documentation -->
2542: * Retrieves the value of a JDBC <code>FLOAT</code> parameter as
2543: * a <code>float</code> in the Java programming language. <p>
2544: * <!-- end generic documentation -->
2545: *
2546: * <!-- start release-specific documentation -->
2547: * <div class="ReleaseSpecificDocumentation">
2548: * <h3>HSQLDB-Specific Information:</h3> <p>
2549: *
2550: * HSQLDB 1.7.2 does not support this feature. <p>
2551: *
2552: * Calling this method always throws an <code>SQLException</code>.
2553: * </div>
2554: * <!-- end release-specific documentation -->
2555: *
2556: * @param parameterName the name of the parameter
2557: * @return the parameter value. If the value is SQL <code>NULL</code>,
2558: * the result is <code>0</code>.
2559: * @exception SQLException if a database access error occurs
2560: * @see #setFloat
2561: * @since JDK 1.4, HSQLDB 1.7.0
2562: */
2563: //#ifdef JDBC3
2564: public float getFloat(String parameterName) throws SQLException {
2565: return getFloat(findParameterIndex(parameterName));
2566: }
2567:
2568: //#endif JDBC3
2569:
2570: /**
2571: * <!-- start generic documentation -->
2572: * Retrieves the value of a JDBC <code>DOUBLE</code> parameter as
2573: * a <code>double</code> in the Java programming language. <p>
2574: * <!-- end generic documentation -->
2575: *
2576: * <!-- start release-specific documentation -->
2577: * <div class="ReleaseSpecificDocumentation">
2578: * <h3>HSQLDB-Specific Information:</h3> <p>
2579: *
2580: * HSQLDB 1.7.2 does not support this feature. <p>
2581: *
2582: * Calling this method always throws an <code>SQLException</code>.
2583: * </div>
2584: * <!-- end release-specific documentation -->
2585: *
2586: * @param parameterName the name of the parameter
2587: * @return the parameter value. If the value is SQL <code>NULL</code>,
2588: * the result is <code>0</code>.
2589: * @exception SQLException if a database access error occurs
2590: * @see #setDouble
2591: * @since JDK 1.4, HSQLDB 1.7.0
2592: */
2593: //#ifdef JDBC3
2594: public double getDouble(String parameterName) throws SQLException {
2595: return getDouble(findParameterIndex(parameterName));
2596: }
2597:
2598: //#endif JDBC3
2599:
2600: /**
2601: * <!-- start generic documentation -->
2602: * Retrieves the value of a JDBC <code>BINARY</code> or
2603: * <code>VARBINARY</code> parameter as an array of <code>byte</code>
2604: * values in the Java programming language. <p>
2605: * <!-- end generic documentation -->
2606: *
2607: * <!-- start release-specific documentation -->
2608: * <div class="ReleaseSpecificDocumentation">
2609: * <h3>HSQLDB-Specific Information:</h3> <p>
2610: *
2611: * HSQLDB 1.7.2 does not support this feature. <p>
2612: *
2613: * Calling this method always throws an <code>SQLException</code>.
2614: * </div>
2615: * <!-- end release-specific documentation -->
2616: *
2617: * @param parameterName the name of the parameter
2618: * @return the parameter value. If the value is SQL <code>NULL</code>,
2619: * the result is <code>null</code>.
2620: * @exception SQLException if a database access error occurs
2621: * @see #setBytes
2622: * @since JDK 1.4, HSQLDB 1.7.0
2623: */
2624: //#ifdef JDBC3
2625: public byte[] getBytes(String parameterName) throws SQLException {
2626: return getBytes(findParameterIndex(parameterName));
2627: }
2628:
2629: //#endif JDBC3
2630:
2631: /**
2632: * <!-- start generic documentation -->
2633: * Retrieves the value of a JDBC <code>DATE</code> parameter as a
2634: * <code>java.sql.Date</code> object. <p>
2635: * <!-- end generic documentation -->
2636: *
2637: * <!-- start release-specific documentation -->
2638: * <div class="ReleaseSpecificDocumentation">
2639: * <h3>HSQLDB-Specific Information:</h3> <p>
2640: *
2641: * HSQLDB 1.7.2 does not support this feature. <p>
2642: *
2643: * Calling this method always throws an <code>SQLException</code>.
2644: * </div>
2645: * <!-- end release-specific documentation -->
2646: *
2647: * @param parameterName the name of the parameter
2648: * @return the parameter value. If the value is SQL <code>NULL</code>,
2649: * the result is <code>null</code>.
2650: * @exception SQLException if a database access error occurs
2651: * @see #setDate
2652: * @since JDK 1.4, HSQLDB 1.7.0
2653: */
2654: //#ifdef JDBC3
2655: public Date getDate(String parameterName) throws SQLException {
2656: return getDate(findParameterIndex(parameterName));
2657: }
2658:
2659: //#endif JDBC3
2660:
2661: /**
2662: * <!-- start generic documentation -->
2663: * Retrieves the value of a JDBC <code>TIME</code> parameter as a
2664: * <code>java.sql.Time</code> object. <p>
2665: * <!-- end generic documentation -->
2666: *
2667: * <!-- start release-specific documentation -->
2668: * <div class="ReleaseSpecificDocumentation">
2669: * <h3>HSQLDB-Specific Information:</h3> <p>
2670: *
2671: * HSQLDB 1.7.2 does not support this feature. <p>
2672: *
2673: * Calling this method always throws an <code>SQLException</code>.
2674: * </div>
2675: * <!-- end release-specific documentation -->
2676: *
2677: * @param parameterName the name of the parameter
2678: * @return the parameter value. If the value is SQL <code>NULL</code>,
2679: * the result is <code>null</code>.
2680: * @exception SQLException if a database access error occurs
2681: * @see #setTime
2682: * @since JDK 1.4, HSQLDB 1.7.0
2683: */
2684: //#ifdef JDBC3
2685: public Time getTime(String parameterName) throws SQLException {
2686: return getTime(findParameterIndex(parameterName));
2687: }
2688:
2689: //#endif JDBC3
2690:
2691: /**
2692: * <!-- start generic documentation -->
2693: * Retrieves the value of a JDBC <code>TIMESTAMP</code> parameter as a
2694: * <code>java.sql.Timestamp</code> object. <p>
2695: * <!-- end generic documentation -->
2696: *
2697: * <!-- start release-specific documentation -->
2698: * <div class="ReleaseSpecificDocumentation">
2699: * <h3>HSQLDB-Specific Information:</h3> <p>
2700: *
2701: * HSQLDB 1.7.2 does not support this feature. <p>
2702: *
2703: * Calling this method always throws an <code>SQLException</code>.
2704: * </div>
2705: * <!-- end release-specific documentation -->
2706: *
2707: * @param parameterName the name of the parameter
2708: * @return the parameter value. If the value is SQL <code>NULL</code>,
2709: * the result is <code>null</code>.
2710: * @exception SQLException if a database access error occurs
2711: * @see #setTimestamp
2712: * @since JDK 1.4, HSQLDB 1.7.0
2713: */
2714: //#ifdef JDBC3
2715: public Timestamp getTimestamp(String parameterName)
2716: throws SQLException {
2717: return getTimestamp(findParameterIndex(parameterName));
2718: }
2719:
2720: //#endif JDBC3
2721:
2722: /**
2723: * <!-- start generic documentation -->
2724: * Retrieves the value of a parameter as an <code>Object</code> in the Java
2725: * programming language. If the value is an SQL <code>NULL</code>, the
2726: * driver returns a Java <code>null</code>.
2727: * <p>
2728: * This method returns a Java object whose type corresponds to the JDBC
2729: * type that was registered for this parameter using the method
2730: * <code>registerOutParameter</code>. By registering the target JDBC
2731: * type as <code>java.sql.Types.OTHER</code>, this method can be used
2732: * to read database-specific abstract data types. <p>
2733: * <!-- end generic documentation -->
2734: *
2735: * <!-- start release-specific documentation -->
2736: * <div class="ReleaseSpecificDocumentation">
2737: * <h3>HSQLDB-Specific Information:</h3> <p>
2738: *
2739: * HSQLDB 1.7.2 does not support this feature. <p>
2740: *
2741: * Calling this method always throws an <code>SQLException</code>.
2742: * </div>
2743: * <!-- end release-specific documentation -->
2744: *
2745: * @param parameterName the name of the parameter
2746: * @return A <code>java.lang.Object</code> holding the OUT parameter value.
2747: * @exception SQLException if a database access error occurs
2748: * @see java.sql.Types
2749: * @see #setObject
2750: * @since JDK 1.4, HSQLDB 1.7.0
2751: */
2752: //#ifdef JDBC3
2753: public Object getObject(String parameterName) throws SQLException {
2754: return getObject(findParameterIndex(parameterName));
2755: }
2756:
2757: //#endif JDBC3
2758:
2759: /**
2760: * <!-- start generic documentation -->
2761: * Retrieves the value of a JDBC <code>NUMERIC</code> parameter as a
2762: * <code>java.math.BigDecimal</code> object with as many digits to the
2763: * right of the decimal point as the value contains. <p>
2764: * <!-- end generic documentation -->
2765: *
2766: * <!-- start release-specific documentation -->
2767: * <div class="ReleaseSpecificDocumentation">
2768: * <h3>HSQLDB-Specific Information:</h3> <p>
2769: *
2770: * HSQLDB 1.7.2 does not support this feature. <p>
2771: *
2772: * Calling this method always throws an <code>SQLException</code>.
2773: * </div>
2774: * <!-- end release-specific documentation -->
2775: *
2776: * @param parameterName the name of the parameter
2777: * @return the parameter value in full precision. If the value is
2778: * SQL <code>NULL</code>, the result is <code>null</code>.
2779: * @exception SQLException if a database access error occurs
2780: * @see #setBigDecimal
2781: * @since JDK 1.4, HSQLDB 1.7.0
2782: */
2783: //#ifdef JDBC3
2784: public BigDecimal getBigDecimal(String parameterName)
2785: throws SQLException {
2786: return getBigDecimal(findParameterIndex(parameterName));
2787: }
2788:
2789: //#endif JDBC3
2790:
2791: /**
2792: * <!-- start generic documentation -->
2793: * Returns an object representing the value of OUT parameter
2794: * <code>parameterName</code> and uses <code>map</code> for the custom
2795: * mapping of the parameter value.
2796: * <p>
2797: * This method returns a Java object whose type corresponds to the
2798: * JDBC type that was registered for this parameter using the method
2799: * <code>registerOutParameter</code>. By registering the target
2800: * JDBC type as <code>java.sql.Types.OTHER</code>, this method can
2801: * be used to read database-specific abstract data types. <p>
2802: * <!-- end generic documentation -->
2803: *
2804: * <!-- start release-specific documentation -->
2805: * <div class="ReleaseSpecificDocumentation">
2806: * <h3>HSQLDB-Specific Information:</h3> <p>
2807: *
2808: * HSQLDB 1.7.2 does not support this feature. <p>
2809: *
2810: * Calling this method always throws an <code>SQLException</code>.
2811: * </div>
2812: * <!-- end release-specific documentation -->
2813: *
2814: * @param parameterName the name of the parameter
2815: * @param map the mapping from SQL type names to Java classes
2816: * @return a <code>java.lang.Object</code> holding the OUT parameter value
2817: * @exception SQLException if a database access error occurs
2818: * @see #setObject
2819: * @since JDK 1.4, HSQLDB 1.7.0
2820: */
2821: //#ifdef JDBC3
2822: public Object getObject(String parameterName, Map map)
2823: throws SQLException {
2824: return getObject(findParameterIndex(parameterName), map);
2825: }
2826:
2827: //#endif JDBC3
2828:
2829: /**
2830: * <!-- start generic documentation -->
2831: * Retrieves the value of a JDBC <code>REF(<structured-type>)</code>
2832: * parameter as a {@link Ref} object in the Java programming language. <p>
2833: * <!-- end generic documentation -->
2834: *
2835: * <!-- start release-specific documentation -->
2836: * <div class="ReleaseSpecificDocumentation">
2837: * <h3>HSQLDB-Specific Information:</h3> <p>
2838: *
2839: * HSQLDB 1.7.2 does not support this feature. <p>
2840: *
2841: * Calling this method always throws an <code>SQLException</code>.
2842: * </div>
2843: * <!-- end release-specific documentation -->
2844: *
2845: * @param parameterName the name of the parameter
2846: * @return the parameter value as a <code>Ref</code> object in the
2847: * Java programming language. If the value was SQL <code>NULL</code>,
2848: * the value <code>null</code> is returned.
2849: * @exception SQLException if a database access error occurs
2850: * @since JDK 1.4, HSQLDB 1.7.0
2851: */
2852: //#ifdef JDBC3
2853: public Ref getRef(String parameterName) throws SQLException {
2854: return getRef(findParameterIndex(parameterName));
2855: }
2856:
2857: //#endif JDBC3
2858:
2859: /**
2860: * <!-- start generic documentation -->
2861: * Retrieves the value of a JDBC <code>BLOB</code> parameter as a
2862: * {@link java.sql.Blob} object in the Java programming language. <p>
2863: * <!-- end generic documentation -->
2864: *
2865: * <!-- start release-specific documentation -->
2866: * <div class="ReleaseSpecificDocumentation">
2867: * <h3>HSQLDB-Specific Information:</h3> <p>
2868: *
2869: * HSQLDB 1.7.2 does not support this feature. <p>
2870: *
2871: * Calling this method always throws an <code>SQLException</code>.
2872: * </div>
2873: * <!-- end release-specific documentation -->
2874: *
2875: * @param parameterName the name of the parameter
2876: * @return the parameter value as a <code>Blob</code> object in the
2877: * Java programming language. If the value was SQL <code>NULL</code>,
2878: * the value <code>null</code> is returned.
2879: * @exception SQLException if a database access error occurs
2880: * @since JDK 1.4, HSQLDB 1.7.0
2881: */
2882: //#ifdef JDBC3
2883: public Blob getBlob(String parameterName) throws SQLException {
2884: return getBlob(findParameterIndex(parameterName));
2885: }
2886:
2887: //#endif JDBC3
2888:
2889: /**
2890: * <!-- start generic documentation -->
2891: * Retrieves the value of a JDBC <code>CLOB</code> parameter as a
2892: * {@link java.sql.Clob} object in the Java programming language. <p>
2893: * <!-- end generic documentation -->
2894: *
2895: * <!-- start release-specific documentation -->
2896: * <div class="ReleaseSpecificDocumentation">
2897: * <h3>HSQLDB-Specific Information:</h3> <p>
2898: *
2899: * HSQLDB 1.7.2 does not support this feature. <p>
2900: *
2901: * Calling this method always throws an <code>SQLException</code>.
2902: * </div>
2903: * <!-- end release-specific documentation -->
2904: *
2905: * @param parameterName the name of the parameter
2906: * @return the parameter value as a <code>Clob</code> object in the
2907: * Java programming language. If the value was SQL <code>NULL</code>,
2908: * the value <code>null</code> is returned.
2909: * @exception SQLException if a database access error occurs
2910: * @since JDK 1.4, HSQLDB 1.7.0
2911: */
2912: //#ifdef JDBC3
2913: public Clob getClob(String parameterName) throws SQLException {
2914: return getClob(findParameterIndex(parameterName));
2915: }
2916:
2917: //#endif JDBC3
2918:
2919: /**
2920: * <!-- start generic documentation -->
2921: * Retrieves the value of a JDBC <code>ARRAY</code> parameter as an
2922: * {@link Array} object in the Java programming language. <p>
2923: * <!-- end generic documentation -->
2924: *
2925: * <!-- start release-specific documentation -->
2926: * <div class="ReleaseSpecificDocumentation">
2927: * <h3>HSQLDB-Specific Information:</h3> <p>
2928: *
2929: * HSQLDB 1.7.2 does not support this feature. <p>
2930: *
2931: * Calling this method always throws an <code>SQLException</code>.
2932: * </div>
2933: * <!-- end release-specific documentation -->
2934: *
2935: * @param parameterName the name of the parameter
2936: * @return the parameter value as an <code>Array</code> object in
2937: * Java programming language. If the value was SQL <code>NULL</code>,
2938: * the value <code>null</code> is returned.
2939: * @exception SQLException if a database access error occurs
2940: * @since JDK 1.4, HSQLDB 1.7.0
2941: */
2942: //#ifdef JDBC3
2943: public Array getArray(String parameterName) throws SQLException {
2944: return getArray(findParameterIndex(parameterName));
2945: }
2946:
2947: //#endif JDBC3
2948:
2949: /**
2950: * <!-- start generic documentation -->
2951: * Retrieves the value of a JDBC <code>DATE</code> parameter as a
2952: * <code>java.sql.Date</code> object, using
2953: * the given <code>Calendar</code> object
2954: * to construct the date.
2955: * With a <code>Calendar</code> object, the driver
2956: * can calculate the date taking into account a custom timezone and
2957: * locale. If no <code>Calendar</code> object is specified, the d
2958: * river uses the default timezone and locale. <p>
2959: * <!-- end generic documentation -->
2960: *
2961: * <!-- start release-specific documentation -->
2962: * <div class="ReleaseSpecificDocumentation">
2963: * <h3>HSQLDB-Specific Information:</h3> <p>
2964: *
2965: * HSQLDB 1.7.2 does not support this feature. <p>
2966: *
2967: * Calling this method always throws an <code>SQLException</code>.
2968: * </div>
2969: * <!-- end release-specific documentation -->
2970: *
2971: * @param parameterName the name of the parameter
2972: * @param cal the <code>Calendar</code> object the driver will use
2973: * to construct the date
2974: * @return the parameter value. If the value is SQL <code>NULL</code>,
2975: * the result is <code>null</code>.
2976: * @exception SQLException if a database access error occurs
2977: * @see #setDate
2978: * @since JDK 1.4, HSQLDB 1.7.0
2979: */
2980: //#ifdef JDBC3
2981: public Date getDate(String parameterName, Calendar cal)
2982: throws SQLException {
2983: return getDate(findParameterIndex(parameterName), cal);
2984: }
2985:
2986: //#endif JDBC3
2987:
2988: /**
2989: * <!-- start generic documentation -->
2990: * Retrieves the value of a JDBC <code>TIME</code> parameter as a
2991: * <code>java.sql.Time</code> object, using
2992: * the given <code>Calendar</code> object
2993: * to construct the time.
2994: * With a <code>Calendar</code> object, the driver
2995: * can calculate the time taking into account a custom timezone and
2996: * locale. If no <code>Calendar</code> object is specified, the driver
2997: * uses the default timezone and locale. <p>
2998: * <!-- end generic documentation -->
2999: *
3000: * <!-- start release-specific documentation -->
3001: * <div class="ReleaseSpecificDocumentation">
3002: * <h3>HSQLDB-Specific Information:</h3> <p>
3003: *
3004: * HSQLDB 1.7.2 does not support this feature. <p>
3005: *
3006: * Calling this method always throws an <code>SQLException</code>.
3007: * </div>
3008: * <!-- end release-specific documentation -->
3009: *
3010: * @param parameterName the name of the parameter
3011: * @param cal the <code>Calendar</code> object the driver will use
3012: * to construct the time
3013: * @return the parameter value; if the value is SQL <code>NULL</code>,
3014: * the result is <code>null</code>.
3015: * @exception SQLException if a database access error occurs
3016: * @see #setTime
3017: * @since JDK 1.4, HSQLDB 1.7.0
3018: */
3019: //#ifdef JDBC3
3020: public Time getTime(String parameterName, Calendar cal)
3021: throws SQLException {
3022: return getTime(findParameterIndex(parameterName), cal);
3023: }
3024:
3025: //#endif JDBC3
3026:
3027: /**
3028: * <!-- start generic documentation -->
3029: * Retrieves the value of a JDBC <code>TIMESTAMP</code> parameter as a
3030: * <code>java.sql.Timestamp</code> object, using
3031: * the given <code>Calendar</code> object to construct
3032: * the <code>Timestamp</code> object.
3033: * With a <code>Calendar</code> object, the driver
3034: * can calculate the timestamp taking into account a custom timezone
3035: * and locale. If no <code>Calendar</code> object is specified, the
3036: * driver uses the default timezone and locale. <p>
3037: * <!-- end generic documentation -->
3038: *
3039: * <!-- start release-specific documentation -->
3040: * <div class="ReleaseSpecificDocumentation">
3041: * <h3>HSQLDB-Specific Information:</h3> <p>
3042: *
3043: * HSQLDB 1.7.2 does not support this feature. <p>
3044: *
3045: * Calling this method always throws an <code>SQLException</code>.
3046: * </div>
3047: * <!-- end release-specific documentation -->
3048: *
3049: *
3050: * @param parameterName the name of the parameter
3051: * @param cal the <code>Calendar</code> object the driver will use
3052: * to construct the timestamp
3053: * @return the parameter value. If the value is SQL <code>NULL</code>,
3054: * the result is <code>null</code>.
3055: * @exception SQLException if a database access error occurs
3056: * @see #setTimestamp
3057: * @since JDK 1.4, HSQLDB 1.7.0
3058: */
3059: //#ifdef JDBC3
3060: public Timestamp getTimestamp(String parameterName, Calendar cal)
3061: throws SQLException {
3062: return getTimestamp(findParameterIndex(parameterName), cal);
3063: }
3064:
3065: //#endif JDBC3
3066:
3067: /**
3068: * <!-- start generic documentation -->
3069: * Retrieves the value of a JDBC <code>DATALINK</code> parameter as a
3070: * <code>java.net.URL</code> object. <p>
3071: * <!-- end generic documentation -->
3072: *
3073: * <!-- start release-specific documentation -->
3074: * <div class="ReleaseSpecificDocumentation">
3075: * <h3>HSQLDB-Specific Information:</h3> <p>
3076: *
3077: * HSQLDB 1.7.2 does not support this feature. <p>
3078: *
3079: * Calling this method always throws an <code>SQLException</code>.
3080: * </div>
3081: * <!-- end release-specific documentation -->
3082: *
3083: * @param parameterName the name of the parameter
3084: * @return the parameter value as a <code>java.net.URL</code> object in the
3085: * Java programming language. If the value was SQL
3086: * <code>NULL</code>, the value <code>null</code> is returned.
3087: * @exception SQLException if a database access error occurs,
3088: * or if there is a problem with the URL
3089: * @see #setURL
3090: * @since JDK 1.4, HSQLDB 1.7.0
3091: */
3092: //#ifdef JDBC3
3093: public java.net.URL getURL(String parameterName)
3094: throws SQLException {
3095: return getURL(findParameterIndex(parameterName));
3096: }
3097:
3098: //#endif JDBC3
3099: }
|