Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import jakarta.persistence.metamodel.Bindable;

import org.hibernate.metamodel.model.domain.JpaMetamodel;
import org.hibernate.metamodel.model.domain.PathSource;
import org.hibernate.query.sqm.tree.domain.SqmDomainType;
import org.hibernate.query.sqm.tree.SqmExpressibleAccessor;
Expand All @@ -35,16 +34,6 @@ public interface SqmPathSource<J>
@Override
SqmDomainType<J> getPathType();

/**
* The type of {@linkplain SqmPath path} this source creates.
*
* @deprecated Use {@link #getPathType()}.
*/
@Deprecated(since = "7.0", forRemoval = true)
default SqmDomainType<J> getSqmPathType() {
return getPathType();
}

/**
* Find a {@link SqmPathSource} by name relative to this source.
*
Expand All @@ -54,18 +43,6 @@ default SqmDomainType<J> getSqmPathType() {
*/
SqmPathSource<?> findSubPathSource(String name);

/**
* Find a {@link SqmPathSource} by name relative to this source.
*
* @return null if the subPathSource is not found
* @throws IllegalStateException to indicate that this source cannot be de-referenced
* @deprecated Use {@link #findSubPathSource(String, boolean)} instead
*/
@Deprecated(forRemoval = true, since = "7.0")
default SqmPathSource<?> findSubPathSource(String name, JpaMetamodel metamodel) {
return findSubPathSource( name, true );
}

/**
* Find a {@link SqmPathSource} by name relative to this source. If {@code includeSubtypes} is set
* to {@code true} and this path source is polymorphic, also try finding subtype attributes.
Expand Down Expand Up @@ -101,29 +78,6 @@ default SqmPathSource<?> getSubPathSource(String name) {
return subPathSource;
}

/**
* Find a {@link SqmPathSource} by name relative to this source and all its subtypes.
*
* @throws IllegalStateException to indicate that this source cannot be de-referenced
* @throws IllegalArgumentException if the subPathSource is not found
* @deprecated Use #{@link #getSubPathSource(String, boolean)} instead
*/
@Deprecated(forRemoval = true, since = "7.0")
default SqmPathSource<?> getSubPathSource(String name, JpaMetamodel metamodel) {
final SqmPathSource<?> subPathSource = findSubPathSource( name, true );
if ( subPathSource == null ) {
throw new PathElementException(
String.format(
Locale.ROOT,
"Could not resolve attribute '%s' of '%s'",
name,
getExpressible().getTypeName()
)
);
}
return subPathSource;
}

/**
* Find a {@link SqmPathSource} by name relative to this source. If {@code subtypes} is set
* to {@code true} and this path source is polymorphic, also try finding subtype attributes.
Expand All @@ -134,7 +88,7 @@ default SqmPathSource<?> getSubPathSource(String name, JpaMetamodel metamodel) {
* @throws IllegalArgumentException if the subPathSource is not found
*/
default SqmPathSource<?> getSubPathSource(String name, boolean subtypes) {
final SqmPathSource<?> subPathSource = findSubPathSource( name, true );
final SqmPathSource<?> subPathSource = findSubPathSource( name, subtypes );
if ( subPathSource == null ) {
throw new PathElementException(
String.format(
Expand Down