Update this record (Always called from the record class).
@param fieldList The record to add.
@exception DBException File exception.
329704
public void set(Rec fieldList) throws DBException
    {
        Record record = (Record)fieldList;
        int iErrorCode = DBConstants.NORMAL_RETURN;
        if ((record.getOpenMode() & DBConstants.OPEN_READ_ONLY) != 0)
            throw new DatabaseException(DBConstants.ERROR_READ_ONLY);
        if ((record.getOpenMode() & DBConstants.OPEN_APPEND_ONLY) != 0)
            throw new DatabaseException(DBConstants.ERROR_APPEND_ONLY);
        try   {
            if (record.getEditMode() != Constants.EDIT_IN_PROGRESS)
                throw new DatabaseException(DBConstants.RECORD_NOT_LOCKED);
            iErrorCode = record.handleRecordChange(DBConstants.UPDATE_TYPE);
            if (iErrorCode != DBConstants.NORMAL_RETURN)
                throw new DatabaseException(iErrorCode);
            this.fieldsToData(record);
            this.doSet(record);
            m_iRecordStatus |= DBConstants.RECORD_INVALID;
        } catch (DBException ex)    {
            iErrorCode = this.getRecord().handleErrorReturn(DBConstants.AFTER_UPDATE_TYPE, ex.getErrorCode()); // Give the listeners a chance to fix the error.
            // Note: I DO NOT do: record.setEditMode(Constants.EDIT_NONE);  to give the client a chance to recover and rewrite this record.
            if ((iErrorCode != DBConstants.NORMAL_RETURN) && (iErrorCode != DBConstants.RECORD_CHANGED))
                throw ex;
            // If the error was fixed, continue
        }
        record.setEditMode(Constants.EDIT_NONE);    // Unknown status after an update
        iErrorCode = record.handleRecordChange(DBConstants.AFTER_UPDATE_TYPE);  // Remember, these listeners may refresh the record
        if (iErrorCode != DBConstants.NORMAL_RETURN)
            throw new DatabaseException(iErrorCode);
        m_objectID = null;
        m_dataSource = null;
    }
443116
public function updateCMSFields(FieldList $fields)
    {
        // Create Style Fields:
        
        $fields->addFieldToTab(
            'Root.Style',
            FieldSection::create(
                'ImageResizeStyle',
                $this->owner->fieldLabel('ImageResizeStyle'),
                [
                    DimensionsField::create(
                        'ImageResize',
                        $this->owner->fieldLabel('ImageResize')
                    ),
                    DropdownField::create(
                        'ImageResizeMethod',
                        $this->owner->fieldLabel('ImageResizeMethod'),
                        $this->tools()->getResizeMethods()
                    )->setEmptyString(' ')->setAttribute('data-placeholder', _t(__CLASS__ . '.NONE', 'None'))
                ]
            )
        );
    }
652482
public void readData(FieldTable table) throws DBException
    {
        if (this.getLookupKey() instanceof String)
        {
            FieldList record = table.getRecord();
            String strTableName = (String)this.getLookupKey();
            String strDBName = null;
            if (strTableName != null)
            {
                if (strTableName.lastIndexOf('/') != -1)
                {
                    strDBName = strTableName.substring(0, strTableName.lastIndexOf('/'));
                    if (strDBName.lastIndexOf('/') != -1)
                        strDBName = strDBName.substring(strDBName.lastIndexOf('/') + 1);
                    strTableName = strTableName.substring(strTableName.lastIndexOf('/') + 1);
                    if (strTableName.indexOf('.') != -1)
                        strTableName = strTableName.substring(0, strTableName.indexOf('.'));
                }
            }

            String strThickRecordClass = record.getClass().getName();
            
            RecordOwner recordOwner = ((Record)record).getRecordOwner();
            BaseDatabase database = (BaseDatabase)recordOwner.getDatabase(record.getDatabaseName(), record.getDatabaseType(), null);
            Record recSource = Record.makeRecordFromClassName(strThickRecordClass, recordOwner, false, true);
            if (recSource == null)
                return;
            if (strTableName != null)
                if (strTableName.length() > 0)
                    if ((!strTableName.equalsIgnoreCase(recSource.getTableNames(false))))
                        if ((recSource.getDatabaseType() & DBConstants.MAPPED) != 0)
                            recSource.setTableNames(strTableName);
            recSource.setTable(database.makeTable(recSource));
            recSource.init(recordOwner);

            recSource.populateThinTable(record, true);
            
            recSource.free();
        }
    }
1078389
public void doAdd(Rec record) throws DBException
    {
        super.doAdd(record);
        if (m_arrayCache != null)
            if (m_iEndOfFileIndex != NO_INDEX)
        {
            m_iEndOfFileIndex++;
            m_arrayCache.set(m_iEndOfFileIndex, this.getDataSource());  // Show the current record as deleted.
        }
    }
653033
public void add(Rec fieldList) throws DBException
    {
        this.syncCurrentToBase();
        boolean[] rgbListenerState = this.getRecord().setEnableListeners(false);
        this.getRecord().handleRecordChange(DBConstants.ADD_TYPE);   // Fake the call for the grid table
        this.getRecord().setEnableListeners(rgbListenerState);
        
        super.add(fieldList);
        this.syncCurrentToBase();

        rgbListenerState = this.getRecord().setEnableListeners(false);
        this.getRecord().handleRecordChange(DBConstants.AFTER_ADD_TYPE);   // Fake the call for the grid table
        this.getRecord().setEnableListeners(rgbListenerState);
    }
638805
public void removeFieldList(FieldList fieldList)
    {
        if (m_vFieldListList == null)
            return;
        for (int i = 0; ; i++)
        {   // Step 1 - Disconnect the controls from the fields
            FieldList fieldInList = this.getFieldList(i);
            if (fieldInList == null)
                break;
            if ((fieldList == null)
                || (fieldList == fieldInList))
                    m_vFieldListList.remove(i); // Found, remove.
        }
    }
685525
public void init(MDatabase pDatabase, FieldList record, Object key)
    {
        super.init(pDatabase, record, key);
        m_bDataIn = false;
    }
886297
public void addListener(FieldListener listener, BaseField field)
    {
        super.addListener(listener, field);
        if (listener.getOwner().getRecord() == this.getRecord())   // Only replicate listeners added to base.
        {
            Iterator<BaseTable> iterator = this.getTables();
            while (iterator.hasNext())
            {
                BaseTable table = iterator.next();
                if ((table != null) && (table != this.getNextTable()))
                {
                    BaseField fldInTable = table.getRecord().getField(field.getFieldName());
                    if (fldInTable != null)
                    {
                        FieldListener newBehavior = null; // Clone the file behaviors
                        try   {
                            newBehavior = (FieldListener)listener.clone(fldInTable);  // Clone the file behaviors
                        } catch (CloneNotSupportedException ex)   {
                            newBehavior = null;
                        }
                        if (newBehavior != null)
                            if (newBehavior.getOwner() == null)     // This should have been set, just being careful (ie., next line never called)
                                fldInTable.addListener(newBehavior);        // Add them to the new query
                    }
                }
            }
        }
    }
400332
public void doAddNew() throws DBException
    {
        if (this.lockOnDBTrxType(null, DBConstants.ADD_TYPE, false))  // ADD_TYPE = Add new; Should I do the unlock in my code?
            this.unlockIfLocked(this.getRecord(), null);    // Release any locks
    }
546677
public function updateCMSFields(FieldList $fields)
    {
        /** Only allow authors or higher! */
        $fields->addFieldToTab(
            'Root', // What tab
            TabSet::create(
                'Newssettings', _t('NewsSiteConfigExtension.NEWSCOMMENTS', 'News settings')
            )
        );
        if (($this->owner->AllowAuthors && $this->owner->canEdit(Member::currentUser())) || Member::currentUser()->inGroup('administrators')) {
            $userTabs = array();
            foreach (self::$config_tabs as $tab) {
                $userTabs[] = $this->$tab();
            }
            $fields->addFieldsToTab('Root.Newssettings', $userTabs);
        } else {
            $fields->addFieldToTab('Root.Newssettings', HeaderField::create('NoPermissions', _t('NewsSiteConfigExtension.PERMISSIONERROR', 'You do not have the permission to edit these settings')));
        }
        if (Member::currentUser()->inGroup('administrators')) {
            $adminTabs = array();
            foreach (self::$admin_tabs as $tab) {
                $adminTabs[] = $this->$tab();
            }
            $fields->addFieldsToTab('Root.Newssettings', $adminTabs, 'Help');
        }
    }
174922
public FieldList move(int iRelPosition) throws DBException
    {
        this.setCurrentRecord(this.getBaseRecord());
        boolean bAfterRequery = !this.getBaseRecord().isOpen();
        if (!this.isOpen())
            this.open();    // Make sure any listeners are called before disabling.
        Object[] rgobjEnabledFields = this.getBaseRecord().setEnableNonFilter(null, false, false, false, false, true);
        try {
            Record record = (Record)super.move(iRelPosition);
            if (record == null)
                return null;

            this.getBaseRecord().setEnableNonFilter(rgobjEnabledFields, true, false, bAfterRequery, false, true);
            rgobjEnabledFields = null;
            
      //      this.getBaseRecord().handleValidRecord(); // Display Fields (handleValidRecord this was done in setEnableNonFilter)
            record = this.moveToCurrentRecord(record);
            if (record != null) if (record != this.getBaseRecord())
                record.handleValidRecord(); // Display Fields

            return record;
        } catch (DBException ex)    {
            throw ex;
        } finally {
            if (rgobjEnabledFields != null)
                this.getBaseRecord().setEnableNonFilter(rgobjEnabledFields, false, false, bAfterRequery, true, true);   // EOF
        }
    }
224395
@Override
	public FieldList addField(Integer fieldID) {
		if (fieldID == null) {
			throw new IllegalArgumentException("Field ID must not be null.");
		}
		
		if (size() == 0) {
			return new FieldList(fieldID);
		} else {
			ArrayList<Integer> list = new ArrayList<Integer>(size() + 1);
			list.addAll(this.collection);
			list.add(fieldID);
			return new FieldList(Collections.unmodifiableList(list));
		}
	}
642588
public void doAdd(Rec record) throws DBException
    {
        try   {
            m_objLastModBookmark = m_tableRemote.add(this.getDataSource(), record.getOpenMode());
        } catch (RemoteException ex) {
            throw new DBException(ex.getMessage());
        }
    }
226032
public function updateCMSFields(FieldList $fields)
    {
        $tags = $this->getAllTagsMap();
        $tagField = ListboxField::create('Tags', _t('DMSDocumentTaxonomyExtension.TAGS', 'Tags'))
            ->setMultiple(true)
            ->setSource($tags);

        if (empty($tags)) {
            $tagField->setAttribute('data-placeholder', _t('DMSDocumentTaxonomyExtension.NOTAGS', 'No tags found'));
        }

        $fields->insertAfter('Description', $tagField);
    }
1011506
public void fieldsToData(Rec record) throws DBException
    {
        this.setupNewDataSource();
        int fieldCount = record.getFieldCount(); // Number of fields to write out
        for (int iFieldSeq = Constants.MAIN_FIELD; iFieldSeq < fieldCount + Constants.MAIN_FIELD; iFieldSeq++)
        {
            Field field = record.getField(iFieldSeq);
            if (field.isVirtual()) //x || (!field.isSelected()))
                continue;               // This field is never moved to a buffer
            this.fieldToData(field);
        }
    }
21758
public void set(Rec fieldList) throws DBException
    {
        this.restoreMainRecord((Record)fieldList, true);
        super.set(fieldList);
    }
132472
public void updateField(int iSFieldSeq, Object objData)
    {
        try   {
            ScreenField sField = null;
            if (iSFieldSeq != -1)
                sField = m_gridScreen.getSField(this.getRelativeSField(iSFieldSeq));
            if (sField != null)
            {
                this.editTargetRecord();
                sField.getConverter().setData(objData);
                this.updateTargetRecord();   // Read this record
            }
        } catch (Exception ex)  {
            ex.printStackTrace();
        }
    }