00001 /** 00002 * C-JDBC: Clustered JDBC. 00003 * Copyright (C) 2002-2004 French National Institute For Research In Computer 00004 * Science And Control (INRIA). 00005 * Contact: c-jdbc@objectweb.org 00006 * 00007 * This library is free software; you can redistribute it and/or modify it 00008 * under the terms of the GNU Lesser General Public License as published by the 00009 * Free Software Foundation; either version 2.1 of the License, or any later 00010 * version. 00011 * 00012 * This library is distributed in the hope that it will be useful, but WITHOUT 00013 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00014 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License 00015 * for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public License 00018 * along with this library; if not, write to the Free Software Foundation, 00019 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 00020 * 00021 * Initial developer(s): Emmanuel Cecchet. 00022 * Contributor(s): ______________________________________. 00023 */ 00024 00025 package org.objectweb.cjdbc.driver; 00026 00027 import java.io.InputStream; 00028 import java.io.Reader; 00029 import java.math.BigDecimal; 00030 import java.net.URL; 00031 import java.sql.Array; 00032 import java.sql.Blob; 00033 import java.sql.Clob; 00034 import java.sql.Date; 00035 import java.sql.Ref; 00036 import java.sql.SQLException; 00037 import java.sql.Time; 00038 import java.sql.Timestamp; 00039 import java.util.Calendar; 00040 import java.util.Map; 00041 00042 import org.objectweb.cjdbc.common.sql.NotImplementedException; 00043 00044 /** 00045 * This class is used to execute SQL stored procedures. The JDBC API provides a 00046 * stored procedure SQL escape syntax that allows stored procedures to be called 00047 * in a standard way for all RDBMSs. The only syntax accepted by this 00048 * implementation is as follows: 00049 * 00050 * <pre> 00051 * {call <procedure-name>[<arg1>,<arg2>, ...]} 00052 * </pre> 00053 * 00054 * The other standard form 00055 * 00056 * <pre> 00057 * {?= call <procedure-name>[<arg1>,<arg2>, ...]} 00058 * </pre> 00059 * 00060 * is *NOT* supported. Parameters are referred to sequentially, by number, with 00061 * the first parameter being 1. IN parameter values are set using the 00062 * <code>set</code> methods inherited from {@link PreparedStatement}. 00063 * <p> 00064 * OUT parameters are *NOT* supported. 00065 * <p> 00066 * A <code>CallableStatement</code> can return one {@link DriverResultSet} 00067 * object or multiple <code>ResultSet</code> objects. Multiple 00068 * <code>ResultSet</code> objects are handled using operations inherited from 00069 * {@link Statement}. 00070 * 00071 * @see org.objectweb.cjdbc.driver.Connection#prepareCall(String) 00072 * @see DriverResultSet 00073 * @author <a href="mailto:Emmanuel.Cecchet@inria.fr">Emmanuel Cecchet </a> 00074 * @version 1.0 00075 */ 00076 public class CallableStatement extends PreparedStatement 00077 implements 00078 java.sql.CallableStatement 00079 { 00080 /** 00081 * <code>CallableStatements</code> syntax is {call procedure_name[(?, ?, 00082 * ...)]}. Note that {? = call ...} is not supported by this implementation. 00083 * 00084 * @param connection the instanatiating connection 00085 * @param sql the SQL statement with ? for IN markers 00086 * @exception SQLException if something bad occurs 00087 */ 00088 public CallableStatement(Connection connection, String sql) 00089 throws SQLException 00090 { 00091 super(connection, sql); 00092 if (!this.sql.toLowerCase().startsWith("{call") 00093 && !this.sql.toLowerCase().startsWith("}call")) 00094 throw new SQLException( 00095 "Syntax error: callable statements expected syntax is {call procedure_name[(?, ?, ...)]}"); 00096 } 00097 00098 /** 00099 * Registers the OUT parameter in ordinal position <code>parameterIndex</code> 00100 * to the JDBC type <code>sqlType</code>. All OUT parameters must be 00101 * registered before a stored procedure is executed. 00102 * <p> 00103 * The JDBC type specified by <code>sqlType</code> for an OUT parameter 00104 * determines the Java type that must be used in the <code>get</code> method 00105 * to read the value of that parameter. 00106 * <p> 00107 * If the JDBC type expected to be returned to this output parameter is 00108 * specific to this particular database, <code>sqlType</code> should be 00109 * <code>java.sql.Types.OTHER</code>. The method {@link #getObject(int)} 00110 * retrieves the value. 00111 * 00112 * @param parameterIndex the first parameter is 1, the second is 2, and so on 00113 * @param sqlType the JDBC type code defined by <code>java.sql.Types</code>. 00114 * If the parameter is of JDBC type <code>NUMERIC</code> or 00115 * <code>DECIMAL</code>, the version of 00116 * <code>registerOutParameter</code> that accepts a scale value 00117 * should be used. 00118 * @exception SQLException if a database access error occurs 00119 * @see java.sql.Types 00120 */ 00121 public void registerOutParameter(int parameterIndex, int sqlType) 00122 throws SQLException 00123 { 00124 throw new NotImplementedException( 00125 "registerOutParameter(int parameterIndex, int sqlType)"); 00126 } 00127 00128 /** 00129 * Registers the parameter in ordinal position <code>parameterIndex</code> 00130 * to be of JDBC type <code>sqlType</code>. This method must be called 00131 * before a stored procedure is executed. 00132 * <p> 00133 * The JDBC type specified by <code>sqlType</code> for an OUT parameter 00134 * determines the Java type that must be used in the <code>get</code> method 00135 * to read the value of that parameter. 00136 * <p> 00137 * This version of <code>registerOutParameter</code> should be used when the 00138 * parameter is of JDBC type <code>NUMERIC</code> or <code>DECIMAL</code>. 00139 * 00140 * @param parameterIndex the first parameter is 1, the second is 2, and so on 00141 * @param sqlType the SQL type code defined by <code>java.sql.Types</code>. 00142 * @param scale the desired number of digits to the right of the decimal 00143 * point. It must be greater than or equal to zero. 00144 * @exception SQLException if a database access error occurs 00145 * @see java.sql.Types 00146 */ 00147 public void registerOutParameter(int parameterIndex, int sqlType, int scale) 00148 throws SQLException 00149 { 00150 throw new NotImplementedException( 00151 "registerOutParameter(int parameterIndex, int sqlType, int scale)"); 00152 } 00153 00154 /** 00155 * Retrieves whether the last OUT parameter read had the value of SQL 00156 * <code>NULL</code>. Note that this method should be called only after 00157 * calling a getter method; otherwise, there is no value to use in determining 00158 * whether it is <code>null</code> or not. 00159 * 00160 * @return <code>true</code> if the last parameter read was SQL 00161 * <code>NULL</code>;<code>false</code> otherwise 00162 * @exception SQLException if a database access error occurs 00163 */ 00164 public boolean wasNull() throws SQLException 00165 { 00166 throw new NotImplementedException("wasNull"); 00167 } 00168 00169 /** 00170 * Retrieves the value of the designated JDBC <code>CHAR</code>, 00171 * <code>VARCHAR</code>, or <code>LONGVARCHAR</code> parameter as a 00172 * <code>String</code> in the Java programming language. 00173 * <p> 00174 * For the fixed-length type JDBC <code>CHAR</code>, the 00175 * <code>String</code> object returned has exactly the same value the JDBC 00176 * <code>CHAR</code> value had in the database, including any padding added 00177 * by the database. 00178 * 00179 * @param parameterIndex the first parameter is 1, the second is 2, and so on 00180 * @return the parameter value. If the value is SQL <code>NULL</code>, the 00181 * result is <code>null</code>. 00182 * @exception SQLException if a database access error occurs 00183 * @see #setString 00184 */ 00185 public String getString(int parameterIndex) throws SQLException 00186 { 00187 throw new NotImplementedException("getString"); 00188 } 00189 00190 /** 00191 * Retrieves the value of the designated JDBC <code>BIT</code> parameter as 00192 * a <code>boolean</code> in the Java programming language. 00193 * 00194 * @param parameterIndex the first parameter is 1, the second is 2, and so on 00195 * @return the parameter value. If the value is SQL <code>NULL</code>, the 00196 * result is <code>false</code>. 00197 * @exception SQLException if a database access error occurs 00198 * @see #setBoolean 00199 */ 00200 public boolean getBoolean(int parameterIndex) throws SQLException 00201 { 00202 throw new NotImplementedException("getBoolean"); 00203 } 00204 00205 /** 00206 * Retrieves the value of the designated JDBC <code>TINYINT</code> parameter 00207 * as a <code>byte</code> in the Java programming language. 00208 * 00209 * @param parameterIndex the first parameter is 1, the second is 2, and so on 00210 * @return the parameter value. If the value is SQL <code>NULL</code>, the 00211 * result is <code>0</code>. 00212 * @exception SQLException if a database access error occurs 00213 * @see #setByte 00214 */ 00215 public byte getByte(int parameterIndex) throws SQLException 00216 { 00217 throw new NotImplementedException("getByte"); 00218 } 00219 00220 /** 00221 * Retrieves the value of the designated JDBC <code>SMALLINT</code> 00222 * parameter as a <code>short</code> in the Java programming language. 00223 * 00224 * @param parameterIndex the first parameter is 1, the second is 2, and so on 00225 * @return the parameter value. If the value is SQL <code>NULL</code>, the 00226 * result is <code>0</code>. 00227 * @exception SQLException if a database access error occurs 00228 * @see #setShort 00229 */ 00230 public short getShort(int parameterIndex) throws SQLException 00231 { 00232 throw new NotImplementedException("getShort"); 00233 } 00234 00235 /** 00236 * Retrieves the value of the designated JDBC <code>INTEGER</code> parameter 00237 * as an <code>int</code> in the Java programming language. 00238 * 00239 * @param parameterIndex the first parameter is 1, the second is 2, and so on 00240 * @return the parameter value. If the value is SQL <code>NULL</code>, the 00241 * result is <code>0</code>. 00242 * @exception SQLException if a database access error occurs 00243 * @see #setInt 00244 */ 00245 public int getInt(int parameterIndex) throws SQLException 00246 { 00247 throw new NotImplementedException("getInt"); 00248 } 00249 00250 /** 00251 * Retrieves the value of the designated JDBC <code>BIGINT</code> parameter 00252 * as a <code>long</code> in the Java programming language. 00253 * 00254 * @param parameterIndex the first parameter is 1, the second is 2, and so on 00255 * @return the parameter value. If the value is SQL <code>NULL</code>, the 00256 * result is <code>0</code>. 00257 * @exception SQLException if a database access error occurs 00258 * @see #setLong 00259 */ 00260 public long getLong(int parameterIndex) throws SQLException 00261 { 00262 throw new NotImplementedException("getLong"); 00263 } 00264 00265 /** 00266 * Retrieves the value of the designated JDBC <code>FLOAT</code> parameter 00267 * as a <code>float</code> in the Java programming language. 00268 * 00269 * @param parameterIndex the first parameter is 1, the second is 2, and so on 00270 * @return the parameter value. If the value is SQL <code>NULL</code>, the 00271 * result is <code>0</code>. 00272 * @exception SQLException if a database access error occurs 00273 * @see #setFloat 00274 */ 00275 public float getFloat(int parameterIndex) throws SQLException 00276 { 00277 throw new NotImplementedException("getFloat"); 00278 } 00279 00280 /** 00281 * Retrieves the value of the designated JDBC <code>DOUBLE</code> parameter 00282 * as a <code>double</code> in the Java programming language. 00283 * 00284 * @param parameterIndex the first parameter is 1, the second is 2, and so on 00285 * @return the parameter value. If the value is SQL <code>NULL</code>, the 00286 * result is <code>0</code>. 00287 * @exception SQLException if a database access error occurs 00288 * @see #setDouble 00289 */ 00290 public double getDouble(int parameterIndex) throws SQLException 00291 { 00292 throw new NotImplementedException("getDouble"); 00293 } 00294 00295 /** 00296 * Retrieves the value of the designated JDBC <code>NUMERIC</code> parameter 00297 * as a <code>java.math.BigDecimal</code> object with <i>scale </i> digits 00298 * to the right of the decimal point. 00299 * 00300 * @param parameterIndex the first parameter is 1, the second is 2, and so on 00301 * @param scale the number of digits to the right of the decimal point 00302 * @return the parameter value. If the value is SQL <code>NULL</code>, the 00303 * result is <code>null</code>. 00304 * @exception SQLException if a database access error occurs 00305 * @deprecated use <code>getBigDecimal(int parameterIndex)</code> or 00306 * <code>getBigDecimal(String parameterName)</code> 00307 * @see #setBigDecimal 00308 */ 00309 public BigDecimal getBigDecimal(int parameterIndex, int scale) 00310 throws SQLException 00311 { 00312 throw new NotImplementedException("getBigDecimal"); 00313 } 00314 00315 /** 00316 * Retrieves the value of the designated JDBC <code>BINARY</code> or 00317 * <code>VARBINARY</code> parameter as an array of <code>byte</code> 00318 * values in the Java programming language. 00319 * 00320 * @param parameterIndex the first parameter is 1, the second is 2, and so on 00321 * @return the parameter value. If the value is SQL <code>NULL</code>, the 00322 * result is <code>null</code>. 00323 * @exception SQLException if a database access error occurs 00324 * @see #setBytes 00325 */ 00326 public byte[] getBytes(int parameterIndex) throws SQLException 00327 { 00328 throw new NotImplementedException("getBytes"); 00329 } 00330 00331 /** 00332 * Retrieves the value of the designated JDBC <code>DATE</code> parameter as 00333 * a <code>java.sql.Date</code> object. 00334 * 00335 * @param parameterIndex the first parameter is 1, the second is 2, and so on 00336 * @return the parameter value. If the value is SQL <code>NULL</code>, the 00337 * result is <code>null</code>. 00338 * @exception SQLException if a database access error occurs 00339 * @see #setDate(String, Date) 00340 */ 00341 public Date getDate(int parameterIndex) throws SQLException 00342 { 00343 throw new NotImplementedException("getDate"); 00344 } 00345 00346 /** 00347 * Retrieves the value of the designated JDBC <code>TIME</code> parameter as 00348 * a <code>java.sql.Time</code> object. 00349 * 00350 * @param parameterIndex the first parameter is 1, the second is 2, and so on 00351 * @return the parameter value. If the value is SQL <code>NULL</code>, the 00352 * result is <code>null</code>. 00353 * @exception SQLException if a database access error occurs 00354 * @see #setTime(String, Time) 00355 */ 00356 public Time getTime(int parameterIndex) throws SQLException 00357 { 00358 throw new NotImplementedException("getTime"); 00359 } 00360 00361 /** 00362 * Retrieves the value of the designated JDBC <code>TIMESTAMP</code> 00363 * parameter as a <code>java.sql.Timestamp</code> object. 00364 * 00365 * @param parameterIndex the first parameter is 1, the second is 2, and so on 00366 * @return the parameter value. If the value is SQL <code>NULL</code>, the 00367 * result is <code>null</code>. 00368 * @exception SQLException if a database access error occurs 00369 * @see #setTimestamp(String, Timestamp) 00370 */ 00371 public Timestamp getTimestamp(int parameterIndex) throws SQLException 00372 { 00373 throw new NotImplementedException("getTimestamp"); 00374 } 00375 00376 //---------------------------------------------------------------------- 00377 // Advanced features: 00378 00379 /** 00380 * Retrieves the value of the designated parameter as an <code>Object</code> 00381 * in the Java programming language. If the value is an SQL <code>NULL</code>, 00382 * the driver returns a Java <code>null</code>. 00383 * <p> 00384 * This method returns a Java object whose type corresponds to the JDBC type 00385 * that was registered for this parameter using the method 00386 * <code>registerOutParameter</code>. By registering the target JDBC type 00387 * as <code>java.sql.Types.OTHER</code>, this method can be used to read 00388 * database-specific abstract data types. 00389 * 00390 * @param parameterIndex the first parameter is 1, the second is 2, and so on 00391 * @return A <code>java.lang.Object</code> holding the OUT parameter value 00392 * @exception SQLException if a database access error occurs 00393 * @see java.sql.Types 00394 * @see #setObject(String, Object) 00395 */ 00396 public Object getObject(int parameterIndex) throws SQLException 00397 { 00398 throw new NotImplementedException("getObject"); 00399 } 00400 00401 //--------------------------JDBC 2.0----------------------------- 00402 00403 /** 00404 * Retrieves the value of the designated JDBC <code>NUMERIC</code> parameter 00405 * as a <code>java.math.BigDecimal</code> object with as many digits to the 00406 * right of the decimal point as the value contains. 00407 * 00408 * @param parameterIndex the first parameter is 1, the second is 2, and so on 00409 * @return the parameter value in full precision. If the value is SQL 00410 * <code>NULL</code>, the result is <code>null</code>. 00411 * @exception SQLException if a database access error occurs 00412 * @see #setBigDecimal 00413 * @since 1.2 00414 */ 00415 public BigDecimal getBigDecimal(int parameterIndex) throws SQLException 00416 { 00417 throw new NotImplementedException(""); 00418 } 00419 00420 /** 00421 * Returns an object representing the value of OUT parameter <code>i</code> 00422 * and uses <code>map</code> for the custom mapping of the parameter value. 00423 * <p> 00424 * This method returns a Java object whose type corresponds to the JDBC type 00425 * that was registered for this parameter using the method 00426 * <code>registerOutParameter</code>. By registering the target JDBC type 00427 * as <code>java.sql.Types.OTHER</code>, this method can be used to read 00428 * database-specific abstract data types. 00429 * 00430 * @param i the first parameter is 1, the second is 2, and so on 00431 * @param map the mapping from SQL type names to Java classes 00432 * @return a <code>java.lang.Object</code> holding the OUT parameter value 00433 * @exception SQLException if a database access error occurs 00434 * @see #setObject(String, Object) 00435 * @since 1.2 00436 */ 00437 public Object getObject(int i, Map map) throws SQLException 00438 { 00439 throw new NotImplementedException("getObject"); 00440 } 00441 00442 /** 00443 * Retrieves the value of the designated JDBC 00444 * <code>REF(<structured-type>)</code> parameter as a <code>Ref</code> 00445 * object in the Java programming language. 00446 * 00447 * @param i the first parameter is 1, the second is 2, and so on 00448 * @return the parameter value as a <code>Ref</code> object in the Java 00449 * programming language. If the value was SQL <code>NULL</code>, 00450 * the value <code>null</code> is returned. 00451 * @exception SQLException if a database access error occurs 00452 * @since 1.2 00453 */ 00454 public Ref getRef(int i) throws SQLException 00455 { 00456 throw new NotImplementedException("getRef"); 00457 } 00458 00459 /** 00460 * Retrieves the value of the designated JDBC <code>BLOB</code> parameter as 00461 * a {@link Blob}object in the Java programming language. 00462 * 00463 * @param i the first parameter is 1, the second is 2, and so on 00464 * @return the parameter value as a <code>Blob</code> object in the Java 00465 * programming language. If the value was SQL <code>NULL</code>, 00466 * the value <code>null</code> is returned. 00467 * @exception SQLException if a database access error occurs 00468 * @since 1.2 00469 */ 00470 public Blob getBlob(int i) throws SQLException 00471 { 00472 throw new NotImplementedException("getBlob"); 00473 } 00474 00475 /** 00476 * Retrieves the value of the designated JDBC <code>CLOB</code> parameter as 00477 * a <code>Clob</code> object in the Java programming language. 00478 * 00479 * @param i the first parameter is 1, the second is 2, and so on 00480 * @return the parameter value as a <code>Clob</code> object in the Java 00481 * programming language. If the value was SQL <code>NULL</code>, 00482 * the value <code>null</code> is returned. 00483 * @exception SQLException if a database access error occurs 00484 * @since 1.2 00485 */ 00486 public Clob getClob(int i) throws SQLException 00487 { 00488 throw new NotImplementedException("getClob"); 00489 } 00490 00491 /** 00492 * Retrieves the value of the designated JDBC <code>ARRAY</code> parameter 00493 * as an {@link Array}object in the Java programming language. 00494 * 00495 * @param i the first parameter is 1, the second is 2, and so on 00496 * @return the parameter value as an <code>Array</code> object in the Java 00497 * programming language. If the value was SQL <code>NULL</code>, 00498 * the value <code>null</code> is returned. 00499 * @exception SQLException if a database access error occurs 00500 * @since 1.2 00501 */ 00502 public Array getArray(int i) throws SQLException 00503 { 00504 throw new NotImplementedException("getArray"); 00505 } 00506 00507 /** 00508 * Retrieves the value of the designated JDBC <code>DATE</code> parameter as 00509 * a <code>java.sql.Date</code> object, using the given 00510 * <code>Calendar</code> object to construct the date. With a 00511 * <code>Calendar</code> object, the driver can calculate the date taking 00512 * into account a custom timezone and locale. If no <code>Calendar</code> 00513 * object is specified, the driver uses the default timezone and locale. 00514 * 00515 * @param parameterIndex the first parameter is 1, the second is 2, and so on 00516 * @param cal the <code>Calendar</code> object the driver will use to 00517 * construct the date 00518 * @return the parameter value. If the value is SQL <code>NULL</code>, the 00519 * result is <code>null</code>. 00520 * @exception SQLException if a database access error occurs 00521 * @see #setDate(String, Date) 00522 * @since 1.2 00523 */ 00524 public Date getDate(int parameterIndex, Calendar cal) throws SQLException 00525 { 00526 throw new NotImplementedException("getDate"); 00527 } 00528 00529 /** 00530 * Retrieves the value of the designated JDBC <code>TIME</code> parameter as 00531 * a <code>java.sql.Time</code> object, using the given 00532 * <code>Calendar</code> object to construct the time. With a 00533 * <code>Calendar</code> object, the driver can calculate the time taking 00534 * into account a custom timezone and locale. If no <code>Calendar</code> 00535 * object is specified, the driver uses the default timezone and locale. 00536 * 00537 * @param parameterIndex the first parameter is 1, the second is 2, and so on 00538 * @param cal the <code>Calendar</code> object the driver will use to 00539 * construct the time 00540 * @return the parameter value; if the value is SQL <code>NULL</code>, the 00541 * result is <code>null</code>. 00542 * @exception SQLException if a database access error occurs 00543 * @see #setTime(String, Time) 00544 * @since 1.2 00545 */ 00546 public Time getTime(int parameterIndex, Calendar cal) throws SQLException 00547 { 00548 throw new NotImplementedException("getTime"); 00549 } 00550 00551 /** 00552 * Retrieves the value of the designated JDBC <code>TIMESTAMP</code> 00553 * parameter as a <code>java.sql.Timestamp</code> object, using the given 00554 * <code>Calendar</code> object to construct the <code>Timestamp</code> 00555 * object. With a <code>Calendar</code> object, the driver can calculate the 00556 * timestamp taking into account a custom timezone and locale. If no 00557 * <code>Calendar</code> object is specified, the driver uses the default 00558 * timezone and locale. 00559 * 00560 * @param parameterIndex the first parameter is 1, the second is 2, and so on 00561 * @param cal the <code>Calendar</code> object the driver will use to 00562 * construct the timestamp 00563 * @return the parameter value. If the value is SQL <code>NULL</code>, the 00564 * result is <code>null</code>. 00565 * @exception SQLException if a database access error occurs 00566 * @see #setTimestamp(String, Timestamp) 00567 * @since 1.2 00568 */ 00569 public Timestamp getTimestamp(int parameterIndex, Calendar cal) 00570 throws SQLException 00571 { 00572 throw new NotImplementedException("getTimestamp"); 00573 } 00574 00575 /** 00576 * Registers the designated output parameter. This version of the method 00577 * <code>registerOutParameter</code> should be used for a user-defined or 00578 * <code>REF</code> output parameter. Examples of user-defined types 00579 * include: <code>STRUCT</code>,<code>DISTINCT</code>, 00580 * <code>JAVA_OBJECT</code>, and named array types. 00581 * <p> 00582 * Before executing a stored procedure call, you must explicitly call 00583 * <code>registerOutParameter</code> to register the type from 00584 * <code>java.sql.Types</code> for each OUT parameter. For a user-defined 00585 * parameter, the fully-qualified SQL type name of the parameter should also 00586 * be given, while a <code>REF</code> parameter requires that the 00587 * fully-qualified type name of the referenced type be given. A JDBC driver 00588 * that does not need the type code and type name information may ignore it. 00589 * To be portable, however, applications should always provide these values 00590 * for user-defined and <code>REF</code> parameters. 00591 * <p> 00592 * Although it is intended for user-defined and <code>REF</code> parameters, 00593 * this method may be used to register a parameter of any JDBC type. If the 00594 * parameter does not have a user-defined or <code>REF</code> type, the 00595 * <i>typeName </i> parameter is ignored. 00596 * <p> 00597 * <b>Note: </b> When reading the value of an out parameter, you must use the 00598 * getter method whose Java type corresponds to the parameter's registered SQL 00599 * type. 00600 * 00601 * @param paramIndex the first parameter is 1, the second is 2,... 00602 * @param sqlType a value from {@link java.sql.Types} 00603 * @param typeName the fully-qualified name of an SQL structured type 00604 * @exception SQLException if a database access error occurs 00605 * @see java.sql.Types 00606 * @since 1.2 00607 */ 00608 public void registerOutParameter(int paramIndex, int sqlType, String typeName) 00609 throws SQLException 00610 { 00611 throw new NotImplementedException("registerOutParameter"); 00612 } 00613 00614 //--------------------------JDBC 3.0----------------------------- 00615 00616 /** 00617 * Registers the OUT parameter named <code>parameterName</code> to the JDBC 00618 * type <code>sqlType</code>. All OUT parameters must be registered before 00619 * a stored procedure is executed. 00620 * <p> 00621 * The JDBC type specified by <code>sqlType</code> for an OUT parameter 00622 * determines the Java type that must be used in the <code>get</code> method 00623 * to read the value of that parameter. 00624 * <p> 00625 * If the JDBC type expected to be returned to this output parameter is 00626 * specific to this particular database, <code>sqlType</code> should be 00627 * <code>java.sql.Types.OTHER</code>. The method {@link #getObject(String)} 00628 * retrieves the value. 00629 * 00630 * @param parameterName the name of the parameter 00631 * @param sqlType the JDBC type code defined by <code>java.sql.Types</code>. 00632 * If the parameter is of JDBC type <code>NUMERIC</code> or 00633 * <code>DECIMAL</code>, the version of 00634 * <code>registerOutParameter</code> that accepts a scale value 00635 * should be used. 00636 * @exception SQLException if a database access error occurs 00637 * @since 1.4 00638 * @see java.sql.Types 00639 */ 00640 public void registerOutParameter(String parameterName, int sqlType) 00641 throws SQLException 00642 { 00643 throw new NotImplementedException("registerOutParameter"); 00644 } 00645 00646 /** 00647 * Registers the parameter named <code>parameterName</code> to be of JDBC 00648 * type <code>sqlType</code>. This method must be called before a stored 00649 * procedure is executed. 00650 * <p> 00651 * The JDBC type specified by <code>sqlType</code> for an OUT parameter 00652 * determines the Java type that must be used in the <code>get</code> method 00653 * to read the value of that parameter. 00654 * <p> 00655 * This version of <code>registerOutParameter</code> should be used when the 00656 * parameter is of JDBC type <code>NUMERIC</code> or <code>DECIMAL</code>. 00657 * 00658 * @param parameterName the name of the parameter 00659 * @param sqlType SQL type code defined by <code>java.sql.Types</code>. 00660 * @param scale the desired number of digits to the right of the decimal 00661 * point. It must be greater than or equal to zero. 00662 * @exception SQLException if a database access error occurs 00663 * @since 1.4 00664 * @see java.sql.Types 00665 */ 00666 public void registerOutParameter(String parameterName, int sqlType, int scale) 00667 throws SQLException 00668 { 00669 throw new NotImplementedException("registerOutParameter"); 00670 } 00671 00672 /** 00673 * Registers the designated output parameter. This version of the method 00674 * <code>registerOutParameter</code> should be used for a user-named or REF 00675 * output parameter. Examples of user-named types include: STRUCT, DISTINCT, 00676 * JAVA_OBJECT, and named array types. 00677 * <p> 00678 * Before executing a stored procedure call, you must explicitly call 00679 * <code>registerOutParameter</code> to register the type from 00680 * <code>java.sql.Types</code> for each OUT parameter. For a user-named 00681 * parameter the fully-qualified SQL type name of the parameter should also be 00682 * given, while a REF parameter requires that the fully-qualified type name of 00683 * the referenced type be given. A JDBC driver that does not need the type 00684 * code and type name information may ignore it. To be portable, however, 00685 * applications should always provide these values for user-named and REF 00686 * parameters. 00687 * <p> 00688 * Although it is intended for user-named and REF parameters, this method may 00689 * be used to register a parameter of any JDBC type. If the parameter does not 00690 * have a user-named or REF type, the typeName parameter is ignored. 00691 * <p> 00692 * <b>Note: </b> When reading the value of an out parameter, you must use the 00693 * <code>getXXX</code> method whose Java type XXX corresponds to the 00694 * parameter's registered SQL type. 00695 * 00696 * @param parameterName the name of the parameter 00697 * @param sqlType a value from {@link java.sql.Types} 00698 * @param typeName the fully-qualified name of an SQL structured type 00699 * @exception SQLException if a database access error occurs 00700 * @see java.sql.Types 00701 * @since 1.4 00702 */ 00703 public void registerOutParameter(String parameterName, int sqlType, 00704 String typeName) throws SQLException 00705 { 00706 throw new NotImplementedException("registerOutParameter"); 00707 } 00708 00709 /** 00710 * Retrieves the value of the designated JDBC <code>DATALINK</code> 00711 * parameter as a <code>java.net.URL</code> object. 00712 * 00713 * @param parameterIndex the first parameter is 1, the second is 2,... 00714 * @return a <code>java.net.URL</code> object that represents the JDBC 00715 * <code>DATALINK</code> value used as the designated parameter 00716 * @exception SQLException if a database access error occurs, or if the URL 00717 * being returned is not a valid URL on the Java platform 00718 * @see #setURL 00719 * @since 1.4 00720 */ 00721 public URL getURL(int parameterIndex) throws SQLException 00722 { 00723 throw new NotImplementedException("getURL"); 00724 } 00725 00726 /** 00727 * Sets the designated parameter to the given <code>java.net.URL</code> 00728 * object. The driver converts this to an SQL <code>DATALINK</code> value 00729 * when it sends it to the database. 00730 * 00731 * @param parameterName the name of the parameter 00732 * @param val the parameter value 00733 * @exception SQLException if a database access error occurs, or if a URL is 00734 * malformed 00735 * @see #getURL(String) 00736 * @since 1.4 00737 */ 00738 public void setURL(String parameterName, URL val) throws SQLException 00739 { 00740 throw new NotImplementedException("setURL"); 00741 } 00742 00743 /** 00744 * Sets the designated parameter to SQL <code>NULL</code>. 00745 * <p> 00746 * <b>Note: </b> you must specify the parameter's SQL type. 00747 * 00748 * @param parameterName the name of the parameter 00749 * @param sqlType the SQL type code defined in <code>java.sql.Types</code> 00750 * @exception SQLException if a database access error occurs 00751 * @since 1.4 00752 */ 00753 public void setNull(String parameterName, int sqlType) throws SQLException 00754 { 00755 throw new NotImplementedException("setNull"); 00756 } 00757 00758 /** 00759 * Sets the designated parameter to the given Java <code>boolean</code> 00760 * value. The driver converts this to an SQL <code>BIT</code> value when it 00761 * sends it to the database. 00762 * 00763 * @param parameterName the name of the parameter 00764 * @param x the parameter value 00765 * @exception SQLException if a database access error occurs 00766 * @see #getBoolean(String) 00767 * @since 1.4 00768 */ 00769 public void setBoolean(String parameterName, boolean x) throws SQLException 00770 { 00771 throw new NotImplementedException("setBoolean"); 00772 } 00773 00774 /** 00775 * Sets the designated parameter to the given Java <code>byte</code> value. 00776 * The driver converts this to an SQL <code>TINYINT</code> value when it 00777 * sends it to the database. 00778 * 00779 * @param parameterName the name of the parameter 00780 * @param x the parameter value 00781 * @exception SQLException if a database access error occurs 00782 * @see #getByte(String) 00783 * @since 1.4 00784 */ 00785 public void setByte(String parameterName, byte x) throws SQLException 00786 { 00787 throw new NotImplementedException("setByte"); 00788 } 00789 00790 /** 00791 * Sets the designated parameter to the given Java <code>short</code> value. 00792 * The driver converts this to an SQL <code>SMALLINT</code> value when it 00793 * sends it to the database. 00794 * 00795 * @param parameterName the name of the parameter 00796 * @param x the parameter value 00797 * @exception SQLException if a database access error occurs 00798 * @see #getShort(String) 00799 * @since 1.4 00800 */ 00801 public void setShort(String parameterName, short x) throws SQLException 00802 { 00803 throw new NotImplementedException("setShort"); 00804 } 00805 00806 /** 00807 * Sets the designated parameter to the given Java <code>int</code> value. 00808 * The driver converts this to an SQL <code>INTEGER</code> value when it 00809 * sends it to the database. 00810 * 00811 * @param parameterName the name of the parameter 00812 * @param x the parameter value 00813 * @exception SQLException if a database access error occurs 00814 * @see #getInt(String) 00815 * @since 1.4 00816 */ 00817 public void setInt(String parameterName, int x) throws SQLException 00818 { 00819 throw new NotImplementedException("setInt"); 00820 } 00821 00822 /** 00823 * Sets the designated parameter to the given Java <code>long</code> value. 00824 * The driver converts this to an SQL <code>BIGINT</code> value when it 00825 * sends it to the database. 00826 * 00827 * @param parameterName the name of the parameter 00828 * @param x the parameter value 00829 * @exception SQLException if a database access error occurs 00830 * @see #getLong(String) 00831 * @since 1.4 00832 */ 00833 public void setLong(String parameterName, long x) throws SQLException 00834 { 00835 throw new NotImplementedException("setLong"); 00836 } 00837 00838 /** 00839 * Sets the designated parameter to the given Java <code>float</code> value. 00840 * The driver converts this to an SQL <code>FLOAT</code> value when it sends 00841 * it to the database. 00842 * 00843 * @param parameterName the name of the parameter 00844 * @param x the parameter value 00845 * @exception SQLException if a database access error occurs 00846 * @see #getFloat(String) 00847 * @since 1.4 00848 */ 00849 public void setFloat(String parameterName, float x) throws SQLException 00850 { 00851 throw new NotImplementedException("setFloat"); 00852 } 00853 00854 /** 00855 * Sets the designated parameter to the given Java <code>double</code> 00856 * value. The driver converts this to an SQL <code>DOUBLE</code> value when 00857 * it sends it to the database. 00858 * 00859 * @param parameterName the name of the parameter 00860 * @param x the parameter value 00861 * @exception SQLException if a database access error occurs 00862 * @see #getDouble(String) 00863 * @since 1.4 00864 */ 00865 public void setDouble(String parameterName, double x) throws SQLException 00866 { 00867 throw new NotImplementedException("setDouble"); 00868 } 00869 00870 /** 00871 * Sets the designated parameter to the given 00872 * <code>java.math.BigDecimal</code> value. The driver converts this to an 00873 * SQL <code>NUMERIC</code> value when it sends it to the database. 00874 * 00875 * @param parameterName the name of the parameter 00876 * @param x the parameter value 00877 * @exception SQLException if a database access error occurs 00878 * @see #getBigDecimal(String) 00879 * @since 1.4 00880 */ 00881 public void setBigDecimal(String parameterName, BigDecimal x) 00882 throws SQLException 00883 { 00884 throw new NotImplementedException("setBigDecimal"); 00885 } 00886 00887 /** 00888 * Sets the designated parameter to the given Java <code>String</code> 00889 * value. The driver converts this to an SQL <code>VARCHAR</code> or 00890 * <code>LONGVARCHAR</code> value (depending on the argument's size relative 00891 * to the driver's limits on <code>VARCHAR</code> values) when it sends it 00892 * to the database. 00893 * 00894 * @param parameterName the name of the parameter 00895 * @param x the parameter value 00896 * @exception SQLException if a database access error occurs 00897 * @see #getString(String) 00898 * @since 1.4 00899 */ 00900 public void setString(String parameterName, String x) throws SQLException 00901 { 00902 throw new NotImplementedException("setString"); 00903 } 00904 00905 /** 00906 * Sets the designated parameter to the given Java array of bytes. The driver 00907 * converts this to an SQL <code>VARBINARY</code> or 00908 * <code>LONGVARBINARY</code> (depending on the argument's size relative to 00909 * the driver's limits on <code>VARBINARY</code> values) when it sends it to 00910 * the database. 00911 * 00912 * @param parameterName the name of the parameter 00913 * @param x the parameter value 00914 * @exception SQLException if a database access error occurs 00915 * @see #getBytes(String) 00916 * @since 1.4 00917 */ 00918 public void setBytes(String parameterName, byte[] x) throws SQLException 00919 { 00920 throw new NotImplementedException("setBytes"); 00921 } 00922 00923 /** 00924 * Sets the designated parameter to the given <code>java.sql.Date</code> 00925 * value. The driver converts this to an SQL <code>DATE</code> value when it 00926 * sends it to the database. 00927 * 00928 * @param parameterName the name of the parameter 00929 * @param x the parameter value 00930 * @exception SQLException if a database access error occurs 00931 * @see #getDate(String) 00932 * @since 1.4 00933 */ 00934 public void setDate(String parameterName, Date x) throws SQLException 00935 { 00936 throw new NotImplementedException("setDate"); 00937 } 00938 00939 /** 00940 * Sets the designated parameter to the given <code>java.sql.Time</code> 00941 * value. The driver converts this to an SQL <code>TIME</code> value when it 00942 * sends it to the database. 00943 * 00944 * @param parameterName the name of the parameter 00945 * @param x the parameter value 00946 * @exception SQLException if a database access error occurs 00947 * @see #getTime(String) 00948 * @since 1.4 00949 */ 00950 public void setTime(String parameterName, Time x) throws SQLException 00951 { 00952 throw new NotImplementedException("setTime"); 00953 } 00954 00955 /** 00956 * Sets the designated parameter to the given <code>java.sql.Timestamp</code> 00957 * value. The driver converts this to an SQL <code>TIMESTAMP</code> value 00958 * when it sends it to the database. 00959 * 00960 * @param parameterName the name of the parameter 00961 * @param x the parameter value 00962 * @exception SQLException if a database access error occurs 00963 * @see #getTimestamp(String) 00964 * @since 1.4 00965 */ 00966 public void setTimestamp(String parameterName, Timestamp x) 00967 throws SQLException 00968 { 00969 throw new NotImplementedException("setTimestamp"); 00970 } 00971 00972 /** 00973 * Sets the designated parameter to the given input stream, which will have 00974 * the specified number of bytes. When a very large ASCII value is input to a 00975 * <code>LONGVARCHAR</code> parameter, it may be more practical to send it 00976 * via a <code>java.io.InputStream</code>. Data will be read from the 00977 * stream as needed until end-of-file is reached. The JDBC driver will do any 00978 * necessary conversion from ASCII to the database char format. 00979 * <p> 00980 * <b>Note: </b> This stream object can either be a standard Java stream 00981 * object or your own subclass that implements the standard interface. 00982 * 00983 * @param parameterName the name of the parameter 00984 * @param x the Java input stream that contains the ASCII parameter value 00985 * @param length the number of bytes in the stream 00986 * @exception SQLException if a database access error occurs 00987 * @since 1.4 00988 */ 00989 public void setAsciiStream(String parameterName, InputStream x, int length) 00990 throws SQLException 00991 { 00992 throw new NotImplementedException("setAsciiStream"); 00993 } 00994 00995 /** 00996 * Sets the designated parameter to the given input stream, which will have 00997 * the specified number of bytes. When a very large binary value is input to a 00998 * <code>LONGVARBINARY</code> parameter, it may be more practical to send it 00999 * via a <code>java.io.InputStream</code> object. The data will be read from 01000 * the stream as needed until end-of-file is reached. 01001 * <p> 01002 * <b>Note: </b> This stream object can either be a standard Java stream 01003 * object or your own subclass that implements the standard interface. 01004 * 01005 * @param parameterName the name of the parameter 01006 * @param x the java input stream which contains the binary parameter value 01007 * @param length the number of bytes in the stream 01008 * @exception SQLException if a database access error occurs 01009 * @since 1.4 01010 */ 01011 public void setBinaryStream(String parameterName, InputStream x, int length) 01012 throws SQLException 01013 { 01014 throw new NotImplementedException("setBinaryStream"); 01015 } 01016 01017 /** 01018 * Sets the value of the designated parameter with the given object. The 01019 * second argument must be an object type; for integral values, the 01020 * <code>java.lang</code> equivalent objects should be used. 01021 * <p> 01022 * The given Java object will be converted to the given 01023 * <code>targetSqlType</code> before being sent to the database. 01024 * <p> 01025 * If the object has a custom mapping (is of a class implementing the 01026 * interface <code>SQLData</code>), the JDBC driver should call the method 01027 * <code>SQLData.writeSQL</code> to write it to the SQL data stream. If, on 01028 * the other hand, the object is of a class implementing <code>Ref</code>, 01029 * <code>Blob</code>,<code>Clob</code>,<code>Struct</code>, or 01030 * <code>Array</code>, the driver should pass it to the database as a value 01031 * of the corresponding SQL type. 01032 * <p> 01033 * Note that this method may be used to pass datatabase-specific abstract data 01034 * types. 01035 * 01036 * @param parameterName the name of the parameter 01037 * @param x the object containing the input parameter value 01038 * @param targetSqlType the SQL type (as defined in 01039 * <code>java.sql.Types</code>) to be sent to the database. The 01040 * scale argument may further qualify this type. 01041 * @param scale for <code>java.sql.Types.DECIMAL</code> or 01042 * <code>java.sql.Types.NUMERIC</code> types, this is the number of 01043 * digits after the decimal point. For all other types, this value 01044 * will be ignored. 01045 * @exception SQLException if a database access error occurs 01046 * @see java.sql.Types 01047 * @see #getObject(String, Map) 01048 * @since 1.4 01049 */ 01050 public void setObject(String parameterName, Object x, int targetSqlType, 01051 int scale) throws SQLException 01052 { 01053 throw new NotImplementedException("setObject"); 01054 } 01055 01056 /** 01057 * Sets the value of the designated parameter with the given object. This 01058 * method is like the method <code>setObject</code> above, except that it 01059 * assumes a scale of zero. 01060 * 01061 * @param parameterName the name of the parameter 01062 * @param x the object containing the input parameter value 01063 * @param targetSqlType the SQL type (as defined in 01064 * <code>java.sql.Types</code>) to be sent to the database 01065 * @exception SQLException if a database access error occurs 01066 * @see #getObject(String, Map) 01067 * @since 1.4 01068 */ 01069 public void setObject(String parameterName, Object x, int targetSqlType) 01070 throws SQLException 01071 { 01072 throw new NotImplementedException("setObject"); 01073 } 01074 01075 /** 01076 * Sets the value of the designated parameter with the given object. The 01077 * second parameter must be of type <code>Object</code>; therefore, the 01078 * <code>java.lang</code> equivalent objects should be used for built-in 01079 * types. 01080 * <p> 01081 * The JDBC specification specifies a standard mapping from Java 01082 * <code>Object</code> types to SQL types. The given argument will be 01083 * converted to the corresponding SQL type before being sent to the database. 01084 * <p> 01085 * Note that this method may be used to pass datatabase-specific abstract data 01086 * types, by using a driver-specific Java type. 01087 * <p> 01088 * If the object is of a class implementing the interface <code>SQLData</code>, 01089 * the JDBC driver should call the method <code>SQLData.writeSQL</code> to 01090 * write it to the SQL data stream. If, on the other hand, the object is of a 01091 * class implementing <code>Ref</code>,<code>Blob</code>, 01092 * <code>Clob</code>,<code>Struct</code>, or <code>Array</code>, the 01093 * driver should pass it to the database as a value of the corresponding SQL 01094 * type. 01095 * <p> 01096 * This method throws an exception if there is an ambiguity, for example, if 01097 * the object is of a class implementing more than one of the interfaces named 01098 * above. 01099 * 01100 * @param parameterName the name of the parameter 01101 * @param x the object containing the input parameter value 01102 * @exception SQLException if a database access error occurs or if the given 01103 * <code>Object</code> parameter is ambiguous 01104 * @see #getObject(String, Map) 01105 * @since 1.4 01106 */ 01107 public void setObject(String parameterName, Object x) throws SQLException 01108 { 01109 throw new NotImplementedException("setObject"); 01110 } 01111 01112 /** 01113 * Sets the designated parameter to the given <code>Reader</code> object, 01114 * which is the given number of characters long. When a very large UNICODE 01115 * value is input to a <code>LONGVARCHAR</code> parameter, it may be more 01116 * practical to send it via a <code>java.io.Reader</code> object. The data 01117 * will be read from the stream as needed until end-of-file is reached. The 01118 * JDBC driver will do any necessary conversion from UNICODE to the database 01119 * char format. 01120 * <p> 01121 * <b>Note: </b> This stream object can either be a standard Java stream 01122 * object or your own subclass that implements the standard interface. 01123 * 01124 * @param parameterName the name of the parameter 01125 * @param reader the <code>java.io.Reader</code> object that contains the 01126 * UNICODE data used as the designated parameter 01127 * @param length the number of characters in the stream 01128 * @exception SQLException if a database access error occurs 01129 * @since 1.4 01130 */ 01131 public void setCharacterStream(String parameterName, Reader reader, int length) 01132 throws SQLException 01133 { 01134 throw new NotImplementedException(""); 01135 } 01136 01137 /** 01138 * Sets the designated parameter to the given <code>java.sql.Date</code> 01139 * value, using the given <code>Calendar</code> object. The driver uses the 01140 * <code>Calendar</code> object to construct an SQL <code>DATE</code> 01141 * value, which the driver then sends to the database. With a a 01142 * <code>Calendar</code> object, the driver can calculate the date taking 01143 * into account a custom timezone. If no <code>Calendar</code> object is 01144 * specified, the driver uses the default timezone, which is that of the 01145 * virtual machine running the application. 01146 * 01147 * @param parameterName the name of the parameter 01148 * @param x the parameter value 01149 * @param cal the <code>Calendar</code> object the driver will use to 01150 * construct the date 01151 * @exception SQLException if a database access error occurs 01152 * @see #getDate(String, Calendar) 01153 * @since 1.4 01154 */ 01155 public void setDate(String parameterName, Date x, Calendar cal) 01156 throws SQLException 01157 { 01158 throw new NotImplementedException("setDate"); 01159 } 01160 01161 /** 01162 * Sets the designated parameter to the given <code>java.sql.Time</code> 01163 * value, using the given <code>Calendar</code> object. The driver uses the 01164 * <code>Calendar</code> object to construct an SQL <code>TIME</code> 01165 * value, which the driver then sends to the database. With a a 01166 * <code>Calendar</code> object, the driver can calculate the time taking 01167 * into account a custom timezone. If no <code>Calendar</code> object is 01168 * specified, the driver uses the default timezone, which is that of the 01169 * virtual machine running the application. 01170 * 01171 * @param parameterName the name of the parameter 01172 * @param x the parameter value 01173 * @param cal the <code>Calendar</code> object the driver will use to 01174 * construct the time 01175 * @exception SQLException if a database access error occurs 01176 * @see #getTime(String, Calendar) 01177 * @since 1.4 01178 */ 01179 public void setTime(String parameterName, Time x, Calendar cal) 01180 throws SQLException 01181 { 01182 throw new NotImplementedException("setTime"); 01183 } 01184 01185 /** 01186 * Sets the designated parameter to the given <code>java.sql.Timestamp</code> 01187 * value, using the given <code>Calendar</code> object. The driver uses the 01188 * <code>Calendar</code> object to construct an SQL <code>TIMESTAMP</code> 01189 * value, which the driver then sends to the database. With a a 01190 * <code>Calendar</code> object, the driver can calculate the timestamp 01191 * taking into account a custom timezone. If no <code>Calendar</code> object 01192 * is specified, the driver uses the default timezone, which is that of the 01193 * virtual machine running the application. 01194 * 01195 * @param parameterName the name of the parameter 01196 * @param x the parameter value 01197 * @param cal the <code>Calendar</code> object the driver will use to 01198 * construct the timestamp 01199 * @exception SQLException if a database access error occurs 01200 * @see #getTimestamp(String, Calendar) 01201 * @since 1.4 01202 */ 01203 public void setTimestamp(String parameterName, Timestamp x, Calendar cal) 01204 throws SQLException 01205 { 01206 throw new NotImplementedException("setTimestamp"); 01207 } 01208 01209 /** 01210 * Sets the designated parameter to SQL <code>NULL</code>. This version of 01211 * the method <code>setNull</code> should be used for user-defined types and 01212 * REF type parameters. Examples of user-defined types include: STRUCT, 01213 * DISTINCT, JAVA_OBJECT, and named array types. 01214 * <p> 01215 * <b>Note: </b> to be portable, applications must give the SQL type code and 01216 * the fully-qualified SQL type name when specifying a NULL user-defined or 01217 * REF parameter. In the case of a user-defined type the name is the type name 01218 * of the parameter itself. For a REF parameter, the name is the type name of 01219 * the referenced type. If a JDBC driver does not need the type code or type 01220 * name information, it may ignore it. 01221 * <p> 01222 * Although it is intended for user-defined and Ref parameters, this method 01223 * may be used to set a null parameter of any JDBC type. If the parameter does 01224 * not have a user-defined or REF type, the given typeName is ignored. 01225 * 01226 * @param parameterName the name of the parameter 01227 * @param sqlType a value from <code>java.sql.Types</code> 01228 * @param typeName the fully-qualified name of an SQL user-defined type; 01229 * ignored if the parameter is not a user-defined type or SQL 01230 * <code>REF</code> value 01231 * @exception SQLException if a database access error occurs 01232 * @since 1.4 01233 */ 01234 public void setNull(String parameterName, int sqlType, String typeName) 01235 throws SQLException 01236 { 01237 throw new NotImplementedException("setNull"); 01238 } 01239 01240 /** 01241 * Retrieves the value of a JDBC <code>CHAR</code>,<code>VARCHAR</code>, 01242 * or <code>LONGVARCHAR</code> parameter as a <code>String</code> in the 01243 * Java programming language. 01244 * <p> 01245 * For the fixed-length type JDBC <code>CHAR</code>, the 01246 * <code>String</code> object returned has exactly the same value the JDBC 01247 * <code>CHAR</code> value had in the database, including any padding added 01248 * by the database. 01249 * 01250 * @param parameterName the name of the parameter 01251 * @return the parameter value. If the value is SQL <code>NULL</code>, the 01252 * result is <code>null</code>. 01253 * @exception SQLException if a database access error occurs 01254 * @see #setString 01255 * @since 1.4 01256 */ 01257 public String getString(String parameterName) throws SQLException 01258 { 01259 throw new NotImplementedException("getString"); 01260 } 01261 01262 /** 01263 * Retrieves the value of a JDBC <code>BIT</code> parameter as a 01264 * <code>boolean</code> in the Java programming language. 01265 * 01266 * @param parameterName the name of the parameter 01267 * @return the parameter value. If the value is SQL <code>NULL</code>, the 01268 * result is <code>false</code>. 01269 * @exception SQLException if a database access error occurs 01270 * @see #setBoolean 01271 * @since 1.4 01272 */ 01273 public boolean getBoolean(String parameterName) throws SQLException 01274 { 01275 throw new NotImplementedException("getBoolean"); 01276 } 01277 01278 /** 01279 * Retrieves the value of a JDBC <code>TINYINT</code> parameter as a 01280 * <code>byte</code> in the Java programming language. 01281 * 01282 * @param parameterName the name of the parameter 01283 * @return the parameter value. If the value is SQL <code>NULL</code>, the 01284 * result is <code>0</code>. 01285 * @exception SQLException if a database access error occurs 01286 * @see #setByte 01287 * @since 1.4 01288 */ 01289 public byte getByte(String parameterName) throws SQLException 01290 { 01291 throw new NotImplementedException("getByte"); 01292 } 01293 01294 /** 01295 * Retrieves the value of a JDBC <code>SMALLINT</code> parameter as a 01296 * <code>short</code> in the Java programming language. 01297 * 01298 * @param parameterName the name of the parameter 01299 * @return the parameter value. If the value is SQL <code>NULL</code>, the 01300 * result is <code>0</code>. 01301 * @exception SQLException if a database access error occurs 01302 * @see #setShort 01303 * @since 1.4 01304 */ 01305 public short getShort(String parameterName) throws SQLException 01306 { 01307 throw new NotImplementedException("getShort"); 01308 } 01309 01310 /** 01311 * Retrieves the value of a JDBC <code>INTEGER</code> parameter as an 01312 * <code>int</code> in the Java programming language. 01313 * 01314 * @param parameterName the name of the parameter 01315 * @return the parameter value. If the value is SQL <code>NULL</code>, the 01316 * result is <code>0</code>. 01317 * @exception SQLException if a database access error occurs 01318 * @see #setInt 01319 * @since 1.4 01320 */ 01321 public int getInt(String parameterName) throws SQLException 01322 { 01323 throw new NotImplementedException("getInt"); 01324 } 01325 01326 /** 01327 * Retrieves the value of a JDBC <code>BIGINT</code> parameter as a 01328 * <code>long</code> in the Java programming language. 01329 * 01330 * @param parameterName the name of the parameter 01331 * @return the parameter value. If the value is SQL <code>NULL</code>, the 01332 * result is <code>0</code>. 01333 * @exception SQLException if a database access error occurs 01334 * @see #setLong 01335 * @since 1.4 01336 */ 01337 public long getLong(String parameterName) throws SQLException 01338 { 01339 throw new NotImplementedException("getLong"); 01340 } 01341 01342 /** 01343 * Retrieves the value of a JDBC <code>FLOAT</code> parameter as a 01344 * <code>float</code> in the Java programming language. 01345 * 01346 * @param parameterName the name of the parameter 01347 * @return the parameter value. If the value is SQL <code>NULL</code>, the 01348 * result is <code>0</code>. 01349 * @exception SQLException if a database access error occurs 01350 * @see #setFloat 01351 * @since 1.4 01352 */ 01353 public float getFloat(String parameterName) throws SQLException 01354 { 01355 throw new NotImplementedException("getFloat"); 01356 } 01357 01358 /** 01359 * Retrieves the value of a JDBC <code>DOUBLE</code> parameter as a 01360 * <code>double</code> in the Java programming language. 01361 * 01362 * @param parameterName the name of the parameter 01363 * @return the parameter value. If the value is SQL <code>NULL</code>, the 01364 * result is <code>0</code>. 01365 * @exception SQLException if a database access error occurs 01366 * @see #setDouble 01367 * @since 1.4 01368 */ 01369 public double getDouble(String parameterName) throws SQLException 01370 { 01371 throw new NotImplementedException("getDouble"); 01372 } 01373 01374 /** 01375 * Retrieves the value of a JDBC <code>BINARY</code> or 01376 * <code>VARBINARY</code> parameter as an array of <code>byte</code> 01377 * values in the Java programming language. 01378 * 01379 * @param parameterName the name of the parameter 01380 * @return the parameter value. If the value is SQL <code>NULL</code>, the 01381 * result is <code>null</code>. 01382 * @exception SQLException if a database access error occurs 01383 * @see #setBytes 01384 * @since 1.4 01385 */ 01386 public byte[] getBytes(String parameterName) throws SQLException 01387 { 01388 throw new NotImplementedException("getBytes"); 01389 } 01390 01391 /** 01392 * Retrieves the value of a JDBC <code>DATE</code> parameter as a 01393 * <code>java.sql.Date</code> object. 01394 * 01395 * @param parameterName the name of the parameter 01396 * @return the parameter value. If the value is SQL <code>NULL</code>, the 01397 * result is <code>null</code>. 01398 * @exception SQLException if a database access error occurs 01399 * @see #setDate(String, Date) 01400 * @since 1.4 01401 */ 01402 public Date getDate(String parameterName) throws SQLException 01403 { 01404 throw new NotImplementedException("getDate"); 01405 } 01406 01407 /** 01408 * Retrieves the value of a JDBC <code>TIME</code> parameter as a 01409 * <code>java.sql.Time</code> object. 01410 * 01411 * @param parameterName the name of the parameter 01412 * @return the parameter value. If the value is SQL <code>NULL</code>, the 01413 * result is <code>null</code>. 01414 * @exception SQLException if a database access error occurs 01415 * @see #setTime(String, Time) 01416 * @since 1.4 01417 */ 01418 public Time getTime(String parameterName) throws SQLException 01419 { 01420 throw new NotImplementedException("getTime"); 01421 } 01422 01423 /** 01424 * Retrieves the value of a JDBC <code>TIMESTAMP</code> parameter as a 01425 * <code>java.sql.Timestamp</code> object. 01426 * 01427 * @param parameterName the name of the parameter 01428 * @return the parameter value. If the value is SQL <code>NULL</code>, the 01429 * result is <code>null</code>. 01430 * @exception SQLException if a database access error occurs 01431 * @see #setTimestamp(String, Timestamp) 01432 * @since 1.4 01433 */ 01434 public Timestamp getTimestamp(String parameterName) throws SQLException 01435 { 01436 throw new NotImplementedException("getTimestamp"); 01437 } 01438 01439 /** 01440 * Retrieves the value of a parameter as an <code>Object</code> in the Java 01441 * programming language. If the value is an SQL <code>NULL</code>, the 01442 * driver returns a Java <code>null</code>. 01443 * <p> 01444 * This method returns a Java object whose type corresponds to the JDBC type 01445 * that was registered for this parameter using the method 01446 * <code>registerOutParameter</code>. By registering the target JDBC type 01447 * as <code>java.sql.Types.OTHER</code>, this method can be used to read 01448 * database-specific abstract data types. 01449 * 01450 * @param parameterName the name of the parameter 01451 * @return A <code>java.lang.Object</code> holding the OUT parameter value. 01452 * @exception SQLException if a database access error occurs 01453 * @see java.sql.Types 01454 * @see #setObject(String, Object) 01455 * @since 1.4 01456 */ 01457 public Object getObject(String parameterName) throws SQLException 01458 { 01459 throw new NotImplementedException("getObject"); 01460 } 01461 01462 /** 01463 * Retrieves the value of a JDBC <code>NUMERIC</code> parameter as a 01464 * <code>java.math.BigDecimal</code> object with as many digits to the right 01465 * of the decimal point as the value contains. 01466 * 01467 * @param parameterName the name of the parameter 01468 * @return the parameter value in full precision. If the value is SQL 01469 * <code>NULL</code>, the result is <code>null</code>. 01470 * @exception SQLException if a database access error occurs 01471 * @see #setBigDecimal 01472 * @since 1.4 01473 */ 01474 public BigDecimal getBigDecimal(String parameterName) throws SQLException 01475 { 01476 throw new NotImplementedException("getBigDecimal"); 01477 } 01478 01479 /** 01480 * Returns an object representing the value of OUT parameter <code>i</code> 01481 * and uses <code>map</code> for the custom mapping of the parameter value. 01482 * <p> 01483 * This method returns a Java object whose type corresponds to the JDBC type 01484 * that was registered for this parameter using the method 01485 * <code>registerOutParameter</code>. By registering the target JDBC type 01486 * as <code>java.sql.Types.OTHER</code>, this method can be used to read 01487 * database-specific abstract data types. 01488 * 01489 * @param parameterName the name of the parameter 01490 * @param map the mapping from SQL type names to Java classes 01491 * @return a <code>java.lang.Object</code> holding the OUT parameter value 01492 * @exception SQLException if a database access error occurs 01493 * @see #setObject(String, Object) 01494 * @since 1.4 01495 */ 01496 public Object getObject(String parameterName, Map map) throws SQLException 01497 { 01498 throw new NotImplementedException("getObject"); 01499 } 01500 01501 /** 01502 * Retrieves the value of a JDBC <code>REF(<structured-type>)</code> 01503 * parameter as a <code>Ref</code> object in the Java programming language. 01504 * 01505 * @param parameterName the name of the parameter 01506 * @return the parameter value as a <code>Ref</code> object in the Java 01507 * programming language. If the value was SQL <code>NULL</code>, 01508 * the value <code>null</code> is returned. 01509 * @exception SQLException if a database access error occurs 01510 * @since 1.4 01511 */ 01512 public Ref getRef(String parameterName) throws SQLException 01513 { 01514 throw new NotImplementedException("getRef"); 01515 } 01516 01517 /** 01518 * Retrieves the value of a JDBC <code>BLOB</code> parameter as a 01519 * {@link Blob}object in the Java programming language. 01520 * 01521 * @param parameterName the name of the parameter 01522 * @return the parameter value as a <code>Blob</code> object in the Java 01523 * programming language. If the value was SQL <code>NULL</code>, 01524 * the value <code>null</code> is returned. 01525 * @exception SQLException if a database access error occurs 01526 * @since 1.4 01527 */ 01528 public Blob getBlob(String parameterName) throws SQLException 01529 { 01530 throw new NotImplementedException("getBlob"); 01531 } 01532 01533 /** 01534 * Retrieves the value of a JDBC <code>CLOB</code> parameter as a 01535 * <code>Clob</code> object in the Java programming language. 01536 * 01537 * @param parameterName the name of the parameter 01538 * @return the parameter value as a <code>Clob</code> object in the Java 01539 * programming language. If the value was SQL <code>NULL</code>, 01540 * the value <code>null</code> is returned. 01541 * @exception SQLException if a database access error occurs 01542 * @since 1.4 01543 */ 01544 public Clob getClob(String parameterName) throws SQLException 01545 { 01546 throw new NotImplementedException("getClob"); 01547 } 01548 01549 /** 01550 * Retrieves the value of a JDBC <code>ARRAY</code> parameter as an 01551 * {@link Array}object in the Java programming language. 01552 * 01553 * @param parameterName the name of the parameter 01554 * @return the parameter value as an <code>Array</code> object in Java 01555 * programming language. If the value was SQL <code>NULL</code>, 01556 * the value <code>null</code> is returned. 01557 * @exception SQLException if a database access error occurs 01558 * @since 1.4 01559 */ 01560 public Array getArray(String parameterName) throws SQLException 01561 { 01562 throw new NotImplementedException("getArray"); 01563 } 01564 01565 /** 01566 * Retrieves the value of a JDBC <code>DATE</code> parameter as a 01567 * <code>java.sql.Date</code> object, using the given <code>Calendar</code> 01568 * object to construct the date. With a <code>Calendar</code> object, the 01569 * driver can calculate the date taking into account a custom timezone and 01570 * locale. If no <code>Calendar</code> object is specified, the driver uses 01571 * the default timezone and locale. 01572 * 01573 * @param parameterName the name of the parameter 01574 * @param cal the <code>Calendar</code> object the driver will use to 01575 * construct the date 01576 * @return the parameter value. If the value is SQL <code>NULL</code>, the 01577 * result is <code>null</code>. 01578 * @exception SQLException if a database access error occurs 01579 * @see #setDate(String, Date, Calendar) 01580 * @since 1.4 01581 */ 01582 public Date getDate(String parameterName, Calendar cal) throws SQLException 01583 { 01584 throw new NotImplementedException("getDate"); 01585 } 01586 01587 /** 01588 * Retrieves the value of a JDBC <code>TIME</code> parameter as a 01589 * <code>java.sql.Time</code> object, using the given <code>Calendar</code> 01590 * object to construct the time. With a <code>Calendar</code> object, the 01591 * driver can calculate the time taking into account a custom timezone and 01592 * locale. If no <code>Calendar</code> object is specified, the driver uses 01593 * the default timezone and locale. 01594 * 01595 * @param parameterName the name of the parameter 01596 * @param cal the <code>Calendar</code> object the driver will use to 01597 * construct the time 01598 * @return the parameter value; if the value is SQL <code>NULL</code>, the 01599 * result is <code>null</code>. 01600 * @exception SQLException if a database access error occurs 01601 * @see #setTime(String, Time, Calendar) 01602 * @since 1.4 01603 */ 01604 public Time getTime(String parameterName, Calendar cal) throws SQLException 01605 { 01606 throw new NotImplementedException("getTime"); 01607 } 01608 01609 /** 01610 * Retrieves the value of a JDBC <code>TIMESTAMP</code> parameter as a 01611 * <code>java.sql.Timestamp</code> object, using the given 01612 * <code>Calendar</code> object to construct the <code>Timestamp</code> 01613 * object. With a <code>Calendar</code> object, the driver can calculate the 01614 * timestamp taking into account a custom timezone and locale. If no 01615 * <code>Calendar</code> object is specified, the driver uses the default 01616 * timezone and locale. 01617 * 01618 * @param parameterName the name of the parameter 01619 * @param cal the <code>Calendar</code> object the driver will use to 01620 * construct the timestamp 01621 * @return the parameter value. If the value is SQL <code>NULL</code>, the 01622 * result is <code>null</code>. 01623 * @exception SQLException if a database access error occurs 01624 * @see #setTimestamp(String, Timestamp, Calendar) 01625 * @since 1.4 01626 */ 01627 public Timestamp getTimestamp(String parameterName, Calendar cal) 01628 throws SQLException 01629 { 01630 throw new NotImplementedException("getTimestamp"); 01631 } 01632 01633 /** 01634 * Retrieves the value of a JDBC <code>DATALINK</code> parameter as a 01635 * <code>java.net.URL</code> object. 01636 * 01637 * @param parameterName the name of the parameter 01638 * @return the parameter value as a <code>java.net.URL</code> object in the 01639 * Java programming language. If the value was SQL <code>NULL</code>, 01640 * the value <code>null</code> is returned. 01641 * @exception SQLException if a database access error occurs, or if there is a 01642 * problem with the URL 01643 * @see #setURL 01644 * @since 1.4 01645 */ 01646 public URL getURL(String parameterName) throws SQLException 01647 { 01648 throw new NotImplementedException("getURL"); 01649 } 01650 }