- 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voiddeleteEnd(RecordContext ctx) Called after deleting anUpdatableRecord.final voiddeleteStart(RecordContext ctx) Called before deleting anUpdatableRecord.final voidexception(RecordContext ctx) Called when an exception occurs.final voidinsertEnd(RecordContext ctx) Called after inserting anUpdatableRecord.final voidinsertStart(RecordContext ctx) Called before inserting anUpdatableRecord.final voidloadEnd(RecordContext ctx) Called after loading anUpdatableRecord.final voidloadStart(RecordContext ctx) Called before loading anUpdatableRecord.final voidmergeEnd(RecordContext ctx) Called after merging anUpdatableRecord.final voidmergeStart(RecordContext ctx) Called before merging anUpdatableRecord.final CallbackRecordListeneronDeleteEnd(Consumer<? super RecordContext> newOnDeleteEnd) final CallbackRecordListeneronDeleteStart(Consumer<? super RecordContext> newOnDeleteStart) final CallbackRecordListeneronException(Consumer<? super RecordContext> newOnException) final CallbackRecordListeneronInsertEnd(Consumer<? super RecordContext> newOnInsertEnd) final CallbackRecordListeneronInsertStart(Consumer<? super RecordContext> newOnInsertStart) final CallbackRecordListeneronLoadEnd(Consumer<? super RecordContext> newOnLoadEnd) final CallbackRecordListeneronLoadStart(Consumer<? super RecordContext> newOnLoadStart) final CallbackRecordListeneronMergeEnd(Consumer<? super RecordContext> newOnMergeEnd) final CallbackRecordListeneronMergeStart(Consumer<? super RecordContext> newOnMergeStart) final CallbackRecordListeneronRefreshEnd(Consumer<? super RecordContext> newOnRefreshEnd) final CallbackRecordListeneronRefreshStart(Consumer<? super RecordContext> newOnRefreshStart) final CallbackRecordListeneronStoreEnd(Consumer<? super RecordContext> newOnStoreEnd) final CallbackRecordListeneronStoreStart(Consumer<? super RecordContext> newOnStoreStart) final CallbackRecordListeneronUpdateEnd(Consumer<? super RecordContext> newOnUpdateEnd) final CallbackRecordListeneronUpdateStart(Consumer<? super RecordContext> newOnUpdateStart) final voidrefreshEnd(RecordContext ctx) Called after refreshing anUpdatableRecord.final voidCalled before refreshing anUpdatableRecord.final voidstoreEnd(RecordContext ctx) Called after storing anUpdatableRecord.final voidstoreStart(RecordContext ctx) Called before storing anUpdatableRecord.final voidupdateEnd(RecordContext ctx) Called after updating anUpdatableRecord.final voidupdateStart(RecordContext ctx) Called before updating anUpdatableRecord.
-
Constructor Details
-
CallbackRecordListener
public CallbackRecordListener()
-
-
Method Details
-
storeStart
Description copied from interface:RecordListenerCalled 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 anINSERTorUPDATEstatement.A store event will generate a nested
RecordListener.insertStart(RecordContext)orRecordListener.updateStart(RecordContext)event.- Specified by:
storeStartin interfaceRecordListener- Parameters:
ctx- The context containing information about the record operation.- See Also:
-
storeEnd
Description copied from interface:RecordListenerCalled 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 anINSERTorUPDATEstatement.A store event will generate a nested
RecordListener.insertEnd(RecordContext)orRecordListener.updateEnd(RecordContext)event.- Specified by:
storeEndin interfaceRecordListener- Parameters:
ctx- The context containing information about the record operation.- See Also:
-
insertStart
Description copied from interface:RecordListenerCalled before inserting anUpdatableRecord.Implementations are allowed to modify
RecordContext.record()prior to inserting.- Specified by:
insertStartin interfaceRecordListener- Parameters:
ctx- The context containing information about the record operation.- See Also:
-
insertEnd
Description copied from interface:RecordListenerCalled after inserting anUpdatableRecord.Implementations are allowed to modify
RecordContext.record()after inserting.- Specified by:
insertEndin interfaceRecordListener- Parameters:
ctx- The context containing information about the record operation.- See Also:
-
updateStart
Description copied from interface:RecordListenerCalled before updating anUpdatableRecord.Implementations are allowed to modify
RecordContext.record()prior to updating.- Specified by:
updateStartin interfaceRecordListener- Parameters:
ctx- The context containing information about the record operation.- See Also:
-
updateEnd
Description copied from interface:RecordListenerCalled after updating anUpdatableRecord.Implementations are allowed to modify
RecordContext.record()after updating.- Specified by:
updateEndin interfaceRecordListener- Parameters:
ctx- The context containing information about the record operation.- See Also:
-
mergeStart
Description copied from interface:RecordListenerCalled before merging anUpdatableRecord.Implementations are allowed to modify
RecordContext.record()prior to merging.- Specified by:
mergeStartin interfaceRecordListener- Parameters:
ctx- The context containing information about the record operation.- See Also:
-
mergeEnd
Description copied from interface:RecordListenerCalled after merging anUpdatableRecord.Implementations are allowed to modify
RecordContext.record()after merging.- Specified by:
mergeEndin interfaceRecordListener- Parameters:
ctx- The context containing information about the record operation.- See Also:
-
deleteStart
Description copied from interface:RecordListenerCalled before deleting anUpdatableRecord.Implementations are allowed to modify
RecordContext.record()prior to deleting.- Specified by:
deleteStartin interfaceRecordListener- Parameters:
ctx- The context containing information about the record operation.- See Also:
-
deleteEnd
Description copied from interface:RecordListenerCalled after deleting anUpdatableRecord.Implementations are allowed to modify
RecordContext.record()after deleting.- Specified by:
deleteEndin interfaceRecordListener- Parameters:
ctx- The context containing information about the record operation.- See Also:
-
loadStart
Description copied from interface:RecordListenerCalled before loading anUpdatableRecord.Implementations are allowed to modify
RecordContext.record()prior to loading.- Specified by:
loadStartin interfaceRecordListener- Parameters:
ctx- The context containing information about the record operation.
-
loadEnd
Description copied from interface:RecordListenerCalled after loading anUpdatableRecord.Implementations are allowed to modify
RecordContext.record()after loading.- Specified by:
loadEndin interfaceRecordListener- Parameters:
ctx- The context containing information about the record operation.
-
refreshStart
Description copied from interface:RecordListenerCalled before refreshing anUpdatableRecord.Implementations are allowed to modify
RecordContext.record()prior to refreshing.- Specified by:
refreshStartin interfaceRecordListener- Parameters:
ctx- The context containing information about the record operation.- See Also:
-
refreshEnd
Description copied from interface:RecordListenerCalled after refreshing anUpdatableRecord.Implementations are allowed to modify
RecordContext.record()after refreshing.- Specified by:
refreshEndin interfaceRecordListener- Parameters:
ctx- The context containing information about the record operation.- See Also:
-
exception
Description copied from interface:RecordListenerCalled when an exception occurs.- Specified by:
exceptionin 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
-