- All Implemented Interfaces:
EventListener
,RecordListener
RecordListener
that allows for functional composition.
For example:
ParseListener listener = RecordListener
.onLoadStart(ctx -> something())
.onLoadEnd(ctx -> something());
- Author:
- Lukas Eder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteEnd(RecordContext ctx)
Called after deleting anUpdatableRecord
.void
deleteStart(RecordContext ctx)
Called before deleting anUpdatableRecord
.void
exception(RecordContext ctx)
Called when an exception occurs.void
insertEnd(RecordContext ctx)
Called after inserting anUpdatableRecord
.void
insertStart(RecordContext ctx)
Called before inserting anUpdatableRecord
.void
loadEnd(RecordContext ctx)
Called after loading anUpdatableRecord
.void
loadStart(RecordContext ctx)
Called before loading anUpdatableRecord
.void
mergeEnd(RecordContext ctx)
Called after merging anUpdatableRecord
.void
mergeStart(RecordContext ctx)
Called before merging anUpdatableRecord
.onDeleteEnd(Consumer<? super RecordContext> newOnDeleteEnd)
onDeleteStart(Consumer<? super RecordContext> newOnDeleteStart)
onException(Consumer<? super RecordContext> newOnException)
onInsertEnd(Consumer<? super RecordContext> newOnInsertEnd)
onInsertStart(Consumer<? super RecordContext> newOnInsertStart)
onLoadEnd(Consumer<? super RecordContext> newOnLoadEnd)
onLoadStart(Consumer<? super RecordContext> newOnLoadStart)
onMergeEnd(Consumer<? super RecordContext> newOnMergeEnd)
onMergeStart(Consumer<? super RecordContext> newOnMergeStart)
onRefreshEnd(Consumer<? super RecordContext> newOnRefreshEnd)
onRefreshStart(Consumer<? super RecordContext> newOnRefreshStart)
onStoreEnd(Consumer<? super RecordContext> newOnStoreEnd)
onStoreStart(Consumer<? super RecordContext> newOnStoreStart)
onUpdateEnd(Consumer<? super RecordContext> newOnUpdateEnd)
onUpdateStart(Consumer<? super RecordContext> newOnUpdateStart)
void
refreshEnd(RecordContext ctx)
Called after refreshing anUpdatableRecord
.void
refreshStart(RecordContext ctx)
Called before refreshing anUpdatableRecord
.void
storeEnd(RecordContext ctx)
Called after storing anUpdatableRecord
.void
storeStart(RecordContext ctx)
Called before storing anUpdatableRecord
.void
updateEnd(RecordContext ctx)
Called after updating anUpdatableRecord
.void
updateStart(RecordContext ctx)
Called before updating anUpdatableRecord
.
-
Constructor Details
-
CallbackRecordListener
public CallbackRecordListener()
-
-
Method Details
-
storeStart
Description copied from interface:RecordListener
Called before storing anUpdatableRecord
.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 anINSERT
orUPDATE
statement.A store event will generate a nested
RecordListener.insertStart(RecordContext)
orRecordListener.updateStart(RecordContext)
event.- Specified by:
storeStart
in interfaceRecordListener
- See Also:
UpdatableRecord.store()
-
storeEnd
Description copied from interface:RecordListener
Called after storing anUpdatableRecord
.Implementations are allowed to modify
RecordContext.record()
after storing. Note that modifying the record's primary key value may influence whether storing results in anINSERT
orUPDATE
statement.A store event will generate a nested
RecordListener.insertEnd(RecordContext)
orRecordListener.updateEnd(RecordContext)
event.- Specified by:
storeEnd
in interfaceRecordListener
- See Also:
UpdatableRecord.store()
-
insertStart
Description copied from interface:RecordListener
Called before inserting anUpdatableRecord
.Implementations are allowed to modify
RecordContext.record()
prior to inserting.- Specified by:
insertStart
in interfaceRecordListener
- See Also:
UpdatableRecord.insert()
-
insertEnd
Description copied from interface:RecordListener
Called after inserting anUpdatableRecord
.Implementations are allowed to modify
RecordContext.record()
after inserting.- Specified by:
insertEnd
in interfaceRecordListener
- See Also:
UpdatableRecord.insert()
-
updateStart
Description copied from interface:RecordListener
Called before updating anUpdatableRecord
.Implementations are allowed to modify
RecordContext.record()
prior to updating.- Specified by:
updateStart
in interfaceRecordListener
- See Also:
UpdatableRecord.update()
-
updateEnd
Description copied from interface:RecordListener
Called after updating anUpdatableRecord
.Implementations are allowed to modify
RecordContext.record()
after updating.- Specified by:
updateEnd
in interfaceRecordListener
- See Also:
UpdatableRecord.update()
-
mergeStart
Description copied from interface:RecordListener
Called before merging anUpdatableRecord
.Implementations are allowed to modify
RecordContext.record()
prior to merging.- Specified by:
mergeStart
in interfaceRecordListener
- See Also:
UpdatableRecord.merge()
-
mergeEnd
Description copied from interface:RecordListener
Called after merging anUpdatableRecord
.Implementations are allowed to modify
RecordContext.record()
after merging.- Specified by:
mergeEnd
in interfaceRecordListener
- See Also:
UpdatableRecord.merge()
-
deleteStart
Description copied from interface:RecordListener
Called before deleting anUpdatableRecord
.Implementations are allowed to modify
RecordContext.record()
prior to deleting.- Specified by:
deleteStart
in interfaceRecordListener
- See Also:
UpdatableRecord.delete()
-
deleteEnd
Description copied from interface:RecordListener
Called after deleting anUpdatableRecord
.Implementations are allowed to modify
RecordContext.record()
after deleting.- Specified by:
deleteEnd
in interfaceRecordListener
- See Also:
UpdatableRecord.delete()
-
loadStart
Description copied from interface:RecordListener
Called before loading anUpdatableRecord
.Implementations are allowed to modify
RecordContext.record()
prior to loading.- Specified by:
loadStart
in interfaceRecordListener
-
loadEnd
Description copied from interface:RecordListener
Called after loading anUpdatableRecord
.Implementations are allowed to modify
RecordContext.record()
after loading.- Specified by:
loadEnd
in interfaceRecordListener
-
refreshStart
Description copied from interface:RecordListener
Called before refreshing anUpdatableRecord
.Implementations are allowed to modify
RecordContext.record()
prior to refreshing.- Specified by:
refreshStart
in interfaceRecordListener
- See Also:
UpdatableRecord.refresh()
-
refreshEnd
Description copied from interface:RecordListener
Called after refreshing anUpdatableRecord
.Implementations are allowed to modify
RecordContext.record()
after refreshing.- Specified by:
refreshEnd
in interfaceRecordListener
- See Also:
UpdatableRecord.refresh()
-
exception
Description copied from interface:RecordListener
Called when an exception occurs.- Specified by:
exception
in interfaceRecordListener
-
onStoreStart
-
onStoreEnd
-
onInsertStart
public final CallbackRecordListener onInsertStart(Consumer<? super RecordContext> newOnInsertStart) -
onInsertEnd
-
onUpdateStart
public final CallbackRecordListener onUpdateStart(Consumer<? super RecordContext> newOnUpdateStart) -
onUpdateEnd
-
onMergeStart
-
onMergeEnd
-
onDeleteStart
public final CallbackRecordListener onDeleteStart(Consumer<? super RecordContext> newOnDeleteStart) -
onDeleteEnd
-
onLoadStart
-
onLoadEnd
-
onRefreshStart
public final CallbackRecordListener onRefreshStart(Consumer<? super RecordContext> newOnRefreshStart) -
onRefreshEnd
-
onException
-