Buf
- The class of the buffer to which the database event served by this trigger is applied.public abstract class DatabaseTrigger<Buf extends Buffer>
extends java.lang.Object
create
, delete
, find
or some form of write
) which corresponds the database event type handled by the
trigger. Default implementations are no-ops.Constructor and Description |
---|
DatabaseTrigger() |
Modifier and Type | Method and Description |
---|---|
void |
assign(Buf buf)
Should be implemented by an ASSIGN trigger.
|
void |
assign(Buf buf,
BaseDataType oldValueCopy)
Should be implemented by an ASSIGN trigger.
|
void |
assign(Undoable newVal)
Should be implemented by a SCHEMA ASSIGN trigger with NEW form (no field reference).
|
void |
assign(Undoable newVal,
BaseDataType oldValueCopy)
Should be implemented by a SCHEMA ASSIGN trigger with NEW form (no field reference).
|
void |
create(Buf buf)
Should be implemented by a CREATE trigger.
|
void |
delete(Buf buf)
Should be implemented by a DELETE trigger.
|
void |
find(Buf buf)
Should be implemented by a FIND trigger.
|
void |
replicationCreate(Buf buf)
Should be implemented by a REPLICATION-CREATE trigger.
|
void |
replicationDelete(Buf buf)
Should be implemented by a REPLICATION-DELETE trigger.
|
void |
replicationWrite(Buf buf)
Should be implemented by a REPLICATION-WRITE trigger without OLD buffer specified.
|
void |
replicationWrite(Buf newBuf,
Buf oldBuf)
Should be implemented by a REPLICATION-WRITE trigger with OLD buffer specified.
|
protected void |
trigger(Block blk)
Execute the given trigger block.
|
void |
write(Buf buf)
Should be implemented by a WRITE trigger without OLD buffer specified.
|
void |
write(Buf newBuf,
Buf oldBuf)
Should be implemented by a WRITE trigger with OLD buffer specified.
|
public void assign(Buf buf, BaseDataType oldValueCopy)
buf
- Buffer which contains the record that triggered the event.oldValueCopy
- A copy of the old value that was changed by assign statement. Even if this value
can be overwritten, the change will be lost when exiting the trigger body block.public void assign(Buf buf)
buf
- Buffer which contains the record that triggered the event.public void assign(Undoable newVal, BaseDataType oldValueCopy)
newVal
- The value that triggered the event.oldValueCopy
- A copy of the old value that was changed by assign statement. Even if this value
can be overwritten, the change will be lost when exiting the trigger body block.public void assign(Undoable newVal)
newVal
- The value that triggered the event.public void create(Buf buf)
buf
- Buffer which contains the record which triggered the event.public void find(Buf buf)
buf
- Buffer which contains the record which triggered the event.public void delete(Buf buf)
buf
- Buffer which contains the record which triggered the event.public void write(Buf buf)
buf
- Buffer which contains the record which triggered the event.public void write(Buf newBuf, Buf oldBuf)
newBuf
- Buffer which contains the new value of the record which triggered the event.oldBuf
- Buffer which contains the old value of the record which triggered the event.public void replicationCreate(Buf buf)
buf
- Buffer which contains the record which triggered the event.public void replicationDelete(Buf buf)
buf
- Buffer which contains the record which triggered the event.public void replicationWrite(Buf buf)
buf
- Buffer which contains the record which triggered the event.public void replicationWrite(Buf newBuf, Buf oldBuf)
newBuf
- Buffer which contains the new value of the record which triggered the event.oldBuf
- Buffer which contains the old value of the record which triggered the event.protected void trigger(Block blk)
blk
- The code for the trigger block body.