From 0426c152d0828a282fd4c7c6cd3cb241ecb764c7 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Sun, 23 Jan 2022 12:43:02 -0600 Subject: [PATCH] General clean-up of Javadoc for `o.h.annotations` package --- .../src/main/java/org/hibernate/annotations/Any.java | 9 +++++---- .../java/org/hibernate/annotations/AnyDiscriminator.java | 4 +++- .../org/hibernate/annotations/AnyDiscriminatorValue.java | 3 +++ .../org/hibernate/annotations/AttributeAccessor.java | 6 +++--- .../src/main/java/org/hibernate/annotations/Bag.java | 6 +++++- .../hibernate/annotations/EmbeddableInstantiator.java | 2 +- .../annotations/EmbeddableInstantiatorRegistration.java | 5 ++++- .../annotations/EmbeddableInstantiatorRegistrations.java | 2 ++ .../java/org/hibernate/annotations/GenericGenerator.java | 6 +++++- .../org/hibernate/annotations/JavaTypeRegistration.java | 6 ++---- .../java/org/hibernate/annotations/JdbcTypeCode.java | 4 ++-- .../org/hibernate/annotations/JdbcTypeRegistration.java | 4 ++-- .../main/java/org/hibernate/cfg/AvailableSettings.java | 2 ++ 13 files changed, 39 insertions(+), 20 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/Any.java b/hibernate-core/src/main/java/org/hibernate/annotations/Any.java index 73156bc675..ae94d7aff9 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/Any.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/Any.java @@ -17,17 +17,18 @@ import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.RetentionPolicy.RUNTIME; /** - * Maps a discriminated to-one style associations pointing to one of several entity types + * Maps a discriminated to-one style association pointing to one of several entity types * depending on a local discriminator, as opposed to discriminated inheritance where the * discriminator is kept as part of the entity hierarchy (see {@link jakarta.persistence.Inheritance} * and {@link jakarta.persistence.InheritanceType#SINGLE_TABLE} for details about discriminated * inheritance mappings). - *

+ *

* For example, if you consider an {@code Order} entity containing {@code Payment} information * where {@code Payment} might be of type {@code CashPayment} or {@code CreditCardPayment}, * the {@code @Any} approach would be to keep that discriminator and matching value on the - * {@code Order} itself. Thought of another way, the "foreign key" is really made up of the - * value and discriminator. + * {@code Order} itself instead as part of the {@code Payment} class. Thought of another way, + * the "foreign key" is really made up of the value and discriminator. Note however that this + * composite foreign-key is a conceptual and cannot be phsical. *

- * + *

* This code is generally as one of the values defined in {@link java.sql.Types}, but are not * limited to these. The code is resolved against an internal registry of {@link JdbcType} * references. See the user-guide for additional details. - * + *

* See for high-level discussion * of basic value mapping. * diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/JdbcTypeRegistration.java b/hibernate-core/src/main/java/org/hibernate/annotations/JdbcTypeRegistration.java index c77bb616a9..e013f2b219 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/JdbcTypeRegistration.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/JdbcTypeRegistration.java @@ -19,10 +19,10 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; /** * Describes a SqlTypeDescriptor to be added to the {@link JdbcTypeRegistry} - * + *

* Registrations applied to a package are processed before Hibernate begins to process * any attributes, etc. - * + *

* Registrations applied to a class are only applied once Hibernate begins to process * that class; it will also affect all future processing. However, it will not change * previous resolutions to use this newly registered one. Because of this randomness 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 c0fa626036..35f31e343a 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java @@ -761,6 +761,8 @@ public interface AvailableSettings { *

  • the (case insensitive) name of a {@code CollectionClassification}, or *
  • a {@link Class} representing either {@link java.util.List} or {@link java.util.Collection}. * + *

    + * Backwards compatibility can be achieved by specifying `hibernate.mapping.default_list_semantics=bag` e.g. * * @see org.hibernate.jpa.spi.JpaCompliance#isJpaListComplianceEnabled() *