Set the record that owns this listener.
This method looks up up all the fields in the record.
@param owner My owner.
171243
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (owner == null)
            return;
        if (m_fldThisFile == null)
            if (thisFileFieldName != null)
                m_fldThisFile = this.getOwner().getField(thisFileFieldName);
        if (m_fldThisFile2 == null)
            if (thisFileFieldName2 != null)
                m_fldThisFile2 = this.getOwner().getField(thisFileFieldName2);
        if (m_fldThisFile3 == null)
            if (thisFileFieldName3 != null)
                m_fldThisFile3 = this.getOwner().getField(thisFileFieldName3);
//?        if (m_fldThisFile != null)
//?            m_fldThisFile.saveEnableListeners(false);     // Don't let behaviors mess with my values.
//?        if (m_fldThisFile2 != null)
//?            m_fldThisFile2.saveEnableListeners(false);    // Note: This is because of a conflict with.
//?        if (m_fldThisFile3 != null)
//?            m_fldThisFile3.saveEnableListeners(false);    // InitOnceFieldHandler, the value is only set once.
//x        this.setMainKey(true, null);    // Initialize the keys
    }
757115
public void init(BaseField owner)
    {
        m_bScreenMove = true;
        m_bInitMove = true;
        m_bReadMove = true;
        super.init(owner);
    }
335933
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (this.getOwner() != null)
            this.syncBehaviorToRecord(this.getOwner().getRecord().getField(m_iMainFilesFieldSeq));  // Init now
    }
36973
public void set(Rec fieldList) throws DBException
    {
        Record recBase = this.getBaseRecord();
        Record recCurrent = this.getCurrentRecord();
        if (fieldList != recBase)
        {
            if (fieldList != recCurrent)
                throw new DBException("Can't change record class then add");
        }
        else
        {
            if (recBase != recCurrent)
                if (recCurrent.isModified())
                    this.copyRecordInfo(recBase, recCurrent, false, true);
            fieldList = this.moveToCurrentRecord((Record)fieldList);
        }
        if (fieldList != recBase)
        {
            this.getBaseRecord().matchListeners(this.getCurrentRecord(), false, true, true, true, true);      // Clone the listeners that are not there already.
            fieldList.getTable().set(fieldList);
        }
        else
            super.set(fieldList);   // Never (hopefully)
        // Note, since target record is passed, add listeners are called on the correct record
    }
561764
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (owner != null)
        {
            if (mainFieldName == null)
                m_fldMain = this.getOwner().getReferenceField(m_FileToRead);
            if (fileKeyFieldName != null)
                m_FileToRead.setKeyArea(m_FileToRead.getField(fileKeyFieldName));
            else
                m_FileToRead.setKeyArea(m_FileToRead.getField(m_iFileKeyField));
        }
    }
400847
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (owner == null)
            return;
        if (m_recordMain != null)
        {   // If they are using the main record, then make sure the key area is correct.
            ReferenceField fieldThisRecord = this.getOwner().getReferenceField(m_recordMain);
            if (fieldThisRecord != null)
                if (fieldThisRecord.getReferenceRecord(null, false) == null)
                    fieldThisRecord.setReferenceRecord(m_recordMain);   // Make sure these are linked
            this.getOwner().setKeyArea(fieldThisRecord);
            // Listen carefully:
            // If the main record belongs to another screen and the screen is closed,
            // do not change the sub-field.
            if (fieldThisRecord != null)
                if (this.getOwner().getRecordOwner() != null)
                    if (m_recordMain.getRecordOwner() != null)
                        if (this.getOwner().getRecordOwner() != m_recordMain.getRecordOwner())
                            fieldThisRecord.addListener(new InitIfSubFieldHandler(null));
        }
        else if (m_fldThisFile == null)
        {
            if (m_strKeyName == null)
                m_strKeyName = this.getOwner().getKeyArea().getKeyName();
            if (m_strKeyName != null)
            {
            	this.getOwner().setKeyArea(m_strKeyName);
            	if (m_fldMainFile != null)
            		m_fldThisFile = this.getOwner().getKeyArea().getField(0);
            	if (m_fldMainFile2 != null)
            		m_fldThisFile2 = this.getOwner().getKeyArea().getField(1);
            	if (m_fldMainFile3 != null)
            		m_fldThisFile3 = this.getOwner().getKeyArea().getField(2);
            }
        }
    }
637797
public void setOwner(Path f, String user, String group) throws IOException {
    try (Closeable context = new TimerContextWithLog(this.setOwnerTimer.time(), "setOwner", f, user, group)) {
      super.setOwner(f, user, group);
    }
  }
1259172
public function removeOwner($owner)
    {
        if (!$this->owners->extract($owner)) {
            $this->resetStats(array($this->_mixer));
        }
    }
949936
public void removeLockedObjectOwner(String owner) {

        try {
            if (_owner != null) {
                int size = _owner.length;
                for (int i = 0; i < size; i++) {
                    // check every owner if it is the requested one
                    if (_owner[i].equals(owner)) {
                        // remove the owner
                        String[] newLockedObjectOwner = new String[size - 1];
                        for (int j = 0; j < (size - 1); j++) {
                            if (j < i) {
                                newLockedObjectOwner[j] = _owner[j];
                            } else {
                                newLockedObjectOwner[j] = _owner[j + 1];
                            }
                        }
                        _owner = newLockedObjectOwner;

                    }
                }
                if (_owner.length == 0) {
                    _owner = null;
                }
            }
        } catch (ArrayIndexOutOfBoundsException e) {
            System.out.println("LockedObject.removeLockedObjectOwner()");
            System.out.println(e.toString());
        }
    }
207511
public void initSharedRecord(Record record)
    {
        FieldListener listener = null;
        try {
            BaseField field = record.getSharedRecordTypeKey();
            field.addListener(listener = new InitOnceFieldHandler(null));
            field.setData(new Integer(0), true, DBConstants.INIT_MOVE);
            field.setData(new Integer(0), true, DBConstants.INIT_MOVE);
            if (field != null)
                if (field.getDataClass() == Integer.class)
            {
                for (int i = 1; ; i++)
                {
                    Integer intData = new Integer(i);
                    field.setData(intData);
                    record.addNew();
                    Record recShared = record.getTable().getCurrentTable().getRecord();
                    if (recShared == null)
                        break;
                    if (recShared == record)
                        break;
                    if (recShared.getField(field.getFieldName()).getValue() != i)
                        break;
                    this.disableAllListeners(recShared);
                }
            }
        } catch (DBException ex) {
            ex.printStackTrace();
        } finally {
            if (listener != null)
                record.removeListener(listener, true);
        }
    }
970390
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (this.getOwner() != null)
        {
            InitFieldHandler behavior = (InitFieldHandler)this.getOwner().getListener(InitFieldHandler.class.getName());
            if (this.getOwner().getRecord().getEditMode() == DBConstants.EDIT_CURRENT)
                behavior = null;    // Special case - if there is a current record, make sure initonce works.
            if (behavior != null)
                this.setFirstTime(false);  // If InitFieldHandler already set the initial value, don't set the first time.
        }
    }
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));
    }
544737
public void setProperties(Map<String, Object> properties)
    {
        if (this.getParentRecordOwner() != null)
            this.getParentRecordOwner().setProperties(properties);
    }
303432
public void setOwner(String src, String username, String groupname
                      ) throws IOException {
    checkOpen();
    clearFileStatusCache();
    
    try {
      namenode.setOwner(src, username, groupname);
    } catch(RemoteException re) {
      throw re.unwrapRemoteException(AccessControlException.class,
                                     FileNotFoundException.class);
    }
  }
502675
public void setOwner(HttpServiceContext hsc) {
        // if we have an SC owner, set it's flag to false
        if (null != getServiceContext()) {
            getServiceContext().setRequestOwner(false);
        }
        // if the owner is a new HSC, then init the flags
        if (null != hsc) {
            super.init(hsc);
            getServiceContext().setRequestOwner(true);
            setIncoming(getServiceContext().isInboundConnection());
        }
    }
241926
@Override
    public void setOwner(ApiBaseUser owner) {
        room.setOwner(CommandUtil.getSfsUser(owner, api));
        apiRoom.setOwner(owner);
    }
333739
@Override
  public void setOwner(Path p, String username, String groupname
      ) throws IOException {
    if (username == null && groupname == null) {
      throw new IOException("username == null && groupname == null");
    }

    if (username == null) {
      execCommand(pathToFile(p), Shell.SET_GROUP_COMMAND, groupname); 
    } else {
      //OWNER[:[GROUP]]
      String s = username + (groupname == null? "": ":" + groupname);
      execCommand(pathToFile(p), Shell.SET_OWNER_COMMAND, s);
    }
  }