Get update service

@return EntityUpdateService
501261
public function getUpdateService()
    {
        if (null == $this->updateService) {
            $this->setUpdateService(
                new EntityUpdateService($this->getNewEntity())
            );
        }
        return $this->updateService;
    }
223868
protected function _getUpdateMethod()
    {
        // Caches the result
        if ($this->updateMethod === null) {
            if ($this->localFile !== null) {
                $this->updateMethod = self::UPDATE_LOCAL;
            } elseif (ini_get('allow_url_fopen') && function_exists('file_get_contents')) {
                $this->updateMethod = self::UPDATE_FOPEN;
            } elseif (function_exists('fsockopen')) {
                $this->updateMethod = self::UPDATE_FSOCKOPEN;
            } elseif (extension_loaded('curl')) {
                $this->updateMethod = self::UPDATE_CURL;
            } else {
                $this->updateMethod = false;
            }
        }

        return $this->updateMethod;
    }
134759
public function update() {
		$message = new CRUDMessage ( "Modifications were successfully saved", "Updating" );
		$instance = $_SESSION ["instance"] ?? null;
		if (isset ( $instance )) {
			$isNew = $instance->_new;
			try {
				$updated = CRUDHelper::update ( $instance, $_POST );
				if ($updated) {
					$message->setType ( "success" )->setIcon ( "check circle outline" );
					$message = $this->_getEvents ()->onSuccessUpdateMessage ( $message, $instance );
					$this->refreshInstance ( $instance, $isNew );
				} else {
					$message->setMessage ( "An error has occurred. Can not save changes." )->setType ( "error" )->setIcon ( "warning circle" );
					$message = $this->_getEvents ()->onErrorUpdateMessage ( $message, $instance );
				}
			} catch ( \Exception $e ) {
				$instanceString = $this->getInstanceToString ( $instance );
				$message = new CRUDMessage ( "Exception : can not update `" . $instanceString . "`", "Exception", "warning", "warning" );
				$message = $this->_getEvents ()->onErrorUpdateMessage ( $message, $instance );
			}
			echo $this->_showSimpleMessage ( $message, "updateMsg" );
			echo $this->jquery->compile ( $this->view );
			return $instance;
		} else {
			throw new \Exception ( '$_SESSION["instance"] is null' );
		}
	}
573033
private function getSQLForUpdate()
    {
        $table = $this->sqlParts['from']['table'] . ($this->sqlParts['from']['alias'] ? ' ' . $this->sqlParts['from']['alias'] : '');

        return 'UPDATE ' . $table
            . ' SET ' . implode(', ', $this->sqlParts['set'])
            . ($this->sqlParts['where'] !== null ? ' WHERE ' . ((string) $this->sqlParts['where']) : '');
    }
1343275
protected function processUpdates() {
    $updatedOids = [];
    $updateOids = array_keys($this->dirtyObjects);
    while (sizeof($updateOids) > 0) {
      $key = array_shift($updateOids);
      if (self::$isDebugEnabled) {
        self::$logger->debug("Process update on object: ".$key);
      }
      $object = $this->dirtyObjects[$key];
      $object->getMapper()->save($object);
      unset($this->dirtyObjects[$key]);
      $updatedOids[] = $key;
      $updateOids = array_keys($this->dirtyObjects);
    }
    return $updatedOids;
  }
756861
protected function get_update_api_client() {

        if ($this->updateapiclient === null) {
            $this->updateapiclient = \core\update\api::client();
        }

        return $this->updateapiclient;
    }
507571
protected function _update()
    {
        $this->_aSkipSaveFields = ['oxtimestamp', 'oxorderdate'];
        $this->oxorder__oxsenddate = new \OxidEsales\Eshop\Core\Field(\OxidEsales\Eshop\Core\Registry::getUtilsDate()->formatDBDate($this->oxorder__oxsenddate->value, true));

        return parent::_update();
    }
125295
private function getUpdateQuery()
    {
        if (isset($this->parts['from'][0]['alias'])) {
            $fromClause = $this->parts['from'][0]['alias'].' FROM '.$this->getFromClause();
        } else {
            $fromClause = $this->parts['from'][0]['table'];
        }

        $setClause = array();

        foreach ($this->parts['set'] as $idenfier => $value) {
            $setClause[] = $this->getExpressionBuilder()->equal($idenfier, $value);
        }

        return 'UPDATE '.$fromClause.
               ' SET '.implode(', ', $setClause).
               (($this->parts['where'] !== null) ? ' WHERE '.$this->parts['where'] : null);
    }
1316842
protected function proxy() {
        if (!$this->context) {
            $this->context = new EntityContext(
                $this->version,
                $this->solution['serviceSid'],
                $this->solution['identity']
            );
        }

        return $this->context;
    }
1231464
public function getUpdaterInstance()
    {
        if ($this->updater == null) {
            $this->updater = new GitUpdaterImpl($this, $this->getConfigInstance()->getRootPath());
        }
        return $this->updater;
    }
739507
protected function getService()
    {
        if (!isset($this->service)) {
            $this->service = $this->getServiceLocator()
                    ->get($this->getModuleNamespace() . '\Service\\' . $this->getEntityName());
        }

        return $this->service;
    }
655706
public function updateDeferred()
    {
        try {
            if ($this->getRequestMethod() !== \Request::HTTP_POST) {
                throw new \common_exception_NotImplemented('Only post method is accepted to updating delivery');
            }
            if (! $this->hasRequestParameter(self::REST_DELIVERY_SEARCH_PARAMS)) {
                throw new \common_exception_MissingParameter(self::REST_DELIVERY_SEARCH_PARAMS, $this->getRequestURI());
            }
            $where = json_decode(html_entity_decode($this->getRequestParameter(self::REST_DELIVERY_SEARCH_PARAMS)), true);
            $propertyValues = $this->getRequestParameters();
            unset($propertyValues[self::REST_DELIVERY_SEARCH_PARAMS]);

            $task = UpdateDelivery::createTask($where, $propertyValues);

            $result = [
                'reference_id' => $task->getId()
            ];

            /** @var TaskLogInterface $taskLog */
            $taskLog = $this->getServiceManager()->get(TaskLogInterface::SERVICE_ID);
            $report = $taskLog->getReport($task->getId());
            if (!empty($report)) {
                if ($report instanceof \common_report_Report) {
                    //serialize report to array
                    $report = json_decode($report);
                }
                $result['common_report_Report'] = $report;
            }
            return $this->returnSuccess($result);
        }catch (\Exception $e) {
            $this->returnFailure($e);
        }
    }
800595
public function update($id)
    {
        $request = $this->makeRequest('update');
        $model = $this->service->update($request, $id);

        if(is_a($model, \Exception::class)) {

            return $this->getErrorResource($model);

        } else {

            return $this->maybeMakeResource('single', $model, 201);
        }
    }
856576
protected function getDataUpdater()
    {
        if(!isset($this->dataUpdater))
        {
            $readPreference = $this->collection->__debugInfo()['readPreference']->getMode();

            $opts = array(
                'defaultContext'=>$this->defaultContext,
                OP_ASYNC=>$this->async,
                'stat'=>$this->stat,
                'readPreference'=>$readPreference,
                'retriesToGetLock' => $this->retriesToGetLock,
                'statsConfig'=>$this->statsConfig
            );

            $this->dataUpdater = new Updates($this, $opts);
        }
        return $this->dataUpdater;
    }
43879
public function getEntityManager()
    {
        if (!isset($this->_entityManager)) {
            $this->_entityManager = $this->getServiceLocator()
                    ->get('Doctrine\ORM\EntityManager');
        }
        return $this->_entityManager;
    }
200164
public function getUpdater()
    {
        if (!is_string($this->updatedByAttribute) || empty($this->updatedByAttribute)) {
            return null;
        }
        $hostClass = $this->hostClass;
        $host = $hostClass::buildNoInitModel();
        /* @var $user BaseUserModel */
        return $this->hasOne($hostClass::className(), [$host->guidAttribute => 'updatedBy']);
    }
1017781
protected function onUpdate(callable $callback, $entityClass = null)
    {
        $this->checkIfInitialized();

        return $this->processEntities($this->uow->getScheduledEntityUpdates(), self::OPERATION_UPDATE, $callback, $entityClass);
    }