Saves all data on the WilddogObject back to Wilddog.
@returns a promise which will resolve after the save is completed.
182743
function () {
          var self = this;
          var ref = self.$ref();
          var data = $wilddogUtils.toJSON(self);
          return $wilddogUtils.doSet(ref, data).then(function() {
            self.$$notify();
            return self.$ref();
          });
        }
558651
final public boolean save() {
		Transaction t = new Transaction();
		try {
			t.setSuccessful(save(t));
		} finally {
			t.finish();
		}
		return t.isSuccessful();
	}
363203
public function save()
    {
        event(new BeforeSave($this));

        $this->beforeSave();

        $this->doSave();

        $this->afterSave();

        event(new AfterSave($this));
    }
851468
function saveData(data) {
    console.log('saving data', data);
    if (options.cacheKeys) {
      cachedKeys = Object.keys(data);
    }
    if (file === false) {
      return Promise.resolve();
    } else {
      return writeFile(file, JSON.stringify(data, null, 2));
    }
  }
584596
public function save() {
        if (!$this->isPersistent()) {
            $this->dao()->transaction(function() {
                if ($this->beforeSave() !== true)               // pre-processing hook
                    return $this;
                $this->insert();
                $this->afterSave();                             // post-processing hook
            });
        }
        elseif ($this->isModified()) {
            $this->dao()->transaction(function() {
                if ($this->beforeSave() !== true)               // pre-processing hook
                    return $this;
                $this->update();
                $this->afterSave();                             // post-processing hook
            });
        }
        else {
            // persistent but not modified
        }
        return $this;
    }
206761
public function save()
    {
        $deferred = new Deferred();

        $this->http->patch('users/@me', $this->getUpdatableAttributes())->then(
            \React\Partial\bind_right($this->resolve, $deferred),
            \React\Partial\bind_right($this->reject, $deferred)
        );

        return $deferred->promise();
    }
585614
function() {
		var that = this;
		return new Promise(function(resolve, reject) {
			that.resolve(function(err, val) {
				if (err) {
					reject(err);
				} else {
					resolve(val);
				}
			});
		});
	}
414219
public synchronized void save() {
        SharedPreferences prefs = loadSharedPreferences("object");

        if (find(getId()) == null) {
            addObject();

            modelListenerHandler.execOnUpdateListeners(this, OnUpdateListener.Status.CREATED);

            if (cache && cachedObjects != null) {
                cachedObjects.add((T) this);
            }
        } else {
            modelListenerHandler.execOnUpdateListeners(this, OnUpdateListener.Status.UPDATED);
        }

        prefs.edit().putString(String.valueOf(getId()), toJson().toString()).commit();
    }
1092021
function (newData) {
            var result = new $.Deferred();
            var path = this.path;
            var prefFile = FileSystem.getFileForPath(path);

            if (path) {
                try {
                    var text = JSON.stringify(newData, null, 4);

                    // maintain the original line endings
                    text = FileUtils.translateLineEndings(text, this._lineEndings);
                    prefFile.write(text, {}, function (err) {
                        if (err) {
                            result.reject("Unable to save prefs at " + path + " " + err);
                        } else {
                            result.resolve();
                        }
                    });
                } catch (e) {
                    result.reject("Unable to convert prefs to JSON" + e.toString());
                }
            } else {
                result.resolve();
            }
            return result.promise();
        }
1199544
function (next) {
        data = _.isObject(data) ? _.values(data) : data;
        DBActions.getSimpleInstance(app, schema).multipleSave(data, function (err, results) {
            handleSave(err, results, next);
        });
    }
736407
def save(self):
        
        if self.path.is_collection:
            self.session.post_json(self.href,
                                   {self.type: dict(self.data)},
                                   cls=ResourceEncoder)
        else:
            self.session.put_json(self.href,
                                  {self.type: dict(self.data)},
                                  cls=ResourceEncoder)
        return self.fetch(exclude_children=True, exclude_back_refs=True)
1276438
function() {
			if(!this.model.root) {
				return new Deferred().resolve(true);
			}
			var modelList = this.model.root.children || this.model.root.Children;
			if(!modelList) {
				return new Deferred().resolve(true);
			}
			var isDirty = modelList.some( function(child) {
				if(child.children && child.children.length === 1 && child.children[0].resourceComparer && child.children[0].resourceComparer.isDirty()) {
					return true;
				}
			});
			if(isDirty) {
				var dialog = this.registry.getService("orion.page.dialog");
				var d = new Deferred();
				dialog.confirm(messages.confirmUnsavedChanges, function(result){
					if(result){
						var promises = [];
						modelList.forEach( function(child) {
							if(child.children && child.children.length === 1 && child.children[0].resourceComparer && child.children[0].resourceComparer.isDirty() && child.children[0].resourceComparer.save) {
								promises.push(child.children[0].resourceComparer.save(true));
							}
						});				
						return d.resolve(Deferred.all(promises));
					}else{
						return d.resolve();
					}
				});
				return d;
			} else {
				return new Deferred().resolve(true);
			}
		}
303488
@Override
    public void save(T object, AccessControlContext accessControlContext)
            throws OptimisticLockException, AccessControlException, JeppettoException {
        ensureAccessControlEnabled();

        try {
            AccessControlContextOverride.set(accessControlContext);

            getCurrentSession().saveOrUpdate(object);

            // flush() here because we want the AccessControlInterceptor to perform its onSave()/onFlushDirty()
            // checks while the override is in place.
            flush();
        } catch (org.hibernate.OptimisticLockException e) {
            throw new OptimisticLockException(e);
        } catch (HibernateException e) {
            throw new JeppettoException(e);
        } finally {
            AccessControlContextOverride.clear();
        }
    }
203478
function buildAsyncSaveFun(_this, _oldSave, _promise, _oldPromise) {
    return function() {

      // swap promises so save behaves like it has been called during the original call.
      var currentPromise = _this.$promise;
      _this.$promise = _oldPromise;

      // when save resolves, the timeout promise is resolved and the last resource promise returned
      // so it behaves
      _oldSave.call(_this).$promise.then(
        function(_data) {
          _promise.resolve(_data);
          _this.$promise = currentPromise;
        }, function(_reason) {
          _promise.reject(_reason);
          _this.$promise = currentPromise;
        }
      );

      _this.$dmStatus = null;
    };
  }
115517
public synchronized void save() {
		if( bestImage != null ) {
			File path = new File(outputDirectory, String.format("image%04d.png",imageNumber));
			UtilImageIO.saveImage(bestImage,path.getAbsolutePath());
			imageNumber++;
		}
		clearHistory();
	}
323412
function () {
            var result = new $.Deferred();
            this.storage.load()
                .then(function (data) {
                    var oldKeys = this.getKeys();
                    this.data = data;
                    result.resolve();
                    this.trigger(PREFERENCE_CHANGE, {
                        ids: _.union(this.getKeys(), oldKeys)
                    });
                }.bind(this))
                .fail(function (error) {
                    result.reject(error);
                });
            return result.promise();
        }
886052
final public void saveAsync(final OnSavedCallback callback) {
		new AsyncTask<Model, Void, Boolean>() {

			protected Boolean doInBackground(Model... params) {
				return params[0].save();
			}

			protected void onPostExecute(Boolean result) {
				if (result && callback != null) {
					callback.onSaved();
				}
			}

		}.execute(this);
	}