diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/AttributeAccessor.java b/hibernate-core/src/main/java/org/hibernate/annotations/AttributeAccessor.java index 43f6ec0fe9..145715d106 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/AttributeAccessor.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/AttributeAccessor.java @@ -6,18 +6,18 @@ */ package org.hibernate.annotations; -import org.hibernate.property.access.spi.PropertyAccessStrategy; -import org.hibernate.binder.internal.AttributeAccessorBinder; - import java.lang.annotation.Retention; import java.lang.annotation.Target; +import org.hibernate.binder.internal.AttributeAccessorBinder; +import org.hibernate.property.access.spi.PropertyAccessStrategy; + import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.RetentionPolicy.RUNTIME; /** - * Names a persistent property access strategy ({@link PropertyAccessStrategy}) to use. + * Specifies an attribute {@linkplain PropertyAccessStrategy access strategy} to use. *
* Can be specified at either:
- This package defines functionality for processing JDBC - result sets and returning complex graphs of persistent - objects. -
-- Subclasses of Loader define a particular - query mechanism. -
- - diff --git a/hibernate-core/src/main/java/org/hibernate/metadata/package-info.java b/hibernate-core/src/main/java/org/hibernate/metadata/package-info.java index 84b224b2ee..4c8a79aeec 100644 --- a/hibernate-core/src/main/java/org/hibernate/metadata/package-info.java +++ b/hibernate-core/src/main/java/org/hibernate/metadata/package-info.java @@ -6,8 +6,8 @@ */ /** - * This package defines an API for accessing the Hibernate runtime metamodel. + * This package defines an API for accessing details about model mapping * - * deprecated (since 6.0) Use Hibernate's mapping model {@link org.hibernate.metamodel.MappingMetamodel} + * Deprecated since 6.x in favor of the {@linkplain org.hibernate.metamodel.MappingMetamodel mapping-metamodel} */ package org.hibernate.metadata; diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/package-info.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/package-info.java index 3266114a5a..ee2af6a9eb 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/package-info.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/package-info.java @@ -6,7 +6,9 @@ */ /** - * Hibernate extensions to and implementations of the JPA metamodel + * Extension to and implementation of the + * {@linkplain jakarta.persistence.metamodel Jakarta Persistence metamodel}. + * This metamodel is used in {@linkplain org.hibernate.query query} handling. * * @see jakarta.persistence.metamodel */ diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/package-info.java b/hibernate-core/src/main/java/org/hibernate/metamodel/package-info.java new file mode 100644 index 0000000000..a16bbc70bd --- /dev/null +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/package-info.java @@ -0,0 +1,23 @@ +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later. + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html. + */ + +/** + * Package defining Hibernate's 2 forms of runtime metamodel:+ * The overall strategy of the various ways to access a property is defined by the + * {@link org.hibernate.property.access.spi.PropertyAccessStrategy} contract. + *
+ * The access for a specific property is modeled by a + * {@link org.hibernate.property.access.spi.PropertyAccess} instance build from the strategy, exposing + * {@link org.hibernate.property.access.spi.Getter} and {@link org.hibernate.property.access.spi.Setter} + * delegates for accessing the properties values. + *
+ * {@link org.hibernate.property.access.spi.BuiltInPropertyAccessStrategies} defines the built-in + * named strategies understood in terms of mappings. In mappings, users may refer to those short names + * for referring to certain built-in strategies. Users may also implement their own + * strategy and refer to that by fully-qualified name, or they may leverage the + * {@link org.hibernate.boot.registry.selector.spi.StrategySelector} service to define short-naming + * for their custom strategies. + * + * @see org.hibernate.annotations.AttributeAccessor + * @see jakarta.persistence.Access + * + * @author Steve Ebersole + */ +package org.hibernate.property.access; diff --git a/hibernate-core/src/main/java/org/hibernate/property/access/spi/package-info.java b/hibernate-core/src/main/java/org/hibernate/property/access/spi/package-info.java index 44e0686c84..0ddff384f8 100644 --- a/hibernate-core/src/main/java/org/hibernate/property/access/spi/package-info.java +++ b/hibernate-core/src/main/java/org/hibernate/property/access/spi/package-info.java @@ -6,21 +6,6 @@ */ /** - * Defines strategies for accessing the persistent properties of an entity or composite. - *
- * The overall strategy of the various ways to access a property is defined by the - * {@link org.hibernate.property.access.spi.PropertyAccessStrategy} contract. - *
- * The access for a specific property is modeled by a - * {@link org.hibernate.property.access.spi.PropertyAccess} instance build from the strategy, exposing - * {@link org.hibernate.property.access.spi.Getter} and {@link org.hibernate.property.access.spi.Setter} - * delegates for accessing the properties values. - *
- * {@link org.hibernate.property.access.spi.BuiltInPropertyAccessStrategies} defines the built-in - * named strategies understood in terms of mappings. In mappings, users may refer to those short names - * for referring to certain built-in strategies. Users may also implement their own - * strategy and refer to that by fully-qualified name, or they may leverage the - * {@link org.hibernate.boot.registry.selector.spi.StrategySelector} service to define short-naming - * for their custom strategies. + * Integration contracts related with {@link org.hibernate.property.access.spi.PropertyAccessStrategy} */ package org.hibernate.property.access.spi; diff --git a/hibernate-core/src/main/java/org/hibernate/sql/results/graph/entity/AbstractEntityInitializer.java b/hibernate-core/src/main/java/org/hibernate/sql/results/graph/entity/AbstractEntityInitializer.java index 74233e871f..6ebcb21458 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/results/graph/entity/AbstractEntityInitializer.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/results/graph/entity/AbstractEntityInitializer.java @@ -31,7 +31,7 @@ import org.hibernate.event.spi.PreLoadEvent; import org.hibernate.event.spi.PreLoadEventListener; import org.hibernate.internal.util.NullnessHelper; import org.hibernate.internal.util.StringHelper; -import org.hibernate.loader.entity.CacheEntityLoaderHelper; +import org.hibernate.loader.ast.internal.CacheEntityLoaderHelper; import org.hibernate.metamodel.mapping.AttributeMapping; import org.hibernate.metamodel.mapping.AttributeMetadata; import org.hibernate.metamodel.mapping.EntityDiscriminatorMapping; diff --git a/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/IdMetadataGenerator.java b/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/IdMetadataGenerator.java index 2fae24b0af..102017e5c8 100644 --- a/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/IdMetadataGenerator.java +++ b/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/IdMetadataGenerator.java @@ -26,12 +26,12 @@ import org.hibernate.envers.internal.entities.mapper.id.MultipleIdMapper; import org.hibernate.envers.internal.entities.mapper.id.NestedEmbeddedIdMapper; import org.hibernate.envers.internal.entities.mapper.id.SimpleIdMapperBuilder; import org.hibernate.envers.internal.entities.mapper.id.SingleIdMapper; -import org.hibernate.loader.PropertyPath; import org.hibernate.mapping.Component; import org.hibernate.mapping.PersistentClass; import org.hibernate.mapping.Property; import org.hibernate.mapping.ToOne; import org.hibernate.mapping.Value; +import org.hibernate.spi.NavigablePath; import org.hibernate.type.ComponentType; import org.hibernate.type.ManyToOneType; import org.hibernate.type.Type; @@ -67,7 +67,7 @@ public final class IdMetadataGenerator extends AbstractMetadataGenerator { Property virtualProperty, boolean audited) { - if ( PropertyPath.IDENTIFIER_MAPPER_PROPERTY.equals( mappedProperty.getName() ) ) { + if ( NavigablePath.IDENTIFIER_MAPPER_PROPERTY.equals( mappedProperty.getName() ) ) { return false; } diff --git a/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/reader/AuditedPropertiesReader.java b/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/reader/AuditedPropertiesReader.java index 6d8eedfd05..38bfb7ceb2 100644 --- a/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/reader/AuditedPropertiesReader.java +++ b/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/reader/AuditedPropertiesReader.java @@ -16,13 +16,6 @@ import java.util.Map; import java.util.Set; import java.util.function.Function; -import jakarta.persistence.ElementCollection; -import jakarta.persistence.Lob; -import jakarta.persistence.MapKey; -import jakarta.persistence.MapKeyEnumerated; -import jakarta.persistence.OneToMany; -import jakarta.persistence.Version; - import org.hibernate.HibernateException; import org.hibernate.annotations.common.reflection.ReflectionManager; import org.hibernate.annotations.common.reflection.XClass; @@ -43,10 +36,17 @@ import org.hibernate.envers.internal.tools.MappingTools; import org.hibernate.envers.internal.tools.ReflectionTools; import org.hibernate.envers.internal.tools.StringTools; import org.hibernate.internal.util.StringHelper; -import org.hibernate.loader.PropertyPath; import org.hibernate.mapping.Component; import org.hibernate.mapping.Property; import org.hibernate.mapping.Value; +import org.hibernate.spi.NavigablePath; + +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Lob; +import jakarta.persistence.MapKey; +import jakarta.persistence.MapKeyEnumerated; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Version; import static org.hibernate.envers.internal.tools.Tools.newHashMap; import static org.hibernate.envers.internal.tools.Tools.newHashSet; @@ -290,7 +290,7 @@ public class AuditedPropertiesReader { final Property property = propertyIter.next(); addPersistentProperty( property ); // See HHH-6636 - if ( "embedded".equals( property.getPropertyAccessorName() ) && !PropertyPath.IDENTIFIER_MAPPER_PROPERTY.equals( property.getName() ) ) { + if ( "embedded".equals( property.getPropertyAccessorName() ) && !NavigablePath.IDENTIFIER_MAPPER_PROPERTY.equals( property.getName() ) ) { createPropertiesGroupMapping( property ); } }