Sets the record state for this item to the inputed state.
        
        :param      recordState | <XOrbRecordItem.State>
327545
def setRecordState( self, recordState ):
        
        self._recordState = recordState
        
        try:
            is_colored = self.treeWidget().isColored()
        except AttributeError:
            return
        
        if not is_colored:
            return
        
        # determine the color for the item based on the state
        if recordState & XOrbRecordItem.State.Removed:
            clr = self.treeWidget().colorSet().color('RecordRemoved')
        elif recordState & XOrbRecordItem.State.New:
            clr = self.treeWidget().colorSet().color('RecordNew')
        elif recordState & XOrbRecordItem.State.Modified:
            clr = self.treeWidget().colorSet().color('RecordModified')
        else:
            clr = None
        
        # set the color based on the record state
        if clr is not None:
            clr = QColor(clr)
            clr.setAlpha(40)
            brush = QBrush(clr)
        else:
            brush = QBrush()
        
        for c in range(self.treeWidget().columnCount()):
            self.setBackground(c, brush)
942941
public Record setRecordCurrent()
    {
        Record recordMain = this.getMainRecord();
        try   {
            if (recordMain != null)
            {
                if (m_objectID != null)
                { // Read the request
                    if (recordMain.setHandle(m_objectID, DBConstants.BOOKMARK_HANDLE) != null)
                        recordMain.edit();
                    else
                        m_objectID = null;
                }
                if (m_objectID == null)
                    if ((recordMain.getEditMode() != DBConstants.EDIT_CURRENT) && (recordMain.getEditMode() != DBConstants.EDIT_IN_PROGRESS))   // If the record is current, don't touch it.
                {
                    recordMain.addNew();
                }
            }
        } catch (DBException ex)    {
            Debug.print(ex);
            ex.printStackTrace();
            m_objectID = null;
        }
        if (m_objectID == null)
            return null;
        else
            return recordMain;
    }
1174074
def save_records(self, records):
        '''
        
        '''
        for record in records:
            if not isinstance(record, Record):
                record = Record(*record)
            self.save_record(*record)
929193
def set_state(self, state):
        
        _field = self.binary_state_name()
        values = {"desired_state": {_field: state}}
        response = self.api_interface.local_set_state(self, values, type_override="binary_switche")
        self._update_state_from_response(response)
298441
def setRecordSet(self, recordSet):
        
        if not self.tableType():
            self.setTableType(recordSet.table())
        
        self._currentRecordSet = None
        self._recordSet = recordSet
        
        try:
            self.setDatabase(recordSet.database())
        except AttributeError:
            pass
        
        if not self.signalsBlocked():
            self.refresh()
            self.recordsChanged.emit()
398151
def setRecordSet( self, recordSet ):
        
        if ( recordSet ):
            self.setQuery(      recordSet.query() )
            self.setGroupBy(    recordSet.groupBy() )
            self.setPageSize(   recordSet.pageSize() )
            self.setSortBy(     recordSet.order() )
            
            self.uiPagedCHK.setChecked( recordSet.isPaged() )
        else:
            self.setQuery(Q())
            self.setGroupBy('')
            self.setPageSize(100)
            self.setSortBy('')
            
            self.uiPagedCHK.setChecked( False )
120981
def RegisterRecordType(cls, record_class):
        

        record_type = record_class.MatchType()
        if record_type not in UpdateRecord.KNOWN_CLASSES:
            UpdateRecord.KNOWN_CLASSES[record_type] = []

        UpdateRecord.KNOWN_CLASSES[record_type].append(record_class)
856923
def _update_record(self, identifier=None, rtype=None, name=None, content=None):
        """"""
        return self._change_record_sets('UPSERT', rtype, name, content)
1196613
function setSelected(record) {
    var self = this;
    var shapes = self.getShapes();
    Util.each(shapes, function (shape) {
      var origin = shape.get('origin');
      if (origin && origin[FIELD_ORIGIN] === record) {
        self.setShapeSelected(shape);
      }
    });
    return this;
  }
738623
public void setRecord(Rec record)
    {
        if (m_tableNext != null)
            m_tableNext.setRecord(record);  // Must be synchronized
        super.setRecord(record);
    }
949774
def updateRecordValues(self):
        
        record = self.record()
        if not record:
            return
        
        # update the record information
        tree = self.treeWidget()
        if not isinstance(tree, XTreeWidget):
            return
        
        for column in record.schema().columns():
            c = tree.column(column.displayName())
            if c == -1:
                continue
            
            elif tree.isColumnHidden(c):
                continue
            
            else:
                val = record.recordValue(column.name())
                self.updateColumnValue(column, val, c)
        
        # update the record state information
        if not record.isRecord():
            self.addRecordState(XOrbRecordItem.State.New)
        
        elif record.isModified():
            self.addRecordState(XOrbRecordItem.State.Modified)
185373
def set_state(self, state):
        
        values = {"desired_state": {"locked": state}}
        response = self.api_interface.local_set_state(self, values)
        self._update_state_from_response(response)
856054
private void setState(int[] nextState)
                    throws StateErrorException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this,
                        cclass,
                        "setState",
                        new Object[] { nextState,
                                      new Integer(state),
                                      stateNames[state] });

        synchronized (stateLock) {
            previousState = state; // Capture the previous state for dump. 
            state = nextState[state]; // Make the state change.       
        } // synchronized (stateLock)  

        if (state == stateError) {
            StateErrorException stateErrorException = new StateErrorException(this, previousState, stateNames[previousState]);
            ObjectManager.ffdc.processException(this, cclass, "setState", stateErrorException, "1:2016:1.34");

            if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                trace.exit(this,
                           cclass,
                           "setState",
                           new Object[] { stateErrorException,
                                         new Integer(state),
                                         stateNames[state] });
            throw stateErrorException;
        } // if (state == stateError).  

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this
                       , cclass
                       , "setState"
                       , "state=" + state + "(int) " + stateNames[state] + "(String)"
                            );
    }
21211
def record_unchanged?(record_new, record_old)
      # NOTE: Using the dirty state would be great here, but it doesn't keep track of
      # in-place changes.

      allow_indexing?(record_old) == allow_indexing?(record_new) &&
        !@fields.map { |field| record_old.send(field) == record_new.send(field) }.include?(false)
    end
914210
function setUserRecord(state, userRecord) {
  Object.defineProperty(state, 'userRecord',
    {value: userRecord, writable: true, configurable: true, enumerable: false});
}
1274249
def assignCurrentRecord(self, text):
        
        if self.showTreePopup():
            item = self._treePopupWidget.currentItem()
            if item:
                self._currentRecord = item.record()
            else:
                self._currentRecord = None
            return
        
        # look up the record for the given text
        if text:
            index = self.findText(text)
        elif self.isRequired():
            index = 0
        else:
            index = -1
        
        # determine new record to look for
        record = self.recordAt(index)
        if record == self._currentRecord:
            return
        
        # set the current index and record for any changes
        self._currentRecord = record
        self.setCurrentIndex(index)
864993
public void setState(String state)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "setState", state);

    this.state = state;

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "setState");
  }