Event handler called after writing to the database.
12963
public function onAfterWrite()
    {
        parent::onAfterWrite();
        if ($this->ParentID > 0) {
            $this->MenuSetID = $this->Parent()->MenuSetID;
        }
    }
1270639
public function onAfterWrite()
    {
        parent::onAfterWrite();

        // Request via ImportForm where TemplateVersion is already set, so unset it
        $posted = Controller::curr()->getRequest()->postVars();
        if (isset($posted['_CsvFile']) && $this->TemplateVersion) {
            $this->TemplateVersion = null;
        }
        if ($this->numChildren() == 0 && $this->Template && !$this->TemplateVersion) {
            $this->getWorkflowService()->defineFromTemplate($this, $this->Template);
        }
    }
75042
public function onAfterWrite()
    {
        parent::onAfterWrite();

        if ($this->Default) {
            foreach ($this->Contact()->Locations() as $location) {
                if ($location->ID != $this->ID && $location->Default) {
                    $location->Default = false;
                    $location->write();
                }
            }
        }
    }
308291
function requestWrite (database) {
  var deferred = q.defer();

  // Is the database currently being written?
  if(writing[database]) {
    deferred.reject('Database is being written');
    return deferred.promise();
  }

  writing[database] = true;

  // Write the database
  write(database).then(function () {
    deferred.resolve();
  }, function (err) {
    deferred.reject(err);
  });

  var time = globalConfig.db.fileTimeout;

  if(time <= 0) {
    // If there's no time limit for writing, then clear out block
    delete writing[database];
  } else {
    // If there's a time limit, wait for time to pass and remove block
    setTimeout(function () {
      delete writing[database];
    }, time);
  }

  return deferred.promise;
}
209067
function onwritten(err) {
  if (err) return console.error(err)

  collector.cleanAllResources().disable()

  // allow `close` 'after' and `destroy` to fire
  tick(2, () => {
    collector
      .processStacks()
      .stringifyBuffers()

    // save('write-fs-only', Array.from(collector.fileSystemActivities))
    // save('write-fs-all', Array.from(collector.activities))
  })
}
523459
protected function onAfterWrite() {
        parent::onAfterWrite();
        
        //Write the snippet version record
        if(!empty($this->Text)) {
            $version=new SnippetVersion();
            $version->Text=$this->Text;
            $version->ParentID=$this->ID;
            $version->write();
        }
    }
265919
private static void callback(long handle) {
        final C4DatabaseObserver obs = REVERSE_LOOKUP_TABLE.get(handle);
        if (obs != null && obs.listener != null) { obs.listener.callback(obs, obs.context); }
    }
241904
@Override
	public void afterCompletion(int status) {
		// clean up transactions that aren't managed by Spring
		for (DataAccess<SimpleFeatureType, SimpleFeature> dataStore : transactions.keySet()) {
			// we must manage transaction ourselves for non-JDBC !
			if (!(dataStore instanceof JDBCDataStore)) {
				Transaction transaction = transactions.get(dataStore);
				try {
					switch (status) {
						case TransactionSynchronization.STATUS_COMMITTED:
							transaction.commit();
							break;
						case TransactionSynchronization.STATUS_ROLLED_BACK:
							transaction.rollback();
							break;
						case TransactionSynchronization.STATUS_UNKNOWN:
					}
				} catch (IOException e) {
					try {
						transaction.rollback();
					} catch (IOException e1) {
						log.debug("Could not rollback geotools transaction", e1);
					}
				} finally {
					try {
						transaction.close();
					} catch (IOException e) {
						log.debug("Could not close geotools transaction", e);
					}
				}
			}
		}
		transactions.clear();
	}
1040748
function DbWriter(db,errorLogObject,successLogObject) {
	this.db = db;
	this.errorLogObject = errorLogObject;
	this.successLogObject = successLogObject;
}
912042
def OnUndo(self, event):
        """"""

        statustext = undo.stack().undotext()
        undo.stack().undo()

        # Update content changed state
        try:
            post_command_event(self.grid.main_window,
                               self.grid.ContentChangedMsg)
        except TypeError:
            # The main window does not exist any more
            pass

        self.grid.code_array.result_cache.clear()

        post_command_event(self.grid.main_window, self.grid.TableChangedMsg,
                           updated_cell=True)

        # Reset row heights and column widths by zooming
        self.grid.actions.zoom()

        # Change grid table dimensions
        self.grid.GetTable().ResetView()

        # Update TableChoiceIntCtrl
        shape = self.grid.code_array.shape
        post_command_event(self.main_window, self.grid.ResizeGridMsg,
                           shape=shape)

        # Update toolbars
        self.grid.update_entry_line()
        self.grid.update_attribute_toolbar()

        post_command_event(self.grid.main_window, self.grid.StatusBarMsg,
                           text=statustext)
96384
function () {
    // Initialize Column sort
    this._initColumnSort();
        
    // Add the document level click listener
    YAHOO.util.Event.addListener(document, "click", this._onDocumentClick, this);

    // Paginator integration
    this.subscribe("paginatorChange",function () {
        this._handlePaginatorChange.apply(this,arguments);
    });

    this.subscribe("initEvent",function () {
        this.renderPaginator();
    });

    // Initialize CellEditor integration
    this._initCellEditing();
}
1040485
@Override
  @SuppressWarnings("unchecked")
  public void write(TextWriterStream out, String label, Pair<?,?> object) throws IOException {
    if (object != null) {
      Object first = object.getFirst();
      if (first != null) {
        TextWriterWriterInterface<Object> tw = (TextWriterWriterInterface<Object>) out.getWriterFor(first);
        if (tw == null) {
          throw new IOException("No handler for database object itself: " + first.getClass().getSimpleName());
        }
        tw.write(out, label, first);
      }
      Object second = object.getSecond();
      if (second != null) {
        TextWriterWriterInterface<Object> tw = (TextWriterWriterInterface<Object>) out.getWriterFor(second);
        if (tw == null) {
          throw new IOException("No handler for database object itself: " + second.getClass().getSimpleName());
        }
        tw.write(out, label, second);
      }
    }
  }
1151073
def handler(event, context):  # pylint: disable=W0613
    
    records = deserialize_records(event['Records'])

    # Split records into two groups, update and delete.
    # We don't want to query for deleted records.
    update_records, delete_records = group_records_by_type(records, UPDATE_EVENTS)

    LOG.debug('[@] Processing update records...')
    process_update_records(update_records)
    LOG.debug('[@] Completed processing of update records.')

    LOG.debug('[@] Processing delete records...')
    process_delete_records(delete_records)
    LOG.debug('[@] Completed processing of delete records.')

    LOG.debug('[@] Successfully updated current Historical table')
872083
def OnTableChanged(self, event):
        """"""

        if hasattr(event, 'table'):
            self.SetValue(event.table)

        wx.TextCtrl.SetInsertionPoint(self, self.cursor_pos)

        event.Skip()
701303
private void postGetConnectionHandling(Connection conn) throws SQLException {
        helper.doConnectionSetup(conn);

        String[] sqlCommands = dsConfig.get().onConnect;
        if (sqlCommands != null && sqlCommands.length > 0)
            onConnect(conn, sqlCommands);

        // Log the database and driver versions on first getConnection.
        if (!wasUsedToGetAConnection) {
            // Wait until after the connection succeeds to set the indicator.
            // This accounts for the scenario where the first connection attempt is bad.
            // The information needs to be read again on the second attempt.
            helper.gatherAndDisplayMetaDataInfo(conn, this);
            wasUsedToGetAConnection = true;
        }
    }
1156234
@Override protected void handleEvents(final String EVENT_TYPE) {
        super.handleEvents(EVENT_TYPE);
        if ("VISIBILITY".equals(EVENT_TYPE)) {

        } else if ("SECTION".equals(EVENT_TYPE)) {
            redraw();
        }
    }
1101647
public void prepareUpdateStep1bOutput(JspWriter out) throws IOException {

        m_oldLoggingDBOffset = m_newLoggingDBOffset;
        m_newLoggingDBOffset = m_dbUpdateThread.getLoggingThread().getMessages().size();
        if (isInitialized()) {
            for (int i = m_oldLoggingDBOffset; i < m_newLoggingDBOffset; i++) {
                String str = m_dbUpdateThread.getLoggingThread().getMessages().get(i).toString();
                str = CmsEncoder.escapeWBlanks(str, CmsEncoder.ENCODING_UTF_8);
                out.println("output[" + (i - m_oldLoggingDBOffset) + "] = \"" + str + "\";");
            }
        } else {
            out.println("output[0] = 'ERROR';");
        }

        boolean threadFinished = m_dbUpdateThread.isFinished();
        boolean allWritten = m_oldLoggingDBOffset >= m_dbUpdateThread.getLoggingThread().getMessages().size();

        out.println("function initThread() {");
        if (isInitialized()) {
            out.print("send();");
            if (threadFinished && allWritten) {
                out.println("setTimeout('top.display.finish()', 1000);");
            } else {
                int timeout = 5000;
                if (getUpdateDBThread().getLoggingThread().getMessages().size() < 20) {
                    timeout = 2000;
                }
                out.println("setTimeout('location.reload()', " + timeout + ");");
            }
        }
        out.println("}");
    }