--- old/src/share/classes/javax/sql/rowset/Predicate.java 2013-09-15 14:34:39.000000000 -0400 +++ new/src/share/classes/javax/sql/rowset/Predicate.java 2013-09-15 14:34:39.000000000 -0400 @@ -56,44 +56,42 @@ *
{@code
  *    public class Range implements Predicate {
  *
- *       private Object lo[];
- *       private Object hi[];
+ *       private int lo[];
+ *       private int hi[];
  *       private int idx[];
  *
- *       public Range(Object[] lo, Object[] hi, int[] idx) {
+ *       public Range(int[] lo, int[] hi, int[] idx) {
  *          this.lo = lo;
  *          this.hi = hi;
  *          this.idx = idx;
  *       }
  *
  *      public boolean evaluate(RowSet rs) {
- *          CachedRowSet crs = (CachedRowSet)rs;
- *          boolean bool1,bool2;
  *
  *          // Check the present row determine if it lies
  *          // within the filtering criteria.
  *
  *          for (int i = 0; i < idx.length; i++) {
- *
- *              if ((rs.getObject(idx[i]) >= lo[i]) &&
- *                  (rs.getObject(idx[i]) >= hi[i]) {
- *                  bool1 = true; // within filter constraints
- *              } else {
- *                  bool2 = true; // outside of filter constraints
- *              }
- *          }
- *
- *          if (bool2) {
- *             return false;
- *          } else {
- *             return true;
- *          }
+ *             int value = 0;
+ *             try {
+ *                 value = (Integer) rs.getObject(idx[i]);
+ *             } catch (SQLException ex) {
+ *                 Logger.getLogger(Range.class.getName()).log(Level.SEVERE, null, ex);
+ *             }
+ *
+ *             if (value < lo[i] && value > hi[i]) {
+ *                 // outside of filter constraints
+ *                 return false; 
+ *             }
+ *         }
+ *         // Within filter constraints
+ *        return true;
  *      }
- *  }
+ *   }
  * }
*

* The example above implements a simple range predicate. Note, that - * implementations should but are not required to provider String + * implementations should but are not required to provide String * and integer index based constructors to provide for JDBC RowSet Implementation * applications that use both column identification conventions. *