diff --git a/design/6.0-changes.adoc b/design/6.0-changes.adoc index 022b83c881..5730dec030 100644 --- a/design/6.0-changes.adoc +++ b/design/6.0-changes.adoc @@ -9,7 +9,9 @@ Document in release-notes: * `@SqlTypeCode` * `@SqlType` +* `@SqlTypeRegistration` * `@JavaType` +* `@JavaTypeRegistration` * `NativeQuery#addScalar(Class)` * `NativeQuery#addScalar(Class,AttributeConverter)` * `NativeQuery#addScalar(Class,Class)` diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/JavaType.java b/hibernate-core/src/main/java/org/hibernate/annotations/JavaType.java index 590b82f6b5..a4d1d4940a 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/JavaType.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/JavaType.java @@ -17,7 +17,11 @@ import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.RetentionPolicy.RUNTIME; /** + * Explicit BasicJavaDescriptor for the associated attribute + * * @author Steve Ebersole + * + * @since 6.0 */ @Inherited @java.lang.annotation.Target({METHOD, FIELD, ANNOTATION_TYPE}) diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/JavaTypeRegistration.java b/hibernate-core/src/main/java/org/hibernate/annotations/JavaTypeRegistration.java index ae73c9706c..2b07845673 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/JavaTypeRegistration.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/JavaTypeRegistration.java @@ -11,7 +11,6 @@ import java.lang.annotation.Repeatable; import java.lang.annotation.Retention; import org.hibernate.type.descriptor.java.BasicJavaDescriptor; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; import static java.lang.annotation.ElementType.ANNOTATION_TYPE; import static java.lang.annotation.ElementType.PACKAGE; @@ -19,7 +18,11 @@ import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; /** + * Registers the BasicJavaDescriptor to use for the given {@link #javaType} + * * @author Steve Ebersole + * + * @since 6.0 */ @java.lang.annotation.Target({PACKAGE, TYPE, ANNOTATION_TYPE}) @Inherited diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/JavaTypeRegistrations.java b/hibernate-core/src/main/java/org/hibernate/annotations/JavaTypeRegistrations.java index 4b22b7cb5c..d80bcbf277 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/JavaTypeRegistrations.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/JavaTypeRegistrations.java @@ -15,7 +15,11 @@ import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; /** + * Grouping of {@link JavaTypeRegistration} + * * @author Steve Ebersole + * + * @since 6.0 */ @java.lang.annotation.Target({PACKAGE, TYPE, ANNOTATION_TYPE}) @Inherited diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/MapKeyJavaType.java b/hibernate-core/src/main/java/org/hibernate/annotations/MapKeyJavaType.java index 0dc10af69f..ab9e0dfa9f 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/MapKeyJavaType.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/MapKeyJavaType.java @@ -15,7 +15,12 @@ import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.RetentionPolicy.RUNTIME; /** + * Same function as {@link JavaType}, but used to define the Java type descriptor to + * use for the map-key + * * @author Steve Ebersole + * + * @since 6.0 */ @java.lang.annotation.Target({METHOD, FIELD, ANNOTATION_TYPE}) @Inherited diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/MapKeySqlType.java b/hibernate-core/src/main/java/org/hibernate/annotations/MapKeySqlType.java index 35ba852ef1..b7394a3c7c 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/MapKeySqlType.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/MapKeySqlType.java @@ -19,6 +19,8 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * use for the map-key * * @author Steve Ebersole + * + * @since 6.0 */ @java.lang.annotation.Target({METHOD, FIELD, ANNOTATION_TYPE}) @Inherited diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/MapKeySqlTypeCode.java b/hibernate-core/src/main/java/org/hibernate/annotations/MapKeySqlTypeCode.java index f5991350fc..29b42a85e2 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/MapKeySqlTypeCode.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/MapKeySqlTypeCode.java @@ -19,6 +19,8 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * use for the map-key * * @author Steve Ebersole + * + * @since 6.0 */ @java.lang.annotation.Target({METHOD, FIELD, ANNOTATION_TYPE}) @Inherited diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/SqlType.java b/hibernate-core/src/main/java/org/hibernate/annotations/SqlType.java index 43a294d1df..32f7691713 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/SqlType.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/SqlType.java @@ -41,6 +41,8 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * @see org.hibernate.type.descriptor.sql.spi.SqlTypeDescriptorRegistry * * @author Steve Ebersole + * + * @since 6.0 */ @java.lang.annotation.Target({METHOD, FIELD, ANNOTATION_TYPE}) @Inherited diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/SqlTypeCode.java b/hibernate-core/src/main/java/org/hibernate/annotations/SqlTypeCode.java index a4833f565f..3f3549ec0e 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/SqlTypeCode.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/SqlTypeCode.java @@ -53,6 +53,8 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * @see SqlTypeRegistration * * @author Steve Ebersole + * + * @since 6.0 */ @java.lang.annotation.Target({METHOD, FIELD, ANNOTATION_TYPE}) @Inherited diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/SqlTypeRegistration.java b/hibernate-core/src/main/java/org/hibernate/annotations/SqlTypeRegistration.java index 742095e0fd..94f9a86565 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/SqlTypeRegistration.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/SqlTypeRegistration.java @@ -13,8 +13,6 @@ import java.lang.annotation.Retention; import org.hibernate.type.descriptor.sql.SqlTypeDescriptor; import static java.lang.annotation.ElementType.ANNOTATION_TYPE; -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -24,6 +22,8 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * {@link org.hibernate.type.descriptor.sql.spi.SqlTypeDescriptorRegistry} * * @author Steve Ebersole + * + * @since 6.0 */ @java.lang.annotation.Target({PACKAGE, TYPE, ANNOTATION_TYPE}) @Inherited diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/SqlTypeRegistrations.java b/hibernate-core/src/main/java/org/hibernate/annotations/SqlTypeRegistrations.java index 0ea0dbb212..1a7f0c107e 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/SqlTypeRegistrations.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/SqlTypeRegistrations.java @@ -15,7 +15,11 @@ import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; /** + * Grouping of {@link SqlTypeRegistration} + * * @author Steve Ebersole + * + * @since 6.0 */ @java.lang.annotation.Target({PACKAGE, TYPE, ANNOTATION_TYPE}) @Inherited