Class EntityPersistenceEventObserver

    • Constructor Detail

      • EntityPersistenceEventObserver

        public EntityPersistenceEventObserver()
    • Method Detail

      • getObservedEntities

        protected abstract Entity[] getObservedEntities()
        Must be implemented by subclass to signal which Entity 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()