sets the value of the role field (@trole or @troles) and persists the value (in the data store)
 @param [Object] the value to set on the role field of the role subject
192445
def set_ds_field value
      return if ds_field_value == value

      if Troles::Common::Config.log_on?
        puts "Troles::Common::Storage.set_ds_field:"
        puts "#{rolegroup_subject}.#{ds_field_name} = #{value}"
      end

      role_subject.send(:"#{ds_field_name}=", value)
      persist_role_changes!
    end
656246
def _set_value(self, entity, value):
    
    if entity._projection:
      raise ReadonlyPropertyError(
          'You cannot set property values of a projection entity')
    if self._repeated:
      if not isinstance(value, (list, tuple, set, frozenset)):
        raise datastore_errors.BadValueError('Expected list or tuple, got %r' %
                                             (value,))
      value = [self._do_validate(v) for v in value]
    else:
      if value is not None:
        value = self._do_validate(value)
    self._store_value(entity, value)
400746
function setFieldValue (data, field, isRecord) {
    // do not set value for password input
    if (field.inputType === 'password') {
        return
    }
    // get value using either property or name fields
    var value = defined(data[field.property]) ? data[field.property] : data[field.name]
    // data is a record
    if (data.ImmutableCoreModelRecord) {
        // set record for field
        field.record = data
        // value was not found - could be due to resolving record so try to
        // lookup by default id column names
        if (!defined(value)) {
            // get default id column name from model
            var defaultIdColumnName = field.record.model.defaultColumns[field.property]
            // use for value if found
            if (defined(defaultIdColumnName)) {
                value = data[defaultIdColumnName]
            }
        }
    }
    // field is nested array
    if (field.nested && field.array) {
        setFieldValuesNestedArray(field, value)
    }
    // set value
    else {
        field.value = value
    }
    // if field is select then set selected flag on option that matches value
    if (field.inputType === 'select') {
        _.each(field.options, option => {
            option.selected = option.value === field.value
        })
    }
    // if field is immutable and it has a value then make it readonly
    if (isRecord && field.immutable && defined(field.value)) {
        field.readonly = true
    }
}
481462
def setZValue(self, value):
        
        super(XNodeConnection, self).setZValue(value)

        if self._textItem:
            self._textItem.setZValue(value)
253180
def set_value(self, iter, column, value):
        """"""

        # Delegate to child model
        iter = self.convert_iter_to_child_iter(iter)
        self.get_model().set_value(iter, column, value)
1125927
def set_value(self, model, value):
        
        if value is None and self.required:
            raise AttributeError("This field is required.")

        if value is not None:
            value = self._converter(value)

        setattr(model, self.storage_name, value)
113991
def set(self, value, parse=False):
        
        self.value = self.parse(value) if parse else value
776840
function setValue(object, key, value) {
  if (key in object === true) return;
  object[key] = value;
}
64438
function setRuleModel (roles, rule, rules, origRule) {
    // allow/deny is last element of rule
    var allow = rule.pop()
    // blanket rule for all models
    if (rule.length === 0) {
        // create role access rule map
        if (!rules.allow) {
            rules.allow = {}
        }
        // set rule for each role
        _.each(roles, role => {
            rules.allow[role] = allow
        })
        // break
        return
    }

    // model name is first clause of rule
    var model = rule.shift()
    // create map of models
    if (!rules.model) {
        rules.model = {}
    }
    // create entry for model
    if (!rules.model[model]) {
        rules.model[model] = {}
    }

    // blanket rule for single model
    if (rule.length === 0) {
        // create role access rule map
        if (!rules.model[model].allow) {
            rules.model[model].allow = {}
        }
        // set rule for each role
        _.each(roles, role => {
            rules.model[model].allow[role] = allow
        })
        // break
        return
    }

    // action follows model name
    var action = rule.shift()
    // create map of actions
    if (!rules.model[model].action) {
        rules.model[model].action = {}
    }
    // create entry for action
    if (!rules.model[model].action[action]) {
        rules.model[model].action[action] = {}
    }

    // create action does not have any options
    if (action === 'create') {
        // there should be no more rule clauses
        if (rule.length === 0) {
            // create role access rule map
            if (!rules.model[model].action[action].allow) {
                rules.model[model].action[action].allow = {}
            }
            // set rule for each role
            _.each(roles, role => {
                rules.model[model].action[action].allow[role] = allow
            })
            // break
            return
        }
        else {
            throw new Error('invalid rule '+origRule)
        }
    }
    // all other actions apply to existing model instances and can
    // apply either to any instance or to instances owned by session
    else {
        // if there are two rule clauses then next is a state
        if (rule.length === 2) {
            var state = rule.shift()
            // create map of states
            if (!rules.model[model].action[action].state) {
                rules.model[model].action[action].state = {}
            }
            // create entry for state
            if (!rules.model[model].action[action].state[state]) {
                rules.model[model].action[action].state[state] = {}
            }
            // own/any clause follows state
            rules = rules.model[model].action[action].state[state]
        }
        // otherwise own/any clause follows action
        else {
            rules = rules.model[model].action[action]
        }
        // there must be one additional rule clause
        if (rule.length === 1) {
            var scope = rule.shift()
            // scope must be own or any
            assert.ok(scope === 'own' || scope === 'any', 'invalid rule '+origRule)
            // create map for scope
            if (!rules[scope]) {
                rules[scope] = {}
            }
            // create role access rule map
            if (!rules[scope].allow) {
                rules[scope].allow = {}
            }
            // set rule for each role
            _.each(roles, role => {
                rules[scope].allow[role] = allow
            })
        }
        else {
            throw new Error('invalid rule '+origRule)
        }
    }
}
767585
def set_value(self, instance, value, parent=None):
        
        self.resolve_base(instance)
        value = self.deserialize(value, parent)
        instance.values[self.alias] = value
        self._trigger_changed(instance, value)
930852
def set(self, field, value = None):
        
        if value is None and isinstance(field, dict):
            self.content(field)
        if field and value:
            self.data[field] = value
        return self
1074427
public void setRoleMembership(String subject, Set<String> roles) {
		validateStringValue(subject);
		Validate.notNull(roles);
		if(roles.isEmpty())
			return;
		Validate.noNullElements(roles);
		
		props.setProperty(String.format(ROLE_MEMBERSHIP_FORMAT, subject), ArrayUtils.toString(encapsulateValues(roles)));
	}
237495
def []=(name, value)
      @column_keys << name
      @attrs[to_key(name)] = value
      define_accessor(name) unless respond_to?(name)
    end
955121
def value_fields_for(source, order=nil)
      fields = self.send(source).fields

      fields = fields.order(order) if order

      fields.each do |i|
        i.set_value_for(self)
      end

      fields
    end
404220
def set(self, instance, value, **kw):
        
        proxy_field = self.get_proxy_field(instance)
        if proxy_field is None:
            return None
        # set the field with the proper field manager of the proxy field
        fieldmanager = IFieldManager(proxy_field)
        return fieldmanager.set(instance, value, **kw)
475048
def put(key, value)
      if key == ''
        @object_types[:root] = [:root]
        @store[:root] = value
      else
        @notfound.delete(key.to_sym)
        (@object_types[value.type] ||= []) << key.to_s
        if @store[key.to_sym]
          @object_types[@store[key.to_sym].type].delete(key.to_s)
        end
        @store[key.to_sym] = value
      end
    end
289909
def value(self, value):
        
        self.client.nowait(
            'set_field', (Literal('browser'), self.element, value))