8
8
9
9
import jakarta .persistence .metamodel .Bindable ;
10
10
11
- import org .hibernate .metamodel .model .domain .JpaMetamodel ;
12
11
import org .hibernate .metamodel .model .domain .PathSource ;
13
12
import org .hibernate .query .sqm .tree .domain .SqmDomainType ;
14
13
import org .hibernate .query .sqm .tree .SqmExpressibleAccessor ;
@@ -33,16 +32,6 @@ public interface SqmPathSource<J>
33
32
@ Override
34
33
SqmDomainType <J > getPathType ();
35
34
36
- /**
37
- * The type of {@linkplain SqmPath path} this source creates.
38
- *
39
- * @deprecated Use {@link #getPathType()}.
40
- */
41
- @ Deprecated (since = "7.0" , forRemoval = true )
42
- default SqmDomainType <J > getSqmPathType () {
43
- return getPathType ();
44
- }
45
-
46
35
/**
47
36
* Find a {@link SqmPathSource} by name relative to this source.
48
37
*
@@ -52,18 +41,6 @@ default SqmDomainType<J> getSqmPathType() {
52
41
*/
53
42
SqmPathSource <?> findSubPathSource (String name );
54
43
55
- /**
56
- * Find a {@link SqmPathSource} by name relative to this source.
57
- *
58
- * @return null if the subPathSource is not found
59
- * @throws IllegalStateException to indicate that this source cannot be de-referenced
60
- * @deprecated Use {@link #findSubPathSource(String, boolean)} instead
61
- */
62
- @ Deprecated (forRemoval = true , since = "7.0" )
63
- default SqmPathSource <?> findSubPathSource (String name , JpaMetamodel metamodel ) {
64
- return findSubPathSource ( name , true );
65
- }
66
-
67
44
/**
68
45
* Find a {@link SqmPathSource} by name relative to this source. If {@code includeSubtypes} is set
69
46
* to {@code true} and this path source is polymorphic, also try finding subtype attributes.
@@ -99,29 +76,6 @@ default SqmPathSource<?> getSubPathSource(String name) {
99
76
return subPathSource ;
100
77
}
101
78
102
- /**
103
- * Find a {@link SqmPathSource} by name relative to this source and all its subtypes.
104
- *
105
- * @throws IllegalStateException to indicate that this source cannot be de-referenced
106
- * @throws IllegalArgumentException if the subPathSource is not found
107
- * @deprecated Use #{@link #getSubPathSource(String, boolean)} instead
108
- */
109
- @ Deprecated (forRemoval = true , since = "7.0" )
110
- default SqmPathSource <?> getSubPathSource (String name , JpaMetamodel metamodel ) {
111
- final SqmPathSource <?> subPathSource = findSubPathSource ( name , true );
112
- if ( subPathSource == null ) {
113
- throw new PathElementException (
114
- String .format (
115
- Locale .ROOT ,
116
- "Could not resolve attribute '%s' of '%s'" ,
117
- name ,
118
- getExpressible ().getTypeName ()
119
- )
120
- );
121
- }
122
- return subPathSource ;
123
- }
124
-
125
79
/**
126
80
* Find a {@link SqmPathSource} by name relative to this source. If {@code subtypes} is set
127
81
* to {@code true} and this path source is polymorphic, also try finding subtype attributes.
@@ -132,7 +86,7 @@ default SqmPathSource<?> getSubPathSource(String name, JpaMetamodel metamodel) {
132
86
* @throws IllegalArgumentException if the subPathSource is not found
133
87
*/
134
88
default SqmPathSource <?> getSubPathSource (String name , boolean subtypes ) {
135
- final SqmPathSource <?> subPathSource = findSubPathSource ( name , true );
89
+ final SqmPathSource <?> subPathSource = findSubPathSource ( name , subtypes );
136
90
if ( subPathSource == null ) {
137
91
throw new PathElementException (
138
92
String .format (
0 commit comments