Class EntityLifecycleEventDelegate
java.lang.Object
org.springframework.data.relational.core.EntityLifecycleEventDelegate
Delegate class to encapsulate lifecycle event configuration and publishing. Event creation is deferred within an
event
Supplier to delay the actual event object creation.- Since:
- 3.0
- Author:
- Mark Paluch
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidpublishEvent(Supplier<?> eventSupplier) Publish an application event if event publishing is enabled.voidsetEventsEnabled(boolean eventsEnabled) voidsetPublisher(ApplicationEventPublisher publisher)
-
Constructor Details
-
EntityLifecycleEventDelegate
public EntityLifecycleEventDelegate()
-
-
Method Details
-
setPublisher
-
isEventsEnabled
public boolean isEventsEnabled() -
setEventsEnabled
public void setEventsEnabled(boolean eventsEnabled) -
publishEvent
Publish an application event if event publishing is enabled.- Parameters:
eventSupplier- the supplier for application events.
-