k the present row determine if it lies // within the filtering criteria. for (int i = 0; i < idx.length; i++) { int value; try { value = (Integer) rs.getObject(idx[i]); } catch (SQLException ex) { Logger.getLogger(Range.class.getName()).log(Level.SEVERE, null, ex); return false; } 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 provide String
and integer index based constructors to provide for JDBC RowSet Implementation applications that use both column identification conventions.
@author Jonathan Bruce, Amit Handa