ControlFileHandler - Constructor.
@param record My owner (usually passed as null, and set on addListener in setOwner()).
12991
public void init(Record record)
    {
        super.init(record);
        this.setMasterSlaveFlag(FileListener.RUN_IN_MASTER | FileListener.DONT_REPLICATE_TO_SLAVE);
    }
865129
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (this.getOwner() == null)
            return;
        if (m_recordSub != null)    // If field is not in this file, remember to remove it
            m_recordSub.addListener(new FileRemoveBOnCloseHandler(this));
    }
505669
public void syncReference(Record record)
    {
        this.setReferenceRecord(record);
        BaseField recordKeyField = (BaseField)record.getCounterField();
        if ((recordKeyField.isNull()) && (!this.isNull())
            && (!record.isModified())
                && (record.getEditMode() != DBConstants.EDIT_CURRENT)
                    && (record.getEditMode() != DBConstants.EDIT_IN_PROGRESS)
                     && ((record.getOpenMode() & DBConstants.OPEN_REFRESH_AND_LOCK_ON_CHANGE_STRATEGY) == 0))
        {
            recordKeyField.moveFieldToThis(this, DBConstants.DISPLAY, DBConstants.SCREEN_MOVE);   // Start with this field's value if you arn't going to mess up the record
            recordKeyField.setModified(false);
        } 
        else
            this.setReference(record, DBConstants.DISPLAY, DBConstants.SCREEN_MOVE);
            // If the screen field is changed, make sure the passed in header record's key field is changed to match.
        MoveOnChangeHandler listener = (MoveOnChangeHandler)this.getListener(MoveOnChangeHandler.class.getName());
        if ((listener == null)
            || (listener.getDestField() != recordKeyField))
                this.addListener(new MoveOnChangeHandler(recordKeyField, null));
            // If the record is externally selected, sync the record's key with the screenfield
        MoveOnValidHandler listener2 = (MoveOnValidHandler)record.getListener(MoveOnValidHandler.class.getName());
        if ((listener2 == null)
            || (listener2.getSourceField() != recordKeyField))
                record.addListener(new MoveOnValidHandler(this, recordKeyField));
        MainReadOnlyHandler listener3 = (MainReadOnlyHandler)recordKeyField.getListener(MainReadOnlyHandler.class.getName());
        if (listener3 == null)
            recordKeyField.addListener(new MainReadOnlyHandler(null));
    }
1232462
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (owner == null)
            return;
        if (fieldName != null)
            m_fldTarget = this.getOwner().getField(fieldName);
        if (m_fldTarget != null) if (m_fldTarget.getRecord() != this.getOwner())    // If field is not in this file, remember to remove it
            m_fldTarget.addListener(new FieldRemoveBOnCloseHandler(this));
        if ((this.getOwner().getEditMode() == DBConstants.EDIT_CURRENT) || (this.getOwner().getEditMode() == DBConstants.EDIT_IN_PROGRESS))
            this.setEnabled(m_bEnableOnValid);
        if (this.getOwner().getEditMode() == DBConstants.EDIT_ADD)
            this.setEnabled(m_bEnableOnNew);
    }
738623
public void setRecord(Rec record)
    {
        if (m_tableNext != null)
            m_tableNext.setRecord(record);  // Must be synchronized
        super.setRecord(record);
    }
717768
public void fixRecord(Record record)
    {
        super.fixRecord(record);
        if (this.getProperty("field") != null)
        {
            BaseField field = this.getMainRecord().getField(this.getProperty("field").toString());
            if (field != null)
                this.fixCapitalization(field);
        }
    }
36214
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (owner == null)
            return;
        boolean bEnabledFlag = this.setEnabledListener(true);   // Disabled automatically on setOwner.
        try   {     // Open this table and move to the control record
            if (!this.getOwner().isOpen())
                if (this.isEnabled()) // Not on a slave
                    this.getOwner().open();     // Open the control file
            if (this.getOwner().getEditMode() == Constants.EDIT_NONE)
                if (this.isEnabled()) // Not on a slave
                    this.doNewRecord(true);     // Read the control file
        } catch (DBException ex)   {
            ex.printStackTrace();
        } finally   {
            this.setEnabledListener(bEnabledFlag);  // Set back
        }
    }
83268
public void setOwner(ListenerOwner owner)
    {
        if (owner != null)
            if (m_buffer == null)
        {   // Save the current key
            KeyArea keyArea = ((Record)owner).getKeyArea(-1);
            m_buffer = new VectorBuffer(null);
            keyArea.setupKeyBuffer(m_buffer, DBConstants.FILE_KEY_AREA);
        }
        super.setOwner(owner);
    }
381352
public Record makeReferenceRecord(RecordOwner recordOwner)
    {
        if (this.getRecord() instanceof Person)
            this.addListener(new UserContactHandler(null));
        return new UserInfo(recordOwner);
    }
114797
@Override
	public void log(LogRecord record) {
		record.setMessage(maskPassword(record.getMessage()));
		super.log(record);
	}
1279859
public void init(Object parent, Object record)
    {
        super.init(parent, record);

        this.addSubPanels(this);
        
        if (this.getBaseApplet() != null)
            if (this.getBaseApplet().getProperty(Constants.OBJECT_ID) != null)
                if (this.getFieldList() != null)
                    if ((this.getFieldList().getEditMode() == Constants.EDIT_NONE) || (this.getFieldList().getEditMode() == Constants.EDIT_ADD))
        {
            FieldInfo field = this.getFieldList().getCounterField();
            field.setString(this.getBaseApplet().getProperty(Constants.OBJECT_ID));
            this.readKeyed(field);
        }
        this.fieldsToControls();
    }
68653
public void init(Record record, boolean bNoDelete, boolean bNoModify)
    {   // For this to work right, the booking number field needs a listener to re-select this file whenever it changes
        m_bNoDelete = bNoDelete;
        m_bNoModify = bNoModify;
        super.init(record);
    }
1269522
public void init(Object parent, Object record)
    {
        super.init(parent, record);

        this.addSubPanels(this);
        
        TraversableGridPolicy.addGridTraversalPolicy(this.getControl(), this);
    }
295067
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (owner != null)
        {
            if (m_fldSource == null)
                m_fldSource = this.getOwner();
    
            if ((m_fldDest != null)
                && (((BaseField)m_fldDest.getField()).getRecord() != null)
                && (((BaseField)m_fldDest.getField()).getRecord() != this.getOwner().getRecord()))
                    ((BaseField)m_fldDest.getField()).getRecord().addListener(new FileRemoveBOnCloseHandler(this));     // Not same file, if target file closes, remove this listener!
            else if ((m_fldSource.getField() != null)
                && (((BaseField)m_fldSource.getField()).getRecord() != null)
                && (((BaseField)m_fldSource.getField()).getRecord() != this.getOwner().getRecord()))
                    ((BaseField)m_fldSource.getField()).getRecord().addListener(new FileRemoveBOnCloseHandler(this)); // Not same file, if target file closes, remove this listener!
        }
    }
1210685
public static void enableAllBehaviors(Record record, boolean bEnableRecordBehaviors, boolean bEnableFieldBehaviors)
    {
        if (record == null)
            return;
        record.setEnableListeners(bEnableRecordBehaviors);   // Disable all file behaviors
        for (int iFieldSeq = 0; iFieldSeq < record.getFieldCount(); iFieldSeq++)
        {
            BaseField field = record.getField(iFieldSeq);
            field.setEnableListeners(bEnableFieldBehaviors);
        }
    }
790729
def emit(self, record):
        
        try:
            if self.check_base_filename(record):
                self.build_base_filename()
            FileHandler.emit(self, record)
        except (KeyboardInterrupt, SystemExit):
            raise
        except:
            self.handleError(record)
1369746
@UpdateHandler(name = "update_record", file = "RegisteredServiceDocument_update.js")
    public void updateRecord(final RegisteredServiceDocument record) {
        if (record.getId() == null) {
            add(record);
        } else {
            db.callUpdateHandler(stdDesignDocumentId, "update_record", record.getId(), CollectionUtils.wrap("doc", record));
        }
    }