< prev index next >

src/java.sql.rowset/share/classes/com/sun/rowset/FilteredRowSetImpl.java

Print this page




 449    }
 450 
 451    /**
 452      * This is explanation for the overriding of the updateXXX functions.
 453      * These functions have been overriden to ensure that only correct
 454      * values that pass the criteria for the filter are actaully inserted.
 455      * The evaluation of whether a particular value passes the criteria
 456      * of the filter is done using the evaluate function in the Predicate
 457      * interface.
 458      *
 459      * The checking can will done in the evaluate function which is implemented
 460      * in the class that implements the Predicate interface. So the checking
 461      * can vary from one implementation to another.
 462      *
 463      * Some additional points here on the following:
 464      * 1. updateBytes()     - since the evaluate function takes Object as parameter
 465      *                        a String is constructed from the byte array and would
 466      *                        passed to the evaluate function.
 467      * 2. updateXXXstream() - here it would suffice to pass the stream handle
 468      *                        to the evaluate function and the implementation
 469      *                        of the evaluate function can do the comparision
 470      *                        based on the stream and also type of data.
 471      */
 472 
 473 
 474    /**
 475      * Sets the designated column in either the current row or the insert
 476      * row of this <code>CachedRowSetImpl</code> object with the given
 477      * <code>int</code> value.
 478      * <P>
 479      * This method updates a column value in the current row or the insert
 480      * row of this rowset, but it does not update the database.
 481      * If the cursor is on a row in the rowset, the
 482      * method {@link #updateRow} must be called to update the database.
 483      * If the cursor is on the insert row, the method {@link #insertRow}
 484      * must be called, which will insert the new row into both this rowset
 485      * and the database. Both of these methods must be called before the
 486      * cursor moves to another row.
 487      *
 488      * @param columnIndex the first column is <code>1</code>, the second
 489      *        is <code>2</code>, and so on; must be <code>1</code> or larger




 449    }
 450 
 451    /**
 452      * This is explanation for the overriding of the updateXXX functions.
 453      * These functions have been overriden to ensure that only correct
 454      * values that pass the criteria for the filter are actaully inserted.
 455      * The evaluation of whether a particular value passes the criteria
 456      * of the filter is done using the evaluate function in the Predicate
 457      * interface.
 458      *
 459      * The checking can will done in the evaluate function which is implemented
 460      * in the class that implements the Predicate interface. So the checking
 461      * can vary from one implementation to another.
 462      *
 463      * Some additional points here on the following:
 464      * 1. updateBytes()     - since the evaluate function takes Object as parameter
 465      *                        a String is constructed from the byte array and would
 466      *                        passed to the evaluate function.
 467      * 2. updateXXXstream() - here it would suffice to pass the stream handle
 468      *                        to the evaluate function and the implementation
 469      *                        of the evaluate function can do the comparison
 470      *                        based on the stream and also type of data.
 471      */
 472 
 473 
 474    /**
 475      * Sets the designated column in either the current row or the insert
 476      * row of this <code>CachedRowSetImpl</code> object with the given
 477      * <code>int</code> value.
 478      * <P>
 479      * This method updates a column value in the current row or the insert
 480      * row of this rowset, but it does not update the database.
 481      * If the cursor is on a row in the rowset, the
 482      * method {@link #updateRow} must be called to update the database.
 483      * If the cursor is on the insert row, the method {@link #insertRow}
 484      * must be called, which will insert the new row into both this rowset
 485      * and the database. Both of these methods must be called before the
 486      * cursor moves to another row.
 487      *
 488      * @param columnIndex the first column is <code>1</code>, the second
 489      *        is <code>2</code>, and so on; must be <code>1</code> or larger


< prev index next >