DBBaseContext - Base class for database contexts
The base class for database contexts provides some basic functionality for database context classes. The base context class for database context types provides two kinds of handler functions in order to handle different event types simply by overloading the handler function.
- do-handler handling client events
- notify handler handling server events
The basic handler implementations do not do anything and need not to be called from overloaded handlers. Handler functions are returning an execution error code ( >0 ), 0 in case of successful processing and -1 in order to indicate, that the handler did not work and the event has to be passed to the next available handler.
Handlers for database events are usually called within internal transactions. Thus, all modifications made by the event handler are reset when the transaction fails.
For a number of database operations error events are generated that are called in case of an error. An error could be a database (consistency) error but the process event (before event) could have denied the operation as well.
- 1. Administration - Administration functions
- 2.1. Type conversion - Context type conversion
- 5.1. Conetxt event handlers - Context event handlers
- 5.2. Server event handlers - Server event handlers
- DBBaseContext - Constructor
- asDatabaseContext - Get database context
- asObjectSpaceContext - Get object space context
- asPropertyContext - Get property context
- asTypeContext - Get type context
- database - Get database handle
- databaseContext - Get database context
- deleting - Instance is going to be deleted
- doAfterCreate - After create handler
- doAfterDelete - After delete handler
- doAfterInitialize - After initialize handler
- doAfterInsert - After inserted handler
- doAfterLocate - After locate handler
- doAfterOpen - After Open handler
- doAfterRead - After read event
- doAfterRefresh - After refresh handler
- doAfterRemove - After remove handler
- doAfterReopen - After reopen handler
- doAfterReset - After reset handler
- doAfterStore - After store handler
- doBeforeClose - Before close handler
- doBeforeCreate - Before create handler
- doBeforeDelete - Before delete handler
- doBeforeInsert - Before insert handler
- doBeforeModify - Modify handler
- doBeforeOpen - Before open handler
- doBeforeRead - Before read event handler
- doBeforeRemove - Before remove handler
- doBeforeReopen - Before reopen handler
- doBeforeSelect - Before select handler
- doBeforeStore - Before store handler
- doOnCreateError - Not created handler
- doOnDeleteError - Not deleted handler
- doOnInsertError - Not inserted handler
- doOnOpenError - Not opened handler
- doOnRemoveError - Not removed handler
- doOnStoreError - Not stored handler
- objectSpaceContext - Object space context
- setContextVariables - Set context variables
- setTransactionError - Set transaction error
- ~DBBaseContext - Destructor