Skip to content

Commit 18291d8

Browse files
committed
escalate some annotation deprecations to forRemoval=true
especially the enums which names collide with JPA
1 parent ee6fd38 commit 18291d8

14 files changed

+23
-17
lines changed

hibernate-core/src/main/java/org/hibernate/annotations/AttributeAccessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
*
4949
* @deprecated use {@link #strategy()}
5050
*/
51-
@Deprecated(since = "6.0")
51+
@Deprecated(since = "6.0", forRemoval = true)
5252
String value() default "";
5353
/**
5454
* A class implementing {@link PropertyAccessStrategy}.

hibernate-core/src/main/java/org/hibernate/annotations/Cascade.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* @deprecated Use the JPA-defined
3333
* {@link jakarta.persistence.CascadeType}
3434
*/
35-
@Deprecated(since = "7")
35+
@Deprecated(since = "7", forRemoval = true)
3636
@Target({METHOD, FIELD})
3737
@Retention(RUNTIME)
3838
public @interface Cascade {

hibernate-core/src/main/java/org/hibernate/annotations/CascadeType.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@
3030
* @see Cascade
3131
*
3232
* @deprecated Use the JPA-defined
33-
* {@link jakarta.persistence.CascadeType}
33+
* {@link jakarta.persistence.CascadeType}.
34+
* This enumeration will be removed to alleviate the
35+
* duplication in naming.
3436
*/
35-
@Deprecated(since = "7")
37+
@Deprecated(since = "7", forRemoval = true)
3638
public enum CascadeType {
3739
/**
3840
* Includes all types listed here.

hibernate-core/src/main/java/org/hibernate/annotations/Checks.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@
1515
/**
1616
* A list of {@link Check}s.
1717
*
18+
* @deprecated since {@link Check} is deprecated.
19+
*
1820
* @author Gavin King
1921
*/
2022
@Target({TYPE, METHOD, FIELD})
2123
@Retention(RUNTIME)
24+
@Deprecated(since = "7")
2225
public @interface Checks {
2326
Check[] value();
2427
}

hibernate-core/src/main/java/org/hibernate/annotations/FlushModeType.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
* @see NamedQuery#flushMode
1818
* @see NamedNativeQuery#flushMode
1919
*
20-
* @deprecated use {@link QueryFlushMode}
20+
* @deprecated Use {@link QueryFlushMode}. This enumeration will be removed to alleviate
21+
* the duplication in naming with {@link jakarta.persistence.FlushModeType}.
2122
*/
22-
@Deprecated(since="7")
23+
@Deprecated(since="7", forRemoval = true)
2324
public enum FlushModeType {
2425
/**
2526
* Corresponds to {@link org.hibernate.FlushMode#ALWAYS}.

hibernate-core/src/main/java/org/hibernate/annotations/GenericGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
@Target({PACKAGE, TYPE, METHOD, FIELD})
6767
@Retention(RUNTIME)
6868
@Repeatable(GenericGenerators.class)
69-
@Deprecated(since = "6.5")
69+
@Deprecated(since = "6.5", forRemoval = true)
7070
public @interface GenericGenerator {
7171
/**
7272
* The name of the identifier generator. This is the name that may be specified by
@@ -93,7 +93,7 @@
9393
*
9494
* @deprecated use {@link #type()} for typesafety
9595
*/
96-
@Deprecated(since="6.2")
96+
@Deprecated(since="6.2", forRemoval = true)
9797
String strategy() default "native";
9898
/**
9999
* Parameters to be passed to {@link org.hibernate.id.IdentifierGenerator#configure}

hibernate-core/src/main/java/org/hibernate/annotations/GenericGenerators.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121
@Target({PACKAGE, TYPE})
2222
@Retention(RUNTIME)
23-
@Deprecated(since = "6.5")
23+
@Deprecated(since = "6.5", forRemoval = true)
2424
public @interface GenericGenerators {
2525
/**
2626
* The aggregated generators.

hibernate-core/src/main/java/org/hibernate/annotations/NamedNativeQuery.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
*
8181
* @deprecated use {@link #flush()}
8282
*/
83-
@Deprecated(since = "7")
83+
@Deprecated(since = "7", forRemoval = true)
8484
FlushModeType flushMode() default FlushModeType.PERSISTENCE_CONTEXT;
8585

8686
/**
@@ -182,6 +182,6 @@
182182
*
183183
* @see org.hibernate.jpa.HibernateHints#HINT_CALLABLE_FUNCTION
184184
*/
185-
@Deprecated( since = "6.0" )
185+
@Deprecated(since = "6.0", forRemoval = true)
186186
boolean callable() default false;
187187
}

hibernate-core/src/main/java/org/hibernate/annotations/NamedQuery.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
*
7676
* @deprecated use {@link #flush()}
7777
*/
78-
@Deprecated(since = "7")
78+
@Deprecated(since = "7", forRemoval = true)
7979
FlushModeType flushMode() default FlushModeType.PERSISTENCE_CONTEXT;
8080

8181
/**

hibernate-core/src/main/java/org/hibernate/annotations/ResultCheckStyle.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*
2525
* @deprecated Use an {@link Expectation} class instead.
2626
*/
27-
@Deprecated(since = "6.5")
27+
@Deprecated(since = "6.5", forRemoval = true)
2828
public enum ResultCheckStyle {
2929
/**
3030
* No return code checking. Might mean that no checks are required, or that

0 commit comments

Comments
 (0)