docs: public Object elementAt(int iTargetPosition)
      {
          Record record = null;
          Object bookmark = null;
          if (m_iEndOfFileIndex != UNKNOWN_POSITION) if (iTargetPosition >= m_iEndOfFileIndex)
              return null;    // Past/At EOF
          if (!m_gridBuffer.inBufferList(iTargetPosition))
          {
              bookmark = m_gridList.elementAt(iTargetPosition);
              if (bookmark != null)
                  return bookmark;    // In grid list, return it!
              // Find the next lower item in the list
              int iLowestNonNullIndex = this.lowestNonNullIndex(iTargetPosition);
              if (iLowestNonNullIndex != -1)
              {
                  bookmark = m_gridList.elementAt(iLowestNonNullIndex);
                  if (bookmark == null)
                      bookmark = m_gridBuffer.elementAt(iLowestNonNullIndex);
              }
              
              boolean bFindTargetUsingCurrentQuery = false;
              if (bookmark == null)
                  bFindTargetUsingCurrentQuery = true;
              else
              {
                  if (iTargetPosition == m_iPhysicalFilePosition + 1)
                      if (m_bIsSequentialQueryValid)
                          bFindTargetUsingCurrentQuery = true;
              }
  
              if (!bFindTargetUsingCurrentQuery)
              { // This record is not in the grid list, because the granularity is too great
                  // Read the record before it, and move forward.
                  // Move to > bookmark, and move next until you hit this target.
                  this.getNextTable().setDataRecord((DataRecord)bookmark);
                  record = this.getRecord();
                  if (m_behCompare != null)
                      record.removeListener(m_behCompare, true);
                  m_behCompare = new SubCurrentFilter(true, false);
                  m_behCompare.setMasterSlaveFlag(RecordOwner.MASTER | RecordOwner.SLAVE);    // Should run in either space
                  record.addListener(m_behCompare);
                  this.getNextTable().close();
                  this.getRecord().setOpenMode(this.getRecord().getOpenMode() | DBConstants.OPEN_SUPPRESS_MESSAGES);   // Don't send an "AFTER_REQUERY_TYPE" message
                  try   {
                      m_iPhysicalFilePosition = iLowestNonNullIndex - 1;
                      m_bIsSequentialQueryValid = true;
                      record = (Record)this.move(+1);
                      m_iPhysicalFilePosition = iLowestNonNullIndex;
                  } catch (DBException e)   {
                      record = null;
                  } finally {
                      this.getRecord().setOpenMode(this.getRecord().getOpenMode() & ~DBConstants.OPEN_SUPPRESS_MESSAGES);
                  }
                  if (record == null) if (m_behCompare != null)
                  {
                      this.getRecord().removeListener(m_behCompare, true);
                      m_behCompare = null;
                  }
              }
  
              try   {
                  int iCurrentPosition = m_iPhysicalFilePosition;
                  if (iCurrentPosition == -1)
                  {
                      for (iCurrentPosition = 0; ; iCurrentPosition++)
                      {       // Find the first non-deleted record
                          if ((!m_gridBuffer.inBufferList(iCurrentPosition))
                              || (m_gridBuffer.elementAt(iCurrentPosition) != null))
                                  break;
                      }
                      record = (Record)this.move(DBConstants.FIRST_RECORD);
                      if (record != null)
                      {
                          if (iCurrentPosition != 0)
                          {
                              bookmark = m_gridList.elementAt(0);
                              if (bookmark == null)
                                  bookmark = m_gridBuffer.elementAt(0);
                              m_gridBuffer.addElement(0, null, m_gridList);   // Set this as deleted again
                              m_gridBuffer.addElement(iCurrentPosition, bookmark, m_gridList);   // Set this in the right logical position
                              m_iPhysicalFilePosition = iCurrentPosition;
                          }
                      }
                      else
                      {
                          iTargetPosition = 0;    // Make sure current position = 0!
                          m_iEndOfFileIndex = 0;  // EOF + 1
                      }
                  }
                  int iMoveRelative = iTargetPosition - iCurrentPosition;
                  if (iMoveRelative < 0)
                      record = (Record)this.move(iMoveRelative);
                  else
                  {
                      while (iMoveRelative > 0)
                      {
                          if ((m_gridBuffer.inBufferList(m_iPhysicalFilePosition + 1))
                              && (m_gridBuffer.elementAt(m_iPhysicalFilePosition + 1) == null))
                          {
                              m_iPhysicalFilePosition++;  // This record shows deleted, don't fill with a record.
                          }
                          else
                          {
                              record = (Record)this.move(+1);
                              if (record == null)
                                  break;
                          }
                          iMoveRelative--;
                      }
                  }
                  m_bIsSequentialQueryValid = true; // The query is in force, you may use move(+1) next time (instead of starting a new query)
              } catch (DBException ex)    {
                  ex.printStackTrace();
                  record = null;
              }
              m_iPhysicalFilePosition = iTargetPosition;
              if (m_behCompare != null)
              {
                  this.getRecord().removeListener(m_behCompare, true);
                  m_behCompare = null;
              }
              if (record == null)
                  return null;
          }
          if (m_gridBuffer.inBufferList(iTargetPosition))
              bookmark = m_gridBuffer.elementAt(iTargetPosition);
          else
              bookmark = m_gridList.elementAt(iTargetPosition);
          return bookmark;
      }