src/share/classes/javax/sql/rowset/spi/SyncResolver.java

Print this page

        

*** 191,211 **** * through the columns of that row in both <i>resolver</i> and <i>crs</i>, the conflicting * values can be retrieved and compared to decide which one should be persisted. In this * code fragment, the value in <i>crs</i> is the one set as the resolved value, which means * that it will be used to overwrite the conflict value in the data source. * ! * <PRE> * try { * * crs.acceptChanges(con); * * } catch (SyncProviderException spe) { * * SyncResolver resolver = spe.getSyncResolver(); * ! * Object crsValue; // value in the <code>RowSet</code> object ! * Object resolverValue: // value in the <code>SyncResolver</code> object * Object resolvedValue: // value to be persisted * * while(resolver.nextConflict()) { * if(resolver.getStatus() == SyncResolver.UPDATE_ROW_CONFLICT) { * int row = resolver.getRow(); --- 191,211 ---- * through the columns of that row in both <i>resolver</i> and <i>crs</i>, the conflicting * values can be retrieved and compared to decide which one should be persisted. In this * code fragment, the value in <i>crs</i> is the one set as the resolved value, which means * that it will be used to overwrite the conflict value in the data source. * ! * <PRE>{@code * try { * * crs.acceptChanges(con); * * } catch (SyncProviderException spe) { * * SyncResolver resolver = spe.getSyncResolver(); * ! * Object crsValue; // value in the RowSet object ! * Object resolverValue: // value in the SyncResolver object * Object resolvedValue: // value to be persisted * * while(resolver.nextConflict()) { * if(resolver.getStatus() == SyncResolver.UPDATE_ROW_CONFLICT) { * int row = resolver.getRow();
*** 225,235 **** * } * } * } * } * } ! * </PRE> * @author Jonathan Bruce */ public interface SyncResolver extends RowSet { /** --- 225,235 ---- * } * } * } * } * } ! * }</PRE> * @author Jonathan Bruce */ public interface SyncResolver extends RowSet { /**