Saves changes made to the locally cached SecurityDocument object's data
        structures to the remote database.
960211
def save(self):
        
        resp = self.r_session.put(
            self.document_url,
            data=self.json(),
            headers={'Content-Type': 'application/json'}
        )
        resp.raise_for_status()
588101
public void save() {
        SC.ask("Do you want to save changes", new BooleanCallback() {
            @Override
            public void execute(Boolean yesSelected) {
                if (yesSelected) {
                    jcrService().save(repository(), workspace(), new BaseCallback<Object>() {
                            @Override
                            public void onSuccess(Object result) {
                                session().setHasChanges(false);
                                updateControls();
                            }
                    });
                }
            }
        });
    }
443014
def _save(self) -> RunSummary:
        
        assert self.summary["run"] is not None, "Must have called process before"

        trace_frames = self.bulk_saver.get_items_to_add(TraceFrame)
        log.info(
            "Saving %d issues, %d trace frames, %d trace annotations",
            len(self.bulk_saver.get_items_to_add(Issue)),
            len(self.bulk_saver.get_items_to_add(TraceFrame)),
            len(self.bulk_saver.get_items_to_add(TraceFrameAnnotation)),
        )

        num_pre = 0
        num_post = 0
        for frame in trace_frames:
            if frame.kind == TraceKind.PRECONDITION:
                num_pre += 1
            elif frame.kind == TraceKind.POSTCONDITION:
                num_post += 1
        log.info(
            "Within trace frames: %d preconditions, %d postconditions",
            num_pre,
            num_post,
        )

        with self.database.make_session() as session:
            pk_gen = self.primary_key_generator.reserve(
                session, [Run], use_lock=self.use_lock
            )
            self.summary["run"].id.resolve(id=pk_gen.get(Run), is_new=True)
            session.add(self.summary["run"])
            session.commit()

            run_id = self.summary["run"].id.resolved()
            self.summary["run"] = None  # Invalidate it

        self.bulk_saver.save_all(self.database, self.use_lock)

        # Now that the run is finished, fetch it from the DB again and set its
        # status to FINISHED.
        with self.database.make_session() as session:
            run = session.query(self.RUN_MODEL).filter_by(id=run_id).one()
            run.status = RunStatus.FINISHED
            session.add(run)
            session.commit()
            run_summary = run.get_summary()

        run_summary.num_invisible_issues = 0
        run_summary.num_missing_preconditions = len(
            self.summary["missing_preconditions"]
        )
        run_summary.num_missing_postconditions = len(
            self.summary["missing_postconditions"]
        )

        return run_summary
309454
def save(self):
        

        # TODO: Add option force_insert

        if not self.is_loaded and self.id is None or self.id == '':
            data = self.resource.post(data=self.data, collection=self.collection)
            self.id = data['_id']
            self.key = data['_key']
            self.revision = data['_rev']
            self.is_loaded = True
        else:
            data = self.resource(self.id).patch(data=self.data)
            self.revision = data['_rev']
508741
def save(self, commit=True):
        """"""

        # walk through the document fields
        for field_name, field in iter_valid_fields(self._meta):
            setattr(self.instance, field_name, self.cleaned_data.get(field_name))

        if commit:
            self.instance.save()

        return self.instance
111274
function saveResolvedLocalsInData() {
    var localNames = previousOrParentNode.tNode.localNames;
    if (localNames) {
        for (var i = 0; i < localNames.length; i += 2) {
            var index = localNames[i + 1];
            var value = index === -1 ? previousOrParentNode.native : directives[index];
            viewData.push(value);
        }
    }
}
56104
@Override
  public <T> void save(Object objectToSave, String collectionName) {
    if (null == objectToSave) {
      throw new InvalidJsonDbApiUsageException("Null Object cannot be updated into DB");
    }
    Util.ensureNotRestricted(objectToSave);
    Object objToSave = Util.deepCopy(objectToSave);
    CollectionMetaData collectionMeta = cmdMap.get(collectionName);
    collectionMeta.getCollectionLock().writeLock().lock();
    try {
      @SuppressWarnings("unchecked")
      Map<Object, T> collection = (Map<Object, T>) collectionsRef.get().get(collectionName);
      if (null == collection) {
        throw new InvalidJsonDbApiUsageException("Collection by name '" + collectionName + "' not found. Create collection first.");
      }

      CollectionMetaData cmd = cmdMap.get(collectionName);
      Object id = Util.getIdForEntity(objToSave, cmd.getIdAnnotatedFieldGetterMethod());

      T existingObject = collection.get(id);
      if (null == existingObject) {
        throw new InvalidJsonDbApiUsageException(
            String.format("Document with Id: '%s' not found in Collection by name '%s' not found. Insert or Upsert the object first.",
                id, collectionName));
      }
      if(encrypted && cmd.hasSecret()){
        CryptoUtil.encryptFields(objToSave, cmd, dbConfig.getCipher());
      }
      JsonWriter jw = null;
      try {
        jw = new JsonWriter(dbConfig, cmd, collectionName, fileObjectsRef.get().get(collectionName));
      } catch (IOException ioe) {
        logger.error("Failed to obtain writer for " + collectionName, ioe);
        throw new JsonDBException("Failed to save " + collectionName, ioe);
      }
      @SuppressWarnings("unchecked")
      boolean updateResult = jw.updateInJsonFile(collection, id, (T)objToSave);
      if (updateResult) {
        @SuppressWarnings("unchecked")
        T newObject = (T) objToSave;
        collection.put(id, newObject);
      }
    } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
      logger.error("Error when encrypting value for a @Secret annotated field for entity: " + collectionName, e);
      throw new JsonDBException("Error when encrypting value for a @Secret annotated field for entity: " + collectionName, e);
    } finally {
      collectionMeta.getCollectionLock().writeLock().unlock();
    }
  }
1121761
def save
      __robject.content_type = model.content_type
      __robject.data = __persist_attributes

      __check_unique_indices
      __update_indices
      __robject.store

      @id = __robject.key

      self
    end
113410
async def save(self, db):
        
        kwargs = {}
        for col in self._auto_columns:
            if not self.has_real_data(col.name):
                kwargs[col.name] = await col.auto_generate(db, self)
        self.__dict__.update(kwargs)

        # we have to delete the old index key
        stale_object = await self.__class__.load(db, identifier=self.identifier())
        d = {
            k: (v.strftime(DATETIME_FORMAT) if isinstance(v, datetime) else v)
            for k, v in self.__dict__.items()
        }
        success = await db.hmset_dict(self.redis_key(), d)
        await self.save_index(db, stale_object=stale_object)
        return success
762102
public void restore(CachedObject object) {

        writeLock.lock();

        try {
            int i = object.getPos();

            cache.put(i, object);

            // was previously used for text tables
            if (storeOnInsert) {
                saveRow(object);
            }
        } finally {
            writeLock.unlock();
        }
    }
661505
def update_cached_fields_pre_save(self, update_fields: list):
        
        if self.id and update_fields is None:
            self.update_cached_fields(commit=False, exceptions=False)
521705
def save(self, filename, garbage=0, clean=0, deflate=0, incremental=0, ascii=0, expand=0, linear=0, pretty=0, decrypt=1):
        """"""

        if self.isClosed or self.isEncrypted:
            raise ValueError("operation illegal for closed / encrypted doc")
        if type(filename) == str:
            pass
        elif type(filename) == unicode:
            filename = filename.encode('utf8')
        else:
            raise TypeError("filename must be a string")
        if filename == self.name and not incremental:
            raise ValueError("save to original must be incremental")
        if self.pageCount < 1:
            raise ValueError("cannot save with zero pages")
        if incremental:
            if self.name != filename or self.stream:
                raise ValueError("incremental needs original file")


        return _fitz.Document_save(self, filename, garbage, clean, deflate, incremental, ascii, expand, linear, pretty, decrypt)
94840
def save(self, *args, **kwargs):
        '''
        '''
        if not self.term in self.DCELEMENT_CODE_MAP:
            raise ValueError('Extended Dublin Core Terms such as '+self.DCTERM_CODE_MAP[self.term]+' are not allowed. Please use only Dublin Core Elements')
        #HOW TO TELL IF OBJECT CHANGED? RETRIEVE FROM DB and COMPARE
        changed = False
        if self.pk:# existing object
            db_self = QualifiedDublinCoreElement.objects.get(pk=self.pk)
            #compare values, if changed set changed!
            if self.term != db_self.term:
                raise ValueError('Can not change DC element')
            if self.content != db_self.content:
                changed = True
            if self.qualifier != db_self.qualifier:
                changed = True
            if changed:
                hist = QualifiedDublinCoreElementHistory()
                hist.qdce = self
                hist.object_id = db_self.object_id
                hist.content_type = db_self.content_type
                hist.term = db_self.term
                hist.qualifier = db_self.qualifier
                hist.content  = db_self.content
                hist.save()
        super(QualifiedDublinCoreElement, self).save(*args, **kwargs)
        obj = self.content_object
        if hasattr(obj, '_save_dc_xml_file'):
            obj._save_dc_xml_file()
1007036
def save(self, x509):
        """"""

        self.x509 = x509
        with open_tls_file(self.file_path, 'w',
                           private=self.is_private()) as fh:
            fh.write(str(self))
509509
def save_load(jid, load, minions=None):
    '''
    
    '''
    conn, mdb = _get_conn(ret=None)
    to_save = _safe_copy(load)

    if PYMONGO_VERSION > _LooseVersion('2.3'):
        #using .copy() to ensure original data for load is unchanged
        mdb.jobs.insert_one(to_save)
    else:
        mdb.jobs.insert(to_save)
1094743
def save(self):
        
        body = {'ip_address': {'ptr_record': self.ptr_record}}
        data = self.cloud_manager.request('PUT', '/ip_address/' + self.address, body)
        self._reset(**data['ip_address'])
692003
private RootDocument save(final Root root) {
        final RootDocumentMongo rootdoc =
                (RootDocumentMongo) toDocConverter.createGedDocument(root);
        try {
            repositoryManager.getRootDocumentRepository().save(rootdoc);
        } catch (DataAccessException e) {
            logger.error("Could not save root: " + root.getDbName(), e);
            return null;
        }
        return rootdoc;
    }