Interface EntityListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
AbsenceReportCreateEntityListener, AbsenceReportEntityListener, CalculateContingentsAfterCommitListener, CollectingAfterCommitListener, CreateConflictEntityListener, EntityFolderTemplateAfterCommitListener, EventRegistrationCreationAfterCommitListener, ExamAverageAfterCommitListener, FulltextIndexEntityListener, InputStatisticsAfterCommitListener, MinimalPresenceCreateEntityListener, NewsletterReadDateListener, NotificationAfterCommitListener, OpenIdRegistrationListener, PrincipalRenameListener, RabbitMqAfterCommitListener, ReferenceCodeCreateEntityListener, ResourceSearchTextTikaEntityListener, ScriptScheduler, SendInvitationMailEntityListener, TodoRuleListener, TopicSubscriptionMailDispatcher

public interface EntityListener extends EventListener
EntityListeners get notifications on actions taken on Entities. They will be notified about those events after the transaction that did the modifications is committed. If the transaction has been rolled back, no events will be fired.

There are 3 ways to use EntityListener: By code:

  • To use an EntityListener for one EntityManager only: EntityManager.addEntityListener() etc.
  • To use an EntityListener for one Context (and thus all entity types): Context.addEntityListener() etc.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Fired for newly created entities after the transaction committed successfully.
    default void
    Fired for deleted entities after the transaction committed successfully.
    default void
    Fired for updated entities after the transaction committed successfully.
  • Method Details

    • entityCreated

      default void entityCreated(EntityEvent event)
      Fired for newly created entities after the transaction committed successfully.
    • entityUpdated

      default void entityUpdated(EntityEvent event)
      Fired for updated entities after the transaction committed successfully.
    • entityDeleted

      default void entityDeleted(EntityEvent event)
      Fired for deleted entities after the transaction committed successfully.