@Override
    public boolean absolute(int row) throws SQLException {
        checkClosed();
        if (rowCount == 0) {
            if (row == 0) {
               return true;
            }
            return false;
        }
        if (row == 0) {
            beforeFirst();
            return true;
        }
        if (rowCount + row < 0) {
            beforeFirst();
            return false;
        }
        if (row > rowCount) {
            cursorPosition = Position.afterLast;
            if(row == rowCount+1) {
                return true;
            }
            else {
                return false;
            }
        }
        try {
            // for negative row numbers or row numbers lesser then activeRowIndex, resetRowPosition
            // method is called and the cursor advances to the desired row from top of the table
            if(row < 0) {
                row += rowCount;
                row++;
            }
            if(table.getActiveRowIndex() > row || cursorPosition != Position.middle) {
                table.resetRowPosition();
                table.advanceToRow(0);
            }
            cursorPosition = Position.middle;
            return table.advanceToRow(row-1);
        } catch (Exception x) {
            throw SQLError.get(x);
        }
    }
@ Override public boolean absolute ( int row ) throws SQLException { checkClosed ( ) ; if ( rowCount == 0 ) { if ( row == 0 ) { return true ; } return false ; } if ( row == 0 ) { beforeFirst ( ) ; return true ; } if ( rowCount + row < 0 ) { beforeFirst ( ) ; return false ; } if ( row > rowCount ) { cursorPosition = Position . afterLast ; if ( row == rowCount + 1 ) { return true ; } else { return false ; } } try { if ( row < 0 ) { row += rowCount ; row ++ ; } if ( table . getActiveRowIndex ( ) > row || cursorPosition != Position . middle ) { table . resetRowPosition ( ) ; table . advanceToRow ( 0 ) ; } cursorPosition = Position . middle ; return table . advanceToRow ( row - 1 ) ; } catch ( Exception x ) { throw SQLError . get ( x ) ; } }
Moves the cursor to the given row number in this ResultSet object.