src/share/classes/javax/sql/rowset/CachedRowSet.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 44,54 ****
* of this interface.
* <P>
* A <code>CachedRowSet</code> object is a container for rows of data
* that caches its rows in memory, which makes it possible to operate without always being
* connected to its data source. Further, it is a
! * JavaBeans<sup><font size=-2>TM</font></sup> component and is scrollable,
* updatable, and serializable. A <code>CachedRowSet</code> object typically
* contains rows from a result set, but it can also contain rows from any file
* with a tabular format, such as a spread sheet. The reference implementation
* supports getting data only from a <code>ResultSet</code> object, but
* developers can extend the <code>SyncProvider</code> implementations to provide
--- 44,54 ----
* of this interface.
* <P>
* A <code>CachedRowSet</code> object is a container for rows of data
* that caches its rows in memory, which makes it possible to operate without always being
* connected to its data source. Further, it is a
! * JavaBeans™ component and is scrollable,
* updatable, and serializable. A <code>CachedRowSet</code> object typically
* contains rows from a result set, but it can also contain rows from any file
* with a tabular format, such as a spread sheet. The reference implementation
* supports getting data only from a <code>ResultSet</code> object, but
* developers can extend the <code>SyncProvider</code> implementations to provide
*** 408,418 ****
* and for the password.
* <P>
* NOTE: In order to use a <code>DataSource</code> object for making a
* connection, the <code>DataSource</code> object must have been registered
* with a naming service that uses the Java Naming and Directory
! * Interface<sup><font size=-2>TM</font></sup> (JNDI) API. This registration
* is usually done by a person acting in the capacity of a system
* administrator.
* <P>
* In order to be able to populate itself with data from a database, a rowset
* needs to set a command property. This property is a query that is a
--- 408,418 ----
* and for the password.
* <P>
* NOTE: In order to use a <code>DataSource</code> object for making a
* connection, the <code>DataSource</code> object must have been registered
* with a naming service that uses the Java Naming and Directory
! * Interface™ (JNDI) API. This registration
* is usually done by a person acting in the capacity of a system
* administrator.
* <P>
* In order to be able to populate itself with data from a database, a rowset
* needs to set a command property. This property is a query that is a
*** 732,742 ****
* <code>COMMIT_ON_ACCEPT_CHANGES</code> is set to true or not. If it is set
* to true, all updates in the synchronization are committed to the data
* source. Otherwise, the application <b>must</b> explicity call the
* <code>commit()</code> or <code>rollback()</code> methods as appropriate.
*
- * @throws SQLException if the cursor is on the insert row
* @throws SyncProviderException if the underlying
* synchronization provider's writer fails to write the updates
* back to the data source
* @see #acceptChanges(java.sql.Connection)
* @see javax.sql.RowSetWriter
--- 732,741 ----
*** 803,813 ****
* to true, all updates in the synchronization are committed to the data
* source. Otherwise, the application <b>must</b> explicity call the
* <code>commit</code> or <code>rollback</code> methods as appropriate.
*
* @param con a standard JDBC <code>Connection</code> object
- * @throws SQLException if the cursor is on the insert row
* @throws SyncProviderException if the underlying
* synchronization provider's writer fails to write the updates
* back to the data source
* @see #acceptChanges()
* @see javax.sql.RowSetWriter
--- 802,811 ----
*** 1369,1379 ****
* <code>createCopySchema</code> method must not be visible to it.
* <P>
* Applications can form a <code>WebRowSet</code> object from the <code>CachedRowSet</code>
* object returned by this method in order
* to export the <code>RowSet</code> schema definition to XML for future use.
! *
* @throws SQLException if an error occurs in cloning the structure of this
* <code>CachedRowSet</code> object
* @see #createShared
* @see #createCopySchema
* @see #createCopyNoConstraints
--- 1367,1377 ----
* <code>createCopySchema</code> method must not be visible to it.
* <P>
* Applications can form a <code>WebRowSet</code> object from the <code>CachedRowSet</code>
* object returned by this method in order
* to export the <code>RowSet</code> schema definition to XML for future use.
! * @return An empty copy of this {@code CachedRowSet} object
* @throws SQLException if an error occurs in cloning the structure of this
* <code>CachedRowSet</code> object
* @see #createShared
* @see #createCopySchema
* @see #createCopyNoConstraints
*** 1541,1550 ****
--- 1539,1549 ----
* @param event a <code>RowSetEvent</code> object that contains the
* <code>RowSet</code> object that is the source of the events
* @param numRows when populating, the number of rows interval on which the
* <code>CachedRowSet</code> populated should fire; the default value
* is zero; cannot be less than <code>fetchSize</code> or zero
+ * @throws SQLException {@code numRows < 0 or numRows < getFetchSize() }
*/
public void rowSetPopulated(RowSetEvent event, int numRows) throws SQLException;
/**
* Populates this <code>CachedRowSet</code> object with data from