Returns the object updated with the 'id' and 'uri' fields for the
    elasticsearch document

    args:
        obj: data object to update
        def_obj: the class instance that has defintion values
767054
def get_es_ids(obj, def_obj):
    
    try:
        path = ""
        for base in [def_obj.__class__] + list(def_obj.__class__.__bases__):

            if hasattr(base, 'es_defs') and base.es_defs:
                path = "%s/%s/" % (base.es_defs['kds_esIndex'][0],
                                   base.es_defs['kds_esDocType'][0])
                continue
    except KeyError:
        path = ""
    if def_obj.subject.type == 'uri':
        obj['uri'] = def_obj.subject.clean_uri
        obj['id'] = path + make_es_id(obj['uri'])
    elif def_obj.subject.type == 'bnode':
        obj['id'] = path + def_obj.bnode_id()
    else:
        obj['id'] = path + make_es_id(str(obj['value']))
    return obj
896724
function(obj) {

            this.guid.id = this.guid.id || 1;
            obj.id = (obj.id === undefined ? 'j_' + this.guid.id++ : obj.id);
            return obj.id;
        }
1193731
def index(request, obj_id):
    """"""
    if request.method == 'GET':
        return get(request, obj_id)
    elif request.method == 'PUT':
        getPutData(request)
        return put(request, obj_id)
779413
def update(class_or_classname, record_id, new_attrs)
      class_or_classname = find_or_materialize(class_or_classname)
      json_for_update = coerced_json(new_attrs, class_or_classname)
      http_patch("/services/data/v#{self.version}/sobjects/#{class_or_classname.sobject_name}/#{record_id}", json_for_update)
    end
515724
def get_object(self, request, object_id, from_field=None):
        
        # from_field breaks in 1.7.8
        obj = super(VersionedAdmin, self).get_object(request,
                                                     object_id)
        # Only clone if update view as get_object() is also called for change,
        # delete, and history views
        if request.method == 'POST' and \
                obj and \
                obj.is_latest and \
                'will_not_clone' not in request.path and \
                'delete' not in request.path and \
                'restore' not in request.path:
            obj = obj.clone()

        return obj
284902
def process_object(self, obj):
        """"""
        document = self.document_class(meta={'id': self.generate_id(obj)})

        for field in document._doc_type.mapping:  # pylint: disable=protected-access
            if field in ['users_with_permissions', 'groups_with_permissions', 'public_permission']:
                continue  # These fields are handled separately

            try:
                # use get_X_value function
                get_value_function = getattr(self, 'get_{}_value'.format(field), None)
                if get_value_function:
                    setattr(document, field, get_value_function(obj))  # pylint: disable=not-callable
                    continue

                # use `mapping` dict
                if field in self.mapping:
                    if callable(self.mapping[field]):
                        setattr(document, field, self.mapping[field](obj))
                        continue

                    try:
                        object_attr = dict_dot(obj, self.mapping[field])
                    except (KeyError, AttributeError):
                        object_attr = None

                    if callable(object_attr):
                        # use method on object
                        setattr(document, field, object_attr(obj))
                    else:
                        # use attribute on object
                        setattr(document, field, object_attr)
                    continue

                # get value from the object
                try:
                    object_value = dict_dot(obj, field)
                    setattr(document, field, object_value)
                    continue
                except KeyError:
                    pass

                raise AttributeError("Cannot determine mapping for field {}".format(field))

            except Exception:  # pylint: disable=broad-except
                logger.exception(
                    "Error occurred while setting value of field '%s' in '%s' Elasticsearch index.",
                    field, self.__class__.__name__,
                    extra={'object_type': self.object_type, 'obj_id': obj.pk}
                )

        permissions = self.get_permissions(obj)
        document.users_with_permissions = permissions['users']
        document.groups_with_permissions = permissions['groups']
        document.public_permission = permissions['public']

        self.push_queue.append(document)
714752
def document_for_full_update(model)
      RSolr::Xml::Document.new(
        id: Adapters::InstanceAdapter.adapt(model).index_id,
        type: Util.superclasses_for(model.class).map(&:name)
      )
    end
625172
def _update(self, api_obj):
    """"""
    if not isinstance(self, api_obj.__class__):
      raise ValueError(
          "Class %s does not derive from %s; cannot update attributes." %
          (self.__class__, api_obj.__class__))

    for name in self._get_attributes().keys():
      try:
        val = getattr(api_obj, name)
        setattr(self, name, val)
      except AttributeError, ignored:
        pass
1293193
def update(self, obj):
        ''''''
        self._dict.update(obj)
        for k, v in obj.items():
            # if k.isupper():
            #    self._check_readonly(k, v)
            if env.verbosity > 2:
                self._log(k, v)
460444
def get_resource_uri(self, obj):
        
        url = 'api:%s:%s-detail' % (
            self.api_version,
            getattr(
                self, 'resource_view_name',
                self.Meta.model._meta.model_name
            )
        )

        return reverse(url, request=self.context.get('request', None), kwargs={
            self.lookup_field: getattr(obj, self.lookup_field)
        })
274808
def _updateable(self, obj):
        """"""
        if obj.latest_version is None or obj.is_editable:
            return None
        else:
            return obj.latest_version != obj.current_version
635412
def update(self, id, **dict):
        ''''''
        if not self._item_path:
            raise AttributeError('update is not available for %s' % self._item_name)
        target = (self._update_path or self._item_path) % id
        payload = json.dumps({self._item_type:dict})
        self._redmine.put(target, payload)
        return None
1190779
def update_obj
      mean, sd = rating.to_glicko_rating
      @obj.rating = mean
      @obj.rating_deviation = sd
      @obj.volatility = volatility
    end
191730
def org_update(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/update' % object_id, input_params, always_retry=always_retry, **kwargs)
1069479
function updateObjectImpl(obj, update, isSelected) {
  if (isSelected(obj)) {
    return update(obj);
  }
  var result = obj;
  var changed = false;
  _lodash2.default.forOwn(obj, function (val, key) {
    var newval = updateValue(val, update, isSelected);
    if (newval === val) {
      return;
    }
    if (!changed) {
      result = _extends({}, obj);
      changed = true;
    }
    result[key] = newval;
  });
  return result;
}
780024
def update(self, data):
        
        data = values.of({'Data': serialize.object(data), })

        payload = self._version.update(
            'POST',
            self._uri,
            data=data,
        )

        return DocumentInstance(
            self._version,
            payload,
            service_sid=self._solution['service_sid'],
            sid=self._solution['sid'],
        )
208174
def get(self, object_id):
        
        if not object_id:
            raise LeanCloudError(code=101, error='Object not found.')
        obj = self._query_class.create_without_data(object_id)
        obj.fetch(select=self._select, include=self._include)
        return obj