public interface RecordListener extends EventListener
UpdatableRecord
s.
Users may want to centrally inject custom behaviour when manipulating their
UpdatableRecord
objects, performing CRUD. This service provider
allows to hook in callback method implementations for before or after any of
these methods:
Modifier and Type | Method and Description |
---|---|
void |
deleteEnd(RecordContext ctx)
Called after deleting an
UpdatableRecord . |
void |
deleteStart(RecordContext ctx)
Called before deleting an
UpdatableRecord . |
void |
exception(RecordContext ctx)
Called when an exception occurs.
|
void |
insertEnd(RecordContext ctx)
Called after inserting an
UpdatableRecord . |
void |
insertStart(RecordContext ctx)
Called before inserting an
UpdatableRecord . |
void |
loadEnd(RecordContext ctx)
Called after loading an
UpdatableRecord . |
void |
loadStart(RecordContext ctx)
Called before loading an
UpdatableRecord . |
void |
refreshEnd(RecordContext ctx)
Called after refreshing an
UpdatableRecord . |
void |
refreshStart(RecordContext ctx)
Called before refreshing an
UpdatableRecord . |
void |
storeEnd(RecordContext ctx)
Called after storing an
UpdatableRecord . |
void |
storeStart(RecordContext ctx)
Called before storing an
UpdatableRecord . |
void |
updateEnd(RecordContext ctx)
Called after updating an
UpdatableRecord . |
void |
updateStart(RecordContext ctx)
Called before updating an
UpdatableRecord . |
void storeStart(RecordContext ctx)
UpdatableRecord
.
Implementations are allowed to modify RecordContext.record()
prior to storing. Note that modifying the record's primary key value may
influence whether storing results in an INSERT
or
UPDATE
statement.
A store event will generate a nested insertStart(RecordContext)
or updateStart(RecordContext)
event.
UpdatableRecord.store()
void storeEnd(RecordContext ctx)
UpdatableRecord
.
Implementations are allowed to modify RecordContext.record()
after storing. Note that modifying the record's primary key value may
influence whether storing results in an INSERT
or
UPDATE
statement.
A store event will generate a nested insertEnd(RecordContext)
or updateEnd(RecordContext)
event.
UpdatableRecord.store()
void insertStart(RecordContext ctx)
UpdatableRecord
.
Implementations are allowed to modify RecordContext.record()
prior to inserting.
UpdatableRecord.insert()
void insertEnd(RecordContext ctx)
UpdatableRecord
.
Implementations are allowed to modify RecordContext.record()
after inserting.
UpdatableRecord.insert()
void updateStart(RecordContext ctx)
UpdatableRecord
.
Implementations are allowed to modify RecordContext.record()
prior to updating.
UpdatableRecord.update()
void updateEnd(RecordContext ctx)
UpdatableRecord
.
Implementations are allowed to modify RecordContext.record()
after updating.
UpdatableRecord.update()
void deleteStart(RecordContext ctx)
UpdatableRecord
.
Implementations are allowed to modify RecordContext.record()
prior to deleting.
UpdatableRecord.delete()
void deleteEnd(RecordContext ctx)
UpdatableRecord
.
Implementations are allowed to modify RecordContext.record()
after deleting.
UpdatableRecord.delete()
void loadStart(RecordContext ctx)
UpdatableRecord
.
Implementations are allowed to modify RecordContext.record()
prior to loading.
void loadEnd(RecordContext ctx)
UpdatableRecord
.
Implementations are allowed to modify RecordContext.record()
after loading.
void refreshStart(RecordContext ctx)
UpdatableRecord
.
Implementations are allowed to modify RecordContext.record()
prior to refreshing.
UpdatableRecord.refresh()
void refreshEnd(RecordContext ctx)
UpdatableRecord
.
Implementations are allowed to modify RecordContext.record()
after refreshing.
UpdatableRecord.refresh()
void exception(RecordContext ctx)
Copyright © 2017. All Rights Reserved.