Jakarta Persistence (JPA) Annotation Type

jakarta.persistence.EntityListeners

Implemented Interfaces:
Annotation
Target:
Type

Specifies the callback listener classes to be used for an entity or mapped superclass. This annotation may be applied to an entity class or mapped superclass.

The specified entity listener classes may have callback methods annotated PrePersist, PreUpdate, PreRemove, PostPersist, PostUpdate, and/or PostRemove.

Since:
Jakarta Persistence (JPA) 1.0
The JPA Lifecycle Events article explains how to use EntityListeners.

Public Instance Methods

Class<?>[] value()
The callback listener classes
Since:
Jakarta Persistence (JPA) 1.0

Annotation Elements

This is a marker annotation with no members/elements.

Additional JDK methods inherited from java.lang.annotation.Annotation

java.lang.annotation.Annotation/annotationType(), java.lang.annotation.Annotation/equals(Object), java.lang.annotation.Annotation/hashCode(), java.lang.annotation.Annotation/toString()