Choose among the owners that are present within the list group that occurs before the tableName, and closest to it
@param owners
@param group
@param tableName
321642
private String chooseFirstOccurence(String[] among_owners, String[] within_listgroup,
			String prior_tableName) {
		int index = CStringUtils.indexOf(within_listgroup, prior_tableName);
		for(int i = index-1; i >= 0; i-- ){
			String closest = within_listgroup[i];
			if(CStringUtils.indexOf(among_owners, closest) >= 0){
				return closest;
			}
		}
		return null;
	}
169322
public void setOwnerIds(java.util.Collection<String> ownerIds) {
        if (ownerIds == null) {
            this.ownerIds = null;
            return;
        }

        this.ownerIds = new com.amazonaws.internal.SdkInternalList<String>(ownerIds);
    }
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.
        }
    }
414377
public void setTableList(java.util.Collection<Table> tableList) {
        if (tableList == null) {
            this.tableList = null;
            return;
        }

        this.tableList = new java.util.ArrayList<Table>(tableList);
    }
62452
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (m_recordToUpdate == null)
            m_recordToUpdate = this.getOwner();   // Defaults to this file
        if (owner != null) if (this.getOwner() != m_recordToUpdate)
            m_recordToUpdate.addListener(new FileRemoveBOnCloseHandler(this));
        if (m_recordToUpdate != null)
            m_recordToUpdate.setOpenMode((m_recordToUpdate.getOpenMode() | DBConstants.OPEN_LOCK_ON_CHANGE_STRATEGY) & ~(DBConstants.OPEN_READ_ONLY | DBConstants.OPEN_APPEND_ONLY));   // Lock the record if any changes
        if (owner != null)
            if (this.getOwner() == m_recordToUpdate)
                if (this.getOwner().getListener() != this)  // Prevents endless loop (listener is already the first in the list)
        {   // This is special weird logic - This must be the first in the listener list
            this.getOwner().removeListener(this, false);
            super.setOwner(owner);  // Set it back
            this.setNextListener(this.getOwner().getListener());
            this.getOwner().setListener(this);  // This MUST be the first listener on the list.
        }
    }
1075788
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (this.getOwner() != null)
        {
            if (m_fldSource != null) if (m_fldSource.getRecord() != this.getOwner().getRecord())
                m_fldSource.getRecord().addListener(new FileRemoveBOnCloseHandler(this));     // Not same file, if target file closes, remove this listener!
            InitOnceFieldHandler behavior = (InitOnceFieldHandler)this.getOwner().getListener(InitOnceFieldHandler.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)
                behavior.setFirstTime(true);  // If this listener exists it doesn't init initially everything up, so disable for a sec.
            this.syncBehaviorToRecord(null);    // Init now
            if (this.getOwner() instanceof ReferenceField)
                if (this.getOwner().getListener(ReadSecondaryHandler.class.getName()) != null)
                {
                    if (behavior != null)
                        behavior.setEnabledListener(false);  // If this listener exists it doesn't init initially everything up, so disable for a sec.
                    ((FieldListener)this.getOwner().getListener(ReadSecondaryHandler.class.getName())).syncBehaviorToRecord(null);
                }
        }
    }
231367
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (this.getOwner() != null) if (!this.getOwner().isNull())
            // Display the screen that is supposed to be up now
            this.fieldChanged(DBConstants.DISPLAY, DBConstants.INIT_MOVE);
    }
83335
protected function addOwners(array $owners)
    {
        foreach ($owners as $owner) {
            if (isset($this->modelPopulators[$owner])) {
                continue;
            }

            $modelPopulator = new ModelPopulator($this, new $owner, $this->generator, [], []);

            // We'll add the owners in reverse order, so that the children will be associated to their parents.
            $this->addOwners($modelPopulator->getOwners());

            $this->modelPopulators[$owner] = $modelPopulator;
            $this->quantities[$owner] = 1;
        }
    }
330802
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (this.getOwner() == null)
            return;
        if (m_fldDest.getRecord() != this.getOwner())  // If field is not in this file, remember to remove it
            m_fldDest.addListener(new FieldRemoveBOnCloseHandler(this));
        if (m_fldSource != null) if (m_fldSource.getRecord() != this.getOwner()) if (m_fldSource.getRecord() != m_fldDest.getRecord())
            m_fldSource.addListener(new FieldRemoveBOnCloseHandler(this));
        if ((this.getOwner().getEditMode() == DBConstants.EDIT_CURRENT) || (this.getOwner().getEditMode() == DBConstants.EDIT_IN_PROGRESS))
            if (m_bMoveOnValid)
                this.moveTheData(DBConstants.DISPLAY, DBConstants.INIT_MOVE);  // Do trigger a record change.
        if (this.getOwner().getEditMode() == DBConstants.EDIT_ADD)
            if (m_bMoveOnNew)
                this.moveTheData(DBConstants.DISPLAY, DBConstants.INIT_MOVE);  // Do trigger a record change.
    }
399666
public void setDBParameterGroups(java.util.Collection<DBParameterGroup> dBParameterGroups) {
        if (dBParameterGroups == null) {
            this.dBParameterGroups = null;
            return;
        }

        this.dBParameterGroups = new java.util.ArrayList<DBParameterGroup>(dBParameterGroups);
    }
342111
private void setParents(Collection<? extends T> c) {
    for (T arg : c) {
      arg.setParent(_owner);
    }
  }
371548
public void setPropertyGroupDescriptions(java.util.Collection<PropertyGroup> propertyGroupDescriptions) {
        if (propertyGroupDescriptions == null) {
            this.propertyGroupDescriptions = null;
            return;
        }

        this.propertyGroupDescriptions = new java.util.ArrayList<PropertyGroup>(propertyGroupDescriptions);
    }
281852
public void setGroups(java.util.Collection<Group> groups) {
        if (groups == null) {
            this.groups = null;
            return;
        }

        this.groups = new java.util.ArrayList<Group>(groups);
    }
340933
public void setGroups(java.util.Collection<GroupType> groups) {
        if (groups == null) {
            this.groups = null;
            return;
        }

        this.groups = new java.util.ArrayList<GroupType>(groups);
    }
1046314
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (this.getOwner() != null)
            this.getOwner().setOpenMode(this.getOwner().getOpenMode() | DBConstants.OPEN_REFRESH_AND_LOCK_ON_CHANGE_STRATEGY);    // Make sure keys are updated before sync
    }
552918
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (owner != null)
            this.fieldChanged(DBConstants.DONT_DISPLAY, DBConstants.INIT_MOVE);
    }
621015
def ownership(self, ownership):
        
        error_msg = 'ownership must be a list of dictionaries'
        if ownership:
            if not isinstance(ownership, list):
                raise TypeError(error_msg)
            if not all([isinstance(item, dict) for item in ownership]):
                raise TypeError(error_msg)
            if not all([item.get('party_id') for item in ownership]):
                raise ValueError('Ownership missing one or more party_ids')
            if not all([item.get('split') for item in ownership]):
                raise ValueError('Ownership missing one or more splits')
            if sum([item.get('split') for item in ownership]) != Decimal('1'):
                raise ValueError('Ownership must sum up to 100%')
        self._ownership = ownership