/** * <p> * Moves the cursor to the first row in this ResultSet object. * </p> * * @return true if the cursor is on valid row, false if there are no rows in * the resultset. * @throws SQLException * if the ResulSet is of TYPE_FORWARD_ONLY. */ public boolean first() throws SQLException { checkNotForwardOnly(); return absolute(1); }
/** * <p> * Moves the cursor to the first row in this ResultSet object. * </p> * * @return true if the cursor is on valid row, false if there are no rows in * the resultset. * @throws SQLException * if the ResulSet is of TYPE_FORWARD_ONLY. */ public boolean first() throws SQLException { checkNotForwardOnly(); return absolute(1); }
/** * <p> * Moves the cursor to the last row in the in this ResultSet object. This * method should be called only if the result set is scrollable. * </p> * * @return true if the cursor is on a validRow, false otherwise or if no * rows exist. * @throws SQLException * if the type of the ResultSet is TYPE_FORWARD_ONLY */ public boolean last() throws SQLException { checkNotForwardOnly(); return absolute(-1); }
/** * <p> * Moves the cursor to the last row in the in this ResultSet object. This * method should be called only if the result set is scrollable. * </p> * * @return true if the cursor is on a validRow, false otherwise or if no * rows exist. * @throws SQLException * if the type of the ResultSet is TYPE_FORWARD_ONLY */ public boolean last() throws SQLException { checkNotForwardOnly(); return absolute(-1); }
public boolean previous() throws SQLException { checkClosed(); checkNotForwardOnly(); return batchResults.previous(); }
public boolean previous() throws SQLException { checkClosed(); checkNotForwardOnly(); return batchResults.previous(); }
public boolean absolute( int row) throws SQLException { checkClosed(); checkNotForwardOnly(); return batchResults.absolute(row, getOffset()); }
public boolean absolute( int row) throws SQLException { checkClosed(); checkNotForwardOnly(); return batchResults.absolute(row, getOffset()); }
/** * <p> * Moves the cursor a number of rows relative to the current row in this * ResultSet object. The number of rows may be positive or negative. * </p> * * @param number * of rows to move relative to the present row. * @return true if the cursor is on a valid row in the resultSet. * @throws SQLException * if the there is an error accessing results */ public boolean relative(int rows) throws SQLException { if (isBeforeFirst() || isAfterLast() || getFinalRowNumber() == 0) { throw new TeiidSQLException( JDBCPlugin.Util .getString("ResultsImpl.The_cursor_is_not_on_a_valid_row._1")); //$NON-NLS-1$ } checkNotForwardOnly(); return this.absolute(Math.max(0, getAbsoluteRowNumber() + rows)); }
/** * <p> * Moves the cursor a number of rows relative to the current row in this * ResultSet object. The number of rows may be positive or negative. * </p> * * @param number * of rows to move relative to the present row. * @return true if the cursor is on a valid row in the resultSet. * @throws SQLException * if the there is an error accessing results */ public boolean relative(int rows) throws SQLException { if (isBeforeFirst() || isAfterLast() || getFinalRowNumber() == 0) { throw new TeiidSQLException( JDBCPlugin.Util .getString("ResultsImpl.The_cursor_is_not_on_a_valid_row._1")); //$NON-NLS-1$ } checkNotForwardOnly(); return this.absolute(Math.max(0, getAbsoluteRowNumber() + rows)); }