SaveOldProperties Method.
773517
public void saveOldProperties(Map<String,String> oldProperties, Record record)
    {
        this.saveOldProperty(oldProperties, record.getDatabaseName() + BaseDatabase.DBSHARED_PARAM_SUFFIX);
        this.saveOldProperty(oldProperties, record.getDatabaseName() + BaseDatabase.DBUSER_PARAM_SUFFIX);
        this.saveOldProperty(oldProperties, DBConstants.DB_USER_PREFIX);
        this.saveOldProperty(oldProperties, DBConstants.SYSTEM_NAME);
        this.saveOldProperty(oldProperties, DBParams.LANGUAGE);
    }
1086904
protected function saveInternalProperties()
    {
        foreach ($this->internal_property_autosave as $name => $autosave) {
            if ($autosave && $this->hasSubDataObject($name)) {
                $object = $this->getSubDataObject($name);
                $object->save();
                $this->setInternalValue($name, $object->getId());
            }
        }
    }
110582
def _clone_properties(self):
    """"""
    cls = self.__class__
    if self._properties is cls._properties:
      self._properties = dict(cls._properties)
197118
public synchronized void persistProperties(Properties properties, File propsFile, String message) {
    Properties toWrite = new Properties();
    for(String key : properties.stringPropertyNames()) {

      if(System.getProperties().containsKey(key) && !properties.getProperty(key).equals(System.getProperty(key))) {

        toWrite.setProperty(key, properties.getProperty(key));
      } 
      else if(System.getenv().containsKey(key) && !properties.getProperty(key).equals(System.getenv(key))) {

        toWrite.setProperty(key, properties.getProperty(key));
      } 
      else if(!System.getProperties().containsKey(key) && !System.getenv().containsKey(key)){

        toWrite.setProperty(key, properties.getProperty(key));
      }
    }
    writer.persistProperties(toWrite, propsFile, message, log);
  }
124057
public void saveProperties(CmsParameterConfiguration properties, String file, boolean backup) {

        if (new File(m_configRfsPath + file).isFile()) {
            String backupFile = file + CmsConfigurationManager.POSTFIX_ORI;
            String tempFile = file + ".tmp";

            m_errors.clear();

            if (backup) {
                // make a backup copy
                copyFile(file, FOLDER_BACKUP + backupFile);
            }

            //save to temporary file
            copyFile(file, tempFile);

            // save properties
            save(properties, tempFile, file, null);

            // delete temp file
            File temp = new File(m_configRfsPath + tempFile);
            temp.delete();
        } else {
            m_errors.add("No valid file: " + file + "\n");
        }

    }
1362211
@SuppressWarnings("unchecked")
  @GwtIncompatible("ObjectOutputStream")
  public void saveContents(ObjectOutputStream out) throws IOException {
    out.writeObject(eachRefTypeIndexedByProperty);
    out.writeObject(interfaceToImplementors);
    out.writeObject(typesIndexedByProperty);
  }
670635
private void persistRealmChanges() {
    configManager.persistProperties(realm.getProperties(), new File(applicationContentDir, PersistablePropertiesRealm.REALM_FILE_NAME), null);
  }
803195
def save(self):
        """"""
        self.write(self.term.save)
        self._saved = True
888528
def _save(self, objects, old_pos, new_pos):
        """"""
        to_shift = objects.exclude(pk=self.pk) if self.pk else objects

        # If not set, insert at end.
        if self.sort_order is None:
            self._move_to_end(objects)

        # New insert.
        elif not self.pk and not old_pos:
            # Increment `sort_order` on objects with:
            #     sort_order > new_pos.
            to_shift = to_shift.filter(sort_order__gte=self.sort_order)
            self._update(to_shift)
            self.sort_order = new_pos

        # self.sort_order decreased.
        elif old_pos and new_pos < old_pos:
            self._move_to_end(objects)
            super(Orderable, self).save()
            # Increment `sort_order` on objects with:
            #     sort_order >= new_pos and sort_order < old_pos
            to_shift = to_shift.filter(sort_order__gte=new_pos, sort_order__lt=old_pos)
            self._update(to_shift)
            self.sort_order = new_pos

        # self.sort_order increased.
        elif old_pos and new_pos > old_pos:
            self._move_to_end(objects)
            super(Orderable, self).save()
            # Decrement sort_order on objects with:
            #     sort_order <= new_pos and sort_order > old_pos.
            to_shift = to_shift.filter(sort_order__lte=new_pos, sort_order__gt=old_pos)
            to_shift.update(sort_order=models.F('sort_order') - 1)
            self.sort_order = new_pos
625942
@Override
     public boolean saveProperties(String servicePid, Dictionary<String, String> properties)
     {
         try {
             if (servicePid != null)
             {
                 ServiceReference caRef = bundleContext.getServiceReference(ConfigurationAdmin.class.getName());
                 if (caRef != null)
                 {
                     ConfigurationAdmin configAdmin = (ConfigurationAdmin)bundleContext.getService(caRef);
                     Configuration config = configAdmin.getConfiguration(servicePid);
    
                     config.update(properties);
                     return true;
                 }
             }
         } catch (IOException e) {
             e.printStackTrace();
         }
         return false;
     }
647074
private void saveLocalization() {

        SortedProperties localization = new SortedProperties();
        for (Object itemId : m_container.getItemIds()) {
            Item item = m_container.getItem(itemId);
            String key = item.getItemProperty(TableProperty.KEY).getValue().toString();
            String value = item.getItemProperty(TableProperty.TRANSLATION).getValue().toString();
            if (!(key.isEmpty() || value.isEmpty())) {
                localization.put(key, value);
            }
        }
        m_keyset.updateKeySet(m_localizations.get(m_locale).keySet(), localization.keySet());
        m_localizations.put(m_locale, localization);

    }
236341
def save(self):
        """"""
        if self.save_option == 'curdir':
            model_path = os.path.join(
                os.getcwd(),
                '{}.lcopt'.format(self.name)
            )
        else: # default to appdir
            model_path = os.path.join(
                storage.model_dir,
                '{}.lcopt'.format(self.name)
            )
        
        model_path = fix_mac_path_escapes(model_path)

        with open(model_path, 'wb') as model_file:
            pickle.dump(self, model_file)
145577
private void saveToPropertyVfsBundle() throws CmsException {

        for (Locale l : m_changedTranslations) {
            SortedProperties props = m_localizations.get(l);
            LockedFile f = m_lockedBundleFiles.get(l);
            if ((null != props) && (null != f)) {
                try {
                    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
                    Writer writer = new OutputStreamWriter(outputStream, f.getEncoding());
                    props.store(writer, null);
                    byte[] contentBytes = outputStream.toByteArray();
                    CmsFile file = f.getFile();
                    file.setContents(contentBytes);
                    String contentEncodingProperty = m_cms.readPropertyObject(
                        file,
                        CmsPropertyDefinition.PROPERTY_CONTENT_ENCODING,
                        false).getValue();
                    if ((null == contentEncodingProperty) || !contentEncodingProperty.equals(f.getEncoding())) {
                        m_cms.writePropertyObject(
                            m_cms.getSitePath(file),
                            new CmsProperty(
                                CmsPropertyDefinition.PROPERTY_CONTENT_ENCODING,
                                f.getEncoding(),
                                f.getEncoding()));
                    }
                    m_cms.writeFile(file);
                } catch (IOException e) {
                    LOG.error(
                        Messages.get().getBundle().key(
                            Messages.ERR_READING_FILE_UNSUPPORTED_ENCODING_2,
                            f.getFile().getRootPath(),
                            f.getEncoding()),
                        e);

                }
            }
        }
    }
1098172
private void saveProperties(String resourcePath, Map<String, String> properties) throws CmsException {

        CmsResource resource;
        CmsObject cms = getCmsObject();
        int pos = resourcePath.indexOf("?");
        String resName = resourcePath;
        if (pos > -1) {
            resName = resourcePath.substring(0, pos);
        }
        resource = cms.readResource(resName);

        if (properties != null) {
            for (Entry<String, String> entry : properties.entrySet()) {
                String propertyName = entry.getKey();
                String propertyValue = entry.getValue();
                if (CmsStringUtil.isEmptyOrWhitespaceOnly(propertyValue)) {
                    propertyValue = "";
                }
                try {
                    CmsProperty currentProperty = cms.readPropertyObject(resource, propertyName, false);
                    // detect if property is a null property or not
                    if (currentProperty.isNullProperty()) {
                        // create new property object and set key and value
                        currentProperty = new CmsProperty();
                        currentProperty.setName(propertyName);
                        if (OpenCms.getWorkplaceManager().isDefaultPropertiesOnStructure()) {
                            // set structure value
                            currentProperty.setStructureValue(propertyValue);
                            currentProperty.setResourceValue(null);
                        } else {
                            // set resource value
                            currentProperty.setStructureValue(null);
                            currentProperty.setResourceValue(propertyValue);
                        }
                    } else if (currentProperty.getStructureValue() != null) {
                        // structure value has to be updated
                        currentProperty.setStructureValue(propertyValue);
                        currentProperty.setResourceValue(null);
                    } else {
                        // resource value has to be updated
                        currentProperty.setStructureValue(null);
                        currentProperty.setResourceValue(propertyValue);
                    }
                    CmsLock lock = cms.getLock(resource);
                    if (lock.isUnlocked()) {
                        // lock resource before operation
                        cms.lockResource(resName);
                    }
                    // write the property to the resource
                    cms.writePropertyObject(resName, currentProperty);
                    // unlock the resource
                    cms.unlockResource(resName);
                } catch (CmsException e) {
                    // writing the property failed, log error
                    log(e.getLocalizedMessage());
                }
            }
        }
    }
995683
def save_partial(self, obj):
        """"""
        self.save_reduce(_genpartial, (obj.func, obj.args, obj.keywords))
542297
public void saveValue()
    {
        PropertyOwner pRegistration = this.retrieveUserProperties();
        if (pRegistration != null) if (pRegistration instanceof UserProperties)
            ((UserProperties)pRegistration).saveField(this.getOwner());
    }
1164125
function copyOwnProperties(dst, src) {
  for (var prop in src) {
    if (src.hasOwnProperty(prop)) {
      dst[prop] = src[prop];
    }
  }
}