| 1 | /* PreparedStatement.java -- Interface for pre-compiled statements.
|
|---|
| 2 | Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
|---|
| 3 |
|
|---|
| 4 | This file is part of GNU Classpath.
|
|---|
| 5 |
|
|---|
| 6 | GNU Classpath is free software; you can redistribute it and/or modify
|
|---|
| 7 | it under the terms of the GNU General Public License as published by
|
|---|
| 8 | the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 9 | any later version.
|
|---|
| 10 |
|
|---|
| 11 | GNU Classpath is distributed in the hope that it will be useful, but
|
|---|
| 12 | WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|---|
| 14 | General Public License for more details.
|
|---|
| 15 |
|
|---|
| 16 | You should have received a copy of the GNU General Public License
|
|---|
| 17 | along with GNU Classpath; see the file COPYING. If not, write to the
|
|---|
| 18 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|---|
| 19 | 02111-1307 USA.
|
|---|
| 20 |
|
|---|
| 21 | Linking this library statically or dynamically with other modules is
|
|---|
| 22 | making a combined work based on this library. Thus, the terms and
|
|---|
| 23 | conditions of the GNU General Public License cover the whole
|
|---|
| 24 | combination.
|
|---|
| 25 |
|
|---|
| 26 | As a special exception, the copyright holders of this library give you
|
|---|
| 27 | permission to link this library with independent modules to produce an
|
|---|
| 28 | executable, regardless of the license terms of these independent
|
|---|
| 29 | modules, and to copy and distribute the resulting executable under
|
|---|
| 30 | terms of your choice, provided that you also meet, for each linked
|
|---|
| 31 | independent module, the terms and conditions of the license of that
|
|---|
| 32 | module. An independent module is a module which is not derived from
|
|---|
| 33 | or based on this library. If you modify this library, you may extend
|
|---|
| 34 | this exception to your version of the library, but you are not
|
|---|
| 35 | obligated to do so. If you do not wish to do so, delete this
|
|---|
| 36 | exception statement from your version. */
|
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 | package java.sql;
|
|---|
| 40 |
|
|---|
| 41 | import java.io.InputStream;
|
|---|
| 42 | import java.io.Reader;
|
|---|
| 43 | import java.math.BigDecimal;
|
|---|
| 44 | import java.util.Calendar;
|
|---|
| 45 |
|
|---|
| 46 | /**
|
|---|
| 47 | * This interface provides a mechanism for executing pre-compiled
|
|---|
| 48 | * statements. This provides greater efficiency when calling the same
|
|---|
| 49 | * statement multiple times. Parameters are allowed in a statement,
|
|---|
| 50 | * providings for maximum reusability.
|
|---|
| 51 | *
|
|---|
| 52 | * @author Aaron M. Renn ([email protected])
|
|---|
| 53 | */
|
|---|
| 54 | public interface PreparedStatement extends Statement
|
|---|
| 55 | {
|
|---|
| 56 |
|
|---|
| 57 | /**
|
|---|
| 58 | * This method populates the specified parameter with a SQL NULL value
|
|---|
| 59 | * for the specified type.
|
|---|
| 60 | *
|
|---|
| 61 | * @param index The index of the parameter to set.
|
|---|
| 62 | * @param type The SQL type identifier of the parameter from <code>Types</code>
|
|---|
| 63 | *
|
|---|
| 64 | * @exception SQLException If an error occurs.
|
|---|
| 65 | */
|
|---|
| 66 | public abstract void
|
|---|
| 67 | setNull(int index, int type) throws SQLException;
|
|---|
| 68 |
|
|---|
| 69 | /*************************************************************************/
|
|---|
| 70 |
|
|---|
| 71 | /**
|
|---|
| 72 | * This method populates the specified parameter with a SQL NULL value
|
|---|
| 73 | * for the specified type.
|
|---|
| 74 | *
|
|---|
| 75 | * @param index The index of the parameter to set.
|
|---|
| 76 | * @param type The SQL type identifier of the parameter from <code>Types</code>
|
|---|
| 77 | * @param name The name of the data type, for user defined types.
|
|---|
| 78 | *
|
|---|
| 79 | * @exception SQLException If an error occurs.
|
|---|
| 80 | */
|
|---|
| 81 | public abstract void
|
|---|
| 82 | setNull(int index, int type, String name) throws SQLException;
|
|---|
| 83 |
|
|---|
| 84 | /*************************************************************************/
|
|---|
| 85 |
|
|---|
| 86 | /**
|
|---|
| 87 | * This method sets the specified parameter from the given Java
|
|---|
| 88 | * <code>boolean</code> value.
|
|---|
| 89 | *
|
|---|
| 90 | * @param index The index of the parameter value to set.
|
|---|
| 91 | * @param value The value of the parameter.
|
|---|
| 92 | *
|
|---|
| 93 | * @exception SQLException If an error occurs.
|
|---|
| 94 | */
|
|---|
| 95 | public abstract void
|
|---|
| 96 | setBoolean(int index, boolean value) throws SQLException;
|
|---|
| 97 |
|
|---|
| 98 | /*************************************************************************/
|
|---|
| 99 |
|
|---|
| 100 | /**
|
|---|
| 101 | * This method sets the specified parameter from the given Java
|
|---|
| 102 | * <code>byte</code> value.
|
|---|
| 103 | *
|
|---|
| 104 | * @param index The index of the parameter value to set.
|
|---|
| 105 | * @param value The value of the parameter.
|
|---|
| 106 | *
|
|---|
| 107 | * @exception SQLException If an error occurs.
|
|---|
| 108 | */
|
|---|
| 109 | public abstract void
|
|---|
| 110 | setByte(int index, byte value) throws SQLException;
|
|---|
| 111 |
|
|---|
| 112 | /*************************************************************************/
|
|---|
| 113 |
|
|---|
| 114 | /**
|
|---|
| 115 | * This method sets the specified parameter from the given Java
|
|---|
| 116 | * <code>short</code> value.
|
|---|
| 117 | *
|
|---|
| 118 | * @param index The index of the parameter value to set.
|
|---|
| 119 | * @param value The value of the parameter.
|
|---|
| 120 | *
|
|---|
| 121 | * @exception SQLException If an error occurs.
|
|---|
| 122 | */
|
|---|
| 123 | public abstract void
|
|---|
| 124 | setShort(int index, short value) throws SQLException;
|
|---|
| 125 |
|
|---|
| 126 | /*************************************************************************/
|
|---|
| 127 |
|
|---|
| 128 | /**
|
|---|
| 129 | * This method sets the specified parameter from the given Java
|
|---|
| 130 | * <code>int</code> value.
|
|---|
| 131 | *
|
|---|
| 132 | * @param index The index of the parameter value to set.
|
|---|
| 133 | * @param value The value of the parameter.
|
|---|
| 134 | *
|
|---|
| 135 | * @exception SQLException If an error occurs.
|
|---|
| 136 | */
|
|---|
| 137 | public abstract void
|
|---|
| 138 | setInt(int index, int value) throws SQLException;
|
|---|
| 139 |
|
|---|
| 140 | /*************************************************************************/
|
|---|
| 141 |
|
|---|
| 142 | /**
|
|---|
| 143 | * This method sets the specified parameter from the given Java
|
|---|
| 144 | * <code>long</code> value.
|
|---|
| 145 | *
|
|---|
| 146 | * @param index The index of the parameter value to set.
|
|---|
| 147 | * @param value The value of the parameter.
|
|---|
| 148 | *
|
|---|
| 149 | * @exception SQLException If an error occurs.
|
|---|
| 150 | */
|
|---|
| 151 | public abstract void
|
|---|
| 152 | setLong(int index, long value) throws SQLException;
|
|---|
| 153 |
|
|---|
| 154 | /*************************************************************************/
|
|---|
| 155 |
|
|---|
| 156 | /**
|
|---|
| 157 | * This method sets the specified parameter from the given Java
|
|---|
| 158 | * <code>float</code> value.
|
|---|
| 159 | *
|
|---|
| 160 | * @param index The index of the parameter value to set.
|
|---|
| 161 | * @param value The value of the parameter.
|
|---|
| 162 | *
|
|---|
| 163 | * @exception SQLException If an error occurs.
|
|---|
| 164 | */
|
|---|
| 165 | public abstract void
|
|---|
| 166 | setFloat(int index, float value) throws SQLException;
|
|---|
| 167 |
|
|---|
| 168 | /*************************************************************************/
|
|---|
| 169 |
|
|---|
| 170 | /**
|
|---|
| 171 | * This method sets the specified parameter from the given Java
|
|---|
| 172 | * <code>double</code> value.
|
|---|
| 173 | *
|
|---|
| 174 | * @param index The index of the parameter value to set.
|
|---|
| 175 | * @param value The value of the parameter.
|
|---|
| 176 | *
|
|---|
| 177 | * @exception SQLException If an error occurs.
|
|---|
| 178 | */
|
|---|
| 179 | public abstract void
|
|---|
| 180 | setDouble(int index, double value) throws SQLException;
|
|---|
| 181 |
|
|---|
| 182 | /*************************************************************************/
|
|---|
| 183 |
|
|---|
| 184 | /**
|
|---|
| 185 | * This method sets the specified parameter from the given Java
|
|---|
| 186 | * <code>String</code> value.
|
|---|
| 187 | *
|
|---|
| 188 | * @param index The index of the parameter value to set.
|
|---|
| 189 | * @param value The value of the parameter.
|
|---|
| 190 | *
|
|---|
| 191 | * @exception SQLException If an error occurs.
|
|---|
| 192 | */
|
|---|
| 193 | public abstract void
|
|---|
| 194 | setString(int index, String value) throws SQLException;
|
|---|
| 195 |
|
|---|
| 196 | /*************************************************************************/
|
|---|
| 197 |
|
|---|
| 198 | /**
|
|---|
| 199 | * This method sets the specified parameter from the given Java
|
|---|
| 200 | * <code>byte</code> array value.
|
|---|
| 201 | *
|
|---|
| 202 | * @param index The index of the parameter value to set.
|
|---|
| 203 | * @param value The value of the parameter.
|
|---|
| 204 | *
|
|---|
| 205 | * @exception SQLException If an error occurs.
|
|---|
| 206 | */
|
|---|
| 207 | public abstract void
|
|---|
| 208 | setBytes(int index, byte[] value) throws SQLException;
|
|---|
| 209 |
|
|---|
| 210 | /*************************************************************************/
|
|---|
| 211 |
|
|---|
| 212 | /**
|
|---|
| 213 | * This method sets the specified parameter from the given Java
|
|---|
| 214 | * <code>java.math.BigDecimal</code> value.
|
|---|
| 215 | *
|
|---|
| 216 | * @param index The index of the parameter value to set.
|
|---|
| 217 | * @param value The value of the parameter.
|
|---|
| 218 | *
|
|---|
| 219 | * @exception SQLException If an error occurs.
|
|---|
| 220 | */
|
|---|
| 221 | public abstract void
|
|---|
| 222 | setBigDecimal(int index, java.math.BigDecimal value) throws SQLException;
|
|---|
| 223 |
|
|---|
| 224 | /*************************************************************************/
|
|---|
| 225 |
|
|---|
| 226 | /**
|
|---|
| 227 | * This method sets the specified parameter from the given Java
|
|---|
| 228 | * <code>java.sql.Date</code> value.
|
|---|
| 229 | *
|
|---|
| 230 | * @param index The index of the parameter value to set.
|
|---|
| 231 | * @param value The value of the parameter.
|
|---|
| 232 | *
|
|---|
| 233 | * @exception SQLException If an error occurs.
|
|---|
| 234 | */
|
|---|
| 235 | public abstract void
|
|---|
| 236 | setDate(int index, java.sql.Date value) throws SQLException;
|
|---|
| 237 |
|
|---|
| 238 | /*************************************************************************/
|
|---|
| 239 |
|
|---|
| 240 | /**
|
|---|
| 241 | * This method sets the specified parameter from the given Java
|
|---|
| 242 | * <code>java.sql.Date</code> value.
|
|---|
| 243 | *
|
|---|
| 244 | * @param index The index of the parameter value to set.
|
|---|
| 245 | * @param value The value of the parameter.
|
|---|
| 246 | * @param calendar The <code>Calendar</code> to use for timezone and locale.
|
|---|
| 247 | *
|
|---|
| 248 | * @exception SQLException If an error occurs.
|
|---|
| 249 | */
|
|---|
| 250 | public abstract void
|
|---|
| 251 | setDate(int index, java.sql.Date value, Calendar calendar) throws SQLException;
|
|---|
| 252 |
|
|---|
| 253 | /*************************************************************************/
|
|---|
| 254 |
|
|---|
| 255 | /**
|
|---|
| 256 | * This method sets the specified parameter from the given Java
|
|---|
| 257 | * <code>java.sql.Time</code> value.
|
|---|
| 258 | *
|
|---|
| 259 | * @param index The index of the parameter value to set.
|
|---|
| 260 | * @param value The value of the parameter.
|
|---|
| 261 | *
|
|---|
| 262 | * @exception SQLException If an error occurs.
|
|---|
| 263 | */
|
|---|
| 264 | public abstract void
|
|---|
| 265 | setTime(int index, java.sql.Time value) throws SQLException;
|
|---|
| 266 |
|
|---|
| 267 | /*************************************************************************/
|
|---|
| 268 |
|
|---|
| 269 | /**
|
|---|
| 270 | * This method sets the specified parameter from the given Java
|
|---|
| 271 | * <code>java.sql.Time</code> value.
|
|---|
| 272 | *
|
|---|
| 273 | * @param index The index of the parameter value to set.
|
|---|
| 274 | * @param value The value of the parameter.
|
|---|
| 275 | * @param calendar The <code>Calendar</code> to use for timezone and locale.
|
|---|
| 276 | *
|
|---|
| 277 | * @exception SQLException If an error occurs.
|
|---|
| 278 | */
|
|---|
| 279 | public abstract void
|
|---|
| 280 | setTime(int index, java.sql.Time value, Calendar calendar) throws SQLException;
|
|---|
| 281 |
|
|---|
| 282 | /*************************************************************************/
|
|---|
| 283 |
|
|---|
| 284 | /**
|
|---|
| 285 | * This method sets the specified parameter from the given Java
|
|---|
| 286 | * <code>java.sql.Timestamp</code> value.
|
|---|
| 287 | *
|
|---|
| 288 | * @param index The index of the parameter value to set.
|
|---|
| 289 | * @param value The value of the parameter.
|
|---|
| 290 | *
|
|---|
| 291 | * @exception SQLException If an error occurs.
|
|---|
| 292 | */
|
|---|
| 293 | public abstract void
|
|---|
| 294 | setTimestamp(int index, java.sql.Timestamp value) throws SQLException;
|
|---|
| 295 |
|
|---|
| 296 | /*************************************************************************/
|
|---|
| 297 |
|
|---|
| 298 | /**
|
|---|
| 299 | * This method sets the specified parameter from the given Java
|
|---|
| 300 | * <code>java.sql.Timestamp</code> value.
|
|---|
| 301 | *
|
|---|
| 302 | * @param index The index of the parameter value to set.
|
|---|
| 303 | * @param value The value of the parameter.
|
|---|
| 304 | * @param calendar The <code>Calendar</code> to use for timezone and locale.
|
|---|
| 305 | *
|
|---|
| 306 | * @exception SQLException If an error occurs.
|
|---|
| 307 | */
|
|---|
| 308 | public abstract void
|
|---|
| 309 | setTimestamp(int index, java.sql.Timestamp value, Calendar calendar)
|
|---|
| 310 | throws SQLException;
|
|---|
| 311 |
|
|---|
| 312 | /*************************************************************************/
|
|---|
| 313 |
|
|---|
| 314 | /**
|
|---|
| 315 | * This method sets the specified parameter from the given Java
|
|---|
| 316 | * ASCII <code>InputStream</code> value.
|
|---|
| 317 | *
|
|---|
| 318 | * @param index The index of the parameter value to set.
|
|---|
| 319 | * @param value The value of the parameter.
|
|---|
| 320 | * @param length The number of bytes in the stream.
|
|---|
| 321 | *
|
|---|
| 322 | * @exception SQLException If an error occurs.
|
|---|
| 323 | */
|
|---|
| 324 | public abstract void
|
|---|
| 325 | setAsciiStream(int index, InputStream value, int length) throws SQLException;
|
|---|
| 326 |
|
|---|
| 327 | /*************************************************************************/
|
|---|
| 328 |
|
|---|
| 329 | /**
|
|---|
| 330 | * This method sets the specified parameter from the given Java
|
|---|
| 331 | * Unicode UTF-8 <code>InputStream</code> value.
|
|---|
| 332 | *
|
|---|
| 333 | * @param index The index of the parameter value to set.
|
|---|
| 334 | * @param value The value of the parameter.
|
|---|
| 335 | * @param length The number of bytes in the stream.
|
|---|
| 336 | *
|
|---|
| 337 | * @exception SQLException If an error occurs.
|
|---|
| 338 | */
|
|---|
| 339 | public abstract void
|
|---|
| 340 | setUnicodeStream(int index, InputStream value, int length) throws SQLException;
|
|---|
| 341 |
|
|---|
| 342 | /*************************************************************************/
|
|---|
| 343 |
|
|---|
| 344 | /**
|
|---|
| 345 | * This method sets the specified parameter from the given Java
|
|---|
| 346 | * binary <code>InputStream</code> value.
|
|---|
| 347 | *
|
|---|
| 348 | * @param index The index of the parameter value to set.
|
|---|
| 349 | * @param value The value of the parameter.
|
|---|
| 350 | * @param length The number of bytes in the stream.
|
|---|
| 351 | *
|
|---|
| 352 | * @exception SQLException If an error occurs.
|
|---|
| 353 | */
|
|---|
| 354 | public abstract void
|
|---|
| 355 | setBinaryStream(int index, InputStream value, int length) throws SQLException;
|
|---|
| 356 |
|
|---|
| 357 | /*************************************************************************/
|
|---|
| 358 |
|
|---|
| 359 | /**
|
|---|
| 360 | * This method sets the specified parameter from the given Java
|
|---|
| 361 | * character <code>Reader</code> value.
|
|---|
| 362 | *
|
|---|
| 363 | * @param index The index of the parameter value to set.
|
|---|
| 364 | * @param value The value of the parameter.
|
|---|
| 365 | * @param length The number of bytes in the stream.
|
|---|
| 366 | *
|
|---|
| 367 | * @exception SQLException If an error occurs.
|
|---|
| 368 | */
|
|---|
| 369 | public abstract void
|
|---|
| 370 | setCharacterStream(int index, Reader value, int length) throws SQLException;
|
|---|
| 371 |
|
|---|
| 372 | /*************************************************************************/
|
|---|
| 373 |
|
|---|
| 374 | /**
|
|---|
| 375 | * This method sets the specified parameter from the given Java
|
|---|
| 376 | * <code>Ref</code> value. The default object type to SQL type mapping
|
|---|
| 377 | * will be used.
|
|---|
| 378 | *
|
|---|
| 379 | * @param index The index of the parameter value to set.
|
|---|
| 380 | * @param value The value of the parameter.
|
|---|
| 381 | *
|
|---|
| 382 | * @exception SQLException If an error occurs.
|
|---|
| 383 | */
|
|---|
| 384 | public abstract void
|
|---|
| 385 | setRef(int index, Ref value) throws SQLException;
|
|---|
| 386 |
|
|---|
| 387 | /*************************************************************************/
|
|---|
| 388 |
|
|---|
| 389 | /**
|
|---|
| 390 | * This method sets the specified parameter from the given Java
|
|---|
| 391 | * <code>Blob</code> value. The default object type to SQL type mapping
|
|---|
| 392 | * will be used.
|
|---|
| 393 | *
|
|---|
| 394 | * @param index The index of the parameter value to set.
|
|---|
| 395 | * @param value The value of the parameter.
|
|---|
| 396 | *
|
|---|
| 397 | * @exception SQLException If an error occurs.
|
|---|
| 398 | */
|
|---|
| 399 | public abstract void
|
|---|
| 400 | setBlob(int index, Blob value) throws SQLException;
|
|---|
| 401 |
|
|---|
| 402 | /*************************************************************************/
|
|---|
| 403 |
|
|---|
| 404 | /**
|
|---|
| 405 | * This method sets the specified parameter from the given Java
|
|---|
| 406 | * <code>Clob</code> value. The default object type to SQL type mapping
|
|---|
| 407 | * will be used.
|
|---|
| 408 | *
|
|---|
| 409 | * @param index The index of the parameter value to set.
|
|---|
| 410 | * @param value The value of the parameter.
|
|---|
| 411 | *
|
|---|
| 412 | * @exception SQLException If an error occurs.
|
|---|
| 413 | */
|
|---|
| 414 | public abstract void
|
|---|
| 415 | setClob(int index, Clob value) throws SQLException;
|
|---|
| 416 |
|
|---|
| 417 | /*************************************************************************/
|
|---|
| 418 |
|
|---|
| 419 | /**
|
|---|
| 420 | * This method sets the specified parameter from the given Java
|
|---|
| 421 | * <code>Array</code> value. The default object type to SQL type mapping
|
|---|
| 422 | * will be used.
|
|---|
| 423 | *
|
|---|
| 424 | * @param index The index of the parameter value to set.
|
|---|
| 425 | * @param value The value of the parameter.
|
|---|
| 426 | *
|
|---|
| 427 | * @exception SQLException If an error occurs.
|
|---|
| 428 | */
|
|---|
| 429 | public abstract void
|
|---|
| 430 | setArray(int index, Array value) throws SQLException;
|
|---|
| 431 |
|
|---|
| 432 | /*************************************************************************/
|
|---|
| 433 |
|
|---|
| 434 | /**
|
|---|
| 435 | * This method sets the specified parameter from the given Java
|
|---|
| 436 | * <code>Object</code> value. The default object type to SQL type mapping
|
|---|
| 437 | * will be used.
|
|---|
| 438 | *
|
|---|
| 439 | * @param index The index of the parameter value to set.
|
|---|
| 440 | * @param value The value of the parameter.
|
|---|
| 441 | *
|
|---|
| 442 | * @exception SQLException If an error occurs.
|
|---|
| 443 | */
|
|---|
| 444 | public abstract void
|
|---|
| 445 | setObject(int index, Object value) throws SQLException;
|
|---|
| 446 |
|
|---|
| 447 | /*************************************************************************/
|
|---|
| 448 |
|
|---|
| 449 | /**
|
|---|
| 450 | * This method sets the specified parameter from the given Java
|
|---|
| 451 | * <code>Object</code> value. The specified SQL object type will be used.
|
|---|
| 452 | *
|
|---|
| 453 | * @param index The index of the parameter value to set.
|
|---|
| 454 | * @param value The value of the parameter.
|
|---|
| 455 | * @param type The SQL type to use for the parameter, from <code>Types</code>
|
|---|
| 456 | *
|
|---|
| 457 | * @exception SQLException If an error occurs.
|
|---|
| 458 | *
|
|---|
| 459 | * @see Types
|
|---|
| 460 | */
|
|---|
| 461 | public abstract void
|
|---|
| 462 | setObject(int index, Object value, int type) throws SQLException;
|
|---|
| 463 |
|
|---|
| 464 | /*************************************************************************/
|
|---|
| 465 |
|
|---|
| 466 | /**
|
|---|
| 467 | * This method sets the specified parameter from the given Java
|
|---|
| 468 | * <code>Object</code> value. The specified SQL object type will be used.
|
|---|
| 469 | *
|
|---|
| 470 | * @param index The index of the parameter value to set.
|
|---|
| 471 | * @param value The value of the parameter.
|
|---|
| 472 | * @param type The SQL type to use for the parameter, from <code>Types</code>
|
|---|
| 473 | * @param scale The scale of the value, for numeric values only.
|
|---|
| 474 | *
|
|---|
| 475 | * @exception SQLException If an error occurs.
|
|---|
| 476 | *
|
|---|
| 477 | * @see Types
|
|---|
| 478 | */
|
|---|
| 479 | public abstract void
|
|---|
| 480 | setObject(int index, Object value, int type, int scale) throws SQLException;
|
|---|
| 481 |
|
|---|
| 482 | /*************************************************************************/
|
|---|
| 483 |
|
|---|
| 484 | /**
|
|---|
| 485 | * This method adds a set of parameters to the batch for JDBC 2.0.
|
|---|
| 486 | *
|
|---|
| 487 | * @exception SQLException If an error occurs.
|
|---|
| 488 | */
|
|---|
| 489 | public abstract void
|
|---|
| 490 | addBatch() throws SQLException;
|
|---|
| 491 |
|
|---|
| 492 | /*************************************************************************/
|
|---|
| 493 |
|
|---|
| 494 | /**
|
|---|
| 495 | * This method clears all of the input parameter that have been
|
|---|
| 496 | * set on this statement.
|
|---|
| 497 | *
|
|---|
| 498 | * @exception SQLException If an error occurs.
|
|---|
| 499 | */
|
|---|
| 500 | public abstract void
|
|---|
| 501 | clearParameters() throws SQLException;
|
|---|
| 502 |
|
|---|
| 503 | /*************************************************************************/
|
|---|
| 504 |
|
|---|
| 505 | /**
|
|---|
| 506 | * This method returns meta data for the result set from this statement.
|
|---|
| 507 | *
|
|---|
| 508 | * @return Meta data for the result set from this statement.
|
|---|
| 509 | *
|
|---|
| 510 | * @exception SQLException If an error occurs.
|
|---|
| 511 | */
|
|---|
| 512 | public abstract ResultSetMetaData
|
|---|
| 513 | getMetaData() throws SQLException;
|
|---|
| 514 |
|
|---|
| 515 | /*************************************************************************/
|
|---|
| 516 |
|
|---|
| 517 | /**
|
|---|
| 518 | * This method executes a prepared SQL query.
|
|---|
| 519 | * Some prepared statements return multiple results; the execute method
|
|---|
| 520 | * handles these complex statements as well as the simpler form of
|
|---|
| 521 | * statements handled by executeQuery and executeUpdate.
|
|---|
| 522 | *
|
|---|
| 523 | * @return The result of the SQL statement.
|
|---|
| 524 | *
|
|---|
| 525 | * @exception SQLException If an error occurs.
|
|---|
| 526 | */
|
|---|
| 527 | public abstract boolean
|
|---|
| 528 | execute() throws SQLException;
|
|---|
| 529 |
|
|---|
| 530 | /*************************************************************************/
|
|---|
| 531 |
|
|---|
| 532 | /**
|
|---|
| 533 | * This method executes a prepared SQL query and returns its ResultSet.
|
|---|
| 534 | *
|
|---|
| 535 | * @return The ResultSet of the SQL statement.
|
|---|
| 536 | *
|
|---|
| 537 | * @exception SQLException If an error occurs.
|
|---|
| 538 | */
|
|---|
| 539 | public abstract ResultSet
|
|---|
| 540 | executeQuery() throws SQLException;
|
|---|
| 541 |
|
|---|
| 542 | /*************************************************************************/
|
|---|
| 543 |
|
|---|
| 544 | /**
|
|---|
| 545 | * This method executes an SQL INSERT, UPDATE or DELETE statement. SQL
|
|---|
| 546 | * statements that return nothing such as SQL DDL statements can be executed.
|
|---|
| 547 | *
|
|---|
| 548 | * @return The result is either the row count for INSERT, UPDATE or DELETE
|
|---|
| 549 | * statements; or 0 for SQL statements that return nothing.
|
|---|
| 550 | *
|
|---|
| 551 | * @exception SQLException If an error occurs.
|
|---|
| 552 | */
|
|---|
| 553 | public abstract int
|
|---|
| 554 | executeUpdate() throws SQLException;
|
|---|
| 555 |
|
|---|
| 556 | } // interface PreparedStatement
|
|---|
| 557 |
|
|---|