88
99import jakarta .persistence .metamodel .Bindable ;
1010
11- import org .hibernate .metamodel .model .domain .JpaMetamodel ;
1211import org .hibernate .metamodel .model .domain .PathSource ;
1312import org .hibernate .query .sqm .tree .domain .SqmDomainType ;
1413import org .hibernate .query .sqm .tree .SqmExpressibleAccessor ;
@@ -33,16 +32,6 @@ public interface SqmPathSource<J>
3332 @ Override
3433 SqmDomainType <J > getPathType ();
3534
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-
4635 /**
4736 * Find a {@link SqmPathSource} by name relative to this source.
4837 *
@@ -52,18 +41,6 @@ default SqmDomainType<J> getSqmPathType() {
5241 */
5342 SqmPathSource <?> findSubPathSource (String name );
5443
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-
6744 /**
6845 * Find a {@link SqmPathSource} by name relative to this source. If {@code includeSubtypes} is set
6946 * to {@code true} and this path source is polymorphic, also try finding subtype attributes.
@@ -99,29 +76,6 @@ default SqmPathSource<?> getSubPathSource(String name) {
9976 return subPathSource ;
10077 }
10178
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-
12579 /**
12680 * Find a {@link SqmPathSource} by name relative to this source. If {@code subtypes} is set
12781 * 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) {
13286 * @throws IllegalArgumentException if the subPathSource is not found
13387 */
13488 default SqmPathSource <?> getSubPathSource (String name , boolean subtypes ) {
135- final SqmPathSource <?> subPathSource = findSubPathSource ( name , true );
89+ final SqmPathSource <?> subPathSource = findSubPathSource ( name , subtypes );
13690 if ( subPathSource == null ) {
13791 throw new PathElementException (
13892 String .format (
0 commit comments