Updates an Engineering Object given as EDBObject based on the update on the given model which is referenced by
the given Engineering Object.
356997
private AdvancedModelWrapper updateEOByUpdatedModel(EDBModelObject reference, AdvancedModelWrapper model,
            Map<Object, AdvancedModelWrapper> updated) {
        ModelDescription source = model.getModelDescription();
        ModelDescription description = reference.getModelDescription();
        AdvancedModelWrapper wrapper = updated.get(reference.getOID());
        Object ref = null;
        if (wrapper == null) {
            ref = reference.getCorrespondingModel();
        } else {
            ref = wrapper.getUnderlyingModel();
        }
        Object transformResult = transformationEngine.performTransformation(source, description,
            model.getUnderlyingModel(), ref);
        return AdvancedModelWrapper.wrap(transformResult);
    }
1067479
public List<EDBObject> convertModelToEDBObject(Object model, ConnectorInformation info) {
        if (!OpenEngSBModel.class.isAssignableFrom(model.getClass())) {
            throw new IllegalArgumentException("This function need to get a model passed");
        }
        List<EDBObject> objects = new ArrayList<>();
        if (model != null) {
            convertSubModel((OpenEngSBModel) model, objects, info);
        }
        return objects;
    }
894704
def update(obj, meta=nil)
      meta ||= {}
      self.temp_object = TempObject.new(obj, meta['name'])
      self.meta['name'] ||= temp_object.name if temp_object.name
      clear_analyser_cache
      add_meta(obj.meta) if obj.respond_to?(:meta)
      add_meta(meta)
      self
    end
437524
def update(instance, full_clean=True, post_save=False, **kwargs):
    ""

    # apply the updated args to the instance to mimic the change
    # note that these might slightly differ from the true database values
    # as the DB could have been updated by another thread. callers should
    # retrieve a new copy of the object if up-to-date values are required
    for k, v in kwargs.iteritems():
        if isinstance(v, ExpressionNode):
            v = resolve_expression_node(instance, v)
        setattr(instance, k, v)

    # clean instance before update
    if full_clean:
        instance.full_clean()

    # fields that use auto_now=True should be updated corrected, too!
    for field in instance._meta.fields:
        if hasattr(field, 'auto_now') and field.auto_now and field.name not in kwargs:
            kwargs[field.name] = field.pre_save(instance, False)

    rows_affected = instance.__class__._default_manager.filter(
        pk=instance.pk).update(**kwargs)

    if post_save:
        signals.post_save.send(sender=instance.__class__, instance=instance)

    return rows_affected
1229992
def updateModel(self, X_all, Y_all, X_new, Y_new):
        
        self.X = X_all
        self.Y = Y_all
        if self.model is None:
            self._create_model(X_all, Y_all)
        else:
            self.model.fit(X_all, Y_all.flatten())
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;
}
591381
private boolean updateExistingObject(DBObject dbObj, Map<String, String> currScalarMap) {
        if (objectIsChangingShards(dbObj, currScalarMap)) {
            return updateShardedObjectMove(dbObj);
        } else {
            return updateObjectSameShard(dbObj, currScalarMap);
        }
    }
1068782
def update(self, instance, validated_data):
        """"""
        # `partitions` field is renamed to `relationpartition_set` based on source of nested serializer
        partitions = validated_data.pop('relationpartition_set', None)

        with transaction.atomic():
            instance = super().update(instance, validated_data)

            if partitions is not None:
                # TODO: Apply the diff instead of recreating all objects.
                instance.relationpartition_set.all().delete()
                self._create_partitions(instance, partitions)

        return instance
1030873
private ModelDescription getDescriptionFromObject(EDBObject obj) {
        String modelName = obj.getString(EDBConstants.MODEL_TYPE);
        String modelVersion = obj.getString(EDBConstants.MODEL_TYPE_VERSION);
        if (modelName == null || modelVersion == null) {
            throw new IllegalArgumentException("The object " + obj.getOID() + " contains no model information");
        }
        return new ModelDescription(modelName, modelVersion);
    }
827781
def update_registered_subject_from_model_on_post_save(sender, instance, raw, created, using, **kwargs):
    """"""
    if not raw and not kwargs.get('update_fields'):
        try:
            instance.registration_update_or_create()
        except AttributeError as e:
            if 'registration_update_or_create' not in str(e):
                raise AttributeError(str(e))
1130042
def update(self, iteration, fobj):
        """""""
        self.bst.update(self.dtrain, iteration, fobj)
903569
def update(self, instance, **kwargs):
        
        for index in self.model_to_indexes[instance.__class__]:
            if not index._doc_type.ignore_signals:
                index.update(instance, **kwargs)
27251
def update_model_dict(self):
        """"""
        dct = {}
        models = self.chimera.openModels
        for md in models.list():
            dct[md.name] = md.id
        self.model_dict = dct
1360201
private List<AdvancedModelWrapper> enhanceUpdates(List<AdvancedModelWrapper> updates,
            Map<Object, AdvancedModelWrapper> updated, EKBCommit commit) {
        List<AdvancedModelWrapper> additionalUpdates = new ArrayList<AdvancedModelWrapper>();
        for (AdvancedModelWrapper model : updates) {
            if (updated.containsKey(model.getCompleteModelOID())) {
                continue; // this model was already updated in this commit
            }
            if (model.isEngineeringObject()) {
                additionalUpdates.addAll(performEOModelUpdate(model.toEngineeringObject(), commit));
            }
            additionalUpdates.addAll(getReferenceBasedUpdates(model, updated, commit));
        }
        return additionalUpdates;
    }
241641
private void updateModelAccordingToDocker() {
        try {
            final ModelHelper modelHelper = new ModelHelper(context.getNodeName(), docker, factory);
            final ContainerRoot dockerModel = modelHelper.docker2model(modelService.getCurrentModel());
            modelService.update(dockerModel, e -> {
                if (e == null) {
                    Log.info("Model updated based on the local Docker engine configuration");
                } else {
                    Log.warn("Failed to update model based on the local Docker engine configuration", e);
                }
            });
        } catch (Exception e) {
            Log.warn("Failed to update model based on the local Docker engine configuration", e);
        }
    }
959178
def update(self, obj, size):
        '''
        '''
        self.number += 1
        self.total  += size
        if self.high < size:  # largest
           self.high = size
           try:  # prefer using weak ref
               self.objref, self.weak = Weakref.ref(obj), True
           except TypeError:
               self.objref, self.weak = obj, False
1314781
private ObjectResult updateObject(DBObject                          dbObj,
                                      Map<String, String>               currScalarMap,
                                      Map<String, Map<String, Integer>> targObjShardNos) {
        ObjectResult objResult = null;
        if (Utils.isEmpty(dbObj.getObjectID())) {
            objResult = ObjectResult.newErrorResult("Object ID is required", null);
        } else if (currScalarMap == null) {
            objResult = ObjectResult.newErrorResult("No object found", dbObj.getObjectID());
        } else {
            ObjectUpdater objUpdater = new ObjectUpdater(m_tableDef);
            if (targObjShardNos.size() > 0) {
                objUpdater.setTargetObjectShardNumbers(targObjShardNos);
            }
            objResult = objUpdater.updateObject(m_parentTran, dbObj, currScalarMap);
        }
        return objResult;
    }