Make the record represented by this DataRecord current.
@param dataRecord tour.db.DataRecord The datarecord to try to recreate.
@return true if successful.
194719
public boolean setDataRecord(DataRecord dataRecord)
    {
        m_objectID = null;
        m_dataSource = null;
    
        boolean bFound = false;
        if (dataRecord.getBuffer() == null)
        {
            this.getCurrentTable().getRecord().setEditMode(Constants.EDIT_NONE);    // Make sure read doesn't use current record.
        }
        else
        {
            m_iRecordStatus = DBConstants.RECORD_NORMAL;
            this.getCurrentTable().getRecord().setEditMode(Constants.EDIT_CURRENT);     // Data Current, not locked
            dataRecord.getBuffer().bufferToFields(this.getCurrentTable().getRecord(), DBConstants.DONT_DISPLAY, DBConstants.READ_MOVE);
            this.getCurrentTable().getRecord().handleValidRecord();   // Display Fields
            bFound = true;
            m_objectID = dataRecord.getHandle(DBConstants.OBJECT_ID_HANDLE);
            m_dataSource = dataRecord.getHandle(DBConstants.DATA_SOURCE_HANDLE);
        } 
        try   {
            if (!bFound) if (dataRecord.getHandle(DBConstants.DATA_SOURCE_HANDLE) != null)
                bFound = (this.setHandle(dataRecord.getHandle(DBConstants.DATA_SOURCE_HANDLE), DBConstants.DATA_SOURCE_HANDLE) != null);
            } catch (DBException ex)    {
                return false; // Not found
            }   
    
        try   {
            if (!bFound) if (dataRecord.getHandle(DBConstants.BOOKMARK_HANDLE) != null)
                bFound = (this.setHandle(dataRecord.getHandle(DBConstants.BOOKMARK_HANDLE), DBConstants.BOOKMARK_HANDLE) != null);
            } catch (DBException ex)    {
                return false; // Not found
            }   
    
        try   {
            if (!bFound) if (dataRecord.getHandle(DBConstants.OBJECT_ID_HANDLE) != null)
                bFound = (this.setHandle(dataRecord.getHandle(DBConstants.OBJECT_ID_HANDLE), DBConstants.OBJECT_ID_HANDLE) != null);
            } catch (DBException ex)    {
                return false; // Not found
            }
    
        return bFound;  // Return
    }
1045475
private Object putToRecordStore(Data dataKey, Data dataValue) {
        if (hasMapListener) {
            return recordStore.put(dataKey, dataValue, DEFAULT_TTL, DEFAULT_MAX_IDLE);
        }
        recordStore.set(dataKey, dataValue, DEFAULT_TTL, DEFAULT_MAX_IDLE);
        return null;
    }
1152791
public boolean recordStableIdGenerator() {
    if (!currentInfo.isStableIdGenerator()) {
      currentInfo.setStableIdGenerator(true);
      populated = true;
      return true;
    } else {
      return false;
    }
  }
764669
public void set(Rec record) throws DBException
    {
        if ((this.getRecord().getEditMode() != Constants.EDIT_CURRENT)
            && ((this.getRecord().getEditMode() != Constants.EDIT_IN_PROGRESS)))
                throw new DBException(Constants.INVALID_RECORD);
        m_record = (FieldList)record;
        this.fieldsToData(record);
        this.doSet(record);
        this.setDataSource(null);
        this.getRecord().setEditMode(Constants.EDIT_NONE);
    }
507094
public boolean onAdd()
    {
        Record record = this.getMainRecord();
        if (record == null)
            return false;

        try {
            if (record.isModified(false))
            {
                if (record.getEditMode() == Constants.EDIT_IN_PROGRESS)
                    record.set();
                else if (record.getEditMode() == Constants.EDIT_ADD)
                    record.add();
            }
            record.addNew();
            this.clearStatusText();
        } catch(DBException ex) {
            this.displayError(ex);
            return false;
        }
        return true;
    }
756637
public BaseTable doMakeTable(Record record)
    {
        if (((record.getDatabaseType() & DBConstants.TABLE_TYPE_MASK) == DBConstants.MEMORY)
            || ((record.getDatabaseType() & DBConstants.TABLE_TYPE_MASK) == DBConstants.UNSHAREABLE_MEMORY))
        {
        	BaseDatabase database = (BaseDatabase)this.getDatabaseOwner().getDatabase(DBParams.MEMORY, record.getDatabaseType(), null);
        	return database.doMakeTable(record);
        }
        else
            return null;
    }
940181
public void doSet(Record record) throws DBException
    {
        if (this.lockOnDBTrxType(null, DBConstants.UPDATE_TYPE, true))
        {
            int iErrorCode = this.lockCurrentRecord();
            if ((iErrorCode == DBConstants.NORMAL_RETURN) || (iErrorCode == DBConstants.RECORD_CHANGED))
            {
                iErrorCode = record.refreshToCurrent(DBConstants.UPDATE_TYPE, true);
            }
        }
//        int iRowsUpdated = 0;
        Object bookmark = record.getHandle(DBConstants.BOOKMARK_HANDLE);
        CounterField fldID = (CounterField)record.getCounterField();
        if (fldID != null)
            if (record.isAutoSequence())
                fldID.setModified(false); // Never set a counter field
        String strRecordset = record.getSQLUpdate(SQLParams.USE_INSERT_UPDATE_LITERALS);
        int iType = DBConstants.SQL_UPDATE_TYPE;
            if (strRecordset != null)
                /*iRowsUpdated =*/ this.executeUpdate(strRecordset, iType);
//            else
//                iRowsUpdated = 1; // No changes
        if (this.lockOnDBTrxType(null, DBConstants.AFTER_UPDATE_TYPE, false))  // ADD_TYPE = Add new; Should I do the unlock in my code?
            this.unlockIfLocked(record, bookmark);
    }
867912
@Override
  public final Future<WriteResponse> write(D record, @Nullable WriteCallback callback) {
    FutureWrappedWriteCallback wrappedWriteCallback = new FutureWrappedWriteCallback(callback);
    BufferedRecord<D> bufferedRecord = new BufferedRecord<>(record, wrappedWriteCallback);
    put(bufferedRecord);
    return wrappedWriteCallback;
  }
1007354
public void init(Record record, Record recordSub, boolean bRestoreCurrentRecord)
    {
        m_recordSub = recordSub;
        m_bRestoreCurrentRecord = bRestoreCurrentRecord;
        super.init(record);
    }
1164854
public final Record makeReferenceRecord()
    {
        if (m_recordReference != null)
            return m_recordReference;       // It already exists
        RecordOwner recordOwner = null;
        if (this.getRecord() != null)
            recordOwner = Record.findRecordOwner(this.getRecord());    // This way the record has access to the correct environment.
        this.setReferenceRecord(this.makeReferenceRecord(recordOwner));
        return m_recordReference;
    }
1244754
public Record moveRecordToBase(Record record)
    {
        SharedBaseRecordTable sharedTable = this.getSharedTable();
        sharedTable.setCurrentRecord(record);
        boolean bCopyEditMode = false;
        boolean bOnlyModifiedFields = false;
        Record recBase = sharedTable.getBaseRecord();
        sharedTable.copyRecordInfo(recBase, record, bCopyEditMode, bOnlyModifiedFields);
        return recBase;
    }
556776
private boolean addHisoricalRecord(HistoricalRecord historicalRecord) {
        synchronized (mInstanceLock) {
            final boolean added = mHistoricalRecords.add(historicalRecord);
            if (added) {
                mHistoricalRecordsChanged = true;
                pruneExcessiveHistoricalRecordsLocked();
                persistHistoricalData();
                sortActivities();
            }
            return added;
        }
    }
899337
public boolean readDestRecord(FieldList recSource, Record recDest)
    {
        FieldInfo fldSecond = recSource.getField("Name");
        if (fldSecond == null)
            fldSecond = recSource.getField("Description");
        if (fldSecond == null)
            return false;
        recDest = BaseFixData.getRecordFromDescription(fldSecond.toString(), fldSecond.getFieldName(), recDest);
        return (recDest != null);
    }
668688
def setCurrentRecord( self, record ):
        
        mode = self.currentMode()
        if ( mode == XOrbBrowserWidget.Mode.Detail ):
            self.detailWidget().setCurrentRecord(record)
        
        elif ( mode == XOrbBrowserWidget.Mode.Thumbnail ):
            thumbs = self.thumbnailWidget()
            for row in range(thumbs.count()):
                item = thumbs.item(row)
                if ( isinstance(item, RecordListWidgetItem) and \
                     item.record() == item ):
                    thumbs.setCurrentItem(item)
                    break
548095
public boolean isEOFRecord(byte[] record) {
        for (int i = 0, sz = this.getRecordSize(); i < sz; ++i) {
            if (record[i] != 0) {
                return false;
            }
        }

        return true;
    }
219541
public void doSet(Rec record) throws DBException
    {
        super.doSet(record);
        if (m_arrayCache != null)
            if (m_iLogicalIndex != NO_INDEX)
            {
                m_arrayCache.set(m_iLogicalIndex, this.getDataSource());    // Show the current record as deleted.
            }
    }
363881
public boolean doHasPrevious()
    {
        if ((m_iRecordStatus & DBConstants.RECORD_AT_BOF) != 0)
            return false; // Already at BOF (can't be one before)
        if ((m_iRecordStatus & DBConstants.RECORD_PREVIOUS_PENDING) != 0)
            return true;    // Already one waiting
        boolean bAtBOF = true;
        try   {
            FieldList record = this.move(DBConstants.PREVIOUS_RECORD);
            if (record == null)
                bAtBOF = true;
            else if ((m_iRecordStatus & DBConstants.RECORD_AT_BOF) != 0)
                bAtBOF = true;
            else if (this.isTable())
                bAtBOF = this.isBOF();
            else
                bAtBOF = false;     // Valid record!
        } catch (DBException ex)    {
            ex.printStackTrace();
        }
        if (bAtBOF)
            return false; // Does not have a next record
        m_iRecordStatus |= DBConstants.RECORD_PREVIOUS_PENDING;     // If next call is a moveNext(), return unchanged!
        return true;        // Yes, a next record exists.
    }