Overwrite a specific data component in a specific store.
161662
function(req, res) {
            if (!req._body || (req.body == null) || !req.body) {
                res.send(400, "Invalid POST missing required request body.");
                return;
            }
            if ((req.body.store == null) || !req.body.store) {
                res.send(400, "Invalid POST mising 'store' property in request body.");
                return;
            }
            if ((req.body.address == null) || !req.body.address) {
                res.send(400, "Invalid POST missing 'address' property in request body.");
                return;
            }
            if ((req.body.data == null) || !req.body.data) {
                res.send(400, "Invalid POST missing 'data' property in request body.");
                return;
            }
            var store = onmStoreDictionary[req.body.store];
            if ((store == null) || !store) {
                res.send(404, "The specified onm data store '" + req.body.store + "' does not exist on this server.");
                return;
            }
            var address = undefined;
            try {
                address = store.model.createAddressFromHashString(req.body.address);
            } catch (exception) {
                console.error(exception);
                res.send(403, "Invalid address '" + req.body.address + "' is outside of the data model's address space.");
                return;
            }
            var namespace = undefined
            try {
                namespace = store.openNamespace(address);
            } catch (exception) {
                console.error(exception);
                res.send(404, "Data component '" + req.body.address + "' does not exist in store '" + req.body.store + "'.");
                return;
            }
            try {
                namespace.fromJSON(req.body.data);
            } catch (exception) {
                console.error(exception);
                res.send(400, "Unable to de-serialize JSON data in request.");
                return;
            }
            res.send(204);
        }
55338
function updateComponentData (
  componentId,
  newData,
  callback
) {
  if (!document || !document.taskCenter) {
    warn("Can't find available \"document\" or \"taskCenter\".");
    return
  }
  if (typeof document.taskCenter.updateData === 'function') {
    return document.taskCenter.updateData(componentId, newData, callback)
  }
  warn(("Failed to update component data (" + componentId + ")."));
}
870888
private void put(DirectoryEntry entry, boolean overwriteExisting) {
    int index = bucketIndex(entry.name(), table.length);

    // find the place the new entry should go, ensuring an entry with the same name doesn't already
    // exist along the way
    DirectoryEntry prev = null;
    DirectoryEntry curr = table[index];
    while (curr != null) {
      if (curr.name().equals(entry.name())) {
        if (overwriteExisting) {
          // just replace the existing entry; no need to expand, and entryCount doesn't change
          if (prev != null) {
            prev.next = entry;
          } else {
            table[index] = entry;
          }
          entry.next = curr.next;
          curr.next = null;
          entry.file().incrementLinkCount();
          return;
        } else {
          throw new IllegalArgumentException("entry '" + entry.name() + "' already exists");
        }
      }

      prev = curr;
      curr = curr.next;
    }

    entryCount++;
    if (expandIfNeeded()) {
      // if the table was expanded, the index/entry we found is no longer applicable, so just add
      // the entry normally
      index = bucketIndex(entry.name(), table.length);
      addToBucket(index, table, entry);
    } else {
      // otherwise, we just can use the index/entry we found
      if (prev != null) {
        prev.next = entry;
      } else {
        table[index] = entry;
      }
    }

    entry.file().incrementLinkCount();
  }
44360
protected void updateOverwriteExisting() {

        if (m_overwriteExisting != null) {
            boolean move = (m_dialogMode == DialogMode.move) || (m_actionCombo.getValue() == Action.move);
            if (move) {
                m_overwriteExisting.setValue(Boolean.FALSE);
                m_overwriteExisting.setVisible(false);
            } else {
                m_overwriteExisting.setVisible(true);
            }
        }
    }
689212
def delete(self, key, **opts):
        """"""
        key, store = self._expand_opts(key, opts)
        try:
            del store[key]
        except KeyError:
            pass
275080
public void moveToRecordId(RecordId rid) {
		moveTo(rid.block().number());
		rp.moveToId(rid.id());
	}
967192
function invalidateBackingStore (id) {
  for (var i=0, len=_backingStores.length; i < len; i++) {
    if (_backingStores[i].id === id) {
      _backingStores.splice(i, 1);
      break;
    }
  }
}
563349
public void flushToDatastore() {
		if ( getAssociation().isEmpty() ) {
			gridDialect.removeAssociation( getAssociationKey(), getAssociationContext() );
			association = null;
			OgmEntityEntryState.getStateFor( session, hostingEntity ).setAssociation( associationKeyMetadata.getCollectionRole(), null );
		}
		else if ( !getAssociation().getOperations().isEmpty() ) {
			gridDialect.insertOrUpdateAssociation( getAssociationKey(), getAssociation(), getAssociationContext() );
		}

		updateHostingEntityIfRequired();
	}
976094
public void disableAllOverrides(int pathID, String clientUUID, int overrideType) {
        PreparedStatement statement = null;

        try (Connection sqlConnection = sqlService.getConnection()) {
            ArrayList<Integer> enabledOverrides = new ArrayList<Integer>();
            enabledOverrides.add(Constants.PLUGIN_REQUEST_HEADER_OVERRIDE_ADD);
            enabledOverrides.add(Constants.PLUGIN_REQUEST_HEADER_OVERRIDE_REMOVE);
            enabledOverrides.add(Constants.PLUGIN_REQUEST_OVERRIDE_CUSTOM);
            enabledOverrides.add(Constants.PLUGIN_REQUEST_OVERRIDE_CUSTOM_POST_BODY);

            String overridePlaceholders = preparePlaceHolders(enabledOverrides.size());

            statement = sqlConnection.prepareStatement(
                "DELETE FROM " + Constants.DB_TABLE_ENABLED_OVERRIDE +
                    " WHERE " + Constants.ENABLED_OVERRIDES_PATH_ID + " = ? " +
                    " AND " + Constants.GENERIC_CLIENT_UUID + " = ? " +
                    " AND " + Constants.ENABLED_OVERRIDES_OVERRIDE_ID +
                    (overrideType == Constants.OVERRIDE_TYPE_RESPONSE ? " NOT" : "") +
                    " IN ( " + overridePlaceholders + " )"
            );
            statement.setInt(1, pathID);
            statement.setString(2, clientUUID);
            for (int i = 3; i <= enabledOverrides.size() + 2; ++i) {
                statement.setInt(i, enabledOverrides.get(i - 3));
            }
            statement.execute();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                if (statement != null) {
                    statement.close();
                }
            } catch (Exception e) {
            }
        }
    }
1093395
function mw(store) {
    if (savedStore && savedStore !== store) {
      throw new Error('cannot assign logicMiddleware instance to multiple stores, create separate instance for each');
    }
    savedStore = store;

    return next => {
      savedNext = next;
      const { action$, sub, logicCount: cnt } =
            applyLogic(arrLogic, savedStore, savedNext,
                       logicSub, actionSrc$, deps, logicCount,
                       monitor$);
      actionEnd$ = action$;
      logicSub = sub;
      logicCount = cnt;

      return action => {
        debug('starting off', action);
        monitor$.next({ action, op: 'top' });
        actionSrc$.next(action);
        return action;
      };
    };
  }
983464
private void overrideDatabaseTerminationToken(Map<Object, Object> props) {
        String overrideTermToken = null;
        String platformClassName = _dbMgr.getDatabasePlatformClassName(_pui);

        if (platformClassName != null) {
            overrideTermToken = platformTerminationToken.get(platformClassName);
        }

        if (overrideTermToken != null) {
            String existing = (String) props.get(PersistenceUnitProperties.TARGET_DATABASE_PROPERTIES);
            if (existing != null) {
                existing = existing + ",";
            } else {
                existing = "";
            }
            existing = (existing + "StoredProcedureTerminationToken=" + overrideTermToken);

            props.put(PersistenceUnitProperties.TARGET_DATABASE_PROPERTIES, existing);
        }
    }
202562
protected function setStore($store_id)
    {
        $this->data_store = array();

        if (is_numeric($store_id)) {

            $this->data_store = $this->store->get($store_id);

            if (empty($this->data_store)) {
                $this->outputHttpStatus(404);
            }
        }

        $this->prepareStore($this->data_store);
    }
221206
def setData(self, index, value, role=QtCore.Qt.UserRole):
        """"""
        # item must already exist at provided index
        self._stim.overwriteComponent(value, index.row(), index.column())

        self.samplerateChanged.emit(self.samplerate())
566950
def put(self, key, value, overwrite=True):
        
        self._get_table()
        s = self.to_string(value)
        log.debug("Storing in key '%s' the object: '%s'" % (key, s))
        self.table.put_item(
            data={
                'key': key,
                'value': s,
            },
            overwrite=overwrite
        )
229109
def clone(self, **override_vars):
        """"""
        c = Context(self.vars, self.data)
        c.executed_actions = set(self.executed_actions)
        c.vars.update(override_vars)
        return c
1083149
def prepareInsert(self, oself, store):
        
        if self.relative:
            fspath = self.__get__(oself)
            oself.__dirty__[self.attrname] = self, self.infilter(fspath, oself, store)
563084
private function overwriteConfig()
    {
        foreach (array_keys($this->config()) as $config) {
            $this->config = $config;

            $this->configToEnv();
        }
    }