- 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 TypeMethodDescriptionfinal void
deleteEnd
(RecordContext ctx) Called after deleting anUpdatableRecord
.final void
deleteStart
(RecordContext ctx) Called before deleting anUpdatableRecord
.final void
exception
(RecordContext ctx) Called when an exception occurs.final void
insertEnd
(RecordContext ctx) Called after inserting anUpdatableRecord
.final void
insertStart
(RecordContext ctx) Called before inserting anUpdatableRecord
.final void
loadEnd
(RecordContext ctx) Called after loading anUpdatableRecord
.final void
loadStart
(RecordContext ctx) Called before loading anUpdatableRecord
.final void
mergeEnd
(RecordContext ctx) Called after merging anUpdatableRecord
.final void
mergeStart
(RecordContext ctx) Called before merging anUpdatableRecord
.final CallbackRecordListener
onDeleteEnd
(Consumer<? super RecordContext> newOnDeleteEnd) final CallbackRecordListener
onDeleteStart
(Consumer<? super RecordContext> newOnDeleteStart) final CallbackRecordListener
onException
(Consumer<? super RecordContext> newOnException) final CallbackRecordListener
onInsertEnd
(Consumer<? super RecordContext> newOnInsertEnd) final CallbackRecordListener
onInsertStart
(Consumer<? super RecordContext> newOnInsertStart) final CallbackRecordListener
onLoadEnd
(Consumer<? super RecordContext> newOnLoadEnd) final CallbackRecordListener
onLoadStart
(Consumer<? super RecordContext> newOnLoadStart) final CallbackRecordListener
onMergeEnd
(Consumer<? super RecordContext> newOnMergeEnd) final CallbackRecordListener
onMergeStart
(Consumer<? super RecordContext> newOnMergeStart) final CallbackRecordListener
onRefreshEnd
(Consumer<? super RecordContext> newOnRefreshEnd) final CallbackRecordListener
onRefreshStart
(Consumer<? super RecordContext> newOnRefreshStart) final CallbackRecordListener
onStoreEnd
(Consumer<? super RecordContext> newOnStoreEnd) final CallbackRecordListener
onStoreStart
(Consumer<? super RecordContext> newOnStoreStart) final CallbackRecordListener
onUpdateEnd
(Consumer<? super RecordContext> newOnUpdateEnd) final CallbackRecordListener
onUpdateStart
(Consumer<? super RecordContext> newOnUpdateStart) final void
refreshEnd
(RecordContext ctx) Called after refreshing anUpdatableRecord
.final void
Called before refreshing anUpdatableRecord
.final void
storeEnd
(RecordContext ctx) Called after storing anUpdatableRecord
.final void
storeStart
(RecordContext ctx) Called before storing anUpdatableRecord
.final void
updateEnd
(RecordContext ctx) Called after updating anUpdatableRecord
.final 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
- Parameters:
ctx
- The context containing information about the record operation.- See Also:
-
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
- Parameters:
ctx
- The context containing information about the record operation.- See Also:
-
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
- Parameters:
ctx
- The context containing information about the record operation.- See Also:
-
insertEnd
Description copied from interface:RecordListener
Called after inserting anUpdatableRecord
.Implementations are allowed to modify
RecordContext.record()
after inserting.- Specified by:
insertEnd
in interfaceRecordListener
- Parameters:
ctx
- The context containing information about the record operation.- See Also:
-
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
- Parameters:
ctx
- The context containing information about the record operation.- See Also:
-
updateEnd
Description copied from interface:RecordListener
Called after updating anUpdatableRecord
.Implementations are allowed to modify
RecordContext.record()
after updating.- Specified by:
updateEnd
in interfaceRecordListener
- Parameters:
ctx
- The context containing information about the record operation.- See Also:
-
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
- Parameters:
ctx
- The context containing information about the record operation.- See Also:
-
mergeEnd
Description copied from interface:RecordListener
Called after merging anUpdatableRecord
.Implementations are allowed to modify
RecordContext.record()
after merging.- Specified by:
mergeEnd
in interfaceRecordListener
- Parameters:
ctx
- The context containing information about the record operation.- See Also:
-
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
- Parameters:
ctx
- The context containing information about the record operation.- See Also:
-
deleteEnd
Description copied from interface:RecordListener
Called after deleting anUpdatableRecord
.Implementations are allowed to modify
RecordContext.record()
after deleting.- Specified by:
deleteEnd
in interfaceRecordListener
- Parameters:
ctx
- The context containing information about the record operation.- See Also:
-
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
- Parameters:
ctx
- The context containing information about the record operation.
-
loadEnd
Description copied from interface:RecordListener
Called after loading anUpdatableRecord
.Implementations are allowed to modify
RecordContext.record()
after loading.- Specified by:
loadEnd
in interfaceRecordListener
- Parameters:
ctx
- The context containing information about the record operation.
-
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
- Parameters:
ctx
- The context containing information about the record operation.- See Also:
-
refreshEnd
Description copied from interface:RecordListener
Called after refreshing anUpdatableRecord
.Implementations are allowed to modify
RecordContext.record()
after refreshing.- Specified by:
refreshEnd
in interfaceRecordListener
- Parameters:
ctx
- The context containing information about the record operation.- See Also:
-
exception
Description copied from interface:RecordListener
Called when an exception occurs.- Specified by:
exception
in interfaceRecordListener
- Parameters:
ctx
- The context containing information about the record operation.
-
onStoreStart
-
onStoreEnd
-
onInsertStart
-
onInsertEnd
-
onUpdateStart
-
onUpdateEnd
-
onMergeStart
-
onMergeEnd
-
onDeleteStart
-
onDeleteEnd
-
onLoadStart
-
onLoadEnd
-
onRefreshStart
public final CallbackRecordListener onRefreshStart(Consumer<? super RecordContext> newOnRefreshStart) -
onRefreshEnd
-
onException
-