|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
interface DatabaseTrigger
Implemented to receive database update notifications.
The databaseUpdated() method may perform additional database operations using the transaction passed to it, or by starting a new transaction. The transaction passed may not be explicitly committed or aborted.
Method Summary | |
---|---|
void |
databaseUpdated(Database db,
Locker locker,
DatabaseEntry priKey,
DatabaseEntry oldData,
DatabaseEntry newData)
Notifies the trigger that a put or delete operation has been performed on the database. |
void |
triggerAdded(Database db)
Notifies the trigger that it has been added and will start receiving update notifications. |
void |
triggerRemoved(Database db)
Notifies the trigger that it has been removed and will stop receiving update notifications. |
Method Detail |
---|
void triggerAdded(Database db)
db
- the database to which the trigger was added.void triggerRemoved(Database db)
db
- the database from which the trigger was removed.void databaseUpdated(Database db, Locker locker, DatabaseEntry priKey, DatabaseEntry oldData, DatabaseEntry newData) throws DatabaseException
When a new entry is inserted, oldData will be null and newData will be non-null.
When an existing entry is updated, oldData and newData will be non-null.
When an existing entry is deleted, oldData will be non-null and newData will be null.
db
- the database that was modified.locker
- the internal locker.priKey
- the primary key, which is never null.oldData
- the primary data before the change, or null if the record
did not previously exist.newData
- the primary data after the change, or null if the record
has been deleted.
DatabaseException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |