1. /*
  2. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  3. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  4. */
  5. package javax.sql;
  6. import java.sql.*;
  7. import java.io.*;
  8. import java.math.*;
  9. import java.util.*;
  10. /**
  11. *
  12. * <P>The RowSet interface adds support to the JDBC API for the
  13. * JavaBeans(TM) component model. A rowset can be used as a JavaBean in
  14. * a visual Bean development environment. A RowSet can be created and
  15. * configured at design time and executed at runtime. The RowSet
  16. * interface provides a set of JavaBeans properties that allow a RowSet
  17. * instance to be configured to connect to a JDBC data source and read
  18. * some data from the data source. A group of setXXX() methods
  19. * provide a way to pass input parameters to a rowset. The RowSet
  20. * interface supports JavaBeans events, allowing other components in an
  21. * application to be notified when an important event on a rowset occurs,
  22. * such as a change in its value.
  23. *
  24. * <P>The RowSet interface is unique in that it is intended to be
  25. * implemented using the rest of the JDBC(TM) API. In other words, a
  26. * RowSet implementation is a layer of software that executes "on top"
  27. * of a JDBC driver. Implementations of the RowSet interface can
  28. * be provided by anyone, including JDBC driver vendors who want to
  29. * provide a RowSet implementation as part of their JDBC products.
  30. *
  31. * <P>Rowsets are easy to use. The RowSet interface extends the standard
  32. * java.sql.ResultSet interface. The RowSetMetaData interface extends
  33. * the java.sql.ResultSetMetaData interface. Thus, developers familiar
  34. * with the JDBC API will have to learn a minimal number of new APIs to
  35. * use rowsets. In addition, third-party software tools that work with
  36. * JDBC ResultSets will also easily be made to work with rowsets.
  37. *
  38. */
  39. public interface RowSet extends ResultSet {
  40. //-----------------------------------------------------------------------
  41. // Properties
  42. //-----------------------------------------------------------------------
  43. //-----------------------------------------------------------------------
  44. // The following properties may be used to create a Connection.
  45. //-----------------------------------------------------------------------
  46. /**
  47. * Get the url used to create a JDBC connection. The default value
  48. * is null.
  49. *
  50. * @return a string url
  51. * @exception SQLException if a database-access error occurs.
  52. */
  53. String getUrl() throws SQLException;
  54. /**
  55. * Set the url used to create a connection.
  56. *
  57. * Setting this property is optional. If a url is used, a JDBC driver
  58. * that accepts the url must be loaded by the application before the
  59. * rowset is used to connect to a database. The rowset will use the url
  60. * internally to create a database connection when reading or writing
  61. * data. Either a url or a data source name is used to create a
  62. * connection, whichever was specified most recently.
  63. *
  64. * @param url a string value, may be null
  65. * @exception SQLException if a database-access error occurs.
  66. */
  67. void setUrl(String url) throws SQLException;
  68. /**
  69. * The JNDI name that identifies a JDBC data source. Users should set
  70. * either the url or data source name properties. The most recent
  71. * property set is used to get a connection.
  72. *
  73. * @return a data source name
  74. */
  75. String getDataSourceName();
  76. /**
  77. * Set the data source name.
  78. *
  79. * @param name a data source name
  80. * @exception SQLException if a database-access error occurs.
  81. */
  82. void setDataSourceName(String name) throws SQLException;
  83. /**
  84. * The username used to create a database connection. The username
  85. * property is set at runtime before calling execute(). It is
  86. * not usually part of the serialized state of a rowset object.
  87. *
  88. * @return a user name
  89. */
  90. String getUsername();
  91. /**
  92. * Set the user name.
  93. *
  94. * @param name a user name
  95. * @exception SQLException if a database-access error occurs.
  96. */
  97. void setUsername(String name) throws SQLException;
  98. /**
  99. * The password used to create a database connection. The password
  100. * property is set at runtime before calling execute(). It is
  101. * not usually part of the serialized state of a rowset object.
  102. *
  103. * @return a password
  104. */
  105. String getPassword();
  106. /**
  107. * Set the password.
  108. *
  109. * @param password the password string
  110. * @exception SQLException if a database-access error occurs.
  111. */
  112. void setPassword(String password) throws SQLException;
  113. /**
  114. * The transaction isolation property contains the JDBC transaction
  115. * isolation level used.
  116. *
  117. * @return the transaction isolation level
  118. */
  119. int getTransactionIsolation();
  120. /**
  121. * Set the transaction isolation.
  122. *
  123. * @param level the transaction isolation level
  124. * @exception SQLException if a database-access error occurs.
  125. */
  126. void setTransactionIsolation(int level) throws SQLException;
  127. /**
  128. * Get the type-map object associated with this rowset.
  129. * By default, the map returned is empty.
  130. *
  131. * @return a map object
  132. * @exception SQLException if a database-access error occurs.
  133. */
  134. java.util.Map getTypeMap() throws SQLException;
  135. /**
  136. * Install a type-map object as the default type-map for
  137. * this rowset.
  138. *
  139. * @param map a map object
  140. * @exception SQLException if a database-access error occurs.
  141. */
  142. void setTypeMap(java.util.Map map) throws SQLException;
  143. //-----------------------------------------------------------------------
  144. // The following properties may be used to create a Statement.
  145. //-----------------------------------------------------------------------
  146. /**
  147. * Get the rowset's command property.
  148. *
  149. * The command property contains a command string that can be executed to
  150. * fill the rowset with data. The default value is null.
  151. *
  152. * @return the command string, may be null
  153. */
  154. String getCommand();
  155. /**
  156. * Set the rowset's command property.
  157. *
  158. * This property is optional. The command property may not be needed
  159. * when a rowset is produced by a data source that doesn't support
  160. * commands, such as a spreadsheet.
  161. *
  162. * @param cmd a command string, may be null
  163. * @exception SQLException if a database-access error occurs.
  164. */
  165. void setCommand(String cmd) throws SQLException;
  166. /**
  167. * A rowset may be read-only. Attempts to update a
  168. * read-only rowset will result in an SQLException being thrown.
  169. * Rowsets are updateable, by default, if updates are possible.
  170. *
  171. * @return true if updatable, false otherwise
  172. */
  173. boolean isReadOnly();
  174. /**
  175. * Set the read-onlyness of the rowset
  176. *
  177. * @param value true if read-only, false otherwise
  178. * @exception SQLException if a database-access error occurs.
  179. */
  180. void setReadOnly(boolean value) throws SQLException;
  181. /**
  182. * The maxFieldSize limit (in bytes) is the maximum amount of data
  183. * returned for any column value; it only applies to BINARY,
  184. * VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR
  185. * columns. If the limit is exceeded, the excess data is silently
  186. * discarded.
  187. *
  188. * @return the current max column size limit; zero means unlimited
  189. * @exception SQLException if a database-access error occurs.
  190. */
  191. int getMaxFieldSize() throws SQLException;
  192. /**
  193. * The maxFieldSize limit (in bytes) is set to limit the size of
  194. * data that can be returned for any column value; it only applies
  195. * to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and
  196. * LONGVARCHAR fields. If the limit is exceeded, the excess data
  197. * is silently discarded. For maximum portability use values
  198. * greater than 256.
  199. *
  200. * @param max the new max column size limit; zero means unlimited
  201. * @exception SQLException if a database-access error occurs.
  202. */
  203. void setMaxFieldSize(int max) throws SQLException;
  204. /**
  205. * The maxRows limit is the maximum number of rows that a
  206. * RowSet can contain. If the limit is exceeded, the excess
  207. * rows are silently dropped.
  208. *
  209. * @return the current max row limit; zero means unlimited
  210. * @exception SQLException if a database-access error occurs.
  211. */
  212. int getMaxRows() throws SQLException;
  213. /**
  214. * The maxRows limit is set to limit the number of rows that any
  215. * RowSet can contain. If the limit is exceeded, the excess
  216. * rows are silently dropped.
  217. *
  218. * @param max the new max rows limit; zero means unlimited
  219. * @exception SQLException if a database-access error occurs.
  220. */
  221. void setMaxRows(int max) throws SQLException;
  222. /**
  223. * If escape scanning is on (the default), the driver will do
  224. * escape substitution before sending the SQL to the database.
  225. *
  226. * @return true if enabled; false if disabled
  227. * @exception SQLException if a database-access error occurs.
  228. */
  229. boolean getEscapeProcessing() throws SQLException;
  230. /**
  231. * If escape scanning is on (the default), the driver will do
  232. * escape substitution before sending the SQL to the database.
  233. *
  234. * @param enable true to enable; false to disable
  235. * @exception SQLException if a database-access error occurs.
  236. */
  237. void setEscapeProcessing(boolean enable) throws SQLException;
  238. /**
  239. * The queryTimeout limit is the number of seconds the driver will
  240. * wait for a Statement to execute. If the limit is exceeded, a
  241. * SQLException is thrown.
  242. *
  243. * @return the current query timeout limit in seconds; zero means
  244. * unlimited
  245. * @exception SQLException if a database-access error occurs.
  246. */
  247. int getQueryTimeout() throws SQLException;
  248. /**
  249. * The queryTimeout limit is the number of seconds the driver will
  250. * wait for a Statement to execute. If the limit is exceeded, a
  251. * SQLException is thrown.
  252. *
  253. * @param seconds the new query timeout limit in seconds; zero means
  254. * unlimited
  255. * @exception SQLException if a database-access error occurs.
  256. */
  257. void setQueryTimeout(int seconds) throws SQLException;
  258. /**
  259. * Set the rowset type.
  260. *
  261. * @param type a value from ResultSet.TYPE_XXX
  262. * @exception SQLException if a database-access error occurs.
  263. */
  264. void setType(int type) throws SQLException;
  265. /**
  266. * Set the rowset concurrency.
  267. *
  268. * @param concurrency a value from ResultSet.CONCUR_XXX
  269. * @exception SQLException if a database-access error occurs.
  270. */
  271. void setConcurrency(int concurrency) throws SQLException;
  272. //-----------------------------------------------------------------------
  273. // Parameters
  274. //-----------------------------------------------------------------------
  275. /**
  276. * The setXXX() methods are used to set any input parameters needed by
  277. * command (above). Parameters are set at runtime, as opposed to design
  278. * time.
  279. */
  280. /**
  281. * Set a parameter to SQL NULL.
  282. *
  283. * <P><B>Note:</B> You must specify the parameter's SQL type.
  284. *
  285. * @param parameterIndex the first parameter is 1, the second is 2, ...
  286. * @param sqlType SQL type code defined by java.sql.Types
  287. * @exception SQLException if a database-access error occurs.
  288. */
  289. void setNull(int parameterIndex, int sqlType) throws SQLException;
  290. /**
  291. * JDBC 2.0
  292. *
  293. * Set a parameter to SQL NULL. This version of setNull should
  294. * be used for user-named types and REF type parameters. Examples
  295. * of user-named types include: STRUCT, DISTINCT, JAVA_OBJECT, and
  296. * named array types.
  297. *
  298. * <P><B>Note:</B> To be portable, applications must give the
  299. * SQL type code and the fully qualified SQL type name when specifying
  300. * a NULL user-named or REF parameter. In the case of a user-named type
  301. * the name is the type name of the parameter itself. For a REF
  302. * parameter the name is the type name of the referenced type. If
  303. * a JDBC driver does not need the type code or type name information,
  304. * it may ignore it.
  305. *
  306. * Although it is intended for user-named and Ref parameters,
  307. * this method may be used to set a null parameter of any JDBC type.
  308. * If the parameter does not have a user-named or REF type then the
  309. * typeName is ignored.
  310. *
  311. *
  312. * @param parameterIndex the first parameter is 1, the second is 2, ...
  313. * @param sqlType a value from java.sql.Types
  314. * @param typeName the fully qualified name of a SQL user-named type,
  315. * ignored if the parameter is not a user-named type or REF
  316. * @exception SQLException if a database-access error occurs.
  317. */
  318. void setNull (int paramIndex, int sqlType, String typeName)
  319. throws SQLException;
  320. /**
  321. * Set a parameter to a Java boolean value.
  322. *
  323. * @param parameterIndex the first parameter is 1, the second is 2, ...
  324. * @param x the parameter value
  325. * @exception SQLException if a database-access error occurs.
  326. */
  327. void setBoolean(int parameterIndex, boolean x) throws SQLException;
  328. /**
  329. * Set a parameter to a Java byte value.
  330. *
  331. * @param parameterIndex the first parameter is 1, the second is 2, ...
  332. * @param x the parameter value
  333. * @exception SQLException if a database-access error occurs.
  334. */
  335. void setByte(int parameterIndex, byte x) throws SQLException;
  336. /**
  337. * Set a parameter to a Java short value.
  338. *
  339. * @param parameterIndex the first parameter is 1, the second is 2, ...
  340. * @param x the parameter value
  341. * @exception SQLException if a database-access error occurs.
  342. */
  343. void setShort(int parameterIndex, short x) throws SQLException;
  344. /**
  345. * Set a parameter to a Java int value.
  346. *
  347. * @param parameterIndex the first parameter is 1, the second is 2, ...
  348. * @param x the parameter value
  349. * @exception SQLException if a database-access error occurs.
  350. */
  351. void setInt(int parameterIndex, int x) throws SQLException;
  352. /**
  353. * Set a parameter to a Java long value.
  354. *
  355. * @param parameterIndex the first parameter is 1, the second is 2, ...
  356. * @param x the parameter value
  357. * @exception SQLException if a database-access error occurs.
  358. */
  359. void setLong(int parameterIndex, long x) throws SQLException;
  360. /**
  361. * Set a parameter to a Java float value. The driver converts this
  362. * to a SQL FLOAT value when it sends it to the database.
  363. *
  364. * @param parameterIndex the first parameter is 1, the second is 2, ...
  365. * @param x the parameter value
  366. * @exception SQLException if a database-access error occurs.
  367. */
  368. void setFloat(int parameterIndex, float x) throws SQLException;
  369. /**
  370. * Set a parameter to a Java double value.
  371. *
  372. * @param parameterIndex the first parameter is 1, the second is 2, ...
  373. * @param x the parameter value
  374. * @exception SQLException if a database-access error occurs.
  375. */
  376. void setDouble(int parameterIndex, double x) throws SQLException;
  377. /**
  378. * Set a parameter to a java.lang.BigDecimal value.
  379. *
  380. * @param parameterIndex the first parameter is 1, the second is 2, ...
  381. * @param x the parameter value
  382. * @exception SQLException if a database-access error occurs.
  383. */
  384. void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException;
  385. /**
  386. * Set a parameter to a Java String value.
  387. *
  388. * @param parameterIndex the first parameter is 1, the second is 2, ...
  389. * @param x the parameter value
  390. * @exception SQLException if a database-access error occurs.
  391. */
  392. void setString(int parameterIndex, String x) throws SQLException;
  393. /**
  394. * Set a parameter to a Java array of bytes.
  395. *
  396. * @param parameterIndex the first parameter is 1, the second is 2, ...
  397. * @param x the parameter value
  398. * @exception SQLException if a database-access error occurs.
  399. */
  400. void setBytes(int parameterIndex, byte x[]) throws SQLException;
  401. /**
  402. * Set a parameter to a java.sql.Date value.
  403. *
  404. * @param parameterIndex the first parameter is 1, the second is 2, ...
  405. * @param x the parameter value
  406. * @exception SQLException if a database-access error occurs.
  407. */
  408. void setDate(int parameterIndex, java.sql.Date x) throws SQLException;
  409. /**
  410. * Set a parameter to a java.sql.Time value.
  411. *
  412. * @param parameterIndex the first parameter is 1, the second is 2, ...
  413. * @param x the parameter value
  414. * @exception SQLException if a database-access error occurs.
  415. */
  416. void setTime(int parameterIndex, java.sql.Time x) throws SQLException;
  417. /**
  418. * Set a parameter to a java.sql.Timestamp value.
  419. *
  420. * @param parameterIndex the first parameter is 1, the second is 2, ...
  421. * @param x the parameter value
  422. * @exception SQLException if a database-access error occurs.
  423. */
  424. void setTimestamp(int parameterIndex, java.sql.Timestamp x)
  425. throws SQLException;
  426. /**
  427. * When a very large ASCII value is input to a LONGVARCHAR
  428. * parameter, it may be more practical to send it via a
  429. * java.io.InputStream. JDBC will read the data from the stream
  430. * as needed, until it reaches end-of-file.
  431. *
  432. * <P><B>Note:</B> This stream object can either be a standard
  433. * Java stream object or your own subclass that implements the
  434. * standard interface.
  435. *
  436. * @param parameterIndex the first parameter is 1, the second is 2, ...
  437. * @param x the java input stream which contains the ASCII parameter value
  438. * @param length the number of bytes in the stream
  439. * @exception SQLException if a database-access error occurs.
  440. */
  441. void setAsciiStream(int parameterIndex, java.io.InputStream x, int length)
  442. throws SQLException;
  443. /**
  444. * When a very large binary value is input to a LONGVARBINARY
  445. * parameter, it may be more practical to send it via a
  446. * java.io.InputStream. JDBC will read the data from the stream
  447. * as needed, until it reaches end-of-file.
  448. *
  449. * <P><B>Note:</B> This stream object can either be a standard
  450. * Java stream object or your own subclass that implements the
  451. * standard interface.
  452. *
  453. * @param parameterIndex the first parameter is 1, the second is 2, ...
  454. * @param x the java input stream which contains the binary parameter value
  455. * @param length the number of bytes in the stream
  456. * @exception SQLException if a database-access error occurs.
  457. */
  458. void setBinaryStream(int parameterIndex, java.io.InputStream x,
  459. int length) throws SQLException;
  460. /**
  461. * When a very large UNICODE value is input to a LONGVARCHAR
  462. * parameter, it may be more practical to send it via a
  463. * java.io.Reader. JDBC will read the data from the stream
  464. * as needed, until it reaches end-of-file.
  465. *
  466. * <P><B>Note:</B> This stream object can either be a standard
  467. * Java stream object or your own subclass that implements the
  468. * standard interface.
  469. *
  470. * @param parameterIndex the first parameter is 1, the second is 2, ...
  471. * @param x the java reader which contains the UNICODE data
  472. * @param length the number of characters in the stream
  473. * @exception SQLException if a database-access error occurs.
  474. */
  475. void setCharacterStream(int parameterIndex,
  476. Reader reader,
  477. int length) throws SQLException;
  478. /**
  479. * <p>Set the value of a parameter using an object; use the
  480. * java.lang equivalent objects for integral values.
  481. *
  482. * <p>The given Java object will be converted to the targetSqlType
  483. * before being sent to the database.
  484. *
  485. * If the object is of a class implementing SQLData,
  486. * the rowset should call its method writeSQL() to write it
  487. * to the SQL data stream.
  488. * else
  489. * If the object is of a class implementing Ref, Blob, Clob, Struct,
  490. * or Array then pass it to the database as a value of the
  491. * corresponding SQL type.
  492. *
  493. * <p>Note that this method may be used to pass datatabase-
  494. * specific abstract data types.
  495. *
  496. * @param parameterIndex The first parameter is 1, the second is 2, ...
  497. * @param x The object containing the input parameter value
  498. * @param targetSqlType The SQL type (as defined in java.sql.Types) to be
  499. * sent to the database. The scale argument may further qualify this type.
  500. * @param scale For java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types
  501. * this is the number of digits after the decimal. For all other
  502. * types this value will be ignored,
  503. * @exception SQLException if a database-access error occurs.
  504. * @see Types
  505. */
  506. void setObject(int parameterIndex, Object x, int targetSqlType, int scale)
  507. throws SQLException;
  508. /**
  509. * This method is like setObject above, but the scale used is the scale
  510. * of the second parameter. Scalar values have a scale of zero. Literal
  511. * values have the scale present in the literal. While it is supported, it
  512. * is not recommended that this method not be called with floating point
  513. * input values.
  514. *
  515. * @exception SQLException if a database-access error occurs.
  516. */
  517. void setObject(int parameterIndex, Object x,
  518. int targetSqlType) throws SQLException;
  519. /**
  520. * <p>Set the value of a parameter using an object; use the
  521. * java.lang equivalent objects for integral values.
  522. *
  523. * <p>The JDBC specification specifies a standard mapping from
  524. * Java Object types to SQL types. The given argument java object
  525. * will be converted to the corresponding SQL type before being
  526. * sent to the database.
  527. *
  528. * <p>Note that this method may be used to pass datatabase
  529. * specific abstract data types, by using a Driver specific Java
  530. * type.
  531. *
  532. * If the object is of a class implementing SQLData,
  533. * the rowset should call its method writeSQL() to write it
  534. * to the SQL data stream.
  535. * else
  536. * If the object is of a class implementing Ref, Blob, Clob, Struct,
  537. * or Array then pass it to the database as a value of the
  538. * corresponding SQL type.
  539. *
  540. * Raise an exception if there is an ambiguity, for example, if the
  541. * object is of a class implementing more than one of those interfaces.
  542. *
  543. * @param parameterIndex The first parameter is 1, the second is 2, ...
  544. * @param x The object containing the input parameter value
  545. * @exception SQLException if a database-access error occurs.
  546. */
  547. void setObject(int parameterIndex, Object x) throws SQLException;
  548. /**
  549. * Set a REF(<structured-type>) parameter.
  550. *
  551. * @param i the first parameter is 1, the second is 2, ...
  552. * @param x an object representing data of an SQL REF Type
  553. */
  554. void setRef (int i, Ref x) throws SQLException;
  555. /**
  556. * Set a BLOB parameter.
  557. *
  558. * @param i the first parameter is 1, the second is 2, ...
  559. * @param x an object representing a BLOB
  560. */
  561. void setBlob (int i, Blob x) throws SQLException;
  562. /**
  563. * Set a CLOB parameter.
  564. *
  565. * @param i the first parameter is 1, the second is 2, ...
  566. * @param x an object representing a CLOB
  567. */
  568. void setClob (int i, Clob x) throws SQLException;
  569. /**
  570. * Set an Array parameter.
  571. *
  572. * @param i the first parameter is 1, the second is 2, ...
  573. * @param x an object representing an SQL array
  574. */
  575. void setArray (int i, Array x) throws SQLException;
  576. /**
  577. * Set a parameter to a java.sql.Date value. The driver converts this
  578. * to a SQL DATE value when it sends it to the database.
  579. *
  580. * @param parameterIndex the first parameter is 1, the second is 2, ...
  581. * @param x the parameter value
  582. * @exception SQLException if a database-access error occurs.
  583. */
  584. void setDate(int parameterIndex, java.sql.Date x, Calendar cal)
  585. throws SQLException;
  586. /**
  587. * Set a parameter to a java.sql.Time value. The driver converts this
  588. * to a SQL TIME value when it sends it to the database.
  589. *
  590. * @param parameterIndex the first parameter is 1, the second is 2, ...
  591. * @param x the parameter value
  592. * @exception SQLException if a database-access error occurs.
  593. */
  594. void setTime(int parameterIndex, java.sql.Time x, Calendar cal)
  595. throws SQLException;
  596. /**
  597. * Set a parameter to a java.sql.Timestamp value. The driver
  598. * converts this to a SQL TIMESTAMP value when it sends it to the
  599. * database.
  600. *
  601. * @param parameterIndex the first parameter is 1, the second is 2, ...
  602. * @param x the parameter value
  603. * @exception SQLException if a database-access error occurs.
  604. */
  605. void setTimestamp(int parameterIndex, java.sql.Timestamp x, Calendar cal)
  606. throws SQLException;
  607. /**
  608. * <P>In general, parameter values remain in force for repeated use of a
  609. * RowSet. Setting a parameter value automatically clears its
  610. * previous value. However, in some cases it is useful to immediately
  611. * release the resources used by the current parameter values; this can
  612. * be done by calling clearParameters.
  613. *
  614. * @exception SQLException if a database-access error occurs.
  615. */
  616. void clearParameters() throws SQLException;
  617. //---------------------------------------------------------------------
  618. // Reading and writing data
  619. //---------------------------------------------------------------------
  620. /**
  621. * Fills the rowset with data.
  622. *
  623. * Execute() may use the following properties: url, data source name,
  624. * user name, password, transaction isolation, and type map to create a
  625. * connection for reading data.
  626. *
  627. * Execute may use the following properties to create a statement
  628. * to execute a command: command, read only, maximum field size,
  629. * maximum rows, escape processing, and query timeout.
  630. *
  631. * If the required properties have not been set, an exception is
  632. * thrown. If successful, the current contents of the rowset are
  633. * discarded and the rowset's metadata is also (re)set. If there are
  634. * outstanding updates, they are ignored.
  635. *
  636. * @exception SQLException if a database-access error occurs.
  637. */
  638. void execute() throws SQLException;
  639. //--------------------------------------------------------------------
  640. // Events
  641. //--------------------------------------------------------------------
  642. /**
  643. * RowSet listener registration. Listeners are notified
  644. * when an event occurs.
  645. *
  646. * @param listener an event listener
  647. */
  648. void addRowSetListener(RowSetListener listener);
  649. /**
  650. * RowSet listener deregistration.
  651. *
  652. * @param listener an event listener
  653. */
  654. void removeRowSetListener(RowSetListener listener);
  655. }