diff --git a/hibernate-core/src/main/java/org/hibernate/Interceptor.java b/hibernate-core/src/main/java/org/hibernate/Interceptor.java index 4a21a07bd9..0144de5751 100644 --- a/hibernate-core/src/main/java/org/hibernate/Interceptor.java +++ b/hibernate-core/src/main/java/org/hibernate/Interceptor.java @@ -14,22 +14,25 @@ import org.hibernate.metamodel.spi.EntityRepresentationStrategy; import org.hibernate.type.Type; /** - * Allows user code to inspect and/or change property values. - * - * Inspection occurs before property values are written and after they are read - * from the database. - * - * There might be a single instance of {@code Interceptor} for a {@code SessionFactory}, or a new instance - * might be specified for each {@code Session}. Whichever approach is used, the interceptor must be - * serializable if the {@code Session} is to be serializable. This means that {@code SessionFactory}-scoped + * Allows user code to inspect and/or change entity property values before they are + * written to the database, or after the are read from the database. + *

+ * The {@code Session} may not be invoked from a callback (nor may a callback cause a + * collection or proxy to be lazily initialized). + *

+ * There might be a single instance of {@code Interceptor} for a {@link SessionFactory}, + * or a new instance might be created for each {@link Session}. Use: + *

+ * Whichever approach is used, the interceptor must be serializable for the + * {@code Session} to be serializable. This means that {@code SessionFactory}-scoped * interceptors should implement {@code readResolve()}. * - * The {@code Session} may not be invoked from a callback (nor may a callback cause a collection or proxy to - * be lazily initialized). - * - * Instead of implementing this interface directly, it is usually better to extend {@code EmptyInterceptor} - * and override only the callback methods of interest. - * * @see SessionBuilder#interceptor(Interceptor) * @see SharedSessionBuilder#interceptor() * @see org.hibernate.cfg.Configuration#setInterceptor(Interceptor) diff --git a/hibernate-core/src/main/java/org/hibernate/SessionEventListener.java b/hibernate-core/src/main/java/org/hibernate/SessionEventListener.java index 4b0d4a0169..0df61f0a5a 100644 --- a/hibernate-core/src/main/java/org/hibernate/SessionEventListener.java +++ b/hibernate-core/src/main/java/org/hibernate/SessionEventListener.java @@ -11,6 +11,8 @@ import java.io.Serializable; /** * NOTE : Consider this an incubating API, likely to change as wider usage indicates changes that need to be made * + * @see org.hibernate.cfg.AvailableSettings#AUTO_SESSION_EVENTS_LISTENER + * * @author Steve Ebersole */ public interface SessionEventListener extends Serializable { diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/TimeZoneStorageType.java b/hibernate-core/src/main/java/org/hibernate/annotations/TimeZoneStorageType.java index 393ca19413..6c474508ae 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/TimeZoneStorageType.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/TimeZoneStorageType.java @@ -10,7 +10,7 @@ import org.hibernate.Incubating; import org.hibernate.dialect.Dialect; /** - * Describes the storage for the time zone information for time zone based types. + * Describes the storage of timezone information for zoned datetime types. * * @author Christian Beikov * @author Steve Ebersole @@ -19,19 +19,28 @@ import org.hibernate.dialect.Dialect; @Incubating public enum TimeZoneStorageType { /** - * Stores the time zone by using the "with time zone" type. Error if {@link Dialect#getTimeZoneSupport()} is not {@link org.hibernate.dialect.TimeZoneSupport#NATIVE}. + * Stores the timezone by using the {@code with time zone} + * SQL column type. + * + * Error if {@link Dialect#getTimeZoneSupport()} is not + * {@link org.hibernate.dialect.TimeZoneSupport#NATIVE}. */ NATIVE, /** - * Does not store the time zone, and instead normalizes timestamps to UTC. + * Does not store the time zone, and instead normalizes + * timestamps to UTC. */ NORMALIZE, /** - * Stores the time zone in a separate column; works in conjunction with {@link TimeZoneColumn}. + * Stores the time zone in a separate column; works in + * conjunction with {@link TimeZoneColumn}. */ COLUMN, /** - * Stores the time zone either with {@link #NATIVE} if {@link Dialect#getTimeZoneSupport()} is {@link org.hibernate.dialect.TimeZoneSupport#NATIVE}, otherwise uses the {@link #COLUMN} strategy. + * Stores the time zone either with {@link #NATIVE} if + * {@link Dialect#getTimeZoneSupport()} is + * {@link org.hibernate.dialect.TimeZoneSupport#NATIVE}, + * otherwise uses the {@link #COLUMN} strategy. */ AUTO diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java b/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java index d9cc00686f..6463455488 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java @@ -9,6 +9,7 @@ package org.hibernate.cfg; import java.util.function.Supplier; import org.hibernate.jpa.LegacySpecHints; +import org.hibernate.query.spi.QueryPlan; /** * Enumerates the configuration properties supported by Hibernate, including @@ -137,6 +138,7 @@ public interface AvailableSettings { *

* See JPA 2 section 8.2.1.9 */ + @SuppressWarnings("unused") String JAKARTA_PERSIST_VALIDATION_GROUP = "jakarta.persistence.validation.group.pre-persist"; /** @@ -144,6 +146,7 @@ public interface AvailableSettings { *

* See JPA 2 section 8.2.1.9 */ + @SuppressWarnings("unused") String JAKARTA_UPDATE_VALIDATION_GROUP = "jakarta.persistence.validation.group.pre-update"; /** @@ -151,6 +154,7 @@ public interface AvailableSettings { *

* See JPA 2 section 8.2.1.9 */ + @SuppressWarnings("unused") String JAKARTA_REMOVE_VALIDATION_GROUP = "jakarta.persistence.validation.group.pre-remove"; /** @@ -200,7 +204,7 @@ public interface AvailableSettings { /** * Specifies a {@link java.util.Collection collection} of the {@link ClassLoader} - * instances Hibernate should use for classloading and resource lookups. + * instances Hibernate should use for classloading and resource loading. * * @since 5.0 */ @@ -322,7 +326,8 @@ public interface AvailableSettings { String POOL_SIZE = " hibernate.connection.pool_size"; /** - * Specifies a {@link javax.sql.DataSource}, either: