public class TriggerManagerHandle
extends java.lang.Object
The generic triggers are Java callback methods which are invoked BEFORE the session database triggers, but they are configured for all tables (we may add a mask/regex pattern to filter only specific tables) of a database. The implementer is responsible to write the code for handling the event at a lower level, including table filtering (for the moment) but must take care of full 4GL state: transactions, locking, buffers, undo ability.
| Modifier and Type | Field and Description |
|---|---|
private DatabaseTriggerManager |
manager
The manager instance.
|
| Constructor and Description |
|---|
TriggerManagerHandle()
Default c'tor does nothing
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
deregisterGenericTrigger(java.lang.String eventName,
java.lang.String database)
Unregister a previously set generic trigger given the event type and database/.
|
java.lang.String |
deregisterGenericTrigger(java.lang.String eventName,
java.lang.String database,
java.lang.String property)
Unregister a session database trigger for the given event type and buffer class.
|
private DatabaseTriggerManager |
getManager()
Obtain and caches the manager instance locally.
|
java.lang.String |
registerGenericTrigger(java.lang.String eventName,
java.lang.String database,
java.lang.String triggerClassName)
Register a generic trigger for a specific event.
|
java.lang.String |
registerGenericTrigger(java.lang.String eventName,
java.lang.String database,
java.lang.String triggerClassName,
java.lang.String property)
Register a generic trigger for a ASSIGN event.
|
private DatabaseTriggerManager manager
public java.lang.String registerGenericTrigger(java.lang.String eventName,
java.lang.String database,
java.lang.String triggerClassName)
eventName - The event as case-insensitive string.database - The database to apply to. (In future revisions, this parameter might be replaced by a table
mask / pattern.)triggerClassName - The trigger class which implements the method for handling the respective event in a generic
manner.null if the operation is successful and a short description of the problem otherwise.public java.lang.String registerGenericTrigger(java.lang.String eventName,
java.lang.String database,
java.lang.String triggerClassName,
java.lang.String property)
eventName - The event as case-insensitive string.database - The database to apply to. (In future revisions, this parameter might be replaced by a table
mask / pattern.)triggerClassName - The trigger class which implements the method for handling the respective event in a generic
manner.property - The property name of the affected field. (Also subject for replacing with a
mask / pattern.)null if the operation is successful and a short description of the problem otherwise.public java.lang.String deregisterGenericTrigger(java.lang.String eventName,
java.lang.String database)
ON <event> OF <table> REVERT but for generic triggers.eventName - The event as case-insensitive string.database - The database to apply to. In future revisions, this parameter might be replaced by a table
pattern.null if the operation is successful and a short description of the problem otherwise.public java.lang.String deregisterGenericTrigger(java.lang.String eventName,
java.lang.String database,
java.lang.String property)
ON Assign OF <table> REVERT but for generic triggers.eventName - The event as case-insensitive string. Recommended ASSIGN but this variant of the method
ignores the parameter.database - The database to apply to. In future revisions, this parameter might be replaced by a table
pattern.property - The property that is deregistered from ASSIGN trigger.null if the operation is successful and a short description of the problem otherwise.private DatabaseTriggerManager getManager()