Update the copied object ids in the registry
@param $oidMap Map of changed object ids (key: old value, value: new value)
496682
protected function updateCopyOIDs(array $oidMap) {
    $registry = $this->getLocalSessionValue(self::OBJECT_MAP_VAR);
    // registry maybe deleted already if it's the last step
    if ($registry) {
      $flippedRegistry = array_flip($registry);
      foreach ($oidMap as $oldOid => $newOid) {
        if (isset($flippedRegistry[$oldOid])) {
          $key = $flippedRegistry[$oldOid];
          unset($flippedRegistry[$oldOid]);
          $flippedRegistry[$newOid] = $key;
        }
      }
      $registry = array_flip($flippedRegistry);
      $this->setLocalSessionValue(self::OBJECT_MAP_VAR, $registry);
    }
  }
1205513
private void updateMethodMap(Map<RequestMethod, List<Integer>> methodMap, Integer roleId, String methodMask) {
        for (int i = 0; i < RoleResourceConstant.METHOD_NUM; ++i) {
            if (methodMask.charAt(i) == RoleResourceConstant.METHOD_IS_ACCESSIBLE) {
                RequestMethod curMethod = RoleResourceConstant.IND_METHOD_MAP.get(i);

                // update List<roleId>
                List<Integer> roleIdList = methodMap.get(curMethod);
                if (roleIdList == null) {
                    roleIdList = new ArrayList<Integer>();
                    methodMap.put(curMethod, roleIdList);
                }
                roleIdList.add(roleId);
            }
        }
    }
217152
public void apply(RelatedObjectSet objects) throws GuacamoleException {

        // Add any added identifiers
        if (!addedObjects.isEmpty())
            objects.addObjects(addedObjects);

        // Remove any removed identifiers
        if (!removedObjects.isEmpty())
            objects.removeObjects(removedObjects);

    }
84164
public function update($object)
    {
        if ($this->isNewObject($object)) {
            throw new UnknownObjectException('The object of type "' . get_class($object) . '" (identifier: "' . $this->getIdentifierByObject($object) . '") which was passed to EntityManager->update() is not a previously persisted object. Check the code which updates this entity and make sure that only objects are updated which were persisted before. Alternatively use add() for persisting new objects."', 1313663277);
        }
        try {
            $this->entityManager->persist($object);
        } catch (\Exception $exception) {
            throw new PersistenceException('Could not merge object of type "' . get_class($object) . '"', 1297778180, $exception);
        }
    }
1087034
@Modified
    protected void modified(Map<String, Object> map) {

        String filterString = OpentracingConfiguration.getServerSkipPattern();
        updateFilters(filterString);
    }
773470
public function onMapListModified($curMapIndex, $nextMapIndex, $isListModified)
    {
        if ($isListModified) {
            $oldMaps = $this->mapStorage->getMaps();

            $this->mapStorage->resetMapData();
            $this->updateMapList();

            // We will dispatch even only when list is modified. If not we dispatch specific events.
            $this->dispatch(__FUNCTION__, [$oldMaps, $curMapIndex, $nextMapIndex, $isListModified]);
        }

        try {
            $currentMap = $this->factory->getConnection()->getCurrentMapInfo();  // sync better
        } catch (\Exception $e) {
            // fallback to use map storage
            $currentMap = $this->mapStorage->getMapByIndex($curMapIndex);
        }        // current map can be false if map by index is not found..
        if ($currentMap) {
            if ($this->mapStorage->getCurrentMap()->uId != $currentMap->uId) {
                $previousMap = $this->mapStorage->getCurrentMap();
                $this->mapStorage->setCurrentMap($currentMap);

                $this->dispatch('onExpansionMapChange', [$currentMap, $previousMap]);
            }
        }

        try {
            $nextMap = $this->factory->getConnection()->getNextMapInfo();  // sync better
        } catch (\Exception $e) {
            // fallback to use map storage
            $nextMap = $this->mapStorage->getMapByIndex($nextMapIndex);
        }
        // next map can be false if map by index is not found..
        if ($nextMap) {
            if ($this->mapStorage->getNextMap()->uId != $nextMap->uId) {
                $previousNextMap = $this->mapStorage->getNextMap();
                $this->mapStorage->setNextMap($nextMap);

                $this->dispatch('onExpansionNextMapChange', [$nextMap, $previousNextMap]);
            }
        }
    }
1331196
public static function set($identifier, $object)
    {
        $objIdentifier = self::getIdentifier($identifier);
        $strIdentifier = (string) $objIdentifier;

        self::$_services->offsetSet($strIdentifier, $object);
    }
1364607
@RequestMapping(value = "ldap-mapping/{id}/update", method = RequestMethod.PUT)
    public LDAPMapping updateMapping(@PathVariable ID id, @RequestBody AccountGroupMappingInput input) {
        securityService.checkGlobalFunction(AccountGroupManagement.class);
        return LDAPMapping.of(accountGroupMappingService.updateMapping(
                LDAPExtensionFeature.LDAP_GROUP_MAPPING,
                id,
                input
        ));
    }
703226
public function reset(Map $map)
    {
        $title = $this->gameDataStorage->getTitle();
        $mode = $this->gameDataStorage->getGameModeCode();
        $script = strtolower($this->gameDataStorage->getGameInfos()->scriptName);

        $this->enableDisablePlugins($title, $mode, $script, $map);
    }
1036021
public function updateCollection(EntityChangeEventInterface $event)
    {
        $collection = $event->getCollection();
        if ($collection->getId()) {
            $collectionMap = $this->getCollectionsMap();
            $collectionMap
                ->set($collection->getId(), $collection);
        }
    }
244894
def update(self, f):
        """"""

        for p in self.__mapper__.attrs:

            if p.key == 'oid':
                continue
            try:
                setattr(self, p.key, getattr(f, p.key))

            except AttributeError:
                # The dict() method copies data property values into the main dict,
                # and these don't have associated class properties.
                continue
86618
public function update($data)
    {
        if (count($this) == 0) {
            return;
        }
        $ids = $this->getPrimaryKeyList();
        $updater = new $this->className();
        $updater->in($updater->getPrimaryKey(), $ids)->update($data);
    }
619915
public function update($object)
    {
        if (!($object instanceof $this->objectType)) {
            throw new IllegalObjectTypeException('The modified object given to update() was not of the type (' . $this->objectType . ') this repository manages.', 1249479625);
        }
        $this->persistenceManager->update($object);
    }
1003543
public function setDiscriminatorMap(array $map) : void
    {
        if ($this->isFile) {
            throw MappingException::discriminatorNotAllowedForGridFS($this->name);
        }

        $this->subClasses         = [];
        $this->discriminatorMap   = [];
        $this->discriminatorValue = null;

        foreach ($map as $value => $className) {
            $this->discriminatorMap[$value] = $className;
            if ($this->name === $className) {
                $this->discriminatorValue = $value;
            } else {
                if (! class_exists($className)) {
                    throw MappingException::invalidClassInDiscriminatorMap($className, $this->name);
                }
                if (is_subclass_of($className, $this->name)) {
                    $this->subClasses[] = $className;
                }
            }
        }
    }
258503
protected function index($oids) {
    $persistenceFacade = $this->getPersistenceFacade();
    foreach($oids as $oid) {
      if (ObjectId::isValid($oid)) {
        $obj = $persistenceFacade->load($oid);
        if ($obj) {
          $this->search->addToIndex($obj);
        }
      }
    }
    $this->search->commitIndex(false);

    if ($this->getStepNumber() == $this->getNumberOfSteps()) {
      $this->addWorkPackage($this->getMessage()->getText('Optimizing index'),
              1, [0], 'optimize');
    }
  }
1003455
public static function setMap($map = null)
    {
        if (is_null(self::$map)) {
            self::$map = include(__DIR__ . '/CommandLine/map.php');
        }

        if (!is_null($map)) {
            self::$map = $map;
        }
    }
28121
public function apply(object $object, ReflectionProperty $reflectionProperty, callable $objectCopier): void
    {
        $reflectionProperty->setAccessible(true);

        $value = ($this->callback)($reflectionProperty->getValue($object));

        $reflectionProperty->setValue($object, $value);
    }