Saves serializable fields of this instance to the persisted storage.

@since 1.245
170043
public void save() throws IOException {
        if(BulkChange.contains(this))   return;
        XmlFile config = getConfigXml();
        config.write(this);
        SaveableListener.fireOnChange(this, config);
    }
917246
public function persist(): void
    {
        foreach ($this->create() as $seed) {
            $this->seeder->persist($seed);
            $this->persistedSeeds++;
        }

        $this->seeder->flush();
    }
748262
public void saveToSetupBean() {

        Map<String, String[]> result = new HashMap<String, String[]>();

        CmsSetupBean bean = m_setupBean;
        if (m_dbCreateUser.isVisible()) {
            bean.setDbCreateUser(m_dbCreateUser.getValue());
        }
        if (m_dbCreatePwd.isVisible()) {
            bean.setDbCreatePwd(m_dbCreatePwd.getValue());
        }
        if (m_dbWorkUser.isVisible()) {
            bean.setDbWorkUser(m_dbWorkUser.getValue());
        }

        if (m_templateDb.isVisible()) {
            setDbProp("templateDb", m_templateDb.getValue());
        }

        if (m_dbWorkPwd.isVisible()) {
            bean.setDbWorkPwd(m_dbWorkPwd.getValue());
        }

        if (m_dbCreateConStr.isVisible()) {
            bean.setDbCreateConStr(m_dbCreateConStr.getValue());
        }

        if (m_dbName.isVisible()) {
            bean.setDb(m_dbName.getValue());
        }

        result.put("dbCreateConStr", new String[] {m_dbCreateConStr.getValue()});

        result.put("dbName", new String[] {bean.getDatabase()});
        result.put("dbProduct", new String[] {bean.getDatabase()});
        result.put("dbProvider", new String[] {"sql"});
        result.put("dbName", new String[] {m_dbName.getValue()});
        result.put("db", new String[] {bean.getDb()});
        result.put("createDb", new String[] {Boolean.toString(m_createDb.getValue().booleanValue())});
        result.put("createTables", new String[] {Boolean.toString(m_createTables.getValue().booleanValue())});
        result.put("jdbcDriver", new String[] {dbProp("driver")});
        result.put("templateDb", new String[] {dbProp("templateDb")});
        result.put("dbCreateUser", new String[] {bean.getDbCreateUser()});
        result.put("dbCreatePwd", new String[] {bean.getDbCreatePwd()});
        result.put("dbWorkUser", new String[] {bean.getDbWorkUser()});
        result.put("dbWorkPwd", new String[] {bean.getDbWorkPwd()});
        result.put("dbDefaultTablespace", new String[] {m_defaultTablespace.getValue()});
        result.put("dbTemporaryTablespace", new String[] {m_temporaryTablespace.getValue()});
        result.put("dbIndexTablespace", new String[] {m_indexTablespace.getValue()});
        // result.put("servletMapping", new String[] {getServeltMapping()});
        result.put("submit", new String[] {Boolean.TRUE.toString()});
        bean.setDbParamaters(result, bean.getDatabase(), null, null);

    }
734863
public function saveSettings()
    {
        $formValues = $this->getForm()->getValues();
        $settingStorage = $this->getSettingsStorage();

        $configValue = $formValues[self::SOURCE_RADIO_NAME];
        if ($configValue === 'list') {
            $sources = trim(str_replace("\r", '', $formValues[self::SOURCE_LIST_NAME]));
            $sources = explode("\n", $sources);
            $settingStorage->set(CspHeaderSettingsInterface::CSP_HEADER_LIST, json_encode($sources));
        }

        $settingStorage->set(CspHeaderSettingsInterface::CSP_HEADER_SETTING, $configValue);
    }
395615
protected function persist()
    {
        if (false === file_put_contents($this->filename, $this->serialize())) {
            // @codeCoverageIgnoreStart
            throw new RuntimeException('Unable to open file ' . $this->filename);
            // @codeCoverageIgnoreEnd
        }
    }
691334
public function save()
    {
        $lifetime = $this->_params['lifetime'];

        foreach ($this->_update as $mbox => $val) {
            $s = &$this->_slicemap[$mbox];

            try {
                if (!empty($val['add'])) {
                    if ($s['c'] <= $this->_params['slicesize']) {
                        $val['slice'][] = $s['i'];
                        $this->_loadSlice($mbox, $s['i']);
                    }
                    $val['slicemap'] = true;

                    foreach (array_keys(array_flip($val['add'])) as $uid) {
                        if ($s['c']++ > $this->_params['slicesize']) {
                            $s['c'] = 0;
                            $val['slice'][] = ++$s['i'];
                            $this->_loadSlice($mbox, $s['i']);
                        }
                        $s['s'][$uid] = $s['i'];
                    }
                }

                if (!empty($val['slice'])) {
                    $d = &$this->_data[$mbox];
                    $val['slicemap'] = true;

                    foreach (array_keys(array_flip($val['slice'])) as $slice) {
                        $data = array();
                        foreach (array_keys($s['s'], $slice) as $uid) {
                            $data[$uid] = is_array($d[$uid])
                                ? serialize($d[$uid])
                                : $d[$uid];
                        }
                        $this->_cache->set($this->_getCid($mbox, $slice), serialize($data), $lifetime);
                    }
                }

                if (!empty($val['slicemap'])) {
                    $this->_cache->set($this->_getCid($mbox, 'slicemap'), serialize($s), $lifetime);
                }
            } catch (Horde_Exception $e) {
            }
        }

        $this->_update = array();
    }
1126147
protected function persist()
    {
        /**
         * @var IObject $object
         */
        foreach ($this->newObjects as $object) {
            $object->getCollection()
                ->persistNewObject($object);

            /**
             * @var ICalculableProperty[] $calculableProperties
             */
            $calculableProperties = [];
            foreach ($object->getAllProperties() as $property) {
                if (!$property->getIsModified() && $property instanceof ICalculableProperty) {
                    $calculableProperties[] = $property;
                }
            }

            $this->getObjectManager()
                ->storeNewObject($object);

            foreach ($calculableProperties as $property) {
                $property->recalculate();
            }
        }

        foreach ($this->relatedObjects as $object) {
            $this->restoreObjectRelations($object, $this->relatedObjects->getInfo());
        }

        foreach ($this->modifiedObjects as $object) {
            $object->getCollection()
                ->persistModifiedObject($object);
        }

        foreach ($this->deletedObjects as $object) {
            $object->getCollection()
                ->persistDeletedObject($object);
        }

        foreach ($this->modifiedObjects as $object) {
            $object->setIsConsistent();
        }

        $this->unloadStorageObjects($this->deletedObjects);
        $this->clearObjectsState();
    }
1043002
public function save()
    {
        $data = $this->getData();
        if (!$this->currentId)
        {
            $config = $this->config();
            $config->last_id++;

            $this->setField('id', $config->last_id);
            array_push($data, $this->set);

            Helpers\Config::table($this->name)->put($config);
        }
        else
        {
            $this->setField('id', $this->currentId);
            $data[$this->currentKey] = $this->set;
        }

        Helpers\Data::table($this->name)->put($data);

//         $this->setFields();
    }
541517
private void saveProperties() {
		assert Thread.holdsLock(properties);
		try {
			// Create a properties instance that sorts the output by keys (case-insensitive)
			Properties writer = new Properties() {
				private static final long serialVersionUID = 6953022173340009928L;
				@Override
				public Enumeration<Object> keys() {
					SortedSet<Object> sortedSet = new TreeSet<>(Collator.getInstance(Locale.ROOT));
					Enumeration<Object> e = super.keys();
					while(e.hasMoreElements()) sortedSet.add(e.nextElement());
					return Collections.enumeration(sortedSet);
				}
			};
			writer.putAll(properties);
			File tmpFile = File.createTempFile("ApplicationResources", null, sourceFile.getParentFile());
			OutputStream out = new BufferedOutputStream(new FileOutputStream(tmpFile));
			try {
				// Write any comments from when file was read
				if(sourceFileComments!=null) {
					for(String line : sourceFileComments) {
						out.write(line.getBytes(propertiesCharset));
						out.write(EOL.getBytes(propertiesCharset));
					}
				}
				// Wrap to skip any comments generated by Properties code
				out = new SkipCommentsFilterOutputStream(out);
				writer.store(out, null);
			} finally {
				out.close();
			}
			FileUtils.renameAllowNonAtomic(tmpFile, sourceFile);
		} catch(IOException err) {
			throw new RuntimeException(err);
		}
	}
52352
def save(self):
        
        assert self.__class__ in conf.config._registry,\
            '%(class_name)s is not registered' % {
                'class_name': self.__class__.__name__
            }

        ConfigModel = apps.get_model('djconfig.Config')

        for field_name, value in self.cleaned_data.items():
            value = utils.serialize(
                value=value,
                field=self.fields.get(field_name, None))
            # TODO: use update_or_create
            count = (ConfigModel.objects
                .filter(key=field_name)
                .update(value=value))
            if not count:
                ConfigModel.objects.create(
                    key=field_name,
                    value=value)

        count = (ConfigModel.objects
            .filter(key='_updated_at')
            .update(value=str(timezone.now())))
        if not count:
            ConfigModel.objects.create(
                key='_updated_at',
                value=str(timezone.now()))

        conf.config._reload()
437332
public function save()
    {
        $host = $this;
        array_map(function ($value) use ($host) {
            $host->saveSubset($value);
        }, $this->fileBasedSubsets);
    }
1298318
public function saveModelInternal()
    {
        // Purge the field values from the attributes
        $this->model->attributes = array_diff_key($this->model->attributes, $this->fieldValues);
    }
1352889
def save(self):
        
        saved = 0
        if not self.objects:
            raise BatchError("Save failed. Batch is empty")
        for deserialized_tx in self.objects:
            try:
                self.model.objects.get(pk=deserialized_tx.pk)
            except self.model.DoesNotExist:
                data = {}
                for field in self.model._meta.get_fields():
                    try:
                        data.update({field.name: getattr(deserialized_tx, field.name)})
                    except AttributeError:
                        pass
                self.model.objects.create(**data)
                saved += 1
        return saved
1267495
@Override
    protected void saveBeans(List<ProxyActionStatus> addedBeans, List<ProxyActionStatus> modifiedBeans,
            List<ProxyActionStatus> removedBeans) {
        // CRUD operations on Target will be done through repository methods
    }
930933
protected function saveNewBinding()
    {
        $modified_properties = $this->getModifiedProperties();

        if (count($modified_properties) === 0) {
            return;
        }

        $fields = array();
        $values = array();

        foreach ($this->getModifiedProperties() as $name => $value) {
            $type = $this->guessType($name, $value);
            $fields[] = sprintf('%s:%s', $type, $name);
            $values[$name] = $value;
        }

        SwatDB::insertRow($this->db, $this->table, $fields, $values);
        $this->flushCacheNamespaces();
    }
767006
public function save() {
    if ($this->id != self::NO_CACHE) {
      $cache = ObjectFactory::getInstance('staticCache');
      $cache->put(self::getCacheSection($this->type), self::getCacheId($this->id), $this);
    }
  }
675950
def save
      raise EntityModelIsNotPersistedError unless entity.persisted?

      if persisted?
        return false unless changed?
        update
      else
        create
      end

      @previously_changed = changes
      @changed_attributes.clear

      true
    end