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 ;
@@ -35,16 +34,6 @@ public interface SqmPathSource<J>
3534 @ Override
3635 SqmDomainType <J > getPathType ();
3736
38- /**
39- * The type of {@linkplain SqmPath path} this source creates.
40- *
41- * @deprecated Use {@link #getPathType()}.
42- */
43- @ Deprecated (since = "7.0" , forRemoval = true )
44- default SqmDomainType <J > getSqmPathType () {
45- return getPathType ();
46- }
47-
4837 /**
4938 * Find a {@link SqmPathSource} by name relative to this source.
5039 *
@@ -54,18 +43,6 @@ default SqmDomainType<J> getSqmPathType() {
5443 */
5544 SqmPathSource <?> findSubPathSource (String name );
5645
57- /**
58- * Find a {@link SqmPathSource} by name relative to this source.
59- *
60- * @return null if the subPathSource is not found
61- * @throws IllegalStateException to indicate that this source cannot be de-referenced
62- * @deprecated Use {@link #findSubPathSource(String, boolean)} instead
63- */
64- @ Deprecated (forRemoval = true , since = "7.0" )
65- default SqmPathSource <?> findSubPathSource (String name , JpaMetamodel metamodel ) {
66- return findSubPathSource ( name , true );
67- }
68-
6946 /**
7047 * Find a {@link SqmPathSource} by name relative to this source. If {@code includeSubtypes} is set
7148 * to {@code true} and this path source is polymorphic, also try finding subtype attributes.
@@ -101,29 +78,6 @@ default SqmPathSource<?> getSubPathSource(String name) {
10178 return subPathSource ;
10279 }
10380
104- /**
105- * Find a {@link SqmPathSource} by name relative to this source and all its subtypes.
106- *
107- * @throws IllegalStateException to indicate that this source cannot be de-referenced
108- * @throws IllegalArgumentException if the subPathSource is not found
109- * @deprecated Use #{@link #getSubPathSource(String, boolean)} instead
110- */
111- @ Deprecated (forRemoval = true , since = "7.0" )
112- default SqmPathSource <?> getSubPathSource (String name , JpaMetamodel metamodel ) {
113- final SqmPathSource <?> subPathSource = findSubPathSource ( name , true );
114- if ( subPathSource == null ) {
115- throw new PathElementException (
116- String .format (
117- Locale .ROOT ,
118- "Could not resolve attribute '%s' of '%s'" ,
119- name ,
120- getExpressible ().getTypeName ()
121- )
122- );
123- }
124- return subPathSource ;
125- }
126-
12781 /**
12882 * Find a {@link SqmPathSource} by name relative to this source. If {@code subtypes} is set
12983 * to {@code true} and this path source is polymorphic, also try finding subtype attributes.
@@ -134,7 +88,7 @@ default SqmPathSource<?> getSubPathSource(String name, JpaMetamodel metamodel) {
13488 * @throws IllegalArgumentException if the subPathSource is not found
13589 */
13690 default SqmPathSource <?> getSubPathSource (String name , boolean subtypes ) {
137- final SqmPathSource <?> subPathSource = findSubPathSource ( name , true );
91+ final SqmPathSource <?> subPathSource = findSubPathSource ( name , subtypes );
13892 if ( subPathSource == null ) {
13993 throw new PathElementException (
14094 String .format (
0 commit comments