Class EntityPersistenceEventObserver
- java.lang.Object
-
- org.openbravo.client.kernel.event.EntityPersistenceEventObserver
-
- Direct Known Subclasses:
AccountChangeObserver
,ColorEventHandler
,EmailServerConfigurationEventHandler
,ExternalBusinessPartnerAddressMappingEventHandler
,ExternalBusinessPartnerConfigColspan
,ExternalBusinessPartnerConfigFilterEventHandler
,ExternalBusinessPartnerConfigPropertyEventHandler
,ExternalBusinessPartnerConfigurationEventHandler
,FileUploadColumnEventHandler
,OrderLineTestObserver
,PriceAdjustmentHandler
,ProductPriceRuleVersionEventHandler
,UserCtxCacheObserver
@ApplicationScoped public abstract class EntityPersistenceEventObserver extends Object
A base listener which can be extended to perform specific actions when persisting entities.- Author:
- mtaal
-
-
Constructor Summary
Constructors Constructor Description EntityPersistenceEventObserver()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Entity[]
getObservedEntities()
Must be implemented by subclass to signal whichEntity
types are observed.protected boolean
isValidEvent(EntityPersistenceEvent event)
Convenience method which can be used by subclass to check if a certain event is indeed targeted for this observer.
-
-
-
Method Detail
-
getObservedEntities
protected abstract Entity[] getObservedEntities()
Must be implemented by subclass to signal whichEntity
types are observed.- Returns:
- the array of entity instances to observe.
- See Also:
isValidEvent(EntityPersistenceEvent)
-
isValidEvent
protected boolean isValidEvent(EntityPersistenceEvent event)
Convenience method which can be used by subclass to check if a certain event is indeed targeted for this observer.- Parameters:
event
- the persistence event which is being handled by this observer.- Returns:
- true if the event applies to one of the observed entities.
- See Also:
getObservedEntities()
-
-