misc Javadoc improvements around event listeners

This commit is contained in:
Gavin King 2023-07-20 12:30:12 +02:00
parent 28d9c65293
commit 17503d93c6
4 changed files with 27 additions and 14 deletions

View File

@ -48,8 +48,8 @@ public interface Interceptor {
* Called just before an object is initialized. The interceptor may change the {@code state}, which will
* be propagated to the persistent object. Note that when this method is called, {@code entity} will be
* an empty uninitialized instance of the class.
* <p>
* NOTE: The indexes across the {@code state}, {@code propertyNames} and {@code types} arrays match.
*
* @apiNote The indexes across the {@code state}, {@code propertyNames}, and {@code types} arrays match.
*
* @param entity The entity instance being loaded
* @param id The identifier value being loaded
@ -73,8 +73,8 @@ public interface Interceptor {
* Called just before an object is initialized. The interceptor may change the {@code state}, which will
* be propagated to the persistent object. Note that when this method is called, {@code entity} will be
* an empty uninitialized instance of the class.
* <p>
* NOTE: The indexes across the {@code state}, {@code propertyNames} and {@code types} arrays match.
*
* @apiNote The indexes across the {@code state}, {@code propertyNames}, and {@code types} arrays match.
*
* @param entity The entity instance being loaded
* @param id The identifier value being loaded
@ -100,8 +100,8 @@ public interface Interceptor {
* Note that not all flushes end in actual synchronization with the database, in which case the
* new {@code currentState} will be propagated to the object, but not necessarily (immediately) to
* the database. It is strongly recommended that the interceptor <b>not</b> modify the {@code previousState}.
* <p>
* NOTE: The indexes across the {@code currentState}, {@code previousState}, {@code propertyNames} and
*
* @apiNote The indexes across the {@code currentState}, {@code previousState}, {@code propertyNames}, and
* {@code types} arrays match.
*
* @param entity The entity instance detected as being dirty and being flushed
@ -134,8 +134,8 @@ public interface Interceptor {
* Note that not all flushes end in actual synchronization with the database, in which case the
* new {@code currentState} will be propagated to the object, but not necessarily (immediately) to
* the database. It is strongly recommended that the interceptor <b>not</b> modify the {@code previousState}.
* <p>
* NOTE: The indexes across the {@code currentState}, {@code previousState}, {@code propertyNames} and
*
* @apiNote The indexes across the {@code currentState}, {@code previousState}, {@code propertyNames}, and
* {@code types} arrays match.
*
* @param entity The entity instance detected as being dirty and being flushed

View File

@ -9,7 +9,7 @@ package org.hibernate.event.spi;
import java.io.Serializable;
/**
* Defines a base class for Session generated events.
* Defines a base class for {@link org.hibernate.Session}-generated events.
*
* @author Steve Ebersole
*/

View File

@ -14,5 +14,18 @@
* performed, and an event listener must respond to the event and
* do that work, usually by scheduling some sort of
* {@linkplain org.hibernate.action.spi.Executable action}.
* <p>
* Note that a {@link org.hibernate.StatelessSession} does not
* produce events and does not make use of this framework.
*
* @apiNote The framework for event notifications defined in this
* package is intended for use by extremely sophisticated
* libraries and frameworks which extend Hibernate, and
* by the internal implementation of Hibernate itself.
* <p>Regular application code should prefer the use of
* JPA-defined lifecycle callback methods, that is,
* {@link jakarta.persistence.PostPersist @PostPersist}
* and friends, or an implementation of the venerable
* {@link org.hibernate.Interceptor} interface.
*/
package org.hibernate.event.spi;