public boolean doSeek(String strSeekSign) throws DBException
    {
        KeyArea keyArea = this.getRecord().getKeyArea(-1);  // Current index
        String strKeyArea = keyArea.getKeyName();

        this.checkCacheMode(Boolean.FALSE);      // Make sure the cache is set up correctly for this type of query (typically not needed)

        Object objKeyData = null;
        if (keyArea.getKeyFields() == 1)    // Special case - single unique key;
            objKeyData = keyArea.getField(DBConstants.MAIN_KEY_FIELD).getData();
        else
        {
            BaseBuffer buffer = new VectorBuffer(null);
            keyArea.setupKeyBuffer(buffer, DBConstants.FILE_KEY_AREA);
            objKeyData = buffer.getPhysicalData();
        }
        try   {
            Object objData = null;
            String strFields = null;
            if (!this.getRecord().isAllSelected())
                strFields = this.getRecord().getSQLFields(DBConstants.SQL_SELECT_TYPE, true);
            boolean bDirection = keyArea.getKeyField(DBConstants.MAIN_KEY_FIELD).getKeyOrder();
            if (m_bDirectionCurrent != bDirection)
            {       // Change the key direction (rarely).
                this.close();
                this.open();
            }
            int iOpenMode = this.getRecord().getOpenMode();    // Open mode

            synchronized (this.getSyncObject())
            {   // In case this is called from another task
                objData = m_tableRemote.seek(strSeekSign, iOpenMode, strKeyArea, strFields, objKeyData);
            }
            if (objData instanceof Vector)
            {
                Record recordBase = this.getRecord();
                int iFieldTypes = BaseBuffer.PHYSICAL_FIELDS;
                if (!recordBase.isAllSelected())
                    iFieldTypes = BaseBuffer.DATA_FIELDS;   // SELECTED_FIELDS; (Selected and physical)
                Vector<Object> data = (Vector)objData;  //m_tableRemote.dataToFields();
                BaseBuffer buffer = new VectorBuffer(data, iFieldTypes);
                m_dataSource = buffer;
                return true;    // Success
            }
            else
                return false; // Not found
        } catch (Exception ex) {
            ex.printStackTrace();
            throw DatabaseException.toDatabaseException(ex);
        }
    }
public boolean doSeek ( String strSeekSign ) throws DBException { KeyArea keyArea = this . getRecord ( ) . getKeyArea ( - 1 ) ; String strKeyArea = keyArea . getKeyName ( ) ; this . checkCacheMode ( Boolean . FALSE ) ; Object objKeyData = null ; if ( keyArea . getKeyFields ( ) == 1 ) objKeyData = keyArea . getField ( DBConstants . MAIN_KEY_FIELD ) . getData ( ) ; else { BaseBuffer buffer = new VectorBuffer ( null ) ; keyArea . setupKeyBuffer ( buffer , DBConstants . FILE_KEY_AREA ) ; objKeyData = buffer . getPhysicalData ( ) ; } try { Object objData = null ; String strFields = null ; if ( ! this . getRecord ( ) . isAllSelected ( ) ) strFields = this . getRecord ( ) . getSQLFields ( DBConstants . SQL_SELECT_TYPE , true ) ; boolean bDirection = keyArea . getKeyField ( DBConstants . MAIN_KEY_FIELD ) . getKeyOrder ( ) ; if ( m_bDirectionCurrent != bDirection ) { this . close ( ) ; this . open ( ) ; } int iOpenMode = this . getRecord ( ) . getOpenMode ( ) ; synchronized ( this . getSyncObject ( ) ) { objData = m_tableRemote . seek ( strSeekSign , iOpenMode , strKeyArea , strFields , objKeyData ) ; } if ( objData instanceof Vector ) { Record recordBase = this . getRecord ( ) ; int iFieldTypes = BaseBuffer . PHYSICAL_FIELDS ; if ( ! recordBase . isAllSelected ( ) ) iFieldTypes = BaseBuffer . DATA_FIELDS ; Vector < Object > data = ( Vector ) objData ; BaseBuffer buffer = new VectorBuffer ( data , iFieldTypes ) ; m_dataSource = buffer ; return true ; } else return false ; } catch ( Exception ex ) { ex . printStackTrace ( ) ; throw DatabaseException . toDatabaseException ( ex ) ; } }
Read the record that matches this record's current key.
<p>NOTE: You do not need to Open to do a seek or addNew.
@param strSeekSign - Seek sign:
@return true if successful, false if not found.
@exception FILE_NOT_OPEN.
@exception KEY_NOT_FOUND - The key was not found on read.