src/share/classes/javax/sql/rowset/CachedRowSet.java

Print this page

        

*** 284,294 **** * control mechanism is desired, a different implementation of * <code>SyncProvider</code> can be plugged in using the method * <code>setSyncProvider</code>. * <P> * In order to use the optimistic concurrency control routine, the ! * <code>RIOptismisticProvider</code> maintains both its current * value and its original value (the value it had immediately preceding the * current value). Note that if no changes have been made to the data in a * <code>RowSet</code> object, its current values and its original values are the same, * both being the values with which the <code>RowSet</code> object was initially * populated. However, once any values in the <code>RowSet</code> object have been --- 284,294 ---- * control mechanism is desired, a different implementation of * <code>SyncProvider</code> can be plugged in using the method * <code>setSyncProvider</code>. * <P> * In order to use the optimistic concurrency control routine, the ! * <code>RIOptimisticProvider</code> maintains both its current * value and its original value (the value it had immediately preceding the * current value). Note that if no changes have been made to the data in a * <code>RowSet</code> object, its current values and its original values are the same, * both being the values with which the <code>RowSet</code> object was initially * populated. However, once any values in the <code>RowSet</code> object have been
*** 349,359 **** * scrolling and updating for <code>ResultSet</code> objects that * do not provide these capabilities themselves. In other words, a * <code>CachedRowSet</code> object can be used to augment the * capabilities of a JDBC technology-enabled driver (hereafter called a * "JDBC driver") when the DBMS does not provide full support for scrolling and ! * updating. To achieve the effect of making a non-scrollble and read-only * <code>ResultSet</code> object scrollable and updatable, a programmer * simply needs to create a <code>CachedRowSet</code> object populated * with that <code>ResultSet</code> object's data. This is demonstrated * in the following code fragment, where <code>stmt</code> is a * <code>Statement</code> object. --- 349,359 ---- * scrolling and updating for <code>ResultSet</code> objects that * do not provide these capabilities themselves. In other words, a * <code>CachedRowSet</code> object can be used to augment the * capabilities of a JDBC technology-enabled driver (hereafter called a * "JDBC driver") when the DBMS does not provide full support for scrolling and ! * updating. To achieve the effect of making a non-scrollable and read-only * <code>ResultSet</code> object scrollable and updatable, a programmer * simply needs to create a <code>CachedRowSet</code> object populated * with that <code>ResultSet</code> object's data. This is demonstrated * in the following code fragment, where <code>stmt</code> is a * <code>Statement</code> object.
*** 730,740 **** * established. * <P> * Note: The <code>acceptChanges()</code> method will determine if the * <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 SyncProviderException if the underlying * synchronization provider's writer fails to write the updates * back to the data source --- 730,740 ---- * established. * <P> * Note: The <code>acceptChanges()</code> method will determine if the * <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> explicitly call the * <code>commit()</code> or <code>rollback()</code> methods as appropriate. * * @throws SyncProviderException if the underlying * synchronization provider's writer fails to write the updates * back to the data source
*** 799,809 **** * established. * <P> * Note: The <code>acceptChanges()</code> method will determine if the * <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. * * @param con a standard JDBC <code>Connection</code> object * @throws SyncProviderException if the underlying * synchronization provider's writer fails to write the updates --- 799,809 ---- * established. * <P> * Note: The <code>acceptChanges()</code> method will determine if the * <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> explicitly call the * <code>commit</code> or <code>rollback</code> methods as appropriate. * * @param con a standard JDBC <code>Connection</code> object * @throws SyncProviderException if the underlying * synchronization provider's writer fails to write the updates
*** 848,858 **** * <P> * This <code>CachedRowSet</code> object should lock until its contents and * associated updates are fully cleared, thus preventing 'dirty' reads by * other components that hold a reference to this <code>RowSet</code> object. * In addition, the contents cannot be released ! * until all all components reading this <code>CachedRowSet</code> object * have completed their reads. This <code>CachedRowSet</code> object * should be returned to normal behavior after firing the * <code>rowSetChanged</code> event. * <P> * The metadata, including JDBC properties and Synchronization SPI --- 848,858 ---- * <P> * This <code>CachedRowSet</code> object should lock until its contents and * associated updates are fully cleared, thus preventing 'dirty' reads by * other components that hold a reference to this <code>RowSet</code> object. * In addition, the contents cannot be released ! * until all components reading this <code>CachedRowSet</code> object * have completed their reads. This <code>CachedRowSet</code> object * should be returned to normal behavior after firing the * <code>rowSetChanged</code> event. * <P> * The metadata, including JDBC properties and Synchronization SPI
*** 932,942 **** * <code>undoUpdate</code> may be called at any time during the lifetime of a * rowset; however, after a synchronization has occurred, this method has no * effect until further modification to the rowset data has occurred. * * @throws SQLException if the cursor is before the first row or after the last ! * row in in this <code>CachedRowSet</code> object * @see #undoDelete * @see #undoInsert * @see java.sql.ResultSet#cancelRowUpdates */ public void undoUpdate() throws SQLException; --- 932,942 ---- * <code>undoUpdate</code> may be called at any time during the lifetime of a * rowset; however, after a synchronization has occurred, this method has no * effect until further modification to the rowset data has occurred. * * @throws SQLException if the cursor is before the first row or after the last ! * row in this <code>CachedRowSet</code> object * @see #undoDelete * @see #undoInsert * @see java.sql.ResultSet#cancelRowUpdates */ public void undoUpdate() throws SQLException;
*** 1069,1079 **** /** * Retrieves the <code>SyncProvider</code> implementation for this * <code>CachedRowSet</code> object. Internally, this method is used by a rowset * to trigger read or write actions between the rowset * and the data source. For example, a rowset may need to get a handle ! * on the the rowset reader (<code>RowSetReader</code> object) from the * <code>SyncProvider</code> to allow the rowset to be populated. * <pre> * RowSetReader rowsetReader = null; * SyncProvider provider = * SyncFactory.getInstance("javax.sql.rowset.provider.RIOptimisticProvider"); --- 1069,1079 ---- /** * Retrieves the <code>SyncProvider</code> implementation for this * <code>CachedRowSet</code> object. Internally, this method is used by a rowset * to trigger read or write actions between the rowset * and the data source. For example, a rowset may need to get a handle ! * on the rowset reader (<code>RowSetReader</code> object) from the * <code>SyncProvider</code> to allow the rowset to be populated. * <pre> * RowSetReader rowsetReader = null; * SyncProvider provider = * SyncFactory.getInstance("javax.sql.rowset.provider.RIOptimisticProvider");
*** 1094,1104 **** * <code>SyncProvider</code> object, including information about the * vendor, version, provider identification, synchronization grade, and locks * it currently has set. * * @return the <code>SyncProvider</code> object that was set when the rowset ! * was instantiated, or if none was was set, the default provider * @throws SQLException if an error occurs while returning the * <code>SyncProvider</code> object * @see #setSyncProvider */ public SyncProvider getSyncProvider() throws SQLException; --- 1094,1104 ---- * <code>SyncProvider</code> object, including information about the * vendor, version, provider identification, synchronization grade, and locks * it currently has set. * * @return the <code>SyncProvider</code> object that was set when the rowset ! * was instantiated, or if none was set, the default provider * @throws SQLException if an error occurs while returning the * <code>SyncProvider</code> object * @see #setSyncProvider */ public SyncProvider getSyncProvider() throws SQLException;