HHH-17874 deprecate @GenericGenerator

This commit is contained in:
Gavin King 2024-03-21 14:56:37 +01:00
parent 49b80f636d
commit 9362964ebd
2 changed files with 8 additions and 1 deletions

View File

@ -56,15 +56,19 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* <p> * <p>
* The disadvantage of this approach is the use of stringly-typed names. An * The disadvantage of this approach is the use of stringly-typed names. An
* alternative, completely typesafe, way to declare a generator and associate * alternative, completely typesafe, way to declare a generator and associate
* it with an entity is provided by the {@link IdGeneratorType} meta-annotation. * it with an entity is provided by the {@link IdGeneratorType @IdGeneratorType}
* meta-annotation.
* *
* @see jakarta.persistence.GeneratedValue * @see jakarta.persistence.GeneratedValue
* *
* @deprecated Use the new approach based on {@link IdGeneratorType}.
*
* @author Emmanuel Bernard * @author Emmanuel Bernard
*/ */
@Target({PACKAGE, TYPE, METHOD, FIELD}) @Target({PACKAGE, TYPE, METHOD, FIELD})
@Retention(RUNTIME) @Retention(RUNTIME)
@Repeatable(GenericGenerators.class) @Repeatable(GenericGenerators.class)
@Deprecated(since = "6.5")
public @interface GenericGenerator { public @interface GenericGenerator {
/** /**
* The name of the identifier generator. This is the name that may be specified by * The name of the identifier generator. This is the name that may be specified by

View File

@ -16,10 +16,13 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
/** /**
* Array of generic generator definitions. * Array of generic generator definitions.
* *
* @deprecated since {@link GenericGenerator} is deprecated.
*
* @author Paul Cowan * @author Paul Cowan
*/ */
@Target({PACKAGE, TYPE}) @Target({PACKAGE, TYPE})
@Retention(RUNTIME) @Retention(RUNTIME)
@Deprecated(since = "6.5")
public @interface GenericGenerators { public @interface GenericGenerators {
/** /**
* The aggregated generators. * The aggregated generators.