diff --git a/hibernate-core/src/main/java/org/hibernate/type/CompositeType.java b/hibernate-core/src/main/java/org/hibernate/type/CompositeType.java index c77e46e8e4..fffc7afb05 100644 --- a/hibernate-core/src/main/java/org/hibernate/type/CompositeType.java +++ b/hibernate-core/src/main/java/org/hibernate/type/CompositeType.java @@ -14,8 +14,10 @@ import org.hibernate.engine.spi.CascadeStyle; import org.hibernate.engine.spi.SharedSessionContractImplementor; /** - * Contract for value types to hold collections and have cascades, etc. The notion is that of composition. JPA terms - * this an embeddable. + * Represents a composite type, a type which itself has typed attributes. + *

+ * For example, a type representing an {@linkplain jakarta.persistence.Embeddable embeddable} + * class is a composite type. * * @author Steve Ebersole */ diff --git a/hibernate-core/src/main/java/org/hibernate/type/ConvertedBasicType.java b/hibernate-core/src/main/java/org/hibernate/type/ConvertedBasicType.java index 9e27dda280..91da5496ad 100644 --- a/hibernate-core/src/main/java/org/hibernate/type/ConvertedBasicType.java +++ b/hibernate-core/src/main/java/org/hibernate/type/ConvertedBasicType.java @@ -9,7 +9,8 @@ package org.hibernate.type; import org.hibernate.metamodel.model.convert.spi.BasicValueConverter; /** - * Extension for BasicType impls which have an implied conversion + * Extension for implementations of {@link BasicType} which have an implied + * {@linkplain BasicValueConverter conversion}. */ public interface ConvertedBasicType extends BasicType { BasicValueConverter getValueConverter(); diff --git a/hibernate-core/src/main/java/org/hibernate/type/NumericBooleanConverter.java b/hibernate-core/src/main/java/org/hibernate/type/NumericBooleanConverter.java index 8b8b6b70c8..7ccfae7903 100644 --- a/hibernate-core/src/main/java/org/hibernate/type/NumericBooleanConverter.java +++ b/hibernate-core/src/main/java/org/hibernate/type/NumericBooleanConverter.java @@ -17,7 +17,7 @@ import jakarta.persistence.Converter; import org.hibernate.type.descriptor.jdbc.JdbcType; /** - * Handles conversion to/from Boolean as `0` (false) or `1` (true) + * Handles conversion to/from {@code Boolean} as {@code 0} (false) or {@code 1} (true) * * @author Steve Ebersole */ diff --git a/hibernate-core/src/main/java/org/hibernate/type/package-info.java b/hibernate-core/src/main/java/org/hibernate/type/package-info.java index 594ad3f15c..ec248cf687 100644 --- a/hibernate-core/src/main/java/org/hibernate/type/package-info.java +++ b/hibernate-core/src/main/java/org/hibernate/type/package-info.java @@ -8,7 +8,8 @@ /** * A Hibernate {@link org.hibernate.type.Type} is a strategy for mapping a Java * property type to a JDBC type or types. Every persistent attribute of an entity - * or embeddable object has a {@code org.hibernate.type.Type}. + * or embeddable object has a {@code Type}, even attributes which represent + * associations or hold references to embedded objects. *

* On the other hand, in modern Hibernate, {@code Type} itself is of receding * importance to application developers, though it remains a very important @@ -67,6 +68,23 @@ * {@link jakarta.persistence.Embeddable} object mapping. * * + *

Built-in converters for boolean mappings

+ * + * In older version of Hibernate there were dedicated {@code Type}s mapping Java + * {@code boolean} to {@code char(1)} or {@code integer} database columns. These + * have now been replaced by the converters: + * + *

+ * These converters may be applied, as usual, using the JPA-defined + * {@link jakarta.persistence.Converter} annotation. + * * @see org.hibernate.type.Type * @see org.hibernate.type.SqlTypes */