Skip to content

Commit 06b3d08

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

File tree

13 files changed

+20
-14
lines changed

13 files changed

+20
-14
lines changed

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: 1 addition & 1 deletion
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

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: 1 addition & 1 deletion
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
/**

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
*
6060
* @deprecated use {@link #verify()} with an {@link Expectation} class
6161
*/
62-
@Deprecated(since = "6.5")
62+
@Deprecated(since = "6.5", forRemoval = true)
6363
ResultCheckStyle check() default ResultCheckStyle.NONE;
6464

6565
/**

0 commit comments

Comments
 (0)