Update the current record.
@param The data to update.
@exception Exception File exception.
546777
public void set(Object data, int iOpenMode) throws DBException, RemoteException
    {
        int iErrorCode = this.checkCurrentCacheIsPhysical(data);
        if (iErrorCode != Constants.NORMAL_RETURN)
            throw new DBException(iErrorCode);  // Data probably changed from last time I read it.
        m_tableRemote.set(data, iOpenMode);
        if (m_objCurrentCacheRecord != null)
        {
            if (m_mapCache != null)
            {
                if ((cacheMode == CacheMode.CACHE_ON_WRITE) || (cacheMode == CacheMode.PASSIVE_CACHE))
                    m_mapCache.set(((Integer)m_objCurrentCacheRecord).intValue(), data);
                else
                    m_mapCache.set(((Integer)m_objCurrentCacheRecord).intValue(), null);
            }
            else if (m_htCache != null)
            {
                m_htCache.remove(m_objCurrentCacheRecord);  // Do not put the new record back, as you don't know the new key.
            }
        }
        m_objCurrentPhysicalRecord = NONE;
        m_objCurrentLockedRecord = NONE;
        m_objCurrentCacheRecord = NONE;
    }
699752
public void save() throws Exception {

        if (fileName == null || fileName.length() == 0) {
            throw new java.io.FileNotFoundException(
                Error.getMessage(ErrorCode.M_HsqlProperties_load));
        }

        String filestring = fileName + ".properties";

        save(filestring);
    }
654808
public function update()
    {
        $data = $this->client->get('http://dev.maxmind.com/static/csv/codes/country_continent.csv');

        // Verify server response
        if ($this->client->getErrors() !== null) {
            throw new Exception($this->client->getErrors());
        }

        $lines = explode("\n", $data[0]);

        array_shift($lines);

        $output = [];

        foreach ($lines as $line) {
            $arr = str_getcsv($line);

            if (count($arr) < 2) {
                continue;
            }

            $output[$arr[0]] = $arr[1];
        }

        // Get path
        $path = $this->config('continent_path');

        file_put_contents($path, json_encode($output));

        return "Continent file ({$path}) updated.";
    }
700080
@Override
    public void run(final Iterable<Object[]> buffer) throws Exception {

        UpdateableDatastoreConnection con = datastore.openConnection();
        try {
            final Column[] updateColumns = con.getSchemaNavigator()
                    .convertToColumns(schemaName, tableName, columnNames);
            final Column[] whereColumns = con.getSchemaNavigator().convertToColumns(schemaName, tableName,
                    conditionColumnNames);

            if (logger.isDebugEnabled()) {
                logger.debug("Updating columns: {}", Arrays.toString(updateColumns));
            }

            final UpdateableDataContext dc = con.getUpdateableDataContext();
            dc.executeUpdate(new BatchUpdateScript() {
                @Override
                public void run(UpdateCallback callback) {
                    int updateCount = 0;
                    for (Object[] rowData : buffer) {
                        RowUpdationBuilder updationBuilder = callback.update(updateColumns[0].getTable());
                        for (int i = 0; i < updateColumns.length; i++) {
                            final Object value = rowData[i];
                            updationBuilder = updationBuilder.value(updateColumns[i], value);
                        }

                        for (int i = 0; i < whereColumns.length; i++) {
                            final Object value = rowData[i + updateColumns.length];
                            final Column whereColumn = whereColumns[i];
                            final FilterItem filterItem = new FilterItem(new SelectItem(whereColumn),
                                    OperatorType.EQUALS_TO, value);

                            updationBuilder = updationBuilder.where(filterItem);
                        }

                        if (logger.isDebugEnabled()) {
                            logger.debug("Updating: {}", Arrays.toString(rowData));
                        }

                        try {
                            updationBuilder.execute();
                            updateCount++;
                            _updatedRowCount.incrementAndGet();
                        } catch (final RuntimeException e) {
                            errorOccurred(rowData, e);
                        }
                    }

                    if (updateCount > 0) {
                        _componentContext.publishMessage(new ExecutionLogMessage(updateCount + " updates executed"));
                    }
                }
            });
        } finally {
            con.close();
        }
    }
222574
public void setData(JSONObject data) {
    try {
      Map<String, Object> map = new HashMap<String, Object>();
      Iterator iter = data.keySet().iterator();
      while (iter.hasNext()) {
        String key = (String) iter.next();
        Object value = data.get(key);
        map.put(key, value);
      }
      this.pushData.put("data", map);
    } catch (Exception exception) {
      LOGGER.w(exception);
    }
  }
807686
final public function update() {
        global $DB, $USER;

        if ($this->raw_get('id') <= 0) {
            throw new coding_exception('id is required to update');
        } else if (!$this->is_valid()) {
            throw new invalid_persistent_exception($this->get_errors());
        }

        // Before update hook.
        $this->before_update();

        // We can safely set those values after the validation because we know what we're doing.
        $this->raw_set('timemodified', time());
        $this->raw_set('usermodified', $USER->id);

        $record = $this->to_record();
        unset($record->timecreated);
        $record = (array) $record;

        // Save the record.
        $result = $DB->update_record(static::TABLE, $record);

        // We ensure that this is flagged as validated.
        $this->validated = true;

        // After update hook.
        $this->after_update($result);

        return $result;
    }
242078
private void updateFile() {

        @SuppressWarnings("unchecked")
        List<Logger> logger = (List<Logger>)m_container.getItemIds();

        for (Logger item : logger) {
            m_container.getItem(item).getItemProperty(TableColumn.File).setValue(getLogFiles(item));
        }
        resetPageBuffer();
        refreshRenderedCells();
        refreshRowCache();
    }
776431
protected void updateMessage() {

        if (!hasIndividualMessage()) {
            m_message = Messages.get().container(Messages.ERR_MULTI_EXCEPTION_1, new Integer(m_exceptions.size()));
        }
    }
777338
public void setData(byte[] data) {
        byte[] copy = new byte[data.length];
        System.arraycopy(data, 0, copy, 0, data.length);
        this.data = copy;
    }
1299707
@Trace(dispatcher = true)
	public void updateRecord(Long recordId, Long domainId, String name, String content) throws GloboDnsException {
		NewRelic.setTransactionName(null, "/globodns/updateRecord");
		if (recordId == null) {
			throw new GloboDnsException("Record id cannot be null");
		}
		
		Record record = new Record();
		if (domainId != null)
			record.getGenericRecordAttributes().setDomainId(domainId);
		if (name != null)
			record.getGenericRecordAttributes().setName(name);
		if (content != null)
			record.getGenericRecordAttributes().setContent(content);
		
		GloboDnsRoot<Record> globoDnsRoot = this.put("/records/" + recordId + ".json", record, false);
		if (globoDnsRoot == null) {
			throw new GloboDnsException("Invalid response");
		}
		return;
	}
178119
protected void update(long readBytes) throws IOException {
		if (progressListener.isAborted()) {
			throw new IOException("Reading Cancelled by ProgressListener");
		}
		this.bytesRead += readBytes;
		int step = (int)(bytesRead / stepSize);
		if(step > lastStep) {
			lastStep = step;
			progressListener.updateProgress(step, stepNumber);
		}
	}
160163
protected void update() {
		_updated = true;
		if (System.currentTimeMillis() > _lastDumpTime + _interval) {
			try {
				dump();
			} catch (InvocationException ex) {
				// Todo: decide what to do
			}
		}
	}
970729
@Override
    public void run(final Iterable<Object[]> buffer) throws Exception {

        try (UpdateableDatastoreConnection con = datastore.openConnection()) {
            final Column[] whereColumns =
                    con.getSchemaNavigator().convertToColumns(schemaName, tableName, conditionColumnNames);
            final UpdateableDataContext dc = con.getUpdateableDataContext();
            dc.executeUpdate((BatchUpdateScript) callback -> {
                int deleteCount = 0;
                for (final Object[] rowData : buffer) {
                    RowDeletionBuilder deletionBuilder = callback.deleteFrom(tableName);

                    for (int i = 0; i < whereColumns.length; i++) {
                        final Object value = rowData[i];
                        final Column whereColumn = whereColumns[i];
                        final FilterItem filterItem =
                                new FilterItem(new SelectItem(whereColumn), OperatorType.EQUALS_TO, value);

                        deletionBuilder = deletionBuilder.where(filterItem);
                    }

                    if (logger.isDebugEnabled()) {
                        logger.debug("Updating: {}", Arrays.toString(rowData));
                    }

                    try {
                        deletionBuilder.execute();
                        deleteCount++;
                        _updatedRowCount.incrementAndGet();
                    } catch (final RuntimeException e) {
                        errorOccurred(rowData, e);
                    }
                }

                if (deleteCount > 0) {
                    _componentContext.publishMessage(new ExecutionLogMessage(deleteCount + " deletes executed"));
                }
            });
        }
    }
922553
public function update($index, $data) {
        if (!$data instanceof Record) {
            $data = new Record(Utils::toArray($data));
        }
        $this->getFormat()->update($index, $data);
        // update buffer to reflect current changes
        if (isset($this->buffer[$index])) {
            $this->buffer[$index] = $data;
        }
    }
1007086
@Override
	public void updateComponent(final Object data) {
		MyData myData = (MyData) data;
		name.setText("<B>" + myData.getName() + "</B>");
		count.setText(String.valueOf(myData.getCount()));
	}
201337
public void populate() throws Exception {
        for (int i = 0; i < _initialCapacity; i++) {
            String str = "key." + i;
            byte[] key = str.getBytes();
            byte[] value = createDataForKey(str);
            _store.put(key, value);
        }
        _store.sync();
    }
284485
protected void persistProperties() throws Exception {
		if (isNewState()) {
			return;
		}

		if (Database.DB_TYPE_HSQLDB.equals(model.getDb().getType())) {
			configuration.save(new File(fileName));
		}
		model.getDb().getTableSession().update(getSessionId(), getSessionName());
	}