diff --git a/design/type-system-domain.adoc b/design/type-system-domain.adoc index fc5f57cd0e..f44efdb7bb 100644 --- a/design/type-system-domain.adoc +++ b/design/type-system-domain.adoc @@ -5,7 +5,7 @@ no references to tables, columns, etc. The base contract for Hibernate's extens JPA model is `org.hibernate.metamodel.model.domain.DomainType`. Hibernate's Semantic Query Model (SQM) is defined in terms of these JPA type extensions, -through the `org.hibernate.query.sqm.SqmExpressable` contract, allowing parts of the application's +through the `SqmExpressible` contract, allowing parts of the application's domain model to be used as part of an SQM tree. @@ -25,7 +25,7 @@ interface IdentifiableDomainType interface EntityDomainType interface MappedSuperclassDomainType -interface SqmExpressable +interface SqmExpressible interface SqmPathSource interface PersistentAttribute interface SingularPersistentAttribute @@ -40,8 +40,8 @@ ManagedDomainType <|-- IdentifiableDomainType IdentifiableDomainType <|-- MappedSuperclassDomainType IdentifiableDomainType <|-- EntityDomainType -SqmExpressable <|-- DomainType -SqmExpressable <|-- SqmPathSource +SqmExpressible <|-- DomainType +SqmExpressible <|-- SqmPathSource SqmPathSource <|-- EntityDomainType SqmPathSource <|-- PersistentAttribute diff --git a/design/type-system-mapping.adoc b/design/type-system-mapping.adoc index 0b8b241f22..929ba2217c 100644 --- a/design/type-system-mapping.adoc +++ b/design/type-system-mapping.adoc @@ -18,7 +18,7 @@ skinparam handwritten true interface MappingType interface ManagedMappingType -interface MappingModelExpressable +interface MappingModelExpressible interface ValueMapping interface BasicType interface ModelPart @@ -32,8 +32,8 @@ MappingType <|-- CollectionMappingType ManagedMappingType <|-- EmbeddableMappingType ManagedMappingType <|-- EntityMappingType -MappingModelExpressable <|-- ValueMapping -MappingModelExpressable <|-- ModelPart +MappingModelExpressible <|-- ValueMapping +MappingModelExpressible <|-- ModelPart ValueMapping <|-- BasicType @@ -68,5 +68,5 @@ EntityIdentifierMapping::EntityIdentifierDefinition AT some point this needs to be "resolved" to a ValueMapping/Type/Bindable when generating the SQL AST and executing. -One option is to have the `BindableType` be resolved first to a `SqmExpressable` -`SqmExpressableAllowableParameterType#resolveSqmExpressable` \ No newline at end of file +One option is to have the `BindableType` be resolved first to a `SqmExpressible` +`SqmExpressibleAllowableParameterType#resolveSqmExpressible` \ No newline at end of file diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java index fbb09ed286..4628fad407 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java @@ -109,7 +109,7 @@ import org.hibernate.mapping.Index; import org.hibernate.mapping.Table; import org.hibernate.metamodel.mapping.EntityMappingType; import org.hibernate.metamodel.mapping.JdbcMapping; -import org.hibernate.metamodel.mapping.SqlExpressable; +import org.hibernate.metamodel.mapping.SqlExpressible; import org.hibernate.metamodel.spi.RuntimeModelCreationContext; import org.hibernate.persister.entity.Lockable; import org.hibernate.procedure.internal.StandardCallableStatementSupport; @@ -1421,12 +1421,12 @@ public abstract class Dialect implements ConversionContext { /** * Get the name of the database type appropriate for casting operations - * (via the CAST() SQL function) for the given {@link SqlExpressable} + * (via the CAST() SQL function) for the given {@link SqlExpressible} * SQL type. * * @return The database type name */ - public String getCastTypeName(SqlExpressable type, Long length, Integer precision, Integer scale) { + public String getCastTypeName(SqlExpressible type, Long length, Integer precision, Integer scale) { final JdbcMapping jdbcMapping = type.getJdbcMapping(); final JdbcType jdbcType = jdbcMapping.getJdbcType(); final JavaType javaType = jdbcMapping.getJavaTypeDescriptor(); diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/MySQLDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/MySQLDialect.java index 45681b2c35..e9f81d24f7 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/MySQLDialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/MySQLDialect.java @@ -44,7 +44,7 @@ import org.hibernate.exception.spi.ViolatedConstraintNameExtractor; import org.hibernate.internal.util.JdbcExceptionHelper; import org.hibernate.metamodel.mapping.EntityMappingType; import org.hibernate.metamodel.mapping.JdbcMapping; -import org.hibernate.metamodel.mapping.SqlExpressable; +import org.hibernate.metamodel.mapping.SqlExpressible; import org.hibernate.metamodel.spi.RuntimeModelCreationContext; import org.hibernate.query.sqm.CastType; import org.hibernate.query.sqm.IntervalType; @@ -806,7 +806,7 @@ public class MySQLDialect extends Dialect { } @Override - public String getCastTypeName(SqlExpressable type, Long length, Integer precision, Integer scale) { + public String getCastTypeName(SqlExpressible type, Long length, Integer precision, Integer scale) { final JdbcMapping jdbcMapping = type.getJdbcMapping(); final JdbcType jdbcType = jdbcMapping.getJdbcType(); final JavaType javaType = jdbcMapping.getJavaTypeDescriptor(); diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/SpannerDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/SpannerDialect.java index 256ad667ec..6ae867a261 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/SpannerDialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/SpannerDialect.java @@ -32,7 +32,7 @@ import org.hibernate.mapping.Constraint; import org.hibernate.mapping.ForeignKey; import org.hibernate.mapping.Table; import org.hibernate.mapping.UniqueKey; -import org.hibernate.metamodel.mapping.SqlExpressable; +import org.hibernate.metamodel.mapping.SqlExpressible; import org.hibernate.persister.entity.Lockable; import org.hibernate.query.sqm.IntervalType; import org.hibernate.query.SemanticException; @@ -799,7 +799,7 @@ public class SpannerDialect extends Dialect { /* Type conversion and casting */ @Override - public String getCastTypeName(SqlExpressable type, Long length, Integer precision, Integer scale) { + public String getCastTypeName(SqlExpressible type, Long length, Integer precision, Integer scale) { //Spanner doesn't let you specify a length in cast() types return super.getRawTypeName( type.getJdbcMapping().getJdbcType() ); } diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/function/TimestampaddFunction.java b/hibernate-core/src/main/java/org/hibernate/dialect/function/TimestampaddFunction.java index 4c9f30240b..c56bd2814a 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/function/TimestampaddFunction.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/function/TimestampaddFunction.java @@ -128,7 +128,7 @@ public class TimestampaddFunction ? BinaryArithmeticOperator.MULTIPLY : BinaryArithmeticOperator.DIVIDE, new QueryLiteral<>( - expressionType.getExpressableJavaType() + expressionType.getExpressibleJavaType() .fromString( conversionFactor.substring( 1 ) ), expressionType ), diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/MappingMetamodel.java b/hibernate-core/src/main/java/org/hibernate/metamodel/MappingMetamodel.java index 4543958f55..37161daecb 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/MappingMetamodel.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/MappingMetamodel.java @@ -12,26 +12,26 @@ import java.util.function.Function; import org.hibernate.Incubating; import org.hibernate.graph.RootGraph; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.query.BindableType; import org.hibernate.metamodel.model.domain.EntityDomainType; import org.hibernate.metamodel.model.domain.NavigableRole; import org.hibernate.persister.collection.CollectionPersister; import org.hibernate.persister.entity.EntityPersister; import org.hibernate.query.spi.NavigablePath; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.sql.ast.tree.from.TableGroup; import org.hibernate.type.spi.TypeConfiguration; /** - * Access to information about Hibernate's runtime relational mapping model + * Access to information about the runtime relational O/R mapping model * * @author Steve Ebersole */ @Incubating public interface MappingMetamodel { /** - * The TypeConfiguration this metamodel is associated with + * The {@link TypeConfiguration} this metamodel is associated with */ TypeConfiguration getTypeConfiguration(); @@ -41,8 +41,14 @@ public interface MappingMetamodel { /** * todo (6.0) : POC!!! Intended for use in SQM -> SQL translation */ - MappingModelExpressable resolveMappingExpressable(SqmExpressable sqmExpressable, Function tableGroupLocator); - MappingModelExpressable lenientlyResolveMappingExpressable(SqmExpressable sqmExpressable, Function tableGroupLocator); + MappingModelExpressible resolveMappingExpressible( + SqmExpressible sqmExpressible, + Function tableGroupLocator); + + MappingModelExpressible lenientlyResolveMappingExpressible( + SqmExpressible sqmExpressible, + Function tableGroupLocator); /** * Given a Java type, determine the corresponding BindableType to diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/BasicValuedMapping.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/BasicValuedMapping.java index f842890d06..45e2bd1112 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/BasicValuedMapping.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/BasicValuedMapping.java @@ -20,7 +20,7 @@ import java.util.List; * * @author Steve Ebersole */ -public interface BasicValuedMapping extends ValueMapping, SqlExpressable { +public interface BasicValuedMapping extends ValueMapping, SqlExpressible { @Override default int getJdbcTypeCount() { return 1; diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/CollectionPart.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/CollectionPart.java index a75c049739..5f49351753 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/CollectionPart.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/CollectionPart.java @@ -7,12 +7,12 @@ package org.hibernate.metamodel.mapping; import org.hibernate.sql.results.graph.Fetchable; -import org.hibernate.type.descriptor.java.JavaTypedExpressable; +import org.hibernate.type.descriptor.java.JavaTypedExpressible; /** * @author Steve Ebersole */ -public interface CollectionPart extends ModelPart, Fetchable, JavaTypedExpressable { +public interface CollectionPart extends ModelPart, Fetchable, JavaTypedExpressible { enum Nature { ELEMENT( "{element}" ), INDEX( "{index}" ), diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/JdbcMapping.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/JdbcMapping.java index ed387ba7bb..01be4dd57f 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/JdbcMapping.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/JdbcMapping.java @@ -24,13 +24,13 @@ import org.hibernate.type.descriptor.jdbc.JdbcType; public interface JdbcMapping extends MappingType, JdbcMappingContainer { /** * The descriptor for the Java type represented by this - * expressable type + * expressible type */ JavaType getJavaTypeDescriptor(); /** * The descriptor for the SQL type represented by this - * expressable type + * expressible type */ JdbcType getJdbcType(); @@ -39,19 +39,19 @@ public interface JdbcMapping extends MappingType, JdbcMappingContainer { } /** - * The strategy for extracting values of this expressable + * The strategy for extracting values of this expressible * type from JDBC ResultSets, CallableStatements, etc */ - ValueExtractor getJdbcValueExtractor(); + ValueExtractor getJdbcValueExtractor(); /** - * The strategy for binding values of this expressable - * type to JDBC PreparedStatements, CallableStatements, etc + * The strategy for binding values of this expressible type to + * JDBC {@code PreparedStatement}s and {@code CallableStatement}s. */ ValueBinder getJdbcValueBinder(); @Override - default JavaType getMappedJavaType() { + default JavaType getMappedJavaType() { return getJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/MappingModelExpressable.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/MappingModelExpressible.java similarity index 79% rename from hibernate-core/src/main/java/org/hibernate/metamodel/mapping/MappingModelExpressable.java rename to hibernate-core/src/main/java/org/hibernate/metamodel/mapping/MappingModelExpressible.java index 3420a8c49e..6a9819a782 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/MappingModelExpressable.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/MappingModelExpressible.java @@ -7,7 +7,7 @@ package org.hibernate.metamodel.mapping; /** - * Something that can be expressable at the mapping model level. + * Something that can be expressible at the mapping model level. * * Generally this is used generation of SQL AST * @@ -16,5 +16,5 @@ package org.hibernate.metamodel.mapping; * @author Steve Ebersole * @author Andrea Boriero */ -public interface MappingModelExpressable extends Bindable { +public interface MappingModelExpressible extends Bindable { } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ModelPart.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ModelPart.java index 3f9b83dcb1..09d6fd2b58 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ModelPart.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ModelPart.java @@ -28,7 +28,7 @@ import org.hibernate.type.descriptor.java.JavaType; * * @author Steve Ebersole */ -public interface ModelPart extends MappingModelExpressable { +public interface ModelPart extends MappingModelExpressible { MappingType getPartMappingType(); JavaType getJavaType(); diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/SqlExpressable.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/SqlExpressible.java similarity index 83% rename from hibernate-core/src/main/java/org/hibernate/metamodel/mapping/SqlExpressable.java rename to hibernate-core/src/main/java/org/hibernate/metamodel/mapping/SqlExpressible.java index b7133c0ba4..c18ffa4263 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/SqlExpressable.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/SqlExpressible.java @@ -14,9 +14,9 @@ package org.hibernate.metamodel.mapping; * * @author Steve Ebersole */ -public interface SqlExpressable extends JdbcMappingContainer { +public interface SqlExpressible extends JdbcMappingContainer { /** - * Any thing that is expressable at the SQL AST level + * Anything that is expressible at the SQL AST level * would be of basic type. */ JdbcMapping getJdbcMapping(); diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ValueMapping.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ValueMapping.java index ac6e5cbc07..5c68847a8f 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ValueMapping.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ValueMapping.java @@ -9,7 +9,7 @@ package org.hibernate.metamodel.mapping; import java.util.Locale; import org.hibernate.type.descriptor.java.JavaType; -import org.hibernate.type.descriptor.java.JavaTypedExpressable; +import org.hibernate.type.descriptor.java.JavaTypedExpressible; /** * Describes a mapping related to any part of the app's domain model - e.g. @@ -21,14 +21,14 @@ import org.hibernate.type.descriptor.java.JavaTypedExpressable; * * @author Steve Ebersole */ -public interface ValueMapping extends MappingModelExpressable, JavaTypedExpressable { +public interface ValueMapping extends MappingModelExpressible, JavaTypedExpressible { /** * Descriptor for the type of this mapping */ MappingType getMappedType(); @Override - default JavaType getExpressableJavaType() { + default JavaType getExpressibleJavaType() { return getMappedType().getMappedJavaType(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/BasicEntityIdentifierMappingImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/BasicEntityIdentifierMappingImpl.java index 21e467b838..5a1528f0dd 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/BasicEntityIdentifierMappingImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/BasicEntityIdentifierMappingImpl.java @@ -264,7 +264,7 @@ public class BasicEntityIdentifierMappingImpl implements BasicEntityIdentifierMa return expressionResolver.resolveSqlSelection( expression, - idType.getExpressableJavaType(), + idType.getExpressibleJavaType(), sessionFactory.getTypeConfiguration() ); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/DiscriminatedCollectionPart.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/DiscriminatedCollectionPart.java index b6d0b4c8b7..11d4c0e9d6 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/DiscriminatedCollectionPart.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/DiscriminatedCollectionPart.java @@ -173,7 +173,7 @@ public class DiscriminatedCollectionPart implements DiscriminatedAssociationMode } @Override - public JavaType getExpressableJavaType() { + public JavaType getExpressibleJavaType() { return getJavaType(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EmbeddedCollectionPart.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EmbeddedCollectionPart.java index 9c2ec37c0e..4c35154e7f 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EmbeddedCollectionPart.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EmbeddedCollectionPart.java @@ -302,7 +302,7 @@ public class EmbeddedCollectionPart implements CollectionPart, EmbeddableValuedF } @Override - public JavaType getExpressableJavaType() { + public JavaType getExpressibleJavaType() { return getJavaType(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EntityCollectionPart.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EntityCollectionPart.java index e818e529f1..43af120deb 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EntityCollectionPart.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EntityCollectionPart.java @@ -380,7 +380,7 @@ public class EntityCollectionPart } @Override - public JavaType getExpressableJavaType() { + public JavaType getExpressibleJavaType() { return getJavaType(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/IdClassEmbeddable.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/IdClassEmbeddable.java index aeaacb1532..a7f9e5eba0 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/IdClassEmbeddable.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/IdClassEmbeddable.java @@ -159,7 +159,7 @@ public class IdClassEmbeddable extends AbstractEmbeddableMapping implements Iden if ( o == null ) { final AttributeMapping idClassAttributeMapping = idClassAttribute.get( i ); if ( idClassAttributeMapping.getPropertyAccess().getGetter().getReturnTypeClass().isPrimitive() ) { - propertyValues[i] = idClassAttributeMapping.getExpressableJavaType().getDefaultValue(); + propertyValues[i] = idClassAttributeMapping.getExpressibleJavaType().getDefaultValue(); } else { propertyValues[i] = null; diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/NonAggregatedIdentifierMappingImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/NonAggregatedIdentifierMappingImpl.java index 0ed6f6b6e1..93768ffa5d 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/NonAggregatedIdentifierMappingImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/NonAggregatedIdentifierMappingImpl.java @@ -216,7 +216,7 @@ public class NonAggregatedIdentifierMappingImpl extends AbstractCompositeIdentif if ( o == null ) { final AttributeMapping idClassAttributeMapping = idClassAttributeMappings.get( i ); if ( idClassAttributeMapping.getPropertyAccess().getGetter().getReturnTypeClass().isPrimitive() ) { - propertyValues[i] = idClassAttributeMapping.getExpressableJavaType().getDefaultValue(); + propertyValues[i] = idClassAttributeMapping.getExpressibleJavaType().getDefaultValue(); } else { propertyValues[i] = null; diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/AbstractDomainType.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/AbstractDomainType.java index 7abf1889d2..377a66dcf1 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/AbstractDomainType.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/AbstractDomainType.java @@ -25,13 +25,13 @@ public abstract class AbstractDomainType implements SimpleDomainType { } @Override - public JavaType getExpressableJavaType() { + public JavaType getExpressibleJavaType() { return javaType; } @Override public Class getJavaType() { - return this.getExpressableJavaType().getJavaTypeClass(); + return this.getExpressibleJavaType().getJavaTypeClass(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/BasicDomainType.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/BasicDomainType.java index c2b1271833..382f9c7e4d 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/BasicDomainType.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/BasicDomainType.java @@ -12,7 +12,7 @@ import jakarta.persistence.metamodel.BasicType; import org.hibernate.HibernateException; import org.hibernate.query.ReturnableType; import org.hibernate.query.OutputableType; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; /** * Hibernate extension to the JPA {@link BasicType} contract. @@ -20,7 +20,7 @@ import org.hibernate.query.sqm.SqmExpressable; * @author Steve Ebersole */ public interface BasicDomainType - extends SimpleDomainType, BasicType, SqmExpressable, OutputableType, ReturnableType { + extends SimpleDomainType, BasicType, SqmExpressible, OutputableType, ReturnableType { @Override default PersistenceType getPersistenceType() { return PersistenceType.BASIC; diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/DomainType.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/DomainType.java index e94cdcec3f..71066935b1 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/DomainType.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/DomainType.java @@ -6,7 +6,7 @@ */ package org.hibernate.metamodel.model.domain; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.type.descriptor.java.JavaType; /** @@ -25,7 +25,7 @@ import org.hibernate.type.descriptor.java.JavaType; * * @author Steve Ebersole */ -public interface DomainType extends SqmExpressable { +public interface DomainType extends SqmExpressible { /** * The name of the type. * @@ -35,7 +35,7 @@ public interface DomainType extends SqmExpressable { */ default String getTypeName() { // default impl to handle the general case returning the Java type name - return getExpressableJavaType().getJavaType().getTypeName(); + return getExpressibleJavaType().getJavaType().getTypeName(); } /** @@ -44,5 +44,5 @@ public interface DomainType extends SqmExpressable { * * @see #getTypeName */ - JavaType getExpressableJavaType(); + JavaType getExpressibleJavaType(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/EmbeddableDomainType.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/EmbeddableDomainType.java index 3641dee74d..d3be3c13f9 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/EmbeddableDomainType.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/EmbeddableDomainType.java @@ -7,7 +7,7 @@ package org.hibernate.metamodel.model.domain; import org.hibernate.query.BindableType; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import jakarta.persistence.metamodel.EmbeddableType; @@ -20,5 +20,5 @@ import jakarta.persistence.metamodel.EmbeddableType; * @author Steve Ebersole */ public interface EmbeddableDomainType - extends ManagedDomainType, EmbeddableType, BindableType, SqmExpressable { + extends ManagedDomainType, EmbeddableType, BindableType, SqmExpressible { } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/ManagedDomainType.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/ManagedDomainType.java index 34dac70fe9..c223fbfb06 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/ManagedDomainType.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/ManagedDomainType.java @@ -10,7 +10,7 @@ import java.util.function.Consumer; import org.hibernate.graph.spi.SubGraphImplementor; import org.hibernate.metamodel.RepresentationMode; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import jakarta.persistence.metamodel.ManagedType; @@ -19,7 +19,7 @@ import jakarta.persistence.metamodel.ManagedType; * * @author Steve Ebersole */ -public interface ManagedDomainType extends SqmExpressable, DomainType, ManagedType { +public interface ManagedDomainType extends SqmExpressible, DomainType, ManagedType { /** * Get the type name. * diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/TupleType.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/TupleType.java index b47377b515..ee0c694a80 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/TupleType.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/TupleType.java @@ -8,19 +8,19 @@ package org.hibernate.metamodel.model.domain; import java.util.List; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; /** * Describes any structural type without a direct java type representation. * * @author Christian Beikov */ -public interface TupleType extends SqmExpressable { +public interface TupleType extends SqmExpressible { int componentCount(); String getComponentName(int index); List getComponentNames(); - SqmExpressable get(int index); - SqmExpressable get(String componentName); + SqmExpressible get(int index); + SqmExpressible get(String componentName); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AbstractPluralAttribute.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AbstractPluralAttribute.java index 2cc33fb2f9..e6106eaf23 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AbstractPluralAttribute.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AbstractPluralAttribute.java @@ -92,8 +92,8 @@ public abstract class AbstractPluralAttribute } @Override - public JavaType getExpressableJavaType() { - return getElementType().getExpressableJavaType(); + public JavaType getExpressibleJavaType() { + return getElementType().getExpressibleJavaType(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AbstractSqmPathSource.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AbstractSqmPathSource.java index 2a3631bef7..4007b1cbd0 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AbstractSqmPathSource.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AbstractSqmPathSource.java @@ -48,7 +48,7 @@ public abstract class AbstractSqmPathSource implements SqmPathSource { } @Override - public JavaType getExpressableJavaType() { - return domainType.getExpressableJavaType(); + public JavaType getExpressibleJavaType() { + return domainType.getExpressibleJavaType(); } } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AnyMappingDomainTypeImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AnyMappingDomainTypeImpl.java index 84eb0441ef..59810744ff 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AnyMappingDomainTypeImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AnyMappingDomainTypeImpl.java @@ -35,7 +35,7 @@ public class AnyMappingDomainTypeImpl implements AnyMappingDomainType { } @Override - public JavaType getExpressableJavaType() { + public JavaType getExpressibleJavaType() { return baseJtd; } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/ArrayTupleType.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/ArrayTupleType.java index b257d630d8..c10d4743e5 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/ArrayTupleType.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/ArrayTupleType.java @@ -14,11 +14,11 @@ import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.mapping.IndexedConsumer; import org.hibernate.metamodel.UnsupportedMappingException; import org.hibernate.metamodel.mapping.JdbcMapping; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.query.ReturnableType; import org.hibernate.metamodel.model.domain.TupleType; import org.hibernate.query.BindableType; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.sql.ast.Clause; import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.ObjectArrayJavaType; @@ -29,20 +29,20 @@ import org.hibernate.type.descriptor.java.ObjectArrayJavaType; public class ArrayTupleType implements TupleType, BindableType, ReturnableType, - MappingModelExpressable { + MappingModelExpressible { private final ObjectArrayJavaType javaType; - private final SqmExpressable[] components; + private final SqmExpressible[] components; - public ArrayTupleType(SqmExpressable[] components) { + public ArrayTupleType(SqmExpressible[] components) { this.components = components; this.javaType = new ObjectArrayJavaType( getTypeDescriptors( components ) ); } - private static JavaType[] getTypeDescriptors(SqmExpressable[] components) { + private static JavaType[] getTypeDescriptors(SqmExpressible[] components) { final JavaType[] typeDescriptors = new JavaType[components.length]; for ( int i = 0; i < components.length; i++ ) { - typeDescriptors[i] = components[i].getExpressableJavaType(); + typeDescriptors[i] = components[i].getExpressibleJavaType(); } return typeDescriptors; } @@ -63,17 +63,17 @@ public class ArrayTupleType implements TupleType, } @Override - public SqmExpressable get(int index) { + public SqmExpressible get(int index) { return components[index]; } @Override - public SqmExpressable get(String componentName) { + public SqmExpressible get(String componentName) { throw new UnsupportedMappingException( "Array tuple has no component names" ); } @Override - public JavaType getExpressableJavaType() { + public JavaType getExpressibleJavaType() { return javaType; } @@ -84,7 +84,7 @@ public class ArrayTupleType implements TupleType, @Override public Class getJavaType() { - return getExpressableJavaType().getJavaTypeClass(); + return this.getExpressibleJavaType().getJavaTypeClass(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/BasicSqmPathSource.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/BasicSqmPathSource.java index 145039e6a9..de8093e7b6 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/BasicSqmPathSource.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/BasicSqmPathSource.java @@ -63,7 +63,7 @@ public class BasicSqmPathSource @Override public Class getJavaType() { - return getExpressableJavaType().getJavaTypeClass(); + return getExpressibleJavaType().getJavaTypeClass(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/BasicTypeImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/BasicTypeImpl.java index 979dd7cde4..e69d3d435e 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/BasicTypeImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/BasicTypeImpl.java @@ -31,12 +31,12 @@ public class BasicTypeImpl implements BasicDomainType, Serializable { } @Override - public JavaType getExpressableJavaType() { + public JavaType getExpressibleJavaType() { return javaType; } public Class getJavaType() { - return getExpressableJavaType().getJavaTypeClass(); + return this.getExpressibleJavaType().getJavaTypeClass(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/DiscriminatorSqmPathSource.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/DiscriminatorSqmPathSource.java index 319713f164..2d79b21bc3 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/DiscriminatorSqmPathSource.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/DiscriminatorSqmPathSource.java @@ -59,6 +59,6 @@ public class DiscriminatorSqmPathSource extends AbstractSqmPathSource @Override public Class getJavaType() { - return getExpressableJavaType().getJavaTypeClass(); + return getExpressibleJavaType().getJavaTypeClass(); } } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/JpaMetamodelImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/JpaMetamodelImpl.java index 34eff5a4f8..553f6b4891 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/JpaMetamodelImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/JpaMetamodelImpl.java @@ -505,7 +505,7 @@ public class JpaMetamodelImpl implements JpaMetamodel, Serializable { if ( embeddable.getJavaType() != null && embeddable.getJavaType() != Map.class ) { this.jpaEmbeddables.add( embeddable ); this.jpaManagedTypes.add( embeddable ); - if ( !( embeddable.getExpressableJavaType() instanceof EntityJavaType ) ) { + if ( !( embeddable.getExpressibleJavaType() instanceof EntityJavaType ) ) { this.jpaManagedTypeMap.put( embeddable.getJavaType(), embeddable ); } } @@ -514,7 +514,7 @@ public class JpaMetamodelImpl implements JpaMetamodel, Serializable { this.jpaEmbeddables.add( embeddable ); this.jpaManagedTypes.add( embeddable ); if ( embeddable.getJavaType() != null - && !( embeddable.getExpressableJavaType() instanceof EntityJavaType ) ) { + && !( embeddable.getExpressibleJavaType() instanceof EntityJavaType ) ) { this.jpaManagedTypeMap.put( embeddable.getJavaType(), embeddable ); } break; @@ -522,7 +522,7 @@ public class JpaMetamodelImpl implements JpaMetamodel, Serializable { if ( embeddable.getJavaType() == null ) { throw new UnsupportedOperationException( "ANY not supported" ); } - if ( !( embeddable.getExpressableJavaType() instanceof EntityJavaType ) ) { + if ( !( embeddable.getExpressibleJavaType() instanceof EntityJavaType ) ) { this.jpaManagedTypeMap.put( embeddable.getJavaType(), embeddable ); } break; diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/MappingMetamodelImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/MappingMetamodelImpl.java index 36bd28467b..f3ab5bb17d 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/MappingMetamodelImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/MappingMetamodelImpl.java @@ -48,7 +48,7 @@ import org.hibernate.mapping.PersistentClass; import org.hibernate.metamodel.MappingMetamodel; import org.hibernate.metamodel.internal.JpaMetaModelPopulationSetting; import org.hibernate.metamodel.internal.JpaStaticMetaModelPopulationSetting; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess; import org.hibernate.query.BindableType; import org.hibernate.metamodel.model.domain.EmbeddableDomainType; @@ -65,7 +65,7 @@ import org.hibernate.persister.entity.EntityPersister; import org.hibernate.persister.entity.Queryable; import org.hibernate.persister.spi.PersisterFactory; import org.hibernate.query.spi.NavigablePath; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.domain.SqmPath; import org.hibernate.query.sqm.tree.expression.SqmFieldLiteral; import org.hibernate.sql.ast.tree.from.TableGroup; @@ -155,7 +155,7 @@ public class MappingMetamodelImpl implements MappingMetamodel, MetamodelImplemen private final TypeConfiguration typeConfiguration; private final Map implementorsCache = new ConcurrentHashMap<>(); - private final Map, MappingModelExpressable> tupleTypeCache = new ConcurrentHashMap<>(); + private final Map, MappingModelExpressible> tupleTypeCache = new ConcurrentHashMap<>(); public MappingMetamodelImpl(SessionFactoryImplementor sessionFactory, TypeConfiguration typeConfiguration) { this.sessionFactory = sessionFactory; @@ -745,16 +745,16 @@ public class MappingMetamodelImpl implements MappingMetamodel, MetamodelImplemen } @Override - public MappingModelExpressable lenientlyResolveMappingExpressable( - SqmExpressable sqmExpressable, + public MappingModelExpressible lenientlyResolveMappingExpressible( + SqmExpressible sqmExpressible, Function tableGroupLocator) { - return resolveMappingExpressable( sqmExpressable, tableGroupLocator ); + return resolveMappingExpressible(sqmExpressible, tableGroupLocator ); } @Override - public MappingModelExpressable resolveMappingExpressable(SqmExpressable sqmExpressable, Function tableGroupLocator) { - if ( sqmExpressable instanceof SqmPath ) { - final SqmPath sqmPath = (SqmPath) sqmExpressable; + public MappingModelExpressible resolveMappingExpressible(SqmExpressible sqmExpressible, Function tableGroupLocator) { + if ( sqmExpressible instanceof SqmPath ) { + final SqmPath sqmPath = (SqmPath) sqmExpressible; final NavigablePath navigablePath = sqmPath.getNavigablePath(); if ( navigablePath.getParent() != null ) { final TableGroup parentTableGroup = tableGroupLocator.apply( navigablePath.getParent() ); @@ -763,48 +763,48 @@ public class MappingMetamodelImpl implements MappingMetamodel, MetamodelImplemen return tableGroupLocator.apply( navigablePath.getParent() ).getModelPart(); } - if ( sqmExpressable instanceof BasicType ) { - return (BasicType) sqmExpressable; + if ( sqmExpressible instanceof BasicType ) { + return (BasicType) sqmExpressible; } - if ( sqmExpressable instanceof BasicSqmPathSource ) { - return getTypeConfiguration().getBasicTypeForJavaType(((BasicSqmPathSource) sqmExpressable).getJavaType()); + if ( sqmExpressible instanceof BasicSqmPathSource ) { + return getTypeConfiguration().getBasicTypeForJavaType(((BasicSqmPathSource) sqmExpressible).getJavaType()); } - if ( sqmExpressable instanceof SqmFieldLiteral ) { - return getTypeConfiguration().getBasicTypeForJavaType( ( (SqmFieldLiteral) sqmExpressable ).getJavaType() ); + if ( sqmExpressible instanceof SqmFieldLiteral ) { + return getTypeConfiguration().getBasicTypeForJavaType( ( (SqmFieldLiteral) sqmExpressible).getJavaType() ); } - if ( sqmExpressable instanceof CompositeSqmPathSource ) { - throw new NotYetImplementedFor6Exception( "Resolution of embedded-valued SqmExpressable nodes not yet implemented" ); + if ( sqmExpressible instanceof CompositeSqmPathSource ) { + throw new NotYetImplementedFor6Exception( "Resolution of embedded-valued SqmExpressible nodes not yet implemented" ); } - if ( sqmExpressable instanceof EmbeddableTypeImpl ) { - return (MappingModelExpressable) sqmExpressable; + if ( sqmExpressible instanceof EmbeddableTypeImpl ) { + return (MappingModelExpressible) sqmExpressible; } - if ( sqmExpressable instanceof EntityDomainType ) { - return getEntityDescriptor( ( (EntityDomainType) sqmExpressable ).getHibernateEntityName() ); + if ( sqmExpressible instanceof EntityDomainType ) { + return getEntityDescriptor( ( (EntityDomainType) sqmExpressible).getHibernateEntityName() ); } - if ( sqmExpressable instanceof TupleType ) { - final MappingModelExpressable mappingModelExpressable = tupleTypeCache.get( sqmExpressable ); - if ( mappingModelExpressable != null ) { - return mappingModelExpressable; + if ( sqmExpressible instanceof TupleType ) { + final MappingModelExpressible mappingModelExpressible = tupleTypeCache.get(sqmExpressible); + if ( mappingModelExpressible != null ) { + return mappingModelExpressible; } - final TupleType tupleType = (TupleType) sqmExpressable; - final MappingModelExpressable[] components = new MappingModelExpressable[tupleType.componentCount()]; + final TupleType tupleType = (TupleType) sqmExpressible; + final MappingModelExpressible[] components = new MappingModelExpressible[tupleType.componentCount()]; for ( int i = 0; i < components.length; i++ ) { - components[i] = resolveMappingExpressable( tupleType.get( i ), tableGroupLocator ); + components[i] = resolveMappingExpressible( tupleType.get( i ), tableGroupLocator ); } - final MappingModelExpressable createdMappingModelExpressable = new TupleMappingModelExpressable( components ); - final MappingModelExpressable existingMappingModelExpressable = tupleTypeCache.putIfAbsent( + final MappingModelExpressible createdMappingModelExpressible = new TupleMappingModelExpressible( components ); + final MappingModelExpressible existingMappingModelExpressible = tupleTypeCache.putIfAbsent( tupleType, - createdMappingModelExpressable + createdMappingModelExpressible ); - return existingMappingModelExpressable == null - ? createdMappingModelExpressable - : existingMappingModelExpressable; + return existingMappingModelExpressible == null + ? createdMappingModelExpressible + : existingMappingModelExpressible; } return null; } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/SingularAttributeImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/SingularAttributeImpl.java index ed04fd6f5e..5d01ff3447 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/SingularAttributeImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/SingularAttributeImpl.java @@ -58,7 +58,7 @@ public class SingularAttributeImpl super( declaringType, name, - attributeType.getExpressableJavaType(), + attributeType.getExpressibleJavaType(), attributeClassification, attributeType, member, @@ -81,8 +81,8 @@ public class SingularAttributeImpl return getName(); } - public JavaType getExpressableJavaType() { - return sqmPathSource.getExpressableJavaType(); + public JavaType getExpressibleJavaType() { + return sqmPathSource.getExpressibleJavaType(); } @Override @@ -108,7 +108,7 @@ public class SingularAttributeImpl @Override public Class getBindableJavaType() { - return getExpressableJavaType().getJavaTypeClass(); + return getExpressibleJavaType().getJavaTypeClass(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/TupleMappingModelExpressable.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/TupleMappingModelExpressible.java similarity index 86% rename from hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/TupleMappingModelExpressable.java rename to hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/TupleMappingModelExpressible.java index 1823407fe6..6d5f5743f9 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/TupleMappingModelExpressable.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/TupleMappingModelExpressible.java @@ -9,18 +9,18 @@ package org.hibernate.metamodel.model.domain.internal; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.mapping.IndexedConsumer; import org.hibernate.metamodel.mapping.JdbcMapping; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.sql.ast.Clause; /** * @author Christian Beikov */ -public class TupleMappingModelExpressable implements MappingModelExpressable { +public class TupleMappingModelExpressible implements MappingModelExpressible { - private final MappingModelExpressable[] components; + private final MappingModelExpressible[] components; - public TupleMappingModelExpressable(MappingModelExpressable[] components) { - this.components = (MappingModelExpressable[]) components; + public TupleMappingModelExpressible(MappingModelExpressible[] components) { + this.components = (MappingModelExpressible[]) components; } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/persister/entity/DiscriminatorType.java b/hibernate-core/src/main/java/org/hibernate/persister/entity/DiscriminatorType.java index 913f49383a..0741378b2a 100644 --- a/hibernate-core/src/main/java/org/hibernate/persister/entity/DiscriminatorType.java +++ b/hibernate-core/src/main/java/org/hibernate/persister/entity/DiscriminatorType.java @@ -55,7 +55,7 @@ public class DiscriminatorType extends AbstractType implements BasicType, } @Override - public Class getReturnedClass() { + public Class getReturnedClass() { return Class.class; } @@ -133,7 +133,7 @@ public class DiscriminatorType extends AbstractType implements BasicType, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { - String entityName = session.getFactory().getClassMetadata((Class) value).getEntityName(); + String entityName = session.getFactory().getClassMetadata((Class) value).getEntityName(); Loadable entityPersister = (Loadable) session.getFactory().getMetamodel().entityPersister(entityName); underlyingType.nullSafeSet(st, entityPersister.getDiscriminatorValue(), index, session); } @@ -141,7 +141,7 @@ public class DiscriminatorType extends AbstractType implements BasicType, @Override public void bind(PreparedStatement st, T value, int index, WrapperOptions options) throws SQLException { final SessionFactoryImplementor factory = options.getSession().getFactory(); - final String entityName = factory.getClassMetadata( (Class) value).getEntityName(); + final String entityName = factory.getClassMetadata( (Class) value).getEntityName(); final Loadable entityPersister = (Loadable) factory.getMetamodel().entityPersister(entityName); underlyingType.getJdbcValueBinder().bind( st, entityPersister.getDiscriminatorValue(), index, options ); } @@ -149,7 +149,7 @@ public class DiscriminatorType extends AbstractType implements BasicType, @Override public void bind(CallableStatement st, T value, String name, WrapperOptions options) throws SQLException { final SessionFactoryImplementor factory = options.getSession().getFactory(); - final String entityName = factory.getClassMetadata( (Class) value).getEntityName(); + final String entityName = factory.getClassMetadata( (Class) value).getEntityName(); final Loadable entityPersister = (Loadable) factory.getMetamodel().entityPersister(entityName); underlyingType.getJdbcValueBinder().bind( st, entityPersister.getDiscriminatorValue(), name, options ); } @@ -204,7 +204,7 @@ public class DiscriminatorType extends AbstractType implements BasicType, @SuppressWarnings("unchecked") @Override - public JavaType getExpressableJavaType() { + public JavaType getExpressibleJavaType() { return (JavaType) (persister.getRepresentationStrategy().getMode() == RepresentationMode.POJO ? ClassJavaType.INSTANCE : StringJavaType.INSTANCE); @@ -212,12 +212,12 @@ public class DiscriminatorType extends AbstractType implements BasicType, @Override public JavaType getJavaTypeDescriptor() { - return getExpressableJavaType(); + return this.getExpressibleJavaType(); } @Override public JavaType getMappedJavaType() { - return getExpressableJavaType(); + return this.getExpressibleJavaType(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/procedure/internal/ProcedureCallImpl.java b/hibernate-core/src/main/java/org/hibernate/procedure/internal/ProcedureCallImpl.java index 9a60db1ff8..49e818395c 100644 --- a/hibernate-core/src/main/java/org/hibernate/procedure/internal/ProcedureCallImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/procedure/internal/ProcedureCallImpl.java @@ -58,7 +58,7 @@ import org.hibernate.query.spi.QueryOptionsAdapter; import org.hibernate.query.spi.QueryParameterBinding; import org.hibernate.query.spi.QueryParameterBindings; import org.hibernate.query.spi.ScrollableResultsImplementor; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.result.NoMoreReturnsException; import org.hibernate.result.Output; import org.hibernate.result.ResultSetOutput; @@ -460,21 +460,21 @@ public class ProcedureCallImpl .getDomainModel() .resolveQueryParameterType( javaType ); - final Class expressableJavaType; + final Class expressibleJavaType; if ( parameterType == null ) { - expressableJavaType = null; + expressibleJavaType = null; } else { - final SqmExpressable sqmExpressable = parameterType.resolveExpressable( getSessionFactory() ); - assert sqmExpressable != null; + final SqmExpressible sqmExpressible = parameterType.resolveExpressible( getSessionFactory() ); + assert sqmExpressible != null; - expressableJavaType = sqmExpressable.getExpressableJavaType().getJavaTypeClass(); + expressibleJavaType = sqmExpressible.getExpressibleJavaType().getJavaTypeClass(); } final ProcedureParameterImpl procedureParameter = new ProcedureParameterImpl<>( position, mode, - expressableJavaType, + expressibleJavaType, parameterType ); registerParameter( procedureParameter ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/BindableType.java b/hibernate-core/src/main/java/org/hibernate/query/BindableType.java index f53729027d..0bbd80da59 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/BindableType.java +++ b/hibernate-core/src/main/java/org/hibernate/query/BindableType.java @@ -9,7 +9,7 @@ package org.hibernate.query; import org.hibernate.Incubating; import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.engine.spi.SessionFactoryImplementor; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import jakarta.persistence.AttributeConverter; import jakarta.persistence.metamodel.ManagedType; @@ -54,9 +54,9 @@ public interface BindableType { } /** - * Resolve this parameter type to the corresponding SqmExpressable + * Resolve this parameter type to the corresponding SqmExpressible * * @todo (6.0) - use SessionFactory (API) here instead - we'll just cast "below" */ - SqmExpressable resolveExpressable(SessionFactoryImplementor sessionFactory); + SqmExpressible resolveExpressible(SessionFactoryImplementor sessionFactory); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/hql/internal/FullyQualifiedReflectivePathTerminal.java b/hibernate-core/src/main/java/org/hibernate/query/hql/internal/FullyQualifiedReflectivePathTerminal.java index ea81359c4d..f6937b0c78 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/hql/internal/FullyQualifiedReflectivePathTerminal.java +++ b/hibernate-core/src/main/java/org/hibernate/query/hql/internal/FullyQualifiedReflectivePathTerminal.java @@ -20,7 +20,7 @@ import org.hibernate.metamodel.model.domain.EntityDomainType; import org.hibernate.query.criteria.JpaSelection; import org.hibernate.query.hql.HqlInterpretationException; import org.hibernate.query.sqm.NodeBuilder; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.query.hql.spi.SqmCreationState; import org.hibernate.query.sqm.tree.expression.SqmEnumLiteral; @@ -37,7 +37,7 @@ import org.hibernate.type.descriptor.java.JavaType; public class FullyQualifiedReflectivePathTerminal extends FullyQualifiedReflectivePath implements SqmExpression { - private final SqmExpressable expressableType; + private final SqmExpressible expressibleType; private final SqmCreationState creationState; private final Function handler; @@ -52,7 +52,7 @@ public class FullyQualifiedReflectivePathTerminal this.handler = resolveTerminalSemantic(); // todo (6.0) : how to calculate this? - this.expressableType = null; + this.expressibleType = null; } @SuppressWarnings("unchecked") @@ -124,8 +124,8 @@ public class FullyQualifiedReflectivePathTerminal } @Override - public SqmExpressable getNodeType() { - return expressableType; + public SqmExpressible getNodeType() { + return expressibleType; } @Override @@ -135,12 +135,12 @@ public class FullyQualifiedReflectivePathTerminal @Override public JavaType getJavaTypeDescriptor() { - return expressableType.getExpressableJavaType(); + return expressibleType.getExpressibleJavaType(); } @Override - public void applyInferableType(SqmExpressable type) { + public void applyInferableType(SqmExpressible type) { } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java b/hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java index 1eb6d28eb3..03167e2e2f 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java @@ -76,7 +76,7 @@ import org.hibernate.query.hql.spi.SqmPathRegistry; import org.hibernate.query.sqm.LiteralNumberFormatException; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.ParsingException; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.SqmPathSource; import org.hibernate.query.sqm.SqmQuerySource; import org.hibernate.query.sqm.SqmTreeCreationLogger; @@ -2317,7 +2317,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem return new SqmToDuration<>( (SqmExpression) ctx.getChild( 0 ).accept( this ), toDurationUnit( (SqmExtractUnit) ctx.getChild( 1 ).accept( this ) ), - resolveExpressableTypeBasic( Duration.class ), + resolveExpressibleTypeBasic( Duration.class ), creationContext.getNodeBuilder() ); } @@ -2325,7 +2325,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem private SqmDurationUnit toDurationUnit(SqmExtractUnit extractUnit) { return new SqmDurationUnit<>( extractUnit.getUnit(), - resolveExpressableTypeBasic( Long.class ), + resolveExpressibleTypeBasic( Long.class ), creationContext.getNodeBuilder() ); } @@ -2335,7 +2335,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem return new SqmByUnit( toDurationUnit( (SqmExtractUnit) ctx.getChild( 2 ).accept( this ) ), (SqmExpression) ctx.getChild( 0 ).accept( this ), - resolveExpressableTypeBasic( Long.class ), + resolveExpressibleTypeBasic( Long.class ), creationContext.getNodeBuilder() ); } @@ -2474,7 +2474,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem public SqmExpression visitCurrentDateFunction(HqlParser.CurrentDateFunctionContext ctx) { return getFunctionDescriptor("current_date") .generateSqmExpression( - resolveExpressableTypeBasic( Date.class ), + resolveExpressibleTypeBasic( Date.class ), creationContext.getQueryEngine(), creationContext.getJpaMetamodel().getTypeConfiguration() ); @@ -2484,7 +2484,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem public SqmExpression visitCurrentTimeFunction(HqlParser.CurrentTimeFunctionContext ctx) { return getFunctionDescriptor("current_time") .generateSqmExpression( - resolveExpressableTypeBasic( Time.class ), + resolveExpressibleTypeBasic( Time.class ), creationContext.getQueryEngine(), creationContext.getJpaMetamodel().getTypeConfiguration() ); @@ -2494,7 +2494,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem public SqmExpression visitCurrentTimestampFunction(HqlParser.CurrentTimestampFunctionContext ctx) { return getFunctionDescriptor("current_timestamp") .generateSqmExpression( - resolveExpressableTypeBasic( Timestamp.class ), + resolveExpressibleTypeBasic( Timestamp.class ), creationContext.getQueryEngine(), creationContext.getJpaMetamodel().getTypeConfiguration() ); @@ -2504,7 +2504,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem public SqmExpression visitInstantFunction(HqlParser.InstantFunctionContext ctx) { return getFunctionDescriptor("instant") .generateSqmExpression( - resolveExpressableTypeBasic( Instant.class ), + resolveExpressibleTypeBasic( Instant.class ), creationContext.getQueryEngine(), creationContext.getJpaMetamodel().getTypeConfiguration() ); @@ -2514,7 +2514,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem public SqmExpression visitLocalDateFunction(HqlParser.LocalDateFunctionContext ctx) { return getFunctionDescriptor("local_date") .generateSqmExpression( - resolveExpressableTypeBasic( LocalDate.class ), + resolveExpressibleTypeBasic( LocalDate.class ), creationContext.getQueryEngine(), creationContext.getJpaMetamodel().getTypeConfiguration() ); @@ -2524,7 +2524,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem public SqmExpression visitLocalTimeFunction(HqlParser.LocalTimeFunctionContext ctx) { return getFunctionDescriptor("local_time") .generateSqmExpression( - resolveExpressableTypeBasic( LocalTime.class ), + resolveExpressibleTypeBasic( LocalTime.class ), creationContext.getQueryEngine(), creationContext.getJpaMetamodel().getTypeConfiguration() ); @@ -2534,7 +2534,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem public SqmExpression visitLocalDateTimeFunction(HqlParser.LocalDateTimeFunctionContext ctx) { return getFunctionDescriptor("local_datetime") .generateSqmExpression( - resolveExpressableTypeBasic( LocalDateTime.class ), + resolveExpressibleTypeBasic( LocalDateTime.class ), creationContext.getQueryEngine(), creationContext.getJpaMetamodel().getTypeConfiguration() ); @@ -2544,7 +2544,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem public SqmExpression visitOffsetDateTimeFunction(HqlParser.OffsetDateTimeFunctionContext ctx) { return getFunctionDescriptor("offset_datetime") .generateSqmExpression( - resolveExpressableTypeBasic( OffsetDateTime.class ), + resolveExpressibleTypeBasic( OffsetDateTime.class ), creationContext.getQueryEngine(), creationContext.getJpaMetamodel().getTypeConfiguration() ); @@ -2722,7 +2722,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem if ( timezone == null ) { return new SqmLiteral<>( LocalDateTime.of( localDate( date ), localTime( time ) ), - resolveExpressableTypeBasic( LocalDateTime.class ), + resolveExpressibleTypeBasic( LocalDateTime.class ), creationContext.getNodeBuilder() ); } @@ -2730,7 +2730,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem final ZoneId zoneId = visitZoneId( timezone ); return new SqmLiteral<>( ZonedDateTime.of( localDate( date ), localTime( time ), zoneId ), - resolveExpressableTypeBasic( ZonedDateTime.class ), + resolveExpressibleTypeBasic( ZonedDateTime.class ), creationContext.getNodeBuilder() ); } @@ -2761,7 +2761,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem HqlParser.OffsetContext offset) { return new SqmLiteral<>( OffsetDateTime.of( localDate( date ), localTime( time ), zoneOffset( offset ) ), - resolveExpressableTypeBasic( OffsetDateTime.class ), + resolveExpressibleTypeBasic( OffsetDateTime.class ), creationContext.getNodeBuilder() ); } @@ -2770,7 +2770,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem public Object visitDate(HqlParser.DateContext ctx) { return new SqmLiteral<>( localDate( ctx ), - resolveExpressableTypeBasic( LocalDate.class ), + resolveExpressibleTypeBasic( LocalDate.class ), creationContext.getNodeBuilder() ); } @@ -2779,7 +2779,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem public Object visitTime(HqlParser.TimeContext ctx) { return new SqmLiteral<>( localTime( ctx ), - resolveExpressableTypeBasic( LocalTime.class ), + resolveExpressibleTypeBasic( LocalTime.class ), creationContext.getNodeBuilder() ); } @@ -2835,7 +2835,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem // TemporalAccessor parsed = OFFSET_DATE_TIME.parse( literalText ); // return new SqmLiteral<>( // OffsetDateTime.from( parsed ), -// resolveExpressableTypeBasic( OffsetDateTime.class ), +// resolveExpressibleTypeBasic( OffsetDateTime.class ), // creationContext.getNodeBuilder() // ); // } @@ -2846,14 +2846,14 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem // try { // return new SqmLiteral<>( // ZonedDateTime.from( parsed ), -// resolveExpressableTypeBasic( ZonedDateTime.class ), +// resolveExpressibleTypeBasic( ZonedDateTime.class ), // creationContext.getNodeBuilder() // ); // } // catch (DateTimeException dte) { // return new SqmLiteral<>( // LocalDateTime.from( parsed ), -// resolveExpressableTypeBasic( LocalDateTime.class ), +// resolveExpressibleTypeBasic( LocalDateTime.class ), // creationContext.getNodeBuilder() // ); // } @@ -2862,7 +2862,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem // private SqmLiteral localDateLiteralFrom(String literalText) { // return new SqmLiteral<>( // LocalDate.from( ISO_LOCAL_DATE.parse( literalText ) ), -// resolveExpressableTypeBasic( LocalDate.class ), +// resolveExpressibleTypeBasic( LocalDate.class ), // creationContext.getNodeBuilder() // ); // } @@ -2870,7 +2870,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem // private SqmLiteral localTimeLiteralFrom(String literalText) { // return new SqmLiteral<>( // LocalTime.from( ISO_LOCAL_TIME.parse( literalText ) ), -// resolveExpressableTypeBasic( LocalTime.class ), +// resolveExpressibleTypeBasic( LocalTime.class ), // creationContext.getNodeBuilder() // ); // } @@ -2882,7 +2882,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem final Calendar literal = GregorianCalendar.from( zonedDateTime ); return new SqmLiteral<>( literal, - resolveExpressableTypeBasic( Calendar.class ), + resolveExpressibleTypeBasic( Calendar.class ), creationContext.getNodeBuilder() ); } @@ -2891,7 +2891,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem final Timestamp literal = Timestamp.valueOf( localDateTime ); return new SqmLiteral<>( literal, - resolveExpressableTypeBasic( Timestamp.class ), + resolveExpressibleTypeBasic( Timestamp.class ), creationContext.getNodeBuilder() ); } @@ -2902,7 +2902,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem final Date literal = Date.valueOf( localDate ); return new SqmLiteral<>( literal, - resolveExpressableTypeBasic( Date.class ), + resolveExpressibleTypeBasic( Date.class ), creationContext.getNodeBuilder() ); } @@ -2912,7 +2912,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem final Time literal = Time.valueOf( localTime ); return new SqmLiteral<>( literal, - resolveExpressableTypeBasic( Time.class ), + resolveExpressibleTypeBasic( Time.class ), creationContext.getNodeBuilder() ); } @@ -2920,7 +2920,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem private SqmLiteral booleanLiteral(boolean value) { return new SqmLiteral<>( value, - resolveExpressableTypeBasic( Boolean.class ), + resolveExpressibleTypeBasic( Boolean.class ), creationContext.getNodeBuilder() ); } @@ -2928,7 +2928,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem private SqmLiteral stringLiteral(String text) { return new SqmLiteral<>( QuotingHelper.unquoteStringLiteral( text ), - resolveExpressableTypeBasic( String.class ), + resolveExpressibleTypeBasic( String.class ), creationContext.getNodeBuilder() ); } @@ -2938,7 +2938,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem PrimitiveByteArrayJavaType.INSTANCE.fromString( CharSequenceHelper.subSequence( text, 2, text.length() - 1 ) ), - resolveExpressableTypeBasic( byte[].class ), + resolveExpressibleTypeBasic( byte[].class ), creationContext.getNodeBuilder() ); } @@ -2948,7 +2948,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem final Integer value = Integer.valueOf( text ); return new SqmLiteral<>( value, - resolveExpressableTypeBasic( Integer.class ), + resolveExpressibleTypeBasic( Integer.class ), creationContext.getNodeBuilder() ); } @@ -2958,7 +2958,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem final Long value = Long.valueOf( text ); return new SqmLiteral<>( value, - resolveExpressableTypeBasic( Long.class ), + resolveExpressibleTypeBasic( Long.class ), creationContext.getNodeBuilder() ); } @@ -2977,7 +2977,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem final Integer value = Integer.valueOf( text ); return new SqmLiteral<>( value, - resolveExpressableTypeBasic( Integer.class ), + resolveExpressibleTypeBasic( Integer.class ), creationContext.getNodeBuilder() ); } @@ -2998,7 +2998,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem final Long value = Long.valueOf( text ); return new SqmLiteral<>( value, - resolveExpressableTypeBasic( Long.class ), + resolveExpressibleTypeBasic( Long.class ), creationContext.getNodeBuilder() ); } @@ -3019,16 +3019,16 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem if ( text.endsWith( "l" ) || text.endsWith( "L" ) ) { text = text.substring( 0, text.length() - 1 ); value = Long.parseUnsignedLong( text, 16 ); - type = resolveExpressableTypeBasic( Long.class ); + type = resolveExpressibleTypeBasic( Long.class ); } else { value = Integer.parseUnsignedInt( text, 16 ); - type = resolveExpressableTypeBasic( Integer.class ); + type = resolveExpressibleTypeBasic( Integer.class ); } //noinspection unchecked return new SqmLiteral<>( value, - (SqmExpressable) type, + (SqmExpressible) type, creationContext.getNodeBuilder() ); } @@ -3048,7 +3048,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem } return new SqmLiteral<>( new BigInteger( text ), - resolveExpressableTypeBasic( BigInteger.class ), + resolveExpressibleTypeBasic( BigInteger.class ), creationContext.getNodeBuilder() ); } @@ -3064,7 +3064,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem try { return new SqmLiteral<>( Float.valueOf( text ), - resolveExpressableTypeBasic( Float.class ), + resolveExpressibleTypeBasic( Float.class ), creationContext.getNodeBuilder() ); } @@ -3080,7 +3080,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem try { return new SqmLiteral<>( Double.valueOf( text ), - resolveExpressableTypeBasic( Double.class ), + resolveExpressibleTypeBasic( Double.class ), creationContext.getNodeBuilder() ); } @@ -3100,7 +3100,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem } return new SqmLiteral<>( new BigDecimal( text ), - resolveExpressableTypeBasic( BigDecimal.class ), + resolveExpressibleTypeBasic( BigDecimal.class ), creationContext.getNodeBuilder() ); } @@ -3112,7 +3112,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem } } - private BasicType resolveExpressableTypeBasic(Class javaType) { + private BasicType resolveExpressibleTypeBasic(Class javaType) { return creationContext.getJpaMetamodel().getTypeConfiguration().standardBasicTypeForJavaType( javaType ); } @@ -3171,7 +3171,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem true, null, StandardFunctionReturnTypeResolvers.invariant( - resolveExpressableTypeBasic( Object.class ) + resolveExpressibleTypeBasic( Object.class ) ) ); } @@ -3227,7 +3227,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem true, null, StandardFunctionReturnTypeResolvers.invariant( - resolveExpressableTypeBasic( Object.class ) + resolveExpressibleTypeBasic( Object.class ) ), functionName, filterExpression != null ? FunctionKind.AGGREGATE : FunctionKind.NORMAL, @@ -3330,55 +3330,55 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem case HqlParser.DAY: return new SqmExtractUnit<>( TemporalUnit.DAY, - resolveExpressableTypeBasic( Integer.class ), + resolveExpressibleTypeBasic( Integer.class ), nodeBuilder ); case HqlParser.MONTH: return new SqmExtractUnit<>( TemporalUnit.MONTH, - resolveExpressableTypeBasic( Integer.class ), + resolveExpressibleTypeBasic( Integer.class ), nodeBuilder ); case HqlParser.YEAR: return new SqmExtractUnit<>( TemporalUnit.YEAR, - resolveExpressableTypeBasic( Integer.class ), + resolveExpressibleTypeBasic( Integer.class ), nodeBuilder ); case HqlParser.HOUR: return new SqmExtractUnit<>( TemporalUnit.HOUR, - resolveExpressableTypeBasic( Integer.class ), + resolveExpressibleTypeBasic( Integer.class ), nodeBuilder ); case HqlParser.MINUTE: return new SqmExtractUnit<>( TemporalUnit.MINUTE, - resolveExpressableTypeBasic( Integer.class ), + resolveExpressibleTypeBasic( Integer.class ), nodeBuilder ); case HqlParser.SECOND: return new SqmExtractUnit<>( TemporalUnit.SECOND, - resolveExpressableTypeBasic( Float.class ), + resolveExpressibleTypeBasic( Float.class ), nodeBuilder ); case HqlParser.NANOSECOND: return new SqmExtractUnit<>( NANOSECOND, - resolveExpressableTypeBasic( Long.class ), + resolveExpressibleTypeBasic( Long.class ), nodeBuilder ); case HqlParser.WEEK: return new SqmExtractUnit<>( TemporalUnit.WEEK, - resolveExpressableTypeBasic( Integer.class ), + resolveExpressibleTypeBasic( Integer.class ), nodeBuilder ); case HqlParser.QUARTER: return new SqmExtractUnit<>( TemporalUnit.QUARTER, - resolveExpressableTypeBasic( Integer.class ), + resolveExpressibleTypeBasic( Integer.class ), nodeBuilder ); } @@ -3390,11 +3390,11 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem final NodeBuilder nodeBuilder = creationContext.getNodeBuilder(); switch ( ( (TerminalNode) ctx.getChild( 2 ) ).getSymbol().getType() ) { case HqlParser.MONTH: - return new SqmExtractUnit<>( DAY_OF_MONTH, resolveExpressableTypeBasic( Integer.class ), nodeBuilder ); + return new SqmExtractUnit<>( DAY_OF_MONTH, resolveExpressibleTypeBasic( Integer.class ), nodeBuilder ); case HqlParser.WEEK: - return new SqmExtractUnit<>( DAY_OF_WEEK, resolveExpressableTypeBasic( Integer.class ), nodeBuilder ); + return new SqmExtractUnit<>( DAY_OF_WEEK, resolveExpressibleTypeBasic( Integer.class ), nodeBuilder ); case HqlParser.YEAR: - return new SqmExtractUnit<>( DAY_OF_YEAR, resolveExpressableTypeBasic( Integer.class ), nodeBuilder ); + return new SqmExtractUnit<>( DAY_OF_YEAR, resolveExpressibleTypeBasic( Integer.class ), nodeBuilder ); } throw new ParsingException("Unsupported day field [" + ctx.getText() + "]"); } @@ -3405,10 +3405,10 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem switch ( ( (TerminalNode) ctx.getChild( 2 ) ).getSymbol().getType() ) { case HqlParser.MONTH: //this is computed from DAY_OF_MONTH/7 - return new SqmExtractUnit<>( WEEK_OF_MONTH, resolveExpressableTypeBasic( Integer.class ), nodeBuilder ); + return new SqmExtractUnit<>( WEEK_OF_MONTH, resolveExpressibleTypeBasic( Integer.class ), nodeBuilder ); case HqlParser.YEAR: //this is computed from DAY_OF_YEAR/7 - return new SqmExtractUnit<>( WEEK_OF_YEAR, resolveExpressableTypeBasic( Integer.class ), nodeBuilder ); + return new SqmExtractUnit<>( WEEK_OF_YEAR, resolveExpressibleTypeBasic( Integer.class ), nodeBuilder ); } throw new ParsingException("Unsupported week field [" + ctx.getText() + "]"); } @@ -3419,12 +3419,12 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem switch ( ( (TerminalNode) ctx.getChild( 0 ) ).getSymbol().getType() ) { case HqlParser.DATE: return isExtractingJdbcTemporalType - ? new SqmExtractUnit<>( DATE, resolveExpressableTypeBasic( Date.class ), nodeBuilder ) - : new SqmExtractUnit<>( DATE, resolveExpressableTypeBasic( LocalDate.class ), nodeBuilder ); + ? new SqmExtractUnit<>( DATE, resolveExpressibleTypeBasic( Date.class ), nodeBuilder ) + : new SqmExtractUnit<>( DATE, resolveExpressibleTypeBasic( LocalDate.class ), nodeBuilder ); case HqlParser.TIME: return isExtractingJdbcTemporalType - ? new SqmExtractUnit<>( TIME, resolveExpressableTypeBasic( Time.class ), nodeBuilder ) - : new SqmExtractUnit<>( TIME, resolveExpressableTypeBasic( LocalTime.class ), nodeBuilder ); + ? new SqmExtractUnit<>( TIME, resolveExpressibleTypeBasic( Time.class ), nodeBuilder ) + : new SqmExtractUnit<>( TIME, resolveExpressibleTypeBasic( LocalTime.class ), nodeBuilder ); } throw new ParsingException("Unsupported date or time field [" + ctx.getText() + "]"); } @@ -3434,15 +3434,15 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem final NodeBuilder nodeBuilder = creationContext.getNodeBuilder(); switch ( ( (TerminalNode) ctx.getChild( ctx.getChildCount() - 1 ) ).getSymbol().getType() ) { case HqlParser.TIMEZONE_HOUR: - return new SqmExtractUnit<>( TIMEZONE_HOUR, resolveExpressableTypeBasic( Integer.class ), nodeBuilder ); + return new SqmExtractUnit<>( TIMEZONE_HOUR, resolveExpressibleTypeBasic( Integer.class ), nodeBuilder ); case HqlParser.TIMEZONE_MINUTE: return new SqmExtractUnit<>( TIMEZONE_MINUTE, - resolveExpressableTypeBasic( Integer.class ), + resolveExpressibleTypeBasic( Integer.class ), nodeBuilder ); default: - return new SqmExtractUnit<>( OFFSET, resolveExpressableTypeBasic( ZoneOffset.class ), nodeBuilder ); + return new SqmExtractUnit<>( OFFSET, resolveExpressibleTypeBasic( ZoneOffset.class ), nodeBuilder ); } } @@ -3480,7 +3480,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem final String format = QuotingHelper.unquoteStringLiteral( ctx.getChild( 0 ).getText() ); return new SqmFormat( format, - resolveExpressableTypeBasic( String.class ), + resolveExpressibleTypeBasic( String.class ), creationContext.getNodeBuilder() ); } @@ -3593,7 +3593,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem return getFunctionDescriptor( "every" ).generateAggregateSqmExpression( singletonList( argument ), filterExpression, - resolveExpressableTypeBasic( Boolean.class ), + resolveExpressibleTypeBasic( Boolean.class ), creationContext.getQueryEngine(), creationContext.getJpaMetamodel().getTypeConfiguration() ); @@ -3629,7 +3629,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem return getFunctionDescriptor( "any" ).generateAggregateSqmExpression( singletonList( argument ), filterExpression, - resolveExpressableTypeBasic( Boolean.class ), + resolveExpressibleTypeBasic( Boolean.class ), creationContext.getQueryEngine(), creationContext.getJpaMetamodel().getTypeConfiguration() ); @@ -3789,7 +3789,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem return new SqmLiteral<>( padCharText.charAt( 1 ), - resolveExpressableTypeBasic( Character.class ), + resolveExpressibleTypeBasic( Character.class ), creationContext.getNodeBuilder() ); } @@ -3858,7 +3858,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem return new SqmLiteral<>( trimCharText.charAt( 0 ), - resolveExpressableTypeBasic( Character.class ), + resolveExpressibleTypeBasic( Character.class ), creationContext.getNodeBuilder() ); } @@ -3867,7 +3867,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem public SqmCollectionSize visitCollectionSizeFunction(HqlParser.CollectionSizeFunctionContext ctx) { return new SqmCollectionSize( consumeDomainPath( (HqlParser.PathContext) ctx.getChild( 2 ) ), - resolveExpressableTypeBasic( Integer.class ), + resolveExpressibleTypeBasic( Integer.class ), creationContext.getNodeBuilder() ); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/internal/BindingTypeHelper.java b/hibernate-core/src/main/java/org/hibernate/query/internal/BindingTypeHelper.java index 3db2b7af6a..c0d16ba0f3 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/internal/BindingTypeHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/query/internal/BindingTypeHelper.java @@ -15,7 +15,7 @@ import java.util.Calendar; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.metamodel.mapping.JdbcMapping; import org.hibernate.query.BindableType; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.type.StandardBasicTypes; import org.hibernate.type.descriptor.java.TemporalJavaType; import org.hibernate.type.spi.TypeConfiguration; @@ -39,14 +39,14 @@ public class BindingTypeHelper { BindableType declaredParameterType, SessionFactoryImplementor sessionFactory) { if ( precision != null ) { - final SqmExpressable sqmExpressable = declaredParameterType.resolveExpressable( sessionFactory ); - if ( !( sqmExpressable.getExpressableJavaType() instanceof TemporalJavaType ) ) { + final SqmExpressible sqmExpressible = declaredParameterType.resolveExpressible( sessionFactory ); + if ( !( sqmExpressible.getExpressibleJavaType() instanceof TemporalJavaType ) ) { throw new UnsupportedOperationException( "Cannot treat non-temporal parameter type with temporal precision" ); } - final TemporalJavaType temporalJtd = (TemporalJavaType) sqmExpressable.getExpressableJavaType(); + final TemporalJavaType temporalJtd = (TemporalJavaType) sqmExpressible.getExpressibleJavaType(); if ( temporalJtd.getPrecision() != precision ) { final TypeConfiguration typeConfiguration = sessionFactory.getTypeConfiguration(); return typeConfiguration.getBasicTypeRegistry().resolve( diff --git a/hibernate-core/src/main/java/org/hibernate/query/internal/QueryHelper.java b/hibernate-core/src/main/java/org/hibernate/query/internal/QueryHelper.java index d3c28f5d24..37b1de1cb7 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/internal/QueryHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/query/internal/QueryHelper.java @@ -6,7 +6,7 @@ */ package org.hibernate.query.internal; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.SqmPathSource; /** @@ -18,7 +18,7 @@ public class QueryHelper { } @SafeVarargs - public static SqmExpressable highestPrecedenceType(SqmExpressable... types) { + public static SqmExpressible highestPrecedenceType(SqmExpressible... types) { if ( types == null || types.length == 0 ) { return null; } @@ -27,7 +27,7 @@ public class QueryHelper { return types[0]; } - SqmExpressable highest = highestPrecedenceType2( types[0], types[1] ); + SqmExpressible highest = highestPrecedenceType2( types[0], types[1] ); for ( int i = 2; i < types.length; i++ ) { highest = highestPrecedenceType2( highest, types[i] ); } @@ -35,9 +35,9 @@ public class QueryHelper { return highest; } - public static SqmExpressable highestPrecedenceType2( - SqmExpressable type1, - SqmExpressable type2) { + public static SqmExpressible highestPrecedenceType2( + SqmExpressible type1, + SqmExpressible type2) { if ( type1 == null && type2 == null ) { return null; } @@ -57,7 +57,7 @@ public class QueryHelper { } // any other precedence rules? - if ( type2.getExpressableJavaType().isWider( type1.getExpressableJavaType() ) ) { + if ( type2.getExpressibleJavaType().isWider( type1.getExpressibleJavaType() ) ) { return type2; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/internal/QueryParameterBindingImpl.java b/hibernate-core/src/main/java/org/hibernate/query/internal/QueryParameterBindingImpl.java index 2d566ab78c..da1b3191bd 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/internal/QueryParameterBindingImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/query/internal/QueryParameterBindingImpl.java @@ -12,12 +12,12 @@ import java.util.Iterator; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.metamodel.mapping.BasicValuedMapping; import org.hibernate.metamodel.mapping.JdbcMapping; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.query.BindableType; import org.hibernate.query.QueryParameter; import org.hibernate.query.spi.QueryParameterBinding; import org.hibernate.query.spi.QueryParameterBindingValidator; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.type.descriptor.java.CoercionException; import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.TemporalJavaType; @@ -38,7 +38,7 @@ public class QueryParameterBindingImpl implements QueryParameterBinding, J private boolean isMultiValued; private BindableType bindType; - private MappingModelExpressable type; + private MappingModelExpressible type; private TemporalType explicitTemporalPrecision; private T bindValue; @@ -140,10 +140,10 @@ public class QueryParameterBindingImpl implements QueryParameterBinding, J return null; } - final SqmExpressable sqmExpressable = parameterType.resolveExpressable( sessionFactory ); - assert sqmExpressable != null; + final SqmExpressible sqmExpressible = parameterType.resolveExpressible( sessionFactory ); + assert sqmExpressible != null; - return sqmExpressable.getExpressableJavaType().coerce( value, this ); + return sqmExpressible.getExpressibleJavaType().coerce( value, this ); } private boolean handleAsMultiValue(T value) { @@ -302,19 +302,19 @@ public class QueryParameterBindingImpl implements QueryParameterBinding, J } private JavaType determineJavaType(BindableType bindType) { - final SqmExpressable sqmExpressable = bindType.resolveExpressable( sessionFactory ); - assert sqmExpressable != null; + final SqmExpressible sqmExpressible = bindType.resolveExpressible( sessionFactory ); + assert sqmExpressible != null; - return sqmExpressable.getExpressableJavaType(); + return sqmExpressible.getExpressibleJavaType(); } @Override - public MappingModelExpressable getType() { + public MappingModelExpressible getType() { return type; } @Override @SuppressWarnings("unchecked") - public boolean setType(MappingModelExpressable type) { + public boolean setType(MappingModelExpressible type) { this.type = type; if ( bindType == null || bindType.getBindableJavaType() == Object.class ) { if ( type instanceof BindableType ) { diff --git a/hibernate-core/src/main/java/org/hibernate/query/internal/QueryParameterBindingsImpl.java b/hibernate-core/src/main/java/org/hibernate/query/internal/QueryParameterBindingsImpl.java index 7f6af4c558..ca8fc5ec50 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/internal/QueryParameterBindingsImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/query/internal/QueryParameterBindingsImpl.java @@ -21,14 +21,14 @@ import org.hibernate.QueryParameterException; import org.hibernate.cache.spi.QueryKey; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.query.QueryParameter; import org.hibernate.query.spi.ParameterMetadataImplementor; import org.hibernate.query.spi.QueryParameterBinding; import org.hibernate.query.spi.QueryParameterBindings; import org.hibernate.query.spi.QueryParameterImplementor; import org.hibernate.type.descriptor.java.JavaType; -import org.hibernate.type.descriptor.java.JavaTypedExpressable; +import org.hibernate.type.descriptor.java.JavaTypedExpressible; import org.hibernate.type.spi.TypeConfiguration; /** @@ -170,10 +170,10 @@ public class QueryParameterBindingsImpl implements QueryParameterBindings { int hashCode = 0; for ( QueryParameterBinding binding : parameterBindingMap.values() ) { - final MappingModelExpressable mappingType = determineMappingType( binding, persistenceContext ); - assert mappingType instanceof JavaTypedExpressable; + final MappingModelExpressible mappingType = determineMappingType( binding, persistenceContext ); + assert mappingType instanceof JavaTypedExpressible; //noinspection unchecked - final JavaType javaType = ( (JavaTypedExpressable) mappingType ).getExpressableJavaType(); + final JavaType javaType = ( (JavaTypedExpressible) mappingType ).getExpressibleJavaType(); if ( binding.isMultiValued() ) { for ( Object bindValue : binding.getBindValues() ) { @@ -206,11 +206,11 @@ public class QueryParameterBindingsImpl implements QueryParameterBindings { return new ParameterBindingsMementoImpl( allBindValues.toArray( new Object[0] ), hashCode ); } - private MappingModelExpressable determineMappingType(QueryParameterBinding binding, SharedSessionContractImplementor session) { + private MappingModelExpressible determineMappingType(QueryParameterBinding binding, SharedSessionContractImplementor session) { if ( binding.getBindType() != null ) { - if ( binding.getBindType() instanceof MappingModelExpressable ) { + if ( binding.getBindType() instanceof MappingModelExpressible) { //noinspection unchecked - return (MappingModelExpressable) binding.getBindType(); + return (MappingModelExpressible) binding.getBindType(); } } @@ -220,9 +220,9 @@ public class QueryParameterBindingsImpl implements QueryParameterBindings { final TypeConfiguration typeConfiguration = session.getFactory().getTypeConfiguration(); - if ( binding.getBindType() instanceof JavaTypedExpressable ) { - final JavaTypedExpressable javaTypedExpressable = (JavaTypedExpressable) binding.getBindType(); - final JavaType jtd = javaTypedExpressable.getExpressableJavaType(); + if ( binding.getBindType() instanceof JavaTypedExpressible) { + final JavaTypedExpressible javaTypedExpressible = (JavaTypedExpressible) binding.getBindType(); + final JavaType jtd = javaTypedExpressible.getExpressibleJavaType(); if ( jtd.getJavaTypeClass() != null ) { // avoid dynamic models return typeConfiguration.getBasicTypeForJavaType( jtd.getJavaTypeClass() ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/results/ResultSetMappingSqlSelection.java b/hibernate-core/src/main/java/org/hibernate/query/results/ResultSetMappingSqlSelection.java index 7c58b97fc0..8dd6028825 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/results/ResultSetMappingSqlSelection.java +++ b/hibernate-core/src/main/java/org/hibernate/query/results/ResultSetMappingSqlSelection.java @@ -9,7 +9,7 @@ package org.hibernate.query.results; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.metamodel.mapping.BasicValuedMapping; import org.hibernate.metamodel.mapping.JdbcMapping; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.sql.ast.SqlAstWalker; import org.hibernate.sql.ast.spi.SqlExpressionAccess; import org.hibernate.sql.ast.spi.SqlSelection; @@ -77,7 +77,7 @@ public class ResultSetMappingSqlSelection implements SqlSelection, Expression, S } @Override - public MappingModelExpressable getExpressionType() { + public MappingModelExpressible getExpressionType() { return valueMapping; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/results/complete/CompleteResultBuilderBasicModelPart.java b/hibernate-core/src/main/java/org/hibernate/query/results/complete/CompleteResultBuilderBasicModelPart.java index fe414e181a..5f435f5fc3 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/results/complete/CompleteResultBuilderBasicModelPart.java +++ b/hibernate-core/src/main/java/org/hibernate/query/results/complete/CompleteResultBuilderBasicModelPart.java @@ -47,7 +47,7 @@ public class CompleteResultBuilderBasicModelPart @Override public Class getJavaType() { - return modelPart.getExpressableJavaType().getJavaTypeClass(); + return modelPart.getExpressibleJavaType().getJavaTypeClass(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/query/results/complete/CompleteResultBuilderBasicValuedConverted.java b/hibernate-core/src/main/java/org/hibernate/query/results/complete/CompleteResultBuilderBasicValuedConverted.java index 807a9ef4df..4ceeed4891 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/results/complete/CompleteResultBuilderBasicValuedConverted.java +++ b/hibernate-core/src/main/java/org/hibernate/query/results/complete/CompleteResultBuilderBasicValuedConverted.java @@ -110,7 +110,7 @@ public class CompleteResultBuilderBasicValuedConverted implements CompleteR // return new SqlSelectionImpl( valuesArrayPosition, basicType ); // } // ), -// basicType.getExpressableJavaType(), +// basicType.getExpressibleJavaType(), // sessionFactory.getTypeConfiguration() // ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/results/complete/CompleteResultBuilderBasicValuedStandard.java b/hibernate-core/src/main/java/org/hibernate/query/results/complete/CompleteResultBuilderBasicValuedStandard.java index 7bf291942a..0ad4a41af4 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/results/complete/CompleteResultBuilderBasicValuedStandard.java +++ b/hibernate-core/src/main/java/org/hibernate/query/results/complete/CompleteResultBuilderBasicValuedStandard.java @@ -104,7 +104,7 @@ public class CompleteResultBuilderBasicValuedStandard implements CompleteResultB // return new SqlSelectionImpl( valuesArrayPosition, basicType ); // } // ), -// basicType.getExpressableJavaType(), +// basicType.getExpressibleJavaType(), // sessionFactory.getTypeConfiguration() // ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/results/complete/CompleteResultBuilderCollectionStandard.java b/hibernate-core/src/main/java/org/hibernate/query/results/complete/CompleteResultBuilderCollectionStandard.java index e3a7b532bb..364cb1ba9f 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/results/complete/CompleteResultBuilderCollectionStandard.java +++ b/hibernate-core/src/main/java/org/hibernate/query/results/complete/CompleteResultBuilderCollectionStandard.java @@ -68,7 +68,7 @@ public class CompleteResultBuilderCollectionStandard implements CompleteResultBu @Override public Class getJavaType() { - return pluralAttributeDescriptor.getExpressableJavaType().getJavaTypeClass(); + return pluralAttributeDescriptor.getExpressibleJavaType().getJavaTypeClass(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/query/results/dynamic/DynamicResultBuilderAttribute.java b/hibernate-core/src/main/java/org/hibernate/query/results/dynamic/DynamicResultBuilderAttribute.java index 90a64c050d..50cdfcb79e 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/results/dynamic/DynamicResultBuilderAttribute.java +++ b/hibernate-core/src/main/java/org/hibernate/query/results/dynamic/DynamicResultBuilderAttribute.java @@ -57,7 +57,7 @@ public class DynamicResultBuilderAttribute implements DynamicResultBuilder, Nati @Override public Class getJavaType() { - return attributeMapping.getExpressableJavaType().getJavaTypeClass(); + return attributeMapping.getExpressibleJavaType().getJavaTypeClass(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/query/results/implicit/ImplicitModelPartResultBuilderBasic.java b/hibernate-core/src/main/java/org/hibernate/query/results/implicit/ImplicitModelPartResultBuilderBasic.java index c9d87fa485..0b14aacc56 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/results/implicit/ImplicitModelPartResultBuilderBasic.java +++ b/hibernate-core/src/main/java/org/hibernate/query/results/implicit/ImplicitModelPartResultBuilderBasic.java @@ -35,7 +35,7 @@ public class ImplicitModelPartResultBuilderBasic @Override public Class getJavaType() { - return modelPart.getExpressableJavaType().getJavaTypeClass(); + return modelPart.getExpressibleJavaType().getJavaTypeClass(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/query/spi/AbstractCommonQueryContract.java b/hibernate-core/src/main/java/org/hibernate/query/spi/AbstractCommonQueryContract.java index 02e2d42e8a..c079c53f08 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/spi/AbstractCommonQueryContract.java +++ b/hibernate-core/src/main/java/org/hibernate/query/spi/AbstractCommonQueryContract.java @@ -45,7 +45,7 @@ import org.hibernate.query.TupleTransformer; import org.hibernate.query.TypedParameterValue; import org.hibernate.query.criteria.JpaExpression; import org.hibernate.query.internal.QueryOptionsImpl; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.expression.SqmLiteral; import org.hibernate.query.sqm.tree.expression.SqmParameter; import org.hibernate.query.sqm.tree.select.SqmSelectStatement; @@ -862,10 +862,10 @@ public abstract class AbstractCommonQueryContract implements CommonQueryContract private boolean isInstance(BindableType parameterType, Object value) { - final SqmExpressable sqmExpressable = parameterType.resolveExpressable( getSession().getFactory() ); - assert sqmExpressable != null; + final SqmExpressible sqmExpressible = parameterType.resolveExpressible( getSession().getFactory() ); + assert sqmExpressible != null; - return sqmExpressable.getExpressableJavaType().isInstance( value ); + return sqmExpressible.getExpressibleJavaType().isInstance( value ); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/query/spi/AbstractQuery.java b/hibernate-core/src/main/java/org/hibernate/query/spi/AbstractQuery.java index 78fe894f34..2840cceaa2 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/spi/AbstractQuery.java +++ b/hibernate-core/src/main/java/org/hibernate/query/spi/AbstractQuery.java @@ -49,7 +49,7 @@ import org.hibernate.query.TupleTransformer; import org.hibernate.query.TypedParameterValue; import org.hibernate.query.internal.ScrollableResultsIterator; import org.hibernate.query.named.NamedQueryMemento; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.type.BasicType; import org.hibernate.type.descriptor.java.JavaType; @@ -635,10 +635,10 @@ public abstract class AbstractQuery } private boolean isInstance(BindableType parameterType, Object value) { - final SqmExpressable sqmExpressable = parameterType.resolveExpressable( getSession().getFactory() ); - assert sqmExpressable != null; + final SqmExpressible sqmExpressible = parameterType.resolveExpressible( getSession().getFactory() ); + assert sqmExpressible != null; - return sqmExpressable.getExpressableJavaType().isInstance( value ); + return sqmExpressible.getExpressibleJavaType().isInstance( value ); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/query/spi/QueryParameterBinding.java b/hibernate-core/src/main/java/org/hibernate/query/spi/QueryParameterBinding.java index b5148af23f..87859aaaa5 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/spi/QueryParameterBinding.java +++ b/hibernate-core/src/main/java/org/hibernate/query/spi/QueryParameterBinding.java @@ -10,7 +10,7 @@ import java.util.Collection; import jakarta.persistence.TemporalType; import org.hibernate.Incubating; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.query.BindableType; import org.hibernate.type.spi.TypeConfiguration; @@ -111,17 +111,17 @@ public interface QueryParameterBinding { Collection getBindValues(); /** - * Returns the inferred mapping model expressable i.e. the model reference against which this parameter is compared. + * Returns the inferred mapping model expressible i.e. the model reference against which this parameter is compared. * - * @return the inferred mapping model expressable or null + * @return the inferred mapping model expressible or null */ - MappingModelExpressable getType(); + MappingModelExpressible getType(); /** - * Sets the mapping model expressable for this parameter. + * Sets the mapping model expressible for this parameter. * - * @param type The mapping model expressable + * @param type The mapping model expressible * @return Whether the bind type was changed */ - boolean setType(MappingModelExpressable type); + boolean setType(MappingModelExpressible type); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/spi/QueryParameterBindingValidator.java b/hibernate-core/src/main/java/org/hibernate/query/spi/QueryParameterBindingValidator.java index f5c903c6be..fc782a291e 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/spi/QueryParameterBindingValidator.java +++ b/hibernate-core/src/main/java/org/hibernate/query/spi/QueryParameterBindingValidator.java @@ -12,7 +12,7 @@ import java.util.Date; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.query.BindableType; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.type.descriptor.converter.AttributeConverterTypeAdapter; import org.hibernate.type.descriptor.java.JavaType; @@ -56,8 +56,8 @@ public class QueryParameterBindingValidator { parameterJavaType = paramType.getBindableJavaType(); } else { - final SqmExpressable sqmExpressable = paramType.resolveExpressable( sessionFactory ); - parameterJavaType = sqmExpressable.getBindableJavaType(); + final SqmExpressible sqmExpressible = paramType.resolveExpressible( sessionFactory ); + parameterJavaType = sqmExpressible.getBindableJavaType(); } if ( parameterJavaType == null ) { diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/NodeBuilder.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/NodeBuilder.java index c232414a89..4747e1b70a 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/NodeBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/NodeBuilder.java @@ -91,11 +91,11 @@ public interface NodeBuilder extends HibernateCriteriaBuilder { List> expressions); SqmTuple tuple( - SqmExpressable tupleType, + SqmExpressible tupleType, SqmExpression... expressions); SqmTuple tuple( - SqmExpressable tupleType, + SqmExpressible tupleType, List> expressions); @Override diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/SqmExpressable.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/SqmExpressible.java similarity index 77% rename from hibernate-core/src/main/java/org/hibernate/query/sqm/SqmExpressable.java rename to hibernate-core/src/main/java/org/hibernate/query/sqm/SqmExpressible.java index 16e31818bd..6427426c6e 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/SqmExpressable.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/SqmExpressible.java @@ -19,14 +19,14 @@ import org.hibernate.type.descriptor.java.JavaType; * * @author Steve Ebersole */ -public interface SqmExpressable extends BindableType { +public interface SqmExpressible extends BindableType { /** - * The Java type descriptor for this expressable + * The Java type descriptor for this expressible */ - JavaType getExpressableJavaType(); + JavaType getExpressibleJavaType(); @Override - default SqmExpressable resolveExpressable(SessionFactoryImplementor sessionFactory) { + default SqmExpressible resolveExpressible(SessionFactoryImplementor sessionFactory) { return this; } } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/SqmPathSource.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/SqmPathSource.java index 89663d3e48..56e96a3703 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/SqmPathSource.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/SqmPathSource.java @@ -13,7 +13,7 @@ import jakarta.persistence.metamodel.Bindable; import org.hibernate.metamodel.model.domain.DomainType; import org.hibernate.query.SemanticException; import org.hibernate.query.spi.NavigablePath; -import org.hibernate.query.sqm.tree.SqmExpressableAccessor; +import org.hibernate.query.sqm.tree.SqmExpressibleAccessor; import org.hibernate.query.sqm.tree.domain.SqmPath; /** @@ -25,7 +25,7 @@ import org.hibernate.query.sqm.tree.domain.SqmPath; * * @author Steve Ebersole */ -public interface SqmPathSource extends SqmExpressable, Bindable, SqmExpressableAccessor { +public interface SqmPathSource extends SqmExpressible, Bindable, SqmExpressibleAccessor { /** * The name of this thing. Mainly used in logging and when creating a * {@link NavigablePath} @@ -62,7 +62,7 @@ public interface SqmPathSource extends SqmExpressable, Bindable, SqmExp Locale.ROOT, "Could not resolve attribute '%s' of '%s'", name, - getExpressable().getExpressableJavaType().getJavaType().getTypeName() + getExpressible().getExpressibleJavaType().getJavaType().getTypeName() ) ) ); @@ -83,7 +83,7 @@ public interface SqmPathSource extends SqmExpressable, Bindable, SqmExp SqmPath createSqmPath(SqmPath lhs, SqmPathSource intermediatePathSource); @Override - default SqmExpressable getExpressable() { - return (SqmExpressable) getSqmPathType(); + default SqmExpressible getExpressible() { + return (SqmExpressible) getSqmPathType(); } } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingAggregateFunctionSqlAstExpression.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingAggregateFunctionSqlAstExpression.java index 8fca715633..649d020451 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingAggregateFunctionSqlAstExpression.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingAggregateFunctionSqlAstExpression.java @@ -34,8 +34,8 @@ public class SelfRenderingAggregateFunctionSqlAstExpression extends SelfRenderin List sqlAstArguments, Predicate filter, ReturnableType type, - JdbcMappingContainer expressable) { - super( functionName, renderer, sqlAstArguments, type, expressable ); + JdbcMappingContainer expressible) { + super( functionName, renderer, sqlAstArguments, type, expressible ); this.filter = filter; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingFunctionSqlAstExpression.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingFunctionSqlAstExpression.java index f4a7582063..e75dbbd99b 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingFunctionSqlAstExpression.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingFunctionSqlAstExpression.java @@ -16,7 +16,7 @@ import org.hibernate.mapping.Selectable; import org.hibernate.mapping.Table; import org.hibernate.metamodel.mapping.JdbcMapping; import org.hibernate.metamodel.mapping.JdbcMappingContainer; -import org.hibernate.metamodel.mapping.SqlExpressable; +import org.hibernate.metamodel.mapping.SqlExpressible; import org.hibernate.query.ReturnableType; import org.hibernate.query.sqm.sql.internal.DomainResultProducer; import org.hibernate.sql.ast.SqlAstTranslator; @@ -41,25 +41,25 @@ import org.hibernate.type.spi.TypeConfiguration; * @author Steve Ebersole */ public class SelfRenderingFunctionSqlAstExpression - implements SelfRenderingExpression, Selectable, SqlExpressable, DomainResultProducer, FunctionExpression { + implements SelfRenderingExpression, Selectable, SqlExpressible, DomainResultProducer, FunctionExpression { private final String functionName; private final FunctionRenderingSupport renderer; private final List sqlAstArguments; private final ReturnableType type; - private final JdbcMappingContainer expressable; + private final JdbcMappingContainer expressible; public SelfRenderingFunctionSqlAstExpression( String functionName, FunctionRenderingSupport renderer, List sqlAstArguments, ReturnableType type, - JdbcMappingContainer expressable) { + JdbcMappingContainer expressible) { this.functionName = functionName; this.renderer = renderer; this.sqlAstArguments = sqlAstArguments; this.type = type; //might be null due to code in SelfRenderingFunctionSqlAstExpression - this.expressable = expressable; + this.expressible = expressible; } @Override @@ -74,10 +74,10 @@ public class SelfRenderingFunctionSqlAstExpression @Override public JdbcMappingContainer getExpressionType() { - if ( type instanceof SqlExpressable ) { + if ( type instanceof SqlExpressible) { return (JdbcMappingContainer) type; } - return expressable; + return expressible; } protected FunctionRenderingSupport getRenderer() { @@ -105,13 +105,13 @@ public class SelfRenderingFunctionSqlAstExpression creationState.getSqlAstCreationState().getSqlExpressionResolver() .resolveSqlSelection( this, - type.getExpressableJavaType(), + type.getExpressibleJavaType(), creationState.getSqlAstCreationState().getCreationContext() .getDomainModel().getTypeConfiguration() ) .getValuesArrayPosition(), resultVariable, - type.getExpressableJavaType() + type.getExpressibleJavaType() ); } @@ -165,11 +165,11 @@ public class SelfRenderingFunctionSqlAstExpression @Override public JdbcMapping getJdbcMapping() { - if ( type instanceof SqlExpressable ) { - return ( (SqlExpressable) type ).getJdbcMapping(); + if ( type instanceof SqlExpressible) { + return ( (SqlExpressible) type ).getJdbcMapping(); } else { - return ( (SqlExpressable) expressable ).getJdbcMapping(); + return ( (SqlExpressible) expressible).getJdbcMapping(); } } @@ -180,7 +180,7 @@ public class SelfRenderingFunctionSqlAstExpression sqlExpressionResolver.resolveSqlSelection( this, - type.getExpressableJavaType(), + type.getExpressibleJavaType(), sqlAstCreationState.getCreationContext().getDomainModel().getTypeConfiguration() ); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingSqmAggregateFunction.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingSqmAggregateFunction.java index c7f9b2747f..dce047fb6e 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingSqmAggregateFunction.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingSqmAggregateFunction.java @@ -60,7 +60,7 @@ public class SelfRenderingSqmAggregateFunction extends SelfRenderingSqmFuncti resolveSqlAstArguments( getArguments(), walker ), filter == null ? null : (Predicate) filter.accept( walker ), resultType, - getMappingModelExpressable( walker, resultType ) + getMappingModelExpressible( walker, resultType ) ); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingSqmFunction.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingSqmFunction.java index 876aadb13b..b2156365bb 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingSqmFunction.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingSqmFunction.java @@ -11,10 +11,10 @@ import java.util.List; import org.hibernate.metamodel.MappingMetamodel; import org.hibernate.metamodel.mapping.BasicValuedMapping; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.query.ReturnableType; import org.hibernate.query.sqm.NodeBuilder; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.produce.function.ArgumentsValidator; import org.hibernate.query.sqm.produce.function.FunctionReturnTypeResolver; import org.hibernate.query.sqm.sql.SqmToSqlAstConverter; @@ -87,14 +87,14 @@ public class SelfRenderingSqmFunction extends SqmFunction { getRenderingSupport(), arguments, resultType, - resultType == null ? null : getMappingModelExpressable( walker, resultType ) + resultType == null ? null : getMappingModelExpressible( walker, resultType ) ); } - public SqmExpressable getNodeType() { - SqmExpressable nodeType = super.getNodeType(); + public SqmExpressible getNodeType() { + SqmExpressible nodeType = super.getNodeType(); if ( nodeType == null ) { - nodeType = (SqmExpressable) resolveResultType( nodeBuilder().getTypeConfiguration() ); + nodeType = (SqmExpressible) resolveResultType( nodeBuilder().getTypeConfiguration() ); } return nodeType; @@ -107,19 +107,19 @@ public class SelfRenderingSqmFunction extends SqmFunction { getArguments(), typeConfiguration ); - setExpressableType( resultType ); + setExpressibleType( resultType ); } return resultType; } - protected MappingModelExpressable getMappingModelExpressable( + protected MappingModelExpressible getMappingModelExpressible( SqmToSqlAstConverter walker, ReturnableType resultType) { - MappingModelExpressable mapping; - if ( resultType instanceof MappingModelExpressable ) { + MappingModelExpressible mapping; + if ( resultType instanceof MappingModelExpressible) { // here we have a BasicType, which can be cast // directly to BasicValuedMapping - mapping = (MappingModelExpressable) resultType; + mapping = (MappingModelExpressible) resultType; } else { // here we have something that is not a BasicType, @@ -129,7 +129,7 @@ public class SelfRenderingSqmFunction extends SqmFunction { () -> { try { final MappingMetamodel domainModel = walker.getCreationContext().getDomainModel(); - return (BasicValuedMapping) domainModel.resolveMappingExpressable( + return (BasicValuedMapping) domainModel.resolveMappingExpressible( getNodeType(), walker.getFromClauseAccess()::getTableGroup ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/ConcreteSqmSelectQueryPlan.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/ConcreteSqmSelectQueryPlan.java index b362b59755..3b3e5d6d7b 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/ConcreteSqmSelectQueryPlan.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/ConcreteSqmSelectQueryPlan.java @@ -22,7 +22,7 @@ import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.engine.spi.SubselectFetch; import org.hibernate.internal.EmptyScrollableResults; import org.hibernate.internal.util.collections.ArrayHelper; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.query.IllegalQueryOperationException; import org.hibernate.query.TupleTransformer; import org.hibernate.query.criteria.JpaSelection; @@ -339,8 +339,8 @@ public class ConcreteSqmSelectQueryPlan implements SelectQueryPlan { new SqmParameterMappingModelResolutionAccess() { //this is pretty ugly! @Override @SuppressWarnings("unchecked") - public MappingModelExpressable getResolvedMappingModelType(SqmParameter parameter) { - return (MappingModelExpressable) sqmInterpretation.getSqmParameterMappingModelTypes().get(parameter); + public MappingModelExpressible getResolvedMappingModelType(SqmParameter parameter) { + return (MappingModelExpressible) sqmInterpretation.getSqmParameterMappingModelTypes().get(parameter); } }, session @@ -390,8 +390,8 @@ public class ConcreteSqmSelectQueryPlan implements SelectQueryPlan { tableGroupAccess::findTableGroup, new SqmParameterMappingModelResolutionAccess() { @Override @SuppressWarnings("unchecked") - public MappingModelExpressable getResolvedMappingModelType(SqmParameter parameter) { - return (MappingModelExpressable) sqmInterpretation.getSqmParameterMappingModelTypeResolutions().get(parameter); + public MappingModelExpressible getResolvedMappingModelType(SqmParameter parameter) { + return (MappingModelExpressible) sqmInterpretation.getSqmParameterMappingModelTypeResolutions().get(parameter); } }, session @@ -421,7 +421,7 @@ public class ConcreteSqmSelectQueryPlan implements SelectQueryPlan { private final JdbcSelect jdbcSelect; private final FromClauseAccess tableGroupAccess; private final Map, Map, List>>> jdbcParamsXref; - private final Map, MappingModelExpressable> sqmParameterMappingModelTypes; + private final Map, MappingModelExpressible> sqmParameterMappingModelTypes; private transient JdbcParameterBindings firstParameterBindings; CacheableSqmInterpretation( @@ -429,7 +429,7 @@ public class ConcreteSqmSelectQueryPlan implements SelectQueryPlan { JdbcSelect jdbcSelect, FromClauseAccess tableGroupAccess, Map, Map, List>>> jdbcParamsXref, - Map,MappingModelExpressable> sqmParameterMappingModelTypes, + Map, MappingModelExpressible> sqmParameterMappingModelTypes, JdbcParameterBindings firstParameterBindings) { this.selectStatement = selectStatement; this.jdbcSelect = jdbcSelect; @@ -455,7 +455,7 @@ public class ConcreteSqmSelectQueryPlan implements SelectQueryPlan { return jdbcParamsXref; } - public Map, MappingModelExpressable> getSqmParameterMappingModelTypes() { + public Map, MappingModelExpressible> getSqmParameterMappingModelTypes() { return sqmParameterMappingModelTypes; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/QuerySqmImpl.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/QuerySqmImpl.java index 4a9c3aff98..2261440507 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/QuerySqmImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/QuerySqmImpl.java @@ -74,7 +74,7 @@ import org.hibernate.query.spi.QueryParameterBindings; import org.hibernate.query.spi.QueryParameterImplementor; import org.hibernate.query.spi.ScrollableResultsImplementor; import org.hibernate.query.spi.SelectQueryPlan; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.SqmPathSource; import org.hibernate.query.sqm.internal.SqmInterpretationsKey.InterpretationsKeySource; import org.hibernate.query.sqm.mutation.spi.SqmMultiTableInsertStrategy; @@ -372,7 +372,7 @@ public class QuerySqmImpl final SqmParameter sqmParameter = (SqmParameter) sqmSelection.getSelectableNode(); // we may not yet know a selection type - if ( sqmParameter.getNodeType() == null || sqmParameter.getNodeType().getExpressableJavaType() == null ) { + if ( sqmParameter.getNodeType() == null || sqmParameter.getNodeType().getExpressibleJavaType() == null ) { // we can't verify the result type up front return; } @@ -384,22 +384,22 @@ public class QuerySqmImpl private static void verifyResultType( Class resultClass, - SqmExpressable sqmExpressable, + SqmExpressible sqmExpressible, SessionFactoryImplementor sessionFactory) { - assert sqmExpressable != null; - assert sqmExpressable.getExpressableJavaType() != null; + assert sqmExpressible != null; + assert sqmExpressible.getExpressibleJavaType() != null; - final Class javaTypeClass = sqmExpressable.getExpressableJavaType().getJavaTypeClass(); + final Class javaTypeClass = sqmExpressible.getExpressibleJavaType().getJavaTypeClass(); if ( ! resultClass.isAssignableFrom( javaTypeClass ) ) { // Special case for date because we always report java.util.Date as expression type // But the expected resultClass could be a subtype of that, so we need to check the JdbcType if ( javaTypeClass == Date.class ) { JdbcType jdbcType = null; - if ( sqmExpressable instanceof BasicDomainType ) { - jdbcType = ( (BasicDomainType) sqmExpressable ).getJdbcType(); + if ( sqmExpressible instanceof BasicDomainType ) { + jdbcType = ( (BasicDomainType) sqmExpressible).getJdbcType(); } - else if ( sqmExpressable instanceof SqmPathSource ) { - final DomainType domainType = ( (SqmPathSource) sqmExpressable ).getSqmPathType(); + else if ( sqmExpressible instanceof SqmPathSource ) { + final DomainType domainType = ( (SqmPathSource) sqmExpressible).getSqmPathType(); if ( domainType instanceof BasicDomainType ) { jdbcType = ( (BasicDomainType) domainType ).getJdbcType(); } @@ -427,7 +427,7 @@ public class QuerySqmImpl final String errorMessage = String.format( "Specified result type [%s] did not match Query selection type [%s] - multiple selections: use Tuple or array", resultClass.getName(), - sqmExpressable.getExpressableJavaType().getJavaType().getTypeName() + sqmExpressible.getExpressibleJavaType().getJavaType().getTypeName() ); if ( sessionFactory.getSessionFactoryOptions().getJpaCompliance().isJpaQueryComplianceEnabled() ) { diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SimpleDeleteQueryPlan.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SimpleDeleteQueryPlan.java index da5cd97e3f..20f3f7cfa8 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SimpleDeleteQueryPlan.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SimpleDeleteQueryPlan.java @@ -15,7 +15,7 @@ import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.metamodel.mapping.EntityMappingType; import org.hibernate.metamodel.mapping.ForeignKeyDescriptor; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.metamodel.mapping.MappingModelHelper; import org.hibernate.query.spi.NavigablePath; import org.hibernate.query.spi.DomainQueryExecutionContext; @@ -107,8 +107,8 @@ public class SimpleDeleteQueryPlan implements NonSelectQueryPlan { sqmInterpretation.getFromClauseAccess()::findTableGroup, new SqmParameterMappingModelResolutionAccess() { @Override @SuppressWarnings("unchecked") - public MappingModelExpressable getResolvedMappingModelType(SqmParameter parameter) { - return (MappingModelExpressable) sqmInterpretation.getSqmParameterMappingModelTypeResolutions().get(parameter); + public MappingModelExpressible getResolvedMappingModelType(SqmParameter parameter) { + return (MappingModelExpressible) sqmInterpretation.getSqmParameterMappingModelTypeResolutions().get(parameter); } }, session diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SimpleInsertQueryPlan.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SimpleInsertQueryPlan.java index dcf9ef857b..31567374bd 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SimpleInsertQueryPlan.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SimpleInsertQueryPlan.java @@ -13,7 +13,7 @@ import org.hibernate.action.internal.BulkOperationCleanupAction; import org.hibernate.engine.jdbc.spi.JdbcServices; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.query.spi.DomainQueryExecutionContext; import org.hibernate.query.spi.NonSelectQueryPlan; import org.hibernate.query.spi.QueryEngine; @@ -37,7 +37,7 @@ import org.hibernate.sql.exec.spi.JdbcParameterBindings; public class SimpleInsertQueryPlan implements NonSelectQueryPlan { private final SqmInsertStatement sqmInsert; private final DomainParameterXref domainParameterXref; - private Map, MappingModelExpressable> paramTypeResolutions; + private Map, MappingModelExpressible> paramTypeResolutions; private JdbcInsert jdbcInsert; private FromClauseAccess tableGroupAccess; @@ -100,8 +100,8 @@ public class SimpleInsertQueryPlan implements NonSelectQueryPlan { tableGroupAccess::findTableGroup, new SqmParameterMappingModelResolutionAccess() { @Override @SuppressWarnings("unchecked") - public MappingModelExpressable getResolvedMappingModelType(SqmParameter parameter) { - return (MappingModelExpressable) paramTypeResolutions.get(parameter); + public MappingModelExpressible getResolvedMappingModelType(SqmParameter parameter) { + return (MappingModelExpressible) paramTypeResolutions.get(parameter); } }, session diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SimpleUpdateQueryPlan.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SimpleUpdateQueryPlan.java index 1aa93dc9ac..6c721c8a64 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SimpleUpdateQueryPlan.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SimpleUpdateQueryPlan.java @@ -13,7 +13,7 @@ import org.hibernate.action.internal.BulkOperationCleanupAction; import org.hibernate.engine.jdbc.spi.JdbcServices; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.query.spi.DomainQueryExecutionContext; import org.hibernate.query.spi.NonSelectQueryPlan; import org.hibernate.query.spi.QueryEngine; @@ -41,7 +41,7 @@ public class SimpleUpdateQueryPlan implements NonSelectQueryPlan { private JdbcUpdate jdbcUpdate; private FromClauseAccess tableGroupAccess; private Map, Map, List>>> jdbcParamsXref; - private Map,MappingModelExpressable> sqmParamMappingTypeResolutions; + private Map, MappingModelExpressible> sqmParamMappingTypeResolutions; public SimpleUpdateQueryPlan( SqmUpdateStatement sqmUpdate, @@ -69,8 +69,8 @@ public class SimpleUpdateQueryPlan implements NonSelectQueryPlan { tableGroupAccess::findTableGroup, new SqmParameterMappingModelResolutionAccess() { @Override @SuppressWarnings("unchecked") - public MappingModelExpressable getResolvedMappingModelType(SqmParameter parameter) { - return (MappingModelExpressable) sqmParamMappingTypeResolutions.get(parameter); + public MappingModelExpressible getResolvedMappingModelType(SqmParameter parameter) { + return (MappingModelExpressible) sqmParamMappingTypeResolutions.get(parameter); } }, session diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmCriteriaNodeBuilder.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmCriteriaNodeBuilder.java index 49d9d23b42..d355579d69 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmCriteriaNodeBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmCriteriaNodeBuilder.java @@ -55,7 +55,7 @@ import org.hibernate.query.criteria.JpaSelection; import org.hibernate.query.criteria.ValueHandlingMode; import org.hibernate.query.spi.QueryEngine; import org.hibernate.query.sqm.NodeBuilder; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.SqmQuerySource; import org.hibernate.query.sqm.function.NamedSqmFunctionDescriptor; import org.hibernate.query.sqm.function.SqmFunctionDescriptor; @@ -449,24 +449,24 @@ public class SqmCriteriaNodeBuilder implements NodeBuilder, SqmCreationContext, final TypeConfiguration typeConfiguration = getTypeConfiguration(); @SuppressWarnings("unchecked") final List> sqmExpressions = (List>) expressions; - final SqmExpressable expressableType; + final SqmExpressible expressibleType; if ( tupleType == null || tupleType == Object[].class ) { //noinspection unchecked - expressableType = (DomainType) typeConfiguration.resolveTupleType( sqmExpressions ); + expressibleType = (DomainType) typeConfiguration.resolveTupleType( sqmExpressions ); } else { - expressableType = typeConfiguration.getSessionFactory().getMetamodel().embeddable( tupleType ); + expressibleType = typeConfiguration.getSessionFactory().getMetamodel().embeddable( tupleType ); } - return tuple( expressableType, sqmExpressions ); + return tuple( expressibleType, sqmExpressions ); } @Override - public SqmTuple tuple(SqmExpressable tupleType, SqmExpression... expressions) { + public SqmTuple tuple(SqmExpressible tupleType, SqmExpression... expressions) { return tuple( tupleType, asList( expressions ) ); } @Override - public SqmTuple tuple(SqmExpressable tupleType, List> sqmExpressions) { + public SqmTuple tuple(SqmExpressible tupleType, List> sqmExpressions) { if ( tupleType == null ) { //noinspection unchecked tupleType = (DomainType) getTypeConfiguration().resolveTupleType( sqmExpressions ); @@ -704,7 +704,7 @@ public class SqmCriteriaNodeBuilder implements NodeBuilder, SqmCreationContext, operator, leftHandExpression, rightHandExpression, - (SqmExpressable) getDomainModel().getTypeConfiguration().resolveArithmeticType( + (SqmExpressible) getDomainModel().getTypeConfiguration().resolveArithmeticType( leftHandExpression.getNodeType(), rightHandExpression.getNodeType(), operator @@ -891,17 +891,17 @@ public class SqmCriteriaNodeBuilder implements NodeBuilder, SqmCreationContext, return new SqmLiteralNull<>( this ); } - final SqmExpressable expressible = resolveInferredType( value, typeInferenceSource, getTypeConfiguration() ); + final SqmExpressible expressible = resolveInferredType( value, typeInferenceSource, getTypeConfiguration() ); return new SqmLiteral<>( value, expressible, this ); } - private static SqmExpressable resolveInferredType( + private static SqmExpressible resolveInferredType( T value, SqmExpression typeInferenceSource, TypeConfiguration typeConfiguration) { if ( typeInferenceSource != null ) { //noinspection unchecked - return (SqmExpressable) typeInferenceSource.getNodeType(); + return (SqmExpressible) typeInferenceSource.getNodeType(); } if ( value == null ) { @@ -924,11 +924,11 @@ public class SqmCriteriaNodeBuilder implements NodeBuilder, SqmCreationContext, final BindableType valueParamType = queryEngine.getTypeConfiguration() .getSessionFactory() .resolveParameterBindType( value ); - final SqmExpressable sqmExpressable = valueParamType == null + final SqmExpressible sqmExpressible = valueParamType == null ? null - : valueParamType.resolveExpressable( getTypeConfiguration().getSessionFactory() ); + : valueParamType.resolveExpressible( getTypeConfiguration().getSessionFactory() ); - return new SqmLiteral<>( value, sqmExpressable, this ); + return new SqmLiteral<>( value, sqmExpressible, this ); } @Override @@ -961,19 +961,19 @@ public class SqmCriteriaNodeBuilder implements NodeBuilder, SqmCreationContext, public SqmExpression nullLiteral(Class resultClass) { final TypeConfiguration typeConfiguration = getTypeConfiguration(); final BasicType basicTypeForJavaType = typeConfiguration.getBasicTypeForJavaType( resultClass ); - final SqmExpressable sqmExpressable; + final SqmExpressible sqmExpressible; if ( basicTypeForJavaType == null ) { - sqmExpressable = typeConfiguration.getSessionFactory() + sqmExpressible = typeConfiguration.getSessionFactory() .getMetamodel() .managedType( resultClass ); } else { - sqmExpressable = basicTypeForJavaType; + sqmExpressible = basicTypeForJavaType; } - return new SqmLiteralNull<>( sqmExpressable, this ); + return new SqmLiteralNull<>(sqmExpressible, this ); } - class MultiValueParameterType implements SqmExpressable { + class MultiValueParameterType implements SqmExpressible { private final JavaType javaType; public MultiValueParameterType(Class type) { @@ -984,7 +984,7 @@ public class SqmCriteriaNodeBuilder implements NodeBuilder, SqmCreationContext, } @Override - public JavaType getExpressableJavaType() { + public JavaType getExpressibleJavaType() { return javaType; } @@ -1501,12 +1501,12 @@ public class SqmCriteriaNodeBuilder implements NodeBuilder, SqmCreationContext, @Override public JpaCoalesce coalesce(Expression x, Expression y) { @SuppressWarnings("unchecked") - final SqmExpressable sqmExpressable = (SqmExpressable) highestPrecedenceType( + final SqmExpressible sqmExpressible = (SqmExpressible) highestPrecedenceType( ( (SqmExpression) x ).getNodeType(), ( (SqmExpression) y ).getNodeType() ); return new SqmCoalesce<>( - sqmExpressable, + sqmExpressible, 2, this ) diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmMappingModelHelper.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmMappingModelHelper.java index 5f458f301f..6dcbd0cacb 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmMappingModelHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmMappingModelHelper.java @@ -12,7 +12,7 @@ import jakarta.persistence.metamodel.Bindable; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.metamodel.mapping.CollectionPart; import org.hibernate.metamodel.mapping.EntityMappingType; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.metamodel.mapping.ModelPart; import org.hibernate.metamodel.mapping.ModelPartContainer; import org.hibernate.metamodel.model.domain.AnyMappingDomainType; @@ -27,7 +27,7 @@ import org.hibernate.metamodel.model.domain.internal.EntitySqmPathSource; import org.hibernate.metamodel.MappingMetamodel; import org.hibernate.persister.entity.EntityPersister; import org.hibernate.query.spi.NavigablePath; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.SqmPathSource; import org.hibernate.query.sqm.sql.SqmToSqlAstConverter; import org.hibernate.query.sqm.tree.SqmTypedNode; @@ -112,17 +112,17 @@ public class SqmMappingModelHelper { ); } - public static MappingModelExpressable resolveMappingModelExpressable( + public static MappingModelExpressible resolveMappingModelExpressible( SqmTypedNode sqmNode, MappingMetamodel domainModel, Function tableGroupLocator) { if ( sqmNode instanceof SqmPath ) { - return resolveSqmPath( (SqmPath) sqmNode, domainModel, tableGroupLocator ); + return resolveSqmPath( (SqmPath) sqmNode, domainModel, tableGroupLocator ); } - final SqmExpressable nodeType = sqmNode.getNodeType(); + final SqmExpressible nodeType = sqmNode.getNodeType(); if ( nodeType instanceof BasicType ) { - return ( (BasicType) nodeType ); + return (BasicType) nodeType; } return null; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmUtil.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmUtil.java index 5ee262d4aa..53c6bfd43e 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmUtil.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmUtil.java @@ -29,7 +29,7 @@ import org.hibernate.metamodel.mapping.ConvertibleModelPart; import org.hibernate.metamodel.mapping.EntityIdentifierMapping; import org.hibernate.metamodel.mapping.EntityMappingType; import org.hibernate.metamodel.mapping.JdbcMapping; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.metamodel.mapping.PluralAttributeMapping; import org.hibernate.metamodel.mapping.internal.ToOneAttributeMapping; import org.hibernate.metamodel.model.convert.spi.BasicValueConverter; @@ -221,14 +221,14 @@ public class SqmUtil { continue; } if ( !domainParamBinding.isBound() ) { - final MappingModelExpressable mappingExpressable = SqmMappingModelHelper.resolveMappingModelExpressable( + final MappingModelExpressible mappingExpressible = SqmMappingModelHelper.resolveMappingModelExpressible( sqmParameter, domainModel, tableGroupLocator ); for ( int i = 0; i < jdbcParamsBinds.size(); i++ ) { final List jdbcParams = jdbcParamsBinds.get( i ); - mappingExpressable.forEachJdbcType( + mappingExpressible.forEachJdbcType( (position, jdbcType) -> { jdbcParameterBindings.addBinding( jdbcParams.get( position ), @@ -420,7 +420,7 @@ public class SqmUtil { } for ( int i = 0; i < sqmParameters.size(); i++ ) { - final MappingModelExpressable mappingModelType = mappingModelResolutionAccess + final MappingModelExpressible mappingModelType = mappingModelResolutionAccess .getResolvedMappingModelType( sqmParameters.get( i ) ); if ( mappingModelType != null ) { return mappingModelType; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/MatchingIdSelectionHelper.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/MatchingIdSelectionHelper.java index 248b669562..feffc33944 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/MatchingIdSelectionHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/MatchingIdSelectionHelper.java @@ -19,7 +19,7 @@ import org.hibernate.engine.jdbc.spi.JdbcServices; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.metamodel.mapping.EntityIdentifierMapping; import org.hibernate.metamodel.mapping.EntityMappingType; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.metamodel.mapping.PluralAttributeMapping; import org.hibernate.metamodel.model.domain.EntityDomainType; import org.hibernate.query.spi.DomainQueryExecutionContext; @@ -288,8 +288,8 @@ public class MatchingIdSelectionHelper { navigablePath -> sqmConverter.getMutatingTableGroup(), new SqmParameterMappingModelResolutionAccess() { @Override @SuppressWarnings("unchecked") - public MappingModelExpressable getResolvedMappingModelType(SqmParameter parameter) { - return (MappingModelExpressable) sqmConverter.getSqmParameterMappingModelExpressableResolutions().get(parameter); + public MappingModelExpressible getResolvedMappingModelType(SqmParameter parameter) { + return (MappingModelExpressible) sqmConverter.getSqmParameterMappingModelExpressibleResolutions().get(parameter); } } , diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/MultiTableSqmMutationConverter.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/MultiTableSqmMutationConverter.java index 5153d6ad4b..bfc21c2679 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/MultiTableSqmMutationConverter.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/MultiTableSqmMutationConverter.java @@ -14,7 +14,7 @@ import java.util.function.Function; import org.hibernate.engine.spi.LoadQueryInfluencers; import org.hibernate.internal.util.collections.Stack; import org.hibernate.metamodel.mapping.EntityMappingType; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.persister.entity.EntityPersister; import org.hibernate.query.spi.QueryOptions; import org.hibernate.query.spi.QueryParameterBindings; @@ -57,7 +57,7 @@ import org.hibernate.sql.ast.tree.update.Assignment; */ public class MultiTableSqmMutationConverter extends BaseSqmToSqlAstConverter { public interface SqmParameterResolutionConsumer { - void accept(SqmParameter sqmParam, MappingModelExpressable mappingType, List jdbcParameters); + void accept(SqmParameter sqmParam, MappingModelExpressible mappingType, List jdbcParameters); } private final EntityMappingType mutatingEntityDescriptor; @@ -237,7 +237,7 @@ public class MultiTableSqmMutationConverter extends BaseSqmToSqlAstConverter> jdbcParameters = getJdbcParamsBySqmParam().get( sqmParameter ); - final MappingModelExpressable mappingType = getSqmParameterMappingModelExpressableResolutions().get( sqmParameter ); + final MappingModelExpressible mappingType = getSqmParameterMappingModelExpressibleResolutions().get( sqmParameter ); parameterResolutionConsumer.accept( sqmParameter, mappingType, diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/cte/AbstractCteMutationHandler.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/cte/AbstractCteMutationHandler.java index aa1e75d629..ae6607a955 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/cte/AbstractCteMutationHandler.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/cte/AbstractCteMutationHandler.java @@ -19,9 +19,9 @@ import org.hibernate.boot.model.naming.Identifier; import org.hibernate.engine.jdbc.spi.JdbcServices; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.metamodel.mapping.EntityMappingType; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.metamodel.mapping.ModelPart; -import org.hibernate.metamodel.mapping.SqlExpressable; +import org.hibernate.metamodel.mapping.SqlExpressible; import org.hibernate.query.spi.DomainQueryExecutionContext; import org.hibernate.query.sqm.internal.DomainParameterXref; import org.hibernate.query.sqm.internal.SqmJdbcExecutionContextAdapter; @@ -134,7 +134,7 @@ public abstract class AbstractCteMutationHandler extends AbstractMutationHandler parameterResolutions = new IdentityHashMap<>(); } - final Map paramTypeResolutions = new LinkedHashMap<>(); + final Map paramTypeResolutions = new LinkedHashMap<>(); final Predicate restriction = sqmConverter.visitWhereClause( sqmMutationStatement.getWhereClause(), @@ -172,7 +172,7 @@ public abstract class AbstractCteMutationHandler extends AbstractMutationHandler new BasicResult<>( 0, null, - ( (SqlExpressable) count).getJdbcMapping().getJavaTypeDescriptor() + ( (SqlExpressible) count).getJdbcMapping().getJavaTypeDescriptor() ) ); querySpec.getSelectClause().addSqlSelection( new SqlSelectionImpl( 1, 0, count ) ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/cte/CteInsertHandler.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/cte/CteInsertHandler.java index c98763476a..78d87b6c2d 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/cte/CteInsertHandler.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/cte/CteInsertHandler.java @@ -31,8 +31,8 @@ import org.hibernate.metamodel.mapping.BasicValuedMapping; import org.hibernate.metamodel.mapping.EntityIdentifierMapping; import org.hibernate.metamodel.mapping.EntityMappingType; import org.hibernate.metamodel.mapping.JdbcMapping; -import org.hibernate.metamodel.mapping.MappingModelExpressable; -import org.hibernate.metamodel.mapping.SqlExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; +import org.hibernate.metamodel.mapping.SqlExpressible; import org.hibernate.persister.entity.AbstractEntityPersister; import org.hibernate.persister.entity.EntityPersister; import org.hibernate.persister.entity.Joinable; @@ -188,7 +188,7 @@ public class CteInsertHandler implements InsertHandler { final int size = sqmStatement.getInsertionTargetPaths().size(); final List> targetPathColumns = new ArrayList<>( size ); final List targetPathSqmCteColumns = new ArrayList<>( size ); - final Map, MappingModelExpressable> paramTypeResolutions = new LinkedHashMap<>(); + final Map, MappingModelExpressible> paramTypeResolutions = new LinkedHashMap<>(); final NamedTableReference entityTableReference = new NamedTableReference( cteTable.getCteName(), TemporaryTable.DEFAULT_ALIAS, @@ -632,7 +632,7 @@ public class CteInsertHandler implements InsertHandler { new BasicResult( 0, null, - ( (SqlExpressable) count).getJdbcMapping().getJavaTypeDescriptor() + ( (SqlExpressible) count).getJdbcMapping().getJavaTypeDescriptor() ) ); querySpec.getSelectClause().addSqlSelection( new SqlSelectionImpl( 1, 0, count ) ); @@ -661,8 +661,8 @@ public class CteInsertHandler implements InsertHandler { navigablePath -> sqmConverter.getMutatingTableGroup(), new SqmParameterMappingModelResolutionAccess() { @Override @SuppressWarnings("unchecked") - public MappingModelExpressable getResolvedMappingModelType(SqmParameter parameter) { - return (MappingModelExpressable) paramTypeResolutions.get(parameter); + public MappingModelExpressible getResolvedMappingModelType(SqmParameter parameter) { + return (MappingModelExpressible) paramTypeResolutions.get(parameter); } }, executionContext.getSession() diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/cte/CteUpdateHandler.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/cte/CteUpdateHandler.java index 365e51e2bf..177f9ef55f 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/cte/CteUpdateHandler.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/cte/CteUpdateHandler.java @@ -15,7 +15,7 @@ import java.util.function.BiConsumer; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.internal.util.collections.CollectionHelper; import org.hibernate.metamodel.mapping.EntityMappingType; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.persister.entity.EntityPersister; import org.hibernate.persister.entity.Joinable; import org.hibernate.query.SemanticException; @@ -81,7 +81,7 @@ public class CteUpdateHandler extends AbstractCteMutationHandler implements Upda // information about the assignments final SqmSetClause setClause = updateStatement.getSetClause(); final List assignments = new ArrayList<>( setClause.getAssignments().size() ); - final Map paramTypeResolutions = new LinkedHashMap<>(); + final Map paramTypeResolutions = new LinkedHashMap<>(); sqmConverter.visitSetClause( setClause, diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/InsertExecutionDelegate.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/InsertExecutionDelegate.java index 7a948fdd44..c1b8f06f09 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/InsertExecutionDelegate.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/InsertExecutionDelegate.java @@ -31,7 +31,7 @@ import org.hibernate.id.insert.InsertGeneratedIdentifierDelegate; import org.hibernate.internal.util.collections.CollectionHelper; import org.hibernate.metamodel.mapping.BasicEntityIdentifierMapping; import org.hibernate.metamodel.mapping.EntityMappingType; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.metamodel.mapping.ModelPartContainer; import org.hibernate.persister.entity.AbstractEntityPersister; import org.hibernate.query.sqm.ComparisonOperator; @@ -90,7 +90,7 @@ public class InsertExecutionDelegate implements TableBasedInsertHandler.Executio private final JdbcParameterBindings jdbcParameterBindings; private final Map> assignmentsByTable; - private final Map, MappingModelExpressable> paramTypeResolutions; + private final Map, MappingModelExpressible> paramTypeResolutions; private final SessionFactoryImplementor sessionFactory; public InsertExecutionDelegate( @@ -105,7 +105,7 @@ public class InsertExecutionDelegate implements TableBasedInsertHandler.Executio List assignments, InsertStatement insertStatement, Map, List>> parameterResolutions, - Map, MappingModelExpressable> paramTypeResolutions, + Map, MappingModelExpressible> paramTypeResolutions, DomainQueryExecutionContext executionContext) { this.sqmInsert = sqmInsert; this.sqmConverter = sqmConverter; @@ -137,8 +137,8 @@ public class InsertExecutionDelegate implements TableBasedInsertHandler.Executio navigablePath -> insertingTableGroup, new SqmParameterMappingModelResolutionAccess() { @Override @SuppressWarnings("unchecked") - public MappingModelExpressable getResolvedMappingModelType(SqmParameter parameter) { - return (MappingModelExpressable) paramTypeResolutions.get(parameter); + public MappingModelExpressible getResolvedMappingModelType(SqmParameter parameter) { + return (MappingModelExpressible) paramTypeResolutions.get(parameter); } } , diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/RestrictedDeleteExecutionDelegate.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/RestrictedDeleteExecutionDelegate.java index e0ad0c42e5..3900b07a63 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/RestrictedDeleteExecutionDelegate.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/RestrictedDeleteExecutionDelegate.java @@ -26,7 +26,7 @@ import org.hibernate.internal.util.MutableInteger; import org.hibernate.metamodel.mapping.EntityIdentifierMapping; import org.hibernate.metamodel.mapping.EntityMappingType; import org.hibernate.metamodel.mapping.ForeignKeyDescriptor; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.metamodel.mapping.MappingModelHelper; import org.hibernate.metamodel.mapping.SelectableConsumer; import org.hibernate.persister.entity.EntityPersister; @@ -122,7 +122,7 @@ public class RestrictedDeleteExecutionDelegate implements TableBasedDeleteHandle assert hierarchyRootTableReference != null; final Map, List>> parameterResolutions; - final Map, MappingModelExpressable> paramTypeResolutions; + final Map, MappingModelExpressible> paramTypeResolutions; if ( domainParameterXref.getSqmParameterCount() == 0 ) { parameterResolutions = Collections.emptyMap(); @@ -204,7 +204,7 @@ public class RestrictedDeleteExecutionDelegate implements TableBasedDeleteHandle Predicate suppliedPredicate, TableGroup tableGroup, Map, List>> restrictionSqmParameterResolutions, - Map, MappingModelExpressable> paramTypeResolutions, + Map, MappingModelExpressible> paramTypeResolutions, SqlExpressionResolver sqlExpressionResolver, ExecutionContext executionContext) { assert entityDescriptor == entityDescriptor.getRootEntityDescriptor(); @@ -236,8 +236,8 @@ public class RestrictedDeleteExecutionDelegate implements TableBasedDeleteHandle navigablePath -> tableGroup, new SqmParameterMappingModelResolutionAccess() { @Override @SuppressWarnings("unchecked") - public MappingModelExpressable getResolvedMappingModelType(SqmParameter parameter) { - return (MappingModelExpressable) paramTypeResolutions.get(parameter); + public MappingModelExpressible getResolvedMappingModelType(SqmParameter parameter) { + return (MappingModelExpressible) paramTypeResolutions.get(parameter); } }, executionContext.getSession() @@ -472,7 +472,7 @@ public class RestrictedDeleteExecutionDelegate implements TableBasedDeleteHandle Predicate predicate, TableGroup deletingTableGroup, Map, List>> restrictionSqmParameterResolutions, - Map, MappingModelExpressable> paramTypeResolutions, + Map, MappingModelExpressible> paramTypeResolutions, ExecutionContext executionContext) { final JdbcParameterBindings jdbcParameterBindings = SqmUtil.createJdbcParameterBindings( executionContext.getQueryParameterBindings(), @@ -485,8 +485,8 @@ public class RestrictedDeleteExecutionDelegate implements TableBasedDeleteHandle navigablePath -> deletingTableGroup, new SqmParameterMappingModelResolutionAccess() { @Override @SuppressWarnings("unchecked") - public MappingModelExpressable getResolvedMappingModelType(SqmParameter parameter) { - return (MappingModelExpressable) paramTypeResolutions.get(parameter); + public MappingModelExpressible getResolvedMappingModelType(SqmParameter parameter) { + return (MappingModelExpressible) paramTypeResolutions.get(parameter); } }, executionContext.getSession() diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/TableBasedInsertHandler.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/TableBasedInsertHandler.java index d4a92ae424..7325f6c1e8 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/TableBasedInsertHandler.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/TableBasedInsertHandler.java @@ -24,7 +24,7 @@ import org.hibernate.id.OptimizableGenerator; import org.hibernate.id.enhanced.Optimizer; import org.hibernate.internal.util.collections.CollectionHelper; import org.hibernate.metamodel.MappingMetamodel; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.persister.entity.EntityPersister; import org.hibernate.query.spi.DomainQueryExecutionContext; import org.hibernate.query.sqm.function.SelfRenderingFunctionSqlAstExpression; @@ -142,7 +142,7 @@ public class TableBasedInsertHandler implements InsertHandler { // information about the target paths final List targetPathColumns = new ArrayList<>(); - final Map, MappingModelExpressable> paramTypeResolutions = new LinkedHashMap<>(); + final Map, MappingModelExpressible> paramTypeResolutions = new LinkedHashMap<>(); final NamedTableReference entityTableReference = new NamedTableReference( entityTable.getTableExpression(), TemporaryTable.DEFAULT_ALIAS, diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/TableBasedUpdateHandler.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/TableBasedUpdateHandler.java index dbde4ad049..fe9759f4ec 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/TableBasedUpdateHandler.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/TableBasedUpdateHandler.java @@ -20,7 +20,7 @@ import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.internal.util.collections.CollectionHelper; import org.hibernate.metamodel.MappingMetamodel; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.persister.entity.EntityPersister; import org.hibernate.persister.entity.Joinable; import org.hibernate.query.spi.DomainQueryExecutionContext; @@ -144,7 +144,7 @@ public class TableBasedUpdateHandler // information about the assignments final List assignments = new ArrayList<>(); - final Map, MappingModelExpressable> paramTypeResolutions = new LinkedHashMap<>(); + final Map, MappingModelExpressible> paramTypeResolutions = new LinkedHashMap<>(); converterDelegate.visitSetClause( getSqmDeleteOrUpdateStatement().getSetClause(), diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/UpdateExecutionDelegate.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/UpdateExecutionDelegate.java index 47ae6e5834..434cbf9083 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/UpdateExecutionDelegate.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/UpdateExecutionDelegate.java @@ -19,7 +19,7 @@ import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.internal.util.collections.CollectionHelper; import org.hibernate.metamodel.mapping.EntityMappingType; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.metamodel.mapping.ModelPartContainer; import org.hibernate.metamodel.mapping.SelectableConsumer; import org.hibernate.query.SemanticException; @@ -63,7 +63,7 @@ public class UpdateExecutionDelegate implements TableBasedUpdateHandler.Executio private final JdbcParameterBindings jdbcParameterBindings; private final Map> assignmentsByTable; - private final Map, MappingModelExpressable> paramTypeResolutions; + private final Map, MappingModelExpressible> paramTypeResolutions; private final SessionFactoryImplementor sessionFactory; public UpdateExecutionDelegate( @@ -79,7 +79,7 @@ public class UpdateExecutionDelegate implements TableBasedUpdateHandler.Executio List assignments, Predicate suppliedPredicate, Map, List>> parameterResolutions, - Map, MappingModelExpressable> paramTypeResolutions, + Map, MappingModelExpressible> paramTypeResolutions, DomainQueryExecutionContext executionContext) { this.sqmUpdate = sqmUpdate; this.sqmConverter = sqmConverter; @@ -111,8 +111,8 @@ public class UpdateExecutionDelegate implements TableBasedUpdateHandler.Executio navigablePath -> updatingTableGroup, new SqmParameterMappingModelResolutionAccess() { @Override @SuppressWarnings("unchecked") - public MappingModelExpressable getResolvedMappingModelType(SqmParameter parameter) { - return (MappingModelExpressable) paramTypeResolutions.get(parameter); + public MappingModelExpressible getResolvedMappingModelType(SqmParameter parameter) { + return (MappingModelExpressible) paramTypeResolutions.get(parameter); } }, executionContext.getSession() diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/ArgumentTypesValidator.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/ArgumentTypesValidator.java index 92887321d2..a6faad297a 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/ArgumentTypesValidator.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/ArgumentTypesValidator.java @@ -10,7 +10,7 @@ import org.hibernate.QueryException; import org.hibernate.metamodel.mapping.JdbcMapping; import org.hibernate.metamodel.mapping.JdbcMappingContainer; import org.hibernate.query.spi.QueryEngine; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.SqmTypedNode; import org.hibernate.query.sqm.tree.expression.SqmCollation; import org.hibernate.query.sqm.tree.expression.SqmDurationUnit; @@ -62,10 +62,10 @@ public class ArgumentTypesValidator implements ArgumentsValidator { int count = 0; for (SqmTypedNode argument : arguments) { JdbcTypeIndicators indicators = queryEngine.getTypeConfiguration().getCurrentBaseSqlTypeIndicators(); - SqmExpressable nodeType = argument.getNodeType(); + SqmExpressible nodeType = argument.getNodeType(); FunctionParameterType type = count < types.length ? types[count++] : types[types.length - 1]; if ( nodeType!=null ) { - JavaType javaType = nodeType.getExpressableJavaType(); + JavaType javaType = nodeType.getExpressibleJavaType(); if (javaType != null) { try { JdbcType jdbcType = javaType.getRecommendedJdbcType(indicators); diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/StandardFunctionReturnTypeResolvers.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/StandardFunctionReturnTypeResolvers.java index 8dd06001dd..df3a17b33c 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/StandardFunctionReturnTypeResolvers.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/StandardFunctionReturnTypeResolvers.java @@ -16,7 +16,7 @@ import org.hibernate.metamodel.mapping.BasicValuedMapping; import org.hibernate.metamodel.mapping.JdbcMapping; import org.hibernate.metamodel.mapping.JdbcMappingContainer; import org.hibernate.query.ReturnableType; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.SqmTypedNode; import org.hibernate.sql.ast.tree.SqlAstNode; import org.hibernate.sql.ast.tree.expression.Expression; @@ -205,7 +205,7 @@ public class StandardFunctionReturnTypeResolvers { List> arguments, int position) { final SqmTypedNode specifiedArgument = arguments.get( position - 1 ); - final SqmExpressable specifiedArgType = specifiedArgument.getNodeType(); + final SqmExpressible specifiedArgType = specifiedArgument.getNodeType(); if ( !(specifiedArgType instanceof ReturnableType ) ) { throw new QueryException( String.format( @@ -226,13 +226,13 @@ public class StandardFunctionReturnTypeResolvers { List> arguments, int position) { final SqmTypedNode specifiedArgument = arguments.get( position - 1 ); - final SqmExpressable specifiedArgType = specifiedArgument.getNodeType(); + final SqmExpressible specifiedArgType = specifiedArgument.getNodeType(); if ( specifiedArgType instanceof BasicType ) { return ( (BasicType) specifiedArgType ).getJdbcMapping(); } else { final BasicType basicType = typeConfiguration.getBasicTypeForJavaType( - specifiedArgType.getExpressableJavaType().getJavaTypeClass() + specifiedArgType.getExpressibleJavaType().getJavaTypeClass() ); if ( basicType == null ) { throw new QueryException( diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/spi/SqmParameterMappingModelResolutionAccess.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/spi/SqmParameterMappingModelResolutionAccess.java index 9324a69ff9..cc04bd53ec 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/spi/SqmParameterMappingModelResolutionAccess.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/spi/SqmParameterMappingModelResolutionAccess.java @@ -6,7 +6,7 @@ */ package org.hibernate.query.sqm.spi; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.query.sqm.tree.expression.SqmParameter; /** @@ -14,5 +14,5 @@ import org.hibernate.query.sqm.tree.expression.SqmParameter; */ @FunctionalInterface public interface SqmParameterMappingModelResolutionAccess { - MappingModelExpressable getResolvedMappingModelType(SqmParameter parameter); + MappingModelExpressible getResolvedMappingModelType(SqmParameter parameter); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java index 694298c4d0..b74bc60f9c 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java @@ -72,11 +72,11 @@ import org.hibernate.metamodel.mapping.EntityVersionMapping; import org.hibernate.metamodel.mapping.ForeignKeyDescriptor; import org.hibernate.metamodel.mapping.JdbcMapping; import org.hibernate.metamodel.mapping.JdbcMappingContainer; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.metamodel.mapping.ModelPart; import org.hibernate.metamodel.mapping.ModelPartContainer; import org.hibernate.metamodel.mapping.PluralAttributeMapping; -import org.hibernate.metamodel.mapping.SqlExpressable; +import org.hibernate.metamodel.mapping.SqlExpressible; import org.hibernate.metamodel.mapping.ValueMapping; import org.hibernate.metamodel.mapping.internal.EmbeddedCollectionPart; import org.hibernate.metamodel.mapping.internal.EntityCollectionPart; @@ -111,7 +111,7 @@ import org.hibernate.query.spi.QueryParameterBinding; import org.hibernate.query.spi.QueryParameterBindings; import org.hibernate.query.spi.QueryParameterImplementor; import org.hibernate.query.sqm.InterpretationException; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.SqmPathSource; import org.hibernate.query.sqm.SqmQuerySource; import org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor; @@ -387,7 +387,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base private final DomainParameterXref domainParameterXref; private final QueryParameterBindings domainParameterBindings; - private final Map,MappingModelExpressable> sqmParameterMappingModelTypes = new LinkedHashMap<>(); + private final Map, MappingModelExpressible> sqmParameterMappingModelTypes = new LinkedHashMap<>(); private final Map, SqmJpaCriteriaParameterWrapper> jpaCriteriaParamResolutions; private final List> domainResults; private final EntityGraphTraversalState entityGraphTraversalState; @@ -413,7 +413,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base private SqmByUnit appliedByUnit; private Expression adjustedTimestamp; - private SqmExpressable adjustedTimestampType; //TODO: remove this once we can get a Type directly from adjustedTimestamp + private SqmExpressible adjustedTimestampType; //TODO: remove this once we can get a Type directly from adjustedTimestamp private Expression adjustmentScale; private boolean negativeAdjustment; @@ -475,7 +475,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base .getJpaCriteriaParamResolutions(); } - public Map,MappingModelExpressable> getSqmParameterMappingModelExpressableResolutions() { + public Map, MappingModelExpressible> getSqmParameterMappingModelExpressibleResolutions() { return sqmParameterMappingModelTypes; } @@ -841,8 +841,8 @@ public abstract class BaseSqmToSqlAstConverter extends Base else { final Expression valueExpression = (Expression) assignmentValue.accept( this ); - final int valueExprJdbcCount = getKeyExpressable( valueExpression.getExpressionType() ).getJdbcTypeCount(); - final int assignedPathJdbcCount = getKeyExpressable( assignedPathInterpretation.getExpressionType() ) + final int valueExprJdbcCount = getKeyExpressible( valueExpression.getExpressionType() ).getJdbcTypeCount(); + final int assignedPathJdbcCount = getKeyExpressible( assignedPathInterpretation.getExpressionType() ) .getJdbcTypeCount(); if ( valueExprJdbcCount != assignedPathJdbcCount ) { @@ -3843,7 +3843,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base } private Expression createCaseExpression(SqmPath lhs, EntityDomainType treatTarget, Expression expression) { - final BasicValuedMapping mappingModelExpressable = (BasicValuedMapping) expression.getExpressionType(); + final BasicValuedMapping mappingModelExpressible = (BasicValuedMapping) expression.getExpressionType(); final List whenFragments = new ArrayList<>( 1 ); whenFragments.add( new CaseSearchedExpression.WhenFragment( @@ -3852,9 +3852,9 @@ public abstract class BaseSqmToSqlAstConverter extends Base ) ); return new CaseSearchedExpression( - mappingModelExpressable, + mappingModelExpressible, whenFragments, - new QueryLiteral<>( null, mappingModelExpressable ) + new QueryLiteral<>( null, mappingModelExpressible ) ); } @@ -3884,25 +3884,25 @@ public abstract class BaseSqmToSqlAstConverter extends Base @Override public Expression visitLiteral(SqmLiteral literal) { - final Supplier> inferableTypeAccess = inferrableTypeAccessStack.getCurrent(); + final Supplier> inferableTypeAccess = inferrableTypeAccessStack.getCurrent(); if ( literal instanceof SqmLiteralNull ) { - MappingModelExpressable mappingModelExpressable = inferableTypeAccess.get(); - if ( mappingModelExpressable == null ) { - mappingModelExpressable = determineCurrentExpressable( literal ); + MappingModelExpressible mappingModelExpressible = inferableTypeAccess.get(); + if ( mappingModelExpressible == null ) { + mappingModelExpressible = determineCurrentExpressible( literal ); } - if ( mappingModelExpressable instanceof BasicValuedMapping ) { - return new QueryLiteral<>( null, (BasicValuedMapping) mappingModelExpressable ); + if ( mappingModelExpressible instanceof BasicValuedMapping ) { + return new QueryLiteral<>( null, (BasicValuedMapping) mappingModelExpressible); } - final MappingModelExpressable keyExpressable = getKeyExpressable( mappingModelExpressable ); - if ( keyExpressable == null ) { + final MappingModelExpressible keyExpressible = getKeyExpressible(mappingModelExpressible); + if ( keyExpressible == null ) { // Default to the Object type return new QueryLiteral<>( null, basicType( Object.class ) ); } - final List expressions = new ArrayList<>( keyExpressable.getJdbcTypeCount() ); + final List expressions = new ArrayList<>( keyExpressible.getJdbcTypeCount() ); - keyExpressable.forEachJdbcType( + keyExpressible.forEachJdbcType( (index, jdbcMapping) -> expressions.add( new QueryLiteral<>( null, @@ -3910,13 +3910,13 @@ public abstract class BaseSqmToSqlAstConverter extends Base ) ) ); - return new SqlTuple( expressions, mappingModelExpressable ); + return new SqlTuple( expressions, mappingModelExpressible); } - final MappingModelExpressable inferableExpressable = inferableTypeAccess.get(); + final MappingModelExpressible inferableExpressible = inferableTypeAccess.get(); - if ( inferableExpressable instanceof ConvertibleModelPart ) { - final ConvertibleModelPart convertibleModelPart = (ConvertibleModelPart) inferableExpressable; + if ( inferableExpressible instanceof ConvertibleModelPart ) { + final ConvertibleModelPart convertibleModelPart = (ConvertibleModelPart) inferableExpressible; final BasicValueConverter valueConverter = convertibleModelPart.getValueConverter(); if ( valueConverter != null ) { @@ -3945,8 +3945,8 @@ public abstract class BaseSqmToSqlAstConverter extends Base } } // Special case for when we create an entity literal through the JPA CriteriaBuilder.literal API - else if ( inferableExpressable instanceof EntityDiscriminatorMapping ) { - final EntityDiscriminatorMapping discriminatorMapping = (EntityDiscriminatorMapping) inferableExpressable; + else if ( inferableExpressible instanceof EntityDiscriminatorMapping ) { + final EntityDiscriminatorMapping discriminatorMapping = (EntityDiscriminatorMapping) inferableExpressible; final Object literalValue = literal.getLiteralValue(); final EntityPersister mappingDescriptor; if ( literalValue instanceof Class ) { @@ -3977,38 +3977,38 @@ public abstract class BaseSqmToSqlAstConverter extends Base return new EntityTypeLiteral( mappingDescriptor ); } - final MappingModelExpressable expressable; - final MappingModelExpressable localExpressable = SqmMappingModelHelper.resolveMappingModelExpressable( + final MappingModelExpressible expressible; + final MappingModelExpressible localExpressible = SqmMappingModelHelper.resolveMappingModelExpressible( literal, getCreationContext().getDomainModel(), getFromClauseAccess()::findTableGroup ); - if ( localExpressable == null ) { - expressable = getElementExpressable( inferableExpressable ); + if ( localExpressible == null ) { + expressible = getElementExpressible( inferableExpressible ); } else { - final MappingModelExpressable elementExpressable = getElementExpressable( localExpressable ); - if ( elementExpressable instanceof BasicType ) { - expressable = InferredBasicValueResolver.resolveSqlTypeIndicators( + final MappingModelExpressible elementExpressible = getElementExpressible( localExpressible ); + if ( elementExpressible instanceof BasicType ) { + expressible = InferredBasicValueResolver.resolveSqlTypeIndicators( this, - (BasicType) elementExpressable, + (BasicType) elementExpressible, literal.getJavaTypeDescriptor() ); } else { - expressable = elementExpressable; + expressible = elementExpressible; } } - if ( expressable instanceof BasicValuedMapping ) { + if ( expressible instanceof BasicValuedMapping ) { return new QueryLiteral<>( literal.getLiteralValue(), - (BasicValuedMapping) expressable + (BasicValuedMapping) expressible ); } // Handling other values might seem unnecessary, but with JPA Criteria it is totally possible to have such literals - else if ( expressable instanceof EmbeddableValuedModelPart ) { - final EmbeddableValuedModelPart embeddableValuedModelPart = (EmbeddableValuedModelPart) expressable; + else if ( expressible instanceof EmbeddableValuedModelPart ) { + final EmbeddableValuedModelPart embeddableValuedModelPart = (EmbeddableValuedModelPart) expressible; final List list = new ArrayList<>( embeddableValuedModelPart.getJdbcTypeCount() ); embeddableValuedModelPart.forEachJdbcValue( literal.getLiteralValue(), @@ -4017,10 +4017,10 @@ public abstract class BaseSqmToSqlAstConverter extends Base -> list.add( new QueryLiteral<>( value, (BasicValuedMapping) jdbcMapping ) ), null ); - return new SqlTuple( list, expressable ); + return new SqlTuple( list, expressible ); } - else if ( expressable instanceof EntityValuedModelPart ) { - final EntityValuedModelPart entityValuedModelPart = (EntityValuedModelPart) expressable; + else if ( expressible instanceof EntityValuedModelPart ) { + final EntityValuedModelPart entityValuedModelPart = (EntityValuedModelPart) expressible; final Object associationKey; final ModelPart associationKeyPart; if ( entityValuedModelPart instanceof Association ) { @@ -4062,26 +4062,26 @@ public abstract class BaseSqmToSqlAstConverter extends Base } else { throw new NotYetImplementedFor6Exception( - expressable == null ? literal.getLiteralValue().getClass() : expressable.getClass() + expressible == null ? literal.getLiteralValue().getClass() : expressible.getClass() ); } } - private MappingModelExpressable getKeyExpressable(JdbcMappingContainer mappingModelExpressable) { - if ( mappingModelExpressable instanceof EntityAssociationMapping ) { - return ( (EntityAssociationMapping) mappingModelExpressable ).getKeyTargetMatchPart(); + private MappingModelExpressible getKeyExpressible(JdbcMappingContainer mappingModelExpressible) { + if ( mappingModelExpressible instanceof EntityAssociationMapping ) { + return ( (EntityAssociationMapping) mappingModelExpressible ).getKeyTargetMatchPart(); } else { - return (MappingModelExpressable) mappingModelExpressable; + return (MappingModelExpressible) mappingModelExpressible; } } - private MappingModelExpressable getElementExpressable(MappingModelExpressable mappingModelExpressable) { - if ( mappingModelExpressable instanceof PluralAttributeMapping ) { - return ( (PluralAttributeMapping) mappingModelExpressable ).getElementDescriptor(); + private MappingModelExpressible getElementExpressible(MappingModelExpressible mappingModelExpressible) { + if ( mappingModelExpressible instanceof PluralAttributeMapping ) { + return ( (PluralAttributeMapping) mappingModelExpressible).getElementDescriptor(); } else { - return mappingModelExpressable; + return mappingModelExpressible; } } @@ -4106,7 +4106,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base protected Expression consumeSqmParameter( SqmParameter sqmParameter, - MappingModelExpressable valueMapping, + MappingModelExpressible valueMapping, BiConsumer jdbcParameterConsumer) { final List jdbcParametersForSqm = new ArrayList<>(); @@ -4145,7 +4145,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base private void replaceJdbcParametersType( SqmParameter sourceSqmParameter, List> sqmParameters, - MappingModelExpressable valueMapping) { + MappingModelExpressible valueMapping) { final JdbcMapping jdbcMapping = valueMapping.getJdbcMappings().get( 0 ); for ( SqmParameter sqmParameter : sqmParameters ) { if ( sqmParameter == sourceSqmParameter ) { @@ -4157,7 +4157,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base for ( List parameters : jdbcParamsForSqmParameter ) { assert parameters.size() == 1; final JdbcParameter jdbcParameter = parameters.get( 0 ); - if ( ( (SqlExpressable) jdbcParameter ).getJdbcMapping() != valueMapping ) { + if ( ( (SqlExpressible) jdbcParameter ).getJdbcMapping() != valueMapping ) { final JdbcParameter newJdbcParameter = new JdbcParameterImpl( jdbcMapping ); parameters.set( 0, newJdbcParameter ); jdbcParameters.getJdbcParameters().remove( jdbcParameter ); @@ -4202,7 +4202,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base } protected Expression consumeSingleSqmParameter(SqmParameter sqmParameter) { - final MappingModelExpressable valueMapping = determineValueMapping( sqmParameter ); + final MappingModelExpressible valueMapping = determineValueMapping( sqmParameter ); final List jdbcParametersForSqm = new ArrayList<>(); @@ -4235,31 +4235,31 @@ public abstract class BaseSqmToSqlAstConverter extends Base ); } -// protected MappingModelExpressable lenientlyResolveMappingExpressable(SqmExpressable nodeType) { -// return resolveMappingExpressable( nodeType ); +// protected MappingModelExpressible lenientlyResolveMappingExpressible(SqmExpressible nodeType) { +// return resolveMappingExpressible( nodeType ); // } // -// protected MappingModelExpressable resolveMappingExpressable(SqmExpressable nodeType) { -// final MappingModelExpressable valueMapping = getCreationContext().getDomainModel().resolveMappingExpressable( +// protected MappingModelExpressible resolveMappingExpressible(SqmExpressible nodeType) { +// final MappingModelExpressible valueMapping = getCreationContext().getDomainModel().resolveMappingExpressible( // nodeType, // this::findTableGroupByPath // ); // // if ( valueMapping == null ) { -// final Supplier> currentExpressableSupplier = inferrableTypeAccessStack.getCurrent(); -// if ( currentExpressableSupplier != null ) { -// return currentExpressableSupplier.get(); +// final Supplier> currentExpressibleSupplier = inferrableTypeAccessStack.getCurrent(); +// if ( currentExpressibleSupplier != null ) { +// return currentExpressibleSupplier.get(); // } // } // // if ( valueMapping == null ) { -// throw new ConversionException( "Could not determine ValueMapping for SqmExpressable: " + nodeType ); +// throw new ConversionException( "Could not determine ValueMapping for SqmExpressible: " + nodeType ); // } // // return valueMapping; // } - protected MappingModelExpressable determineValueMapping(SqmExpression sqmExpression) { + protected MappingModelExpressible determineValueMapping(SqmExpression sqmExpression) { if ( sqmExpression instanceof SqmParameter ) { return determineValueMapping( (SqmParameter) sqmExpression ); } @@ -4268,7 +4268,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base if ( sqmExpression instanceof SqmPath ) { log.debugf( "Determining mapping-model type for SqmPath : %s ", sqmExpression ); prepareReusablePath( (SqmPath) sqmExpression, () -> null ); - return SqmMappingModelHelper.resolveMappingModelExpressable( + return SqmMappingModelHelper.resolveMappingModelExpressible( sqmExpression, domainModel, getFromClauseAccess()::findTableGroup @@ -4277,9 +4277,9 @@ public abstract class BaseSqmToSqlAstConverter extends Base // The model type of an enum literal is always inferred if ( sqmExpression instanceof SqmEnumLiteral ) { - final Supplier> currentExpressableSupplier = inferrableTypeAccessStack.getCurrent(); - if ( currentExpressableSupplier != null ) { - return currentExpressableSupplier.get(); + final Supplier> currentExpressibleSupplier = inferrableTypeAccessStack.getCurrent(); + if ( currentExpressibleSupplier != null ) { + return currentExpressibleSupplier.get(); } } @@ -4288,11 +4288,11 @@ public abstract class BaseSqmToSqlAstConverter extends Base final SqmSelectClause selectClause = subQuery.getQuerySpec().getSelectClause(); if ( selectClause.getSelections().size() == 1 ) { final SqmSelection subQuerySelection = selectClause.getSelections().get( 0 ); - final SqmExpressable selectionNodeType = subQuerySelection.getNodeType(); + final SqmExpressible selectionNodeType = subQuerySelection.getNodeType(); if ( selectionNodeType != null ) { - final SqmExpressable sqmExpressable; + final SqmExpressible sqmExpressible; if ( selectionNodeType instanceof PluralPersistentAttribute ) { - sqmExpressable = ( (PluralPersistentAttribute) selectionNodeType ).getElementPathSource(); + sqmExpressible = ( (PluralPersistentAttribute) selectionNodeType ).getElementPathSource(); } else if ( selectionNodeType instanceof SqmPathSource) { final SqmPathSource pathSource = (SqmPathSource) selectionNodeType; @@ -4300,7 +4300,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base pathSource.getPathName() ); if ( partNature == null ) { - sqmExpressable = selectionNodeType; + sqmExpressible = selectionNodeType; } else { final SqmPath sqmPath = (SqmPath) subQuerySelection.getSelectableNode(); @@ -4315,13 +4315,13 @@ public abstract class BaseSqmToSqlAstConverter extends Base } } else { - sqmExpressable = selectionNodeType; + sqmExpressible = selectionNodeType; } - final MappingModelExpressable expressable = domainModel.resolveMappingExpressable( sqmExpressable, this::findTableGroupByPath ); + final MappingModelExpressible expressible = domainModel.resolveMappingExpressible(sqmExpressible, this::findTableGroupByPath ); - if ( expressable != null ) { - return expressable; + if ( expressible != null ) { + return expressible; } try { @@ -4335,20 +4335,20 @@ public abstract class BaseSqmToSqlAstConverter extends Base } log.debugf( "Determining mapping-model type for generalized SqmExpression : %s", sqmExpression ); - final SqmExpressable nodeType = sqmExpression.getNodeType(); + final SqmExpressible nodeType = sqmExpression.getNodeType(); if ( nodeType == null ) { // We can't determine the type of the expression return null; } - final MappingModelExpressable valueMapping = domainModel.resolveMappingExpressable( + final MappingModelExpressible valueMapping = domainModel.resolveMappingExpressible( nodeType, this::findTableGroupByPath ); if ( valueMapping == null ) { - final Supplier> currentExpressableSupplier = inferrableTypeAccessStack.getCurrent(); - if ( currentExpressableSupplier != null ) { - return currentExpressableSupplier.get(); + final Supplier> currentExpressibleSupplier = inferrableTypeAccessStack.getCurrent(); + if ( currentExpressibleSupplier != null ) { + return currentExpressibleSupplier.get(); } } @@ -4359,10 +4359,10 @@ public abstract class BaseSqmToSqlAstConverter extends Base return valueMapping; } - protected MappingModelExpressable getInferredValueMapping() { - final Supplier> currentExpressableSupplier = inferrableTypeAccessStack.getCurrent(); - if ( currentExpressableSupplier != null ) { - final MappingModelExpressable inferredMapping = currentExpressableSupplier.get(); + protected MappingModelExpressible getInferredValueMapping() { + final Supplier> currentExpressibleSupplier = inferrableTypeAccessStack.getCurrent(); + if ( currentExpressibleSupplier != null ) { + final MappingModelExpressible inferredMapping = currentExpressibleSupplier.get(); if ( inferredMapping != null ) { if ( inferredMapping instanceof PluralAttributeMapping ) { return ( (PluralAttributeMapping) inferredMapping ).getElementDescriptor(); @@ -4376,7 +4376,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base return null; } - protected MappingModelExpressable determineValueMapping(SqmParameter sqmParameter) { + protected MappingModelExpressible determineValueMapping(SqmParameter sqmParameter) { log.debugf( "Determining mapping-model type for SqmParameter : %s", sqmParameter ); final QueryParameterImplementor queryParameter = domainParameterXref.getQueryParameter( sqmParameter ); @@ -4386,7 +4386,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base // this should indicate the condition that the user query did not define an // explicit type in regard to this parameter. Here we should prefer the // inferrable type and fallback to the binding type - final MappingModelExpressable inferredValueMapping = getInferredValueMapping(); + final MappingModelExpressible inferredValueMapping = getInferredValueMapping(); if ( inferredValueMapping != null ) { return inferredValueMapping; } @@ -4404,11 +4404,11 @@ public abstract class BaseSqmToSqlAstConverter extends Base // Default to the Object type return basicType( Object.class ); } - else if ( paramType instanceof MappingModelExpressable && paramType.getBindableJavaType() == Object.class ) { - return (MappingModelExpressable) paramType; + else if ( paramType instanceof MappingModelExpressible && paramType.getBindableJavaType() == Object.class ) { + return (MappingModelExpressible) paramType; } - final SqmExpressable paramSqmType = paramType.resolveExpressable( creationContext.getSessionFactory() ); + final SqmExpressible paramSqmType = paramType.resolveExpressible( creationContext.getSessionFactory() ); if ( paramSqmType instanceof SqmPath ) { final SqmPath sqmPath = (SqmPath) paramSqmType; @@ -4430,7 +4430,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base if ( paramSqmType instanceof CompositeSqmPathSource ) { // Try to infer the value mapping since the other side apparently is a path source - final MappingModelExpressable inferredValueMapping = getInferredValueMapping(); + final MappingModelExpressible inferredValueMapping = getInferredValueMapping(); if ( inferredValueMapping != null ) { return inferredValueMapping; } @@ -4439,25 +4439,25 @@ public abstract class BaseSqmToSqlAstConverter extends Base if ( paramSqmType instanceof SqmPathSource || paramSqmType instanceof BasicDomainType ) { // Try to infer the value mapping since the other side apparently is a path source - final MappingModelExpressable inferredValueMapping = getInferredValueMapping(); + final MappingModelExpressible inferredValueMapping = getInferredValueMapping(); if ( inferredValueMapping != null ) { return inferredValueMapping; } return getTypeConfiguration().getBasicTypeForJavaType( - paramSqmType.getExpressableJavaType().getJavaTypeClass() + paramSqmType.getExpressibleJavaType().getJavaTypeClass() ); } throw new ConversionException( "Could not determine ValueMapping for SqmParameter: " + sqmParameter ); } - protected final Stack>> inferrableTypeAccessStack = new StandardStack<>( + protected final Stack>> inferrableTypeAccessStack = new StandardStack<>( () -> null ); private void resolveSqmParameter( SqmParameter expression, - MappingModelExpressable valueMapping, + MappingModelExpressible valueMapping, BiConsumer jdbcParameterConsumer) { sqmParameterMappingModelTypes.put( expression, valueMapping ); final Bindable bindable; @@ -4512,10 +4512,10 @@ public abstract class BaseSqmToSqlAstConverter extends Base final List> groupedExpressions = sqmTuple.getGroupedExpressions(); final int size = groupedExpressions.size(); final List expressions = new ArrayList<>( size ); - final MappingModelExpressable mappingModelExpressable = inferrableTypeAccessStack.getCurrent().get(); + final MappingModelExpressible mappingModelExpressible = inferrableTypeAccessStack.getCurrent().get(); final EmbeddableMappingType embeddableMappingType; - if ( mappingModelExpressable instanceof ValueMapping ) { - embeddableMappingType = (EmbeddableMappingType) ( (ValueMapping) mappingModelExpressable ).getMappedType(); + if ( mappingModelExpressible instanceof ValueMapping ) { + embeddableMappingType = (EmbeddableMappingType) ( (ValueMapping) mappingModelExpressible).getMappedType(); } else { embeddableMappingType = null; @@ -4543,14 +4543,14 @@ public abstract class BaseSqmToSqlAstConverter extends Base } } } - final MappingModelExpressable valueMapping; - if ( mappingModelExpressable != null ) { - valueMapping = mappingModelExpressable; + final MappingModelExpressible valueMapping; + if ( mappingModelExpressible != null ) { + valueMapping = mappingModelExpressible; } else { - final SqmExpressable expressable = sqmTuple.getExpressable(); - if ( expressable instanceof MappingModelExpressable ) { - valueMapping = (MappingModelExpressable) expressable; + final SqmExpressible expressible = sqmTuple.getExpressible(); + if ( expressible instanceof MappingModelExpressible) { + valueMapping = (MappingModelExpressible) expressible; } else { valueMapping = null; @@ -4687,14 +4687,14 @@ public abstract class BaseSqmToSqlAstConverter extends Base } private BasicValuedMapping getExpressionType(SqmBinaryArithmetic expression) { - final SqmExpressable nodeType = expression.getNodeType(); + final SqmExpressible nodeType = expression.getNodeType(); if ( nodeType != null ) { if ( nodeType instanceof BasicValuedMapping ) { return (BasicValuedMapping) nodeType; } else { return getTypeConfiguration().getBasicTypeForJavaType( - nodeType.getExpressableJavaType().getJavaTypeClass() + nodeType.getExpressibleJavaType().getJavaTypeClass() ); } } @@ -4738,14 +4738,14 @@ public abstract class BaseSqmToSqlAstConverter extends Base // ts - x * (d1 - d2) => (ts - x * d1) + x * d2 Expression timestamp = adjustedTimestamp; - SqmExpressable timestampType = adjustedTimestampType; + SqmExpressible timestampType = adjustedTimestampType; adjustedTimestamp = toSqlExpression( expression.getLeftHandOperand().accept( this ) ); JdbcMappingContainer type = adjustedTimestamp.getExpressionType(); - if ( type instanceof SqmExpressable ) { - adjustedTimestampType = (SqmExpressable) type; + if ( type instanceof SqmExpressible) { + adjustedTimestampType = (SqmExpressible) type; } else if (type instanceof AttributeMapping ) { - adjustedTimestampType = (SqmExpressable) ( (AttributeMapping) type ).getMappedType(); + adjustedTimestampType = (SqmExpressible) ( (AttributeMapping) type ).getMappedType(); } else { // else we know it has not been transformed @@ -4883,7 +4883,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base private X cleanly(Supplier supplier) { SqmByUnit byUnit = appliedByUnit; Expression timestamp = adjustedTimestamp; - SqmExpressable timestampType = adjustedTimestampType; + SqmExpressible timestampType = adjustedTimestampType; Expression scale = adjustmentScale; boolean negate = negativeAdjustment; adjustmentScale = null; @@ -5090,11 +5090,11 @@ public abstract class BaseSqmToSqlAstConverter extends Base @Override public CaseSimpleExpression visitSimpleCaseExpression(SqmCaseSimple expression) { final List whenFragments = new ArrayList<>( expression.getWhenFragments().size() ); - final Supplier> inferenceSupplier = inferrableTypeAccessStack.getCurrent(); + final Supplier> inferenceSupplier = inferrableTypeAccessStack.getCurrent(); inferrableTypeAccessStack.push( () -> { for ( SqmCaseSimple.WhenFragment whenFragment : expression.getWhenFragments() ) { - final MappingModelExpressable resolved = determineCurrentExpressable( whenFragment.getCheckValue() ); + final MappingModelExpressible resolved = determineCurrentExpressible( whenFragment.getCheckValue() ); if ( resolved != null ) { return resolved; } @@ -5103,21 +5103,21 @@ public abstract class BaseSqmToSqlAstConverter extends Base } ); final Expression fixture = (Expression) expression.getFixture().accept( this ); - final MappingModelExpressable fixtureType = (MappingModelExpressable) fixture.getExpressionType(); + final MappingModelExpressible fixtureType = (MappingModelExpressible) fixture.getExpressionType(); inferrableTypeAccessStack.pop(); - MappingModelExpressable resolved = determineCurrentExpressable( expression ); + MappingModelExpressible resolved = determineCurrentExpressible( expression ); Expression otherwise = null; for ( SqmCaseSimple.WhenFragment whenFragment : expression.getWhenFragments() ) { inferrableTypeAccessStack.push( () -> fixtureType ); final Expression checkValue = (Expression) whenFragment.getCheckValue().accept( this ); inferrableTypeAccessStack.pop(); - final MappingModelExpressable alreadyKnown = resolved; + final MappingModelExpressible alreadyKnown = resolved; inferrableTypeAccessStack.push( () -> alreadyKnown == null && inferenceSupplier != null ? inferenceSupplier.get() : alreadyKnown ); final Expression resultExpression = (Expression) whenFragment.getResult().accept( this ); inferrableTypeAccessStack.pop(); - resolved = (MappingModelExpressable) TypeHelper.highestPrecedence( resolved, resultExpression.getExpressionType() ); + resolved = (MappingModelExpressible) TypeHelper.highestPrecedence( resolved, resultExpression.getExpressionType() ); whenFragments.add( new CaseSimpleExpression.WhenFragment( @@ -5128,13 +5128,13 @@ public abstract class BaseSqmToSqlAstConverter extends Base } if ( expression.getOtherwise() != null ) { - final MappingModelExpressable alreadyKnown = resolved; + final MappingModelExpressible alreadyKnown = resolved; inferrableTypeAccessStack.push( () -> alreadyKnown == null && inferenceSupplier != null ? inferenceSupplier.get() : alreadyKnown ); otherwise = (Expression) expression.getOtherwise().accept( this ); inferrableTypeAccessStack.pop(); - resolved = (MappingModelExpressable) TypeHelper.highestPrecedence( resolved, otherwise.getExpressionType() ); + resolved = (MappingModelExpressible) TypeHelper.highestPrecedence( resolved, otherwise.getExpressionType() ); } return new CaseSimpleExpression( @@ -5148,42 +5148,42 @@ public abstract class BaseSqmToSqlAstConverter extends Base @Override public CaseSearchedExpression visitSearchedCaseExpression(SqmCaseSearched expression) { final List whenFragments = new ArrayList<>( expression.getWhenFragments().size() ); - final Supplier> inferenceSupplier = inferrableTypeAccessStack.getCurrent(); - MappingModelExpressable resolved = determineCurrentExpressable( expression ); + final Supplier> inferenceSupplier = inferrableTypeAccessStack.getCurrent(); + MappingModelExpressible resolved = determineCurrentExpressible( expression ); Expression otherwise = null; for ( SqmCaseSearched.WhenFragment whenFragment : expression.getWhenFragments() ) { inferrableTypeAccessStack.push( () -> null ); final Predicate whenPredicate = (Predicate) whenFragment.getPredicate().accept( this ); inferrableTypeAccessStack.pop(); - final MappingModelExpressable alreadyKnown = resolved; + final MappingModelExpressible alreadyKnown = resolved; inferrableTypeAccessStack.push( () -> alreadyKnown == null && inferenceSupplier != null ? inferenceSupplier.get() : alreadyKnown ); final Expression resultExpression = (Expression) whenFragment.getResult().accept( this ); inferrableTypeAccessStack.pop(); - resolved = (MappingModelExpressable) TypeHelper.highestPrecedence( resolved, resultExpression.getExpressionType() ); + resolved = (MappingModelExpressible) TypeHelper.highestPrecedence( resolved, resultExpression.getExpressionType() ); whenFragments.add( new CaseSearchedExpression.WhenFragment( whenPredicate, resultExpression ) ); } if ( expression.getOtherwise() != null ) { - final MappingModelExpressable alreadyKnown = resolved; + final MappingModelExpressible alreadyKnown = resolved; inferrableTypeAccessStack.push( () -> alreadyKnown == null && inferenceSupplier != null ? inferenceSupplier.get() : alreadyKnown ); otherwise = (Expression) expression.getOtherwise().accept( this ); inferrableTypeAccessStack.pop(); - resolved = (MappingModelExpressable) TypeHelper.highestPrecedence( resolved, otherwise.getExpressionType() ); + resolved = (MappingModelExpressible) TypeHelper.highestPrecedence( resolved, otherwise.getExpressionType() ); } return new CaseSearchedExpression( resolved, whenFragments, otherwise ); } - private MappingModelExpressable determineCurrentExpressable(SqmTypedNode expression) { + private MappingModelExpressible determineCurrentExpressible(SqmTypedNode expression) { return creationContext .getDomainModel() - .resolveMappingExpressable( expression.getNodeType(), getFromClauseIndex()::findTableGroup ); + .resolveMappingExpressible( expression.getNodeType(), getFromClauseIndex()::findTableGroup ); } private X visitWithInferredType(SqmExpression expression, SqmExpression inferred) { @@ -5199,9 +5199,9 @@ public abstract class BaseSqmToSqlAstConverter extends Base // private X visitWithLenientInferredType(SqmExpression expression, SqmExpression inferred) { // inferrableTypeAccessStack.push( // () -> { -// MappingModelExpressable definedType = creationContext +// MappingModelExpressible definedType = creationContext // .getDomainModel() -// .resolveMappingExpressable( +// .resolveMappingExpressible( // expression.getNodeType(), // getFromClauseIndex()::findTableGroup // ); @@ -5210,7 +5210,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base // } // definedType = creationContext // .getDomainModel() -// .lenientlyResolveMappingExpressable( +// .lenientlyResolveMappingExpressible( // inferred.getNodeType(), // getFromClauseIndex()::findTableGroup // ); @@ -5230,7 +5230,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base public Object visitAny(SqmAny sqmAny) { return new Any( visitSubQueryExpression( sqmAny.getSubquery() ), - null //resolveMappingExpressable( sqmAny.getNodeType() ) + null //resolveMappingExpressible( sqmAny.getNodeType() ) ); } @@ -5238,7 +5238,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base public Object visitEvery(SqmEvery sqmEvery) { return new Every( visitSubQueryExpression( sqmEvery.getSubquery() ), - null //resolveMappingExpressable( sqmEvery.getNodeType() ) + null //resolveMappingExpressible( sqmEvery.getNodeType() ) ); } @@ -5293,7 +5293,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base return new QueryLiteral<>( jdbcValue, inferredPart ); } - final EnumJavaType enumJtd = sqmEnumLiteral.getExpressableJavaType(); + final EnumJavaType enumJtd = sqmEnumLiteral.getExpressibleJavaType(); final JdbcType jdbcType = getTypeConfiguration().getJdbcTypeRegistry().getDescriptor( SqlTypes.TINYINT ); final BasicJavaType relationalJtd = (BasicJavaType) getTypeConfiguration() .getJavaTypeRegistry() @@ -5651,7 +5651,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base inferrableTypeAccessStack.push( () -> { for ( SqmExpression listExpression : predicate.getListExpressions() ) { - final MappingModelExpressable mapping = determineValueMapping( listExpression ); + final MappingModelExpressible mapping = determineValueMapping( listExpression ); if ( mapping != null ) { return mapping; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/SqmTranslation.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/SqmTranslation.java index 1e745e0cef..09fbedea07 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/SqmTranslation.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/SqmTranslation.java @@ -9,7 +9,7 @@ package org.hibernate.query.sqm.sql; import java.util.List; import java.util.Map; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.query.sqm.tree.expression.SqmParameter; import org.hibernate.sql.ast.spi.FromClauseAccess; import org.hibernate.sql.ast.spi.SqlExpressionResolver; @@ -26,5 +26,5 @@ public interface SqmTranslation { SqlExpressionResolver getSqlExpressionResolver(); FromClauseAccess getFromClauseAccess(); Map, List>> getJdbcParamsBySqmParam(); - Map, MappingModelExpressable> getSqmParameterMappingModelTypeResolutions(); + Map, MappingModelExpressible> getSqmParameterMappingModelTypeResolutions(); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/StandardSqmTranslation.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/StandardSqmTranslation.java index 54138997cf..ea89932701 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/StandardSqmTranslation.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/StandardSqmTranslation.java @@ -9,7 +9,7 @@ package org.hibernate.query.sqm.sql; import java.util.List; import java.util.Map; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.query.sqm.tree.expression.SqmParameter; import org.hibernate.sql.ast.spi.FromClauseAccess; import org.hibernate.sql.ast.spi.SqlExpressionResolver; @@ -23,14 +23,14 @@ public class StandardSqmTranslation implements SqmTranslati private final T sqlAst; private final Map, List>> jdbcParamMap; - private final Map, MappingModelExpressable> parameterMappingModelTypeMap; + private final Map, MappingModelExpressible> parameterMappingModelTypeMap; private final SqlExpressionResolver sqlExpressionResolver; private final FromClauseAccess fromClauseAccess; public StandardSqmTranslation( T sqlAst, Map, List>> jdbcParamMap, - Map, MappingModelExpressable> parameterMappingModelTypeMap, + Map, MappingModelExpressible> parameterMappingModelTypeMap, SqlExpressionResolver sqlExpressionResolver, FromClauseAccess fromClauseAccess) { this.sqlAst = sqlAst; @@ -51,7 +51,7 @@ public class StandardSqmTranslation implements SqmTranslati } @Override - public Map, MappingModelExpressable> getSqmParameterMappingModelTypeResolutions() { + public Map, MappingModelExpressible> getSqmParameterMappingModelTypeResolutions() { return parameterMappingModelTypeMap; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/DomainResultProducer.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/DomainResultProducer.java index d363f2f498..a8d32d181b 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/DomainResultProducer.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/DomainResultProducer.java @@ -21,7 +21,7 @@ public interface DomainResultProducer { /* * select p.name, p2.name from Person p, Person p2 * - * SqmPathSource (SqmExpressable) (unmapped) + * SqmPathSource (SqmExpressible) (unmapped) * * DomainType * SimpleDomainType diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqlAstProcessingStateImpl.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqlAstProcessingStateImpl.java index 43b25c66c8..50fbba8461 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqlAstProcessingStateImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqlAstProcessingStateImpl.java @@ -127,7 +127,7 @@ public class SqlAstProcessingStateImpl } // @Override -// public Expression resolveSqlExpression(NonQualifiableSqlExpressable sqlSelectable) { +// public Expression resolveSqlExpression(NonQualifiableSqlExpressible sqlSelectable) { // final Expression expression = normalize( sqlSelectable.createExpression() ); // final Consumer expressionConsumer = resolvedExpressionConsumerAccess.get(); // if ( expressionConsumer != null ) { diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqmParameterInterpretation.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqmParameterInterpretation.java index 90f699f7c4..041ebd6dc2 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqmParameterInterpretation.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqmParameterInterpretation.java @@ -13,12 +13,12 @@ import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.metamodel.mapping.DiscriminatedAssociationModelPart; import org.hibernate.metamodel.mapping.EmbeddableValuedModelPart; import org.hibernate.metamodel.mapping.EntityValuedModelPart; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.query.BindableType; import org.hibernate.query.SemanticException; import org.hibernate.query.spi.QueryParameterBinding; import org.hibernate.query.spi.QueryParameterImplementor; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.expression.SqmParameter; import org.hibernate.sql.ast.SqlAstWalker; import org.hibernate.sql.ast.spi.SqlSelection; @@ -36,7 +36,7 @@ import org.hibernate.sql.results.graph.basic.BasicResult; public class SqmParameterInterpretation implements Expression, DomainResultProducer, SqlTupleContainer { private final SqmParameter sqmParameter; private final QueryParameterImplementor queryParameter; - private final MappingModelExpressable valueMapping; + private final MappingModelExpressible valueMapping; private final Function, QueryParameterBinding> queryParameterBindingResolver; private final Expression resolvedExpression; @@ -45,7 +45,7 @@ public class SqmParameterInterpretation implements Expression, DomainResultProdu SqmParameter sqmParameter, QueryParameterImplementor queryParameter, List jdbcParameters, - MappingModelExpressable valueMapping, + MappingModelExpressible valueMapping, Function, QueryParameterBinding> queryParameterBindingResolver) { this.sqmParameter = sqmParameter; this.queryParameter = queryParameter; @@ -64,7 +64,7 @@ public class SqmParameterInterpretation implements Expression, DomainResultProdu this.resolvedExpression = determineResolvedExpression( jdbcParameters, this.valueMapping ); } - private Expression determineResolvedExpression(List jdbcParameters, MappingModelExpressable valueMapping) { + private Expression determineResolvedExpression(List jdbcParameters, MappingModelExpressible valueMapping) { if ( valueMapping instanceof EmbeddableValuedModelPart || valueMapping instanceof DiscriminatedAssociationModelPart ) { return new SqlTuple( jdbcParameters, valueMapping ); @@ -84,7 +84,7 @@ public class SqmParameterInterpretation implements Expression, DomainResultProdu } @Override - public MappingModelExpressable getExpressionType() { + public MappingModelExpressible getExpressionType() { return valueMapping; } @@ -105,18 +105,18 @@ public class SqmParameterInterpretation implements Expression, DomainResultProdu .getCreationContext() .getSessionFactory(); - final SqmExpressable sqmExpressable = nodeType.resolveExpressable( sessionFactory ); + final SqmExpressible sqmExpressible = nodeType.resolveExpressible( sessionFactory ); final SqlSelection sqlSelection = creationState.getSqlAstCreationState().getSqlExpressionResolver().resolveSqlSelection( resolvedExpression, - sqmExpressable.getExpressableJavaType(), + sqmExpressible.getExpressibleJavaType(), sessionFactory.getTypeConfiguration() ); return new BasicResult<>( sqlSelection.getValuesArrayPosition(), resultVariable, - sqmExpressable.getExpressableJavaType() + sqmExpressible.getExpressibleJavaType() ); } @@ -147,11 +147,11 @@ public class SqmParameterInterpretation implements Expression, DomainResultProdu .getCreationContext() .getSessionFactory(); - final SqmExpressable sqmExpressable = nodeType.resolveExpressable( sessionFactory ); + final SqmExpressible sqmExpressible = nodeType.resolveExpressible( sessionFactory ); return creationState.getSqlAstCreationState().getSqlExpressionResolver().resolveSqlSelection( resolvedExpression, - sqmExpressable.getExpressableJavaType(), + sqmExpressible.getExpressibleJavaType(), sessionFactory.getTypeConfiguration() ); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqmTupleInterpretation.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqmTupleInterpretation.java index 6602c7823c..d018ccf4b5 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqmTupleInterpretation.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqmTupleInterpretation.java @@ -9,7 +9,7 @@ package org.hibernate.query.sqm.sql.internal; import java.util.ArrayList; import java.util.List; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.query.sqm.internal.SqmMappingModelHelper; import org.hibernate.sql.ast.spi.SqlAstCreationState; @@ -36,7 +36,7 @@ public class SqmTupleInterpretation extends SqlTuple { return new SqmTupleInterpretation<>( sqmTuple, groupedSqlExpressions, - SqmMappingModelHelper.resolveMappingModelExpressable( + SqmMappingModelHelper.resolveMappingModelExpressible( sqmTuple, sqlAstCreationState.getCreationContext().getDomainModel(), sqlAstCreationState.getFromClauseAccess()::findTableGroup @@ -49,7 +49,7 @@ public class SqmTupleInterpretation extends SqlTuple { public SqmTupleInterpretation( SqmTuple sqmTuple, List expressions, - MappingModelExpressable valueMapping) { + MappingModelExpressible valueMapping) { super( expressions, valueMapping ); interpretedSqmTuple = sqmTuple; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/SqmExpressableAccessor.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/SqmExpressibleAccessor.java similarity index 62% rename from hibernate-core/src/main/java/org/hibernate/query/sqm/tree/SqmExpressableAccessor.java rename to hibernate-core/src/main/java/org/hibernate/query/sqm/tree/SqmExpressibleAccessor.java index 61dc16f582..6c4d64a9ca 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/SqmExpressableAccessor.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/SqmExpressibleAccessor.java @@ -6,22 +6,22 @@ */ package org.hibernate.query.sqm.tree; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.type.descriptor.java.JavaType; /** - * Accessor for {@link SqmExpressable}. + * Accessor for {@link SqmExpressible}. * * @author Christian Beikov */ -public interface SqmExpressableAccessor { +public interface SqmExpressibleAccessor { /** * The Java type descriptor for this node. */ default JavaType getNodeJavaType() { - final SqmExpressable nodeType = getExpressable(); - return nodeType != null ? nodeType.getExpressableJavaType() : null; + final SqmExpressible nodeType = getExpressible(); + return nodeType != null ? nodeType.getExpressibleJavaType() : null; } - SqmExpressable getExpressable(); + SqmExpressible getExpressible(); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/SqmTypedNode.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/SqmTypedNode.java index a194ea882e..8cdbe525a0 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/SqmTypedNode.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/SqmTypedNode.java @@ -6,7 +6,7 @@ */ package org.hibernate.query.sqm.tree; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.type.descriptor.java.JavaType; /** @@ -15,19 +15,19 @@ import org.hibernate.type.descriptor.java.JavaType; * * @author Steve Ebersole */ -public interface SqmTypedNode extends SqmNode, SqmExpressableAccessor { +public interface SqmTypedNode extends SqmNode, SqmExpressibleAccessor { /** * The Java type descriptor for this node. */ default JavaType getNodeJavaType() { - final SqmExpressable nodeType = getNodeType(); - return nodeType != null ? nodeType.getExpressableJavaType() : null; + final SqmExpressible nodeType = getNodeType(); + return nodeType != null ? nodeType.getExpressibleJavaType() : null; } @Override - default SqmExpressable getExpressable() { + default SqmExpressible getExpressible() { return getNodeType(); } - SqmExpressable getNodeType(); + SqmExpressible getNodeType(); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/cte/SqmCteTableColumn.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/cte/SqmCteTableColumn.java index f3655a300c..1850e17529 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/cte/SqmCteTableColumn.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/cte/SqmCteTableColumn.java @@ -8,7 +8,6 @@ package org.hibernate.query.sqm.tree.cte; import java.io.Serializable; -import org.hibernate.metamodel.mapping.ModelPart; import org.hibernate.metamodel.mapping.ValueMapping; /** @@ -18,15 +17,15 @@ import org.hibernate.metamodel.mapping.ValueMapping; public class SqmCteTableColumn implements Serializable { private final SqmCteTable cteTable; private final String columnName; - private final ValueMapping typeExpressable; + private final ValueMapping typeExpressible; public SqmCteTableColumn( SqmCteTable cteTable, String columnName, - ValueMapping typeExpressable) { + ValueMapping typeExpressible) { this.cteTable = cteTable; this.columnName = columnName; - this.typeExpressable = typeExpressable; + this.typeExpressible = typeExpressible; } public SqmCteTable getCteTable() { @@ -38,7 +37,7 @@ public class SqmCteTableColumn implements Serializable { } public ValueMapping getType() { - return typeExpressable; + return typeExpressible; } } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmBasicValuedSimplePath.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmBasicValuedSimplePath.java index d1186a9339..4da4150883 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmBasicValuedSimplePath.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmBasicValuedSimplePath.java @@ -14,7 +14,7 @@ import org.hibernate.query.SemanticException; import org.hibernate.query.hql.spi.SqmCreationState; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.SqmPathSource; import org.hibernate.type.descriptor.java.BasicJavaType; import org.hibernate.type.descriptor.java.JavaType; @@ -24,7 +24,7 @@ import org.hibernate.type.descriptor.java.JavaType; */ public class SqmBasicValuedSimplePath extends AbstractSqmSimplePath - implements BindableType, SqmExpressable { + implements BindableType, SqmExpressible { public SqmBasicValuedSimplePath( NavigablePath navigablePath, SqmPathSource referencedPathSource, @@ -93,7 +93,7 @@ public class SqmBasicValuedSimplePath } @Override - public JavaType getExpressableJavaType() { + public JavaType getExpressibleJavaType() { return getJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmEmbeddedValuedSimplePath.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmEmbeddedValuedSimplePath.java index f905f36618..4956177cd4 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmEmbeddedValuedSimplePath.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmEmbeddedValuedSimplePath.java @@ -14,7 +14,7 @@ import org.hibernate.query.PathException; import org.hibernate.query.hql.spi.SqmCreationState; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.SqmPathSource; import org.hibernate.type.descriptor.java.JavaType; @@ -23,7 +23,7 @@ import org.hibernate.type.descriptor.java.JavaType; */ public class SqmEmbeddedValuedSimplePath extends AbstractSqmSimplePath - implements BindableType, SqmExpressable { + implements BindableType, SqmExpressible { public SqmEmbeddedValuedSimplePath( NavigablePath navigablePath, SqmPathSource referencedPathSource, @@ -73,7 +73,7 @@ public class SqmEmbeddedValuedSimplePath } @Override - public JavaType getExpressableJavaType() { + public JavaType getExpressibleJavaType() { return getJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmMapEntryReference.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmMapEntryReference.java index d05434f5a4..5165258d95 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmMapEntryReference.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmMapEntryReference.java @@ -15,7 +15,7 @@ import java.util.function.Consumer; import org.hibernate.query.criteria.JpaSelection; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.select.SqmSelectableNode; import org.hibernate.type.descriptor.java.JavaType; @@ -31,7 +31,7 @@ import jakarta.persistence.criteria.Predicate; * @author Steve Ebersole */ public class SqmMapEntryReference - implements SqmSelectableNode>, Expression>, SqmExpressable> { + implements SqmSelectableNode>, Expression>, SqmExpressible> { @SuppressWarnings({"FieldCanBeLocal", "unused"}) private final SqmPath mapPath; private final NodeBuilder nodeBuilder; @@ -78,7 +78,7 @@ public class SqmMapEntryReference } @Override - public JavaType> getExpressableJavaType() { + public JavaType> getExpressibleJavaType() { return mapEntryTypeDescriptor; } @@ -103,7 +103,7 @@ public class SqmMapEntryReference } @Override - public SqmExpressable> getNodeType() { + public SqmExpressible> getNodeType() { return this; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmPath.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmPath.java index 20c4b647a4..747d5a4cac 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmPath.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmPath.java @@ -22,7 +22,7 @@ import org.hibernate.query.criteria.JpaPath; import org.hibernate.query.hql.spi.SemanticPathPart; import org.hibernate.query.hql.spi.SqmCreationState; import org.hibernate.query.sqm.ParsingException; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.SqmPathSource; import org.hibernate.query.sqm.tree.expression.SqmExpression; import org.hibernate.query.sqm.tree.from.SqmRoot; @@ -103,13 +103,13 @@ public interface SqmPath extends SqmExpression, SemanticPathPart, JpaPath< SqmPathSource getNodeType(); @Override - default void applyInferableType(SqmExpressable type) { + default void applyInferableType(SqmExpressible type) { // do nothing } @Override default JavaType getJavaTypeDescriptor() { - return getNodeType().getExpressableJavaType(); + return getNodeType().getExpressibleJavaType(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmPolymorphicRootDescriptor.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmPolymorphicRootDescriptor.java index 4d7cf4c0d1..837fe63ed1 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmPolymorphicRootDescriptor.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmPolymorphicRootDescriptor.java @@ -145,7 +145,7 @@ public class SqmPolymorphicRootDescriptor implements EntityDomainType { } @Override - public JavaType getExpressableJavaType() { + public JavaType getExpressibleJavaType() { return polymorphicJavaType; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/AbstractSqmExpression.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/AbstractSqmExpression.java index 850b8a9b2b..47ade510b3 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/AbstractSqmExpression.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/AbstractSqmExpression.java @@ -14,7 +14,7 @@ import jakarta.persistence.criteria.Expression; import org.hibernate.query.criteria.JpaExpression; import org.hibernate.query.criteria.JpaSelection; import org.hibernate.query.sqm.NodeBuilder; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.SqmTreeCreationLogger; import org.hibernate.query.sqm.internal.SqmCriteriaNodeBuilder; import org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection; @@ -29,7 +29,7 @@ import static org.hibernate.query.internal.QueryHelper.highestPrecedenceType; */ public abstract class AbstractSqmExpression extends AbstractJpaSelection implements SqmExpression { - public AbstractSqmExpression(SqmExpressable type, NodeBuilder criteriaBuilder) { + public AbstractSqmExpression(SqmExpressible type, NodeBuilder criteriaBuilder) { super( type, criteriaBuilder ); } @@ -39,20 +39,20 @@ public abstract class AbstractSqmExpression extends AbstractJpaSelection i } @Override - public void applyInferableType(SqmExpressable type) { + public void applyInferableType(SqmExpressible type) { // if ( type == null ) { // return; // } // -// final SqmExpressable oldType = getNodeType(); +// final SqmExpressible oldType = getNodeType(); // -// final SqmExpressable newType = highestPrecedenceType( oldType, type ); +// final SqmExpressible newType = highestPrecedenceType( oldType, type ); // if ( newType != null && newType != oldType ) { // internalApplyInferableType( newType ); // } } - protected void internalApplyInferableType(SqmExpressable newType) { + protected void internalApplyInferableType(SqmExpressible newType) { SqmTreeCreationLogger.LOGGER.debugf( "Applying inferable type to SqmExpression [%s] : %s -> %s", this, @@ -60,7 +60,7 @@ public abstract class AbstractSqmExpression extends AbstractJpaSelection i newType ); - setExpressableType( highestPrecedenceType( newType, getNodeType() ) ); + setExpressibleType( highestPrecedenceType( newType, getNodeType() ) ); } @Override @@ -153,6 +153,6 @@ public abstract class AbstractSqmExpression extends AbstractJpaSelection i @Override public JavaType getJavaTypeDescriptor() { - return getNodeType() == null ? null : getNodeType().getExpressableJavaType(); + return getNodeType() == null ? null : getNodeType().getExpressibleJavaType(); } } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/AbstractSqmParameter.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/AbstractSqmParameter.java index 12ba62c803..571f9ba0d7 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/AbstractSqmParameter.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/AbstractSqmParameter.java @@ -10,7 +10,7 @@ import org.hibernate.metamodel.model.domain.PluralPersistentAttribute; import org.hibernate.query.BindableType; import org.hibernate.query.internal.QueryHelper; import org.hibernate.query.sqm.NodeBuilder; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; /** * Common support for SqmParameter impls @@ -22,23 +22,23 @@ public abstract class AbstractSqmParameter extends AbstractSqmExpression i public AbstractSqmParameter( boolean canBeMultiValued, - SqmExpressable inherentType, + SqmExpressible inherentType, NodeBuilder nodeBuilder) { super( inherentType, nodeBuilder ); this.canBeMultiValued = canBeMultiValued; } @Override - public void applyInferableType(SqmExpressable type) { + public void applyInferableType(SqmExpressible type) { if ( type == null ) { return; } else if ( type instanceof PluralPersistentAttribute ) { type = ( (PluralPersistentAttribute) type ).getElementType(); } - final SqmExpressable oldType = getNodeType(); + final SqmExpressible oldType = getNodeType(); - final SqmExpressable newType = QueryHelper.highestPrecedenceType( oldType, type ); + final SqmExpressible newType = QueryHelper.highestPrecedenceType( oldType, type ); if ( newType != null && newType != oldType ) { internalApplyInferableType( newType ); } @@ -66,6 +66,6 @@ public abstract class AbstractSqmParameter extends AbstractSqmExpression i @Override public Class getParameterType() { - return this.getNodeType().getExpressableJavaType().getJavaTypeClass(); + return this.getNodeType().getExpressibleJavaType().getJavaTypeClass(); } } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/Conversion.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/Conversion.java index 8890b23ee9..30a9515bc3 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/Conversion.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/Conversion.java @@ -7,7 +7,7 @@ package org.hibernate.query.sqm.tree.expression; import org.hibernate.metamodel.mapping.BasicValuedMapping; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.query.sqm.TemporalUnit; import org.hibernate.query.sqm.sql.internal.DomainResultProducer; import org.hibernate.sql.ast.SqlAstWalker; @@ -83,7 +83,7 @@ public class Conversion } @Override - public MappingModelExpressable getExpressionType() { + public MappingModelExpressible getExpressionType() { return type; } } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/JpaCriteriaParameter.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/JpaCriteriaParameter.java index 1a3c76454c..d3de97f24a 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/JpaCriteriaParameter.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/JpaCriteriaParameter.java @@ -14,7 +14,7 @@ import org.hibernate.query.criteria.JpaParameterExpression; import org.hibernate.query.spi.QueryParameterImplementor; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.sql.internal.DomainResultProducer; import org.hibernate.sql.results.graph.DomainResult; import org.hibernate.sql.results.graph.DomainResultCreationState; @@ -66,11 +66,11 @@ public class JpaCriteriaParameter this.allowsMultiValuedBinding = allowsMultiValuedBinding; } - private static SqmExpressable toSqmType(BindableType type, NodeBuilder nodeBuilder) { + private static SqmExpressible toSqmType(BindableType type, NodeBuilder nodeBuilder) { if ( type == null ) { return null; } - return type.resolveExpressable( + return type.resolveExpressible( nodeBuilder.getQueryEngine().getTypeConfiguration().getSessionFactory() ); } @@ -139,11 +139,11 @@ public class JpaCriteriaParameter @Override public Class getParameterType() { - return this.getNodeType().getExpressableJavaType().getJavaTypeClass(); + return this.getNodeType().getExpressibleJavaType().getJavaTypeClass(); } @Override - protected void internalApplyInferableType(SqmExpressable newType) { + protected void internalApplyInferableType(SqmExpressible newType) { super.internalApplyInferableType( newType ); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/NullSqmExpressable.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/NullSqmExpressible.java similarity index 67% rename from hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/NullSqmExpressable.java rename to hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/NullSqmExpressible.java index 946dc9dcd5..c5853f3bd9 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/NullSqmExpressable.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/NullSqmExpressible.java @@ -6,17 +6,17 @@ */ package org.hibernate.query.sqm.tree.expression; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole */ -public class NullSqmExpressable implements SqmExpressable { +public class NullSqmExpressible implements SqmExpressible { /** * Singleton access */ - public static final NullSqmExpressable NULL_SQM_EXPRESSABLE = new NullSqmExpressable(); + public static final NullSqmExpressible NULL_SQM_EXPRESSIBLE = new NullSqmExpressible(); @Override public Class getBindableJavaType() { @@ -24,7 +24,7 @@ public class NullSqmExpressable implements SqmExpressable { } @Override - public JavaType getExpressableJavaType() { + public JavaType getExpressibleJavaType() { return null; } } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmAliasedNodeRef.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmAliasedNodeRef.java index f99dd3fc4e..8fbe4912e4 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmAliasedNodeRef.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmAliasedNodeRef.java @@ -8,7 +8,7 @@ package org.hibernate.query.sqm.tree.expression; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; /** * Models a reference to a {@link org.hibernate.query.sqm.tree.select.SqmAliasedNode} @@ -18,7 +18,7 @@ import org.hibernate.query.sqm.SqmExpressable; public class SqmAliasedNodeRef extends AbstractSqmExpression { private final int position; - public SqmAliasedNodeRef(int position, SqmExpressable intType, NodeBuilder criteriaBuilder) { + public SqmAliasedNodeRef(int position, SqmExpressible intType, NodeBuilder criteriaBuilder) { super( intType, criteriaBuilder ); this.position = position; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmAny.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmAny.java index 2dd67c319b..9379ab6c05 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmAny.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmAny.java @@ -8,7 +8,6 @@ package org.hibernate.query.sqm.tree.expression; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; import org.hibernate.query.sqm.tree.select.SqmSubQuery; /** diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmBinaryArithmetic.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmBinaryArithmetic.java index d0bd247451..01e670b54b 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmBinaryArithmetic.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmBinaryArithmetic.java @@ -10,7 +10,7 @@ import org.hibernate.metamodel.model.domain.JpaMetamodel; import org.hibernate.query.sqm.BinaryArithmeticOperator; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.select.SqmSelectableNode; /** @@ -29,7 +29,7 @@ public class SqmBinaryArithmetic extends AbstractSqmExpression implements NodeBuilder nodeBuilder) { //noinspection unchecked super( - (SqmExpressable) domainModel.getTypeConfiguration().resolveArithmeticType( + (SqmExpressible) domainModel.getTypeConfiguration().resolveArithmeticType( lhsOperand.getNodeType(), rhsOperand.getNodeType(), operator @@ -49,16 +49,16 @@ public class SqmBinaryArithmetic extends AbstractSqmExpression implements BinaryArithmeticOperator operator, SqmExpression lhsOperand, SqmExpression rhsOperand, - SqmExpressable expressableType, + SqmExpressible expressibleType, NodeBuilder nodeBuilder) { - super( expressableType, nodeBuilder ); + super( expressibleType, nodeBuilder ); this.operator = operator; this.lhsOperand = lhsOperand; this.rhsOperand = rhsOperand; - applyInferableType( expressableType ); + applyInferableType( expressibleType ); } @Override @@ -94,7 +94,7 @@ public class SqmBinaryArithmetic extends AbstractSqmExpression implements } @Override - protected void internalApplyInferableType(SqmExpressable type) { + protected void internalApplyInferableType(SqmExpressible type) { rhsOperand.applyInferableType( type ); lhsOperand.applyInferableType( type ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmByUnit.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmByUnit.java index 27bc80d38d..d37f2da8cf 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmByUnit.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmByUnit.java @@ -8,7 +8,7 @@ package org.hibernate.query.sqm.tree.expression; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; /** * @author Gavin King @@ -20,7 +20,7 @@ public class SqmByUnit extends AbstractSqmExpression { public SqmByUnit( SqmDurationUnit unit, SqmExpression duration, - SqmExpressable longType, + SqmExpressible longType, NodeBuilder nodeBuilder) { super( longType, nodeBuilder ); this.unit = unit; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCaseSearched.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCaseSearched.java index b67037d12f..b4a1833787 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCaseSearched.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCaseSearched.java @@ -13,7 +13,7 @@ import org.hibernate.query.criteria.JpaSearchedCase; import org.hibernate.query.internal.QueryHelper; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.predicate.SqmPredicate; import jakarta.persistence.criteria.Expression; @@ -31,12 +31,12 @@ public class SqmCaseSearched this( null, nodeBuilder ); } - public SqmCaseSearched(SqmExpressable inherentType, NodeBuilder nodeBuilder) { + public SqmCaseSearched(SqmExpressible inherentType, NodeBuilder nodeBuilder) { super( inherentType, nodeBuilder ); this.whenFragments = new ArrayList<>(); } - public SqmCaseSearched(SqmExpressable inherentType, int estimateWhenSize, NodeBuilder nodeBuilder) { + public SqmCaseSearched(SqmExpressible inherentType, int estimateWhenSize, NodeBuilder nodeBuilder) { super( inherentType, nodeBuilder ); this.whenFragments = new ArrayList<>( estimateWhenSize ); } @@ -61,21 +61,21 @@ public class SqmCaseSearched return this; } - private void applyInferableResultType(SqmExpressable type) { + private void applyInferableResultType(SqmExpressible type) { if ( type == null ) { return; } - final SqmExpressable oldType = getNodeType(); + final SqmExpressible oldType = getNodeType(); - final SqmExpressable newType = QueryHelper.highestPrecedenceType2( oldType, type ); + final SqmExpressible newType = QueryHelper.highestPrecedenceType2( oldType, type ); if ( newType != null && newType != oldType ) { internalApplyInferableType( newType ); } } @Override - protected void internalApplyInferableType(SqmExpressable newType) { + protected void internalApplyInferableType(SqmExpressible newType) { super.internalApplyInferableType( newType ); if ( otherwise != null ) { diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCaseSimple.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCaseSimple.java index feb9fa41e6..be8499bb40 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCaseSimple.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCaseSimple.java @@ -16,7 +16,7 @@ import org.hibernate.query.criteria.JpaExpression; import org.hibernate.query.criteria.JpaSimpleCase; import org.hibernate.query.internal.QueryHelper; import org.hibernate.query.sqm.NodeBuilder; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.query.sqm.sql.internal.DomainResultProducer; import org.hibernate.sql.results.graph.DomainResult; @@ -36,13 +36,13 @@ public class SqmCaseSimple this( fixture, null, nodeBuilder ); } - public SqmCaseSimple(SqmExpression fixture, SqmExpressable inherentType, NodeBuilder nodeBuilder) { + public SqmCaseSimple(SqmExpression fixture, SqmExpressible inherentType, NodeBuilder nodeBuilder) { super( inherentType, nodeBuilder ); this.whenFragments = new ArrayList<>( ); this.fixture = fixture; } - public SqmCaseSimple(SqmExpression fixture, SqmExpressable inherentType, int estimateWhenSize, NodeBuilder nodeBuilder) { + public SqmCaseSimple(SqmExpression fixture, SqmExpressible inherentType, int estimateWhenSize, NodeBuilder nodeBuilder) { super( inherentType, nodeBuilder ); this.whenFragments = new ArrayList<>( estimateWhenSize ); this.fixture = fixture; @@ -72,21 +72,21 @@ public class SqmCaseSimple applyInferableResultType( result.getNodeType() ); } - private void applyInferableResultType(SqmExpressable type) { + private void applyInferableResultType(SqmExpressible type) { if ( type == null ) { return; } - final SqmExpressable oldType = getNodeType(); + final SqmExpressible oldType = getNodeType(); - final SqmExpressable newType = QueryHelper.highestPrecedenceType2(oldType, type ); + final SqmExpressible newType = QueryHelper.highestPrecedenceType2(oldType, type ); if ( newType != null && newType != oldType ) { internalApplyInferableType( newType ); } } @Override - protected void internalApplyInferableType(SqmExpressable newType) { + protected void internalApplyInferableType(SqmExpressible newType) { super.internalApplyInferableType( newType ); if ( otherwise != null ) { diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCastTarget.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCastTarget.java index 1427b6aae0..70dc90f784 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCastTarget.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCastTarget.java @@ -9,7 +9,7 @@ package org.hibernate.query.sqm.tree.expression; import org.hibernate.query.ReturnableType; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.AbstractSqmNode; import org.hibernate.query.sqm.tree.SqmTypedNode; import org.hibernate.query.sqm.tree.SqmVisitableNode; @@ -80,7 +80,7 @@ public class SqmCastTarget extends AbstractSqmNode implements SqmTypedNode } @Override - public SqmExpressable getNodeType() { + public SqmExpressible getNodeType() { return type; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCoalesce.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCoalesce.java index d2c347828c..8512b64f58 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCoalesce.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCoalesce.java @@ -11,7 +11,7 @@ import org.hibernate.query.criteria.JpaCoalesce; import org.hibernate.query.criteria.JpaExpression; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.function.SqmFunctionDescriptor; import jakarta.persistence.criteria.Expression; @@ -30,13 +30,13 @@ public class SqmCoalesce extends AbstractSqmExpression implements JpaCoale this( null, nodeBuilder ); } - public SqmCoalesce(SqmExpressable type, NodeBuilder nodeBuilder) { + public SqmCoalesce(SqmExpressible type, NodeBuilder nodeBuilder) { super( type, nodeBuilder ); functionDescriptor = nodeBuilder.getQueryEngine().getSqmFunctionRegistry().findFunctionDescriptor( "coalesce" ); this.arguments = new ArrayList<>(); } - public SqmCoalesce(SqmExpressable type, int numberOfArguments, NodeBuilder nodeBuilder) { + public SqmCoalesce(SqmExpressible type, int numberOfArguments, NodeBuilder nodeBuilder) { super( type, nodeBuilder ); functionDescriptor = nodeBuilder.getQueryEngine().getSqmFunctionRegistry().findFunctionDescriptor( "coalesce" ); this.arguments = new ArrayList<>( numberOfArguments ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCollation.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCollation.java index 04b2b654b5..06649726d1 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCollation.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCollation.java @@ -8,13 +8,13 @@ package org.hibernate.query.sqm.tree.expression; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; /** * @author Christian Beikov */ public class SqmCollation extends SqmLiteral { - public SqmCollation(String value, SqmExpressable inherentType, NodeBuilder nodeBuilder) { + public SqmCollation(String value, SqmExpressible inherentType, NodeBuilder nodeBuilder) { super(value, inherentType, nodeBuilder); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCollectionSize.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCollectionSize.java index 2fc064ad4c..c226525e1e 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCollectionSize.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCollectionSize.java @@ -8,7 +8,7 @@ package org.hibernate.query.sqm.tree.expression; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.domain.SqmPath; /** @@ -24,7 +24,7 @@ public class SqmCollectionSize extends AbstractSqmExpression { this( pluralPath, nodeBuilder.getIntegerType(), nodeBuilder ); } - public SqmCollectionSize(SqmPath pluralPath, SqmExpressable sizeType, NodeBuilder nodeBuilder) { + public SqmCollectionSize(SqmPath pluralPath, SqmExpressible sizeType, NodeBuilder nodeBuilder) { super( sizeType, nodeBuilder ); this.pluralPath = pluralPath; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmDistinct.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmDistinct.java index 67f4f8bce2..2a2496c643 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmDistinct.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmDistinct.java @@ -7,12 +7,11 @@ package org.hibernate.query.sqm.tree.expression; import org.hibernate.query.sqm.NodeBuilder; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.query.sqm.tree.AbstractSqmNode; import org.hibernate.query.sqm.tree.SqmTypedNode; import org.hibernate.query.sqm.tree.SqmVisitableNode; -import org.hibernate.query.sqm.tree.expression.SqmExpression; /** * @author Gavin King @@ -31,7 +30,7 @@ public class SqmDistinct extends AbstractSqmNode implements SqmTypedNode, } @Override - public SqmExpressable getNodeType() { + public SqmExpressible getNodeType() { return expression.getNodeType(); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmDurationUnit.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmDurationUnit.java index eb58bec06e..bfea5df55b 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmDurationUnit.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmDurationUnit.java @@ -10,7 +10,7 @@ import org.hibernate.query.ReturnableType; import org.hibernate.query.sqm.TemporalUnit; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.AbstractSqmNode; import org.hibernate.query.sqm.tree.SqmTypedNode; import org.hibernate.query.sqm.tree.SqmVisitableNode; @@ -42,7 +42,7 @@ public class SqmDurationUnit extends AbstractSqmNode implements SqmTypedNode< } @Override - public SqmExpressable getNodeType() { + public SqmExpressible getNodeType() { return type; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmEnumLiteral.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmEnumLiteral.java index 492765431a..48c664c834 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmEnumLiteral.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmEnumLiteral.java @@ -15,7 +15,7 @@ import org.hibernate.query.hql.spi.SemanticPathPart; import org.hibernate.query.hql.spi.SqmCreationState; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.domain.SqmPath; import org.hibernate.type.descriptor.java.EnumJavaType; @@ -25,7 +25,7 @@ import org.hibernate.type.descriptor.java.EnumJavaType; * * @author Steve Ebersole */ -public class SqmEnumLiteral> extends AbstractSqmExpression implements SqmExpressable, SemanticPathPart { +public class SqmEnumLiteral> extends AbstractSqmExpression implements SqmExpressible, SemanticPathPart { private final E enumValue; private final EnumJavaType referencedEnumTypeDescriptor; private final String enumValueName; @@ -39,7 +39,7 @@ public class SqmEnumLiteral> extends AbstractSqmExpression this.enumValue = enumValue; this.referencedEnumTypeDescriptor = referencedEnumTypeDescriptor; this.enumValueName = enumValueName; - setExpressableType( this ); + setExpressibleType( this ); } public E getEnumValue() { @@ -47,7 +47,7 @@ public class SqmEnumLiteral> extends AbstractSqmExpression } @Override - public EnumJavaType getExpressableJavaType() { + public EnumJavaType getExpressibleJavaType() { return referencedEnumTypeDescriptor; } @@ -92,22 +92,22 @@ public class SqmEnumLiteral> extends AbstractSqmExpression @Override public SqmExpression asLong() { - return nodeBuilder().literal( getExpressableJavaType().toOrdinal( enumValue ).longValue() ); + return nodeBuilder().literal( getExpressibleJavaType().toOrdinal( enumValue ).longValue() ); } @Override public SqmExpression asInteger() { - return nodeBuilder().literal( getExpressableJavaType().toOrdinal( enumValue ) ); + return nodeBuilder().literal( getExpressibleJavaType().toOrdinal( enumValue ) ); } @Override public SqmExpression asFloat() { - return nodeBuilder().literal( getExpressableJavaType().toOrdinal( enumValue ).floatValue() ); + return nodeBuilder().literal( getExpressibleJavaType().toOrdinal( enumValue ).floatValue() ); } @Override public SqmExpression asDouble() { - return nodeBuilder().literal( getExpressableJavaType().toOrdinal( enumValue ).doubleValue() ); + return nodeBuilder().literal( getExpressibleJavaType().toOrdinal( enumValue ).doubleValue() ); } @Override @@ -122,7 +122,7 @@ public class SqmEnumLiteral> extends AbstractSqmExpression @Override public SqmExpression asString() { - return nodeBuilder().literal( getExpressableJavaType().toName( enumValue ) ); + return nodeBuilder().literal( getExpressibleJavaType().toName( enumValue ) ); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmEvery.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmEvery.java index 072e94b4be..fed1662f79 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmEvery.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmEvery.java @@ -8,7 +8,6 @@ package org.hibernate.query.sqm.tree.expression; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; import org.hibernate.query.sqm.tree.select.SqmSubQuery; /** diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmExpression.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmExpression.java index 641feea1c3..fa0f217c1c 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmExpression.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmExpression.java @@ -17,7 +17,7 @@ import org.hibernate.query.ReturnableType; import org.hibernate.metamodel.model.domain.DomainType; import org.hibernate.query.criteria.JpaExpression; import org.hibernate.query.spi.QueryEngine; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.predicate.SqmPredicate; import org.hibernate.query.sqm.tree.select.SqmSelectableNode; @@ -39,13 +39,13 @@ public interface SqmExpression extends SqmSelectableNode, JpaExpression * Can change as a result of calls to {@link #applyInferableType} */ @Override - SqmExpressable getNodeType(); + SqmExpressible getNodeType(); /** * Used to apply type information based on the expression's usage * within the query. * - * @apiNote The SqmExpressable type parameter is dropped here because + * @apiNote The SqmExpressible type parameter is dropped here because * the inference could technically cause a change in Java type (i.e. * an implicit cast) * @@ -53,7 +53,7 @@ public interface SqmExpression extends SqmSelectableNode, JpaExpression */ @Remove @Deprecated - void applyInferableType(SqmExpressable type); + void applyInferableType(SqmExpressible type); @Override default void visitSubSelectableNodes(Consumer> jpaSelectionConsumer) { diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmExpressionHelper.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmExpressionHelper.java index 88a508ea5b..dc43a72402 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmExpressionHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmExpressionHelper.java @@ -18,7 +18,7 @@ import org.hibernate.query.BindableType; import org.hibernate.query.hql.spi.SqmCreationState; import org.hibernate.query.spi.QueryEngine; import org.hibernate.query.sqm.NodeBuilder; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.type.descriptor.java.JdbcDateJavaType; import org.hibernate.type.descriptor.java.JdbcTimeJavaType; import org.hibernate.type.descriptor.java.JdbcTimestampJavaType; @@ -28,26 +28,26 @@ import org.hibernate.type.spi.TypeConfiguration; * @author Steve Ebersole */ public class SqmExpressionHelper { - public static SqmExpressable toSqmType(BindableType parameterType, SqmCreationState creationState) { + public static SqmExpressible toSqmType(BindableType parameterType, SqmCreationState creationState) { return toSqmType( parameterType, creationState.getCreationContext().getJpaMetamodel().getTypeConfiguration() ); } - public static SqmExpressable toSqmType(BindableType anticipatedType, NodeBuilder nodeBuilder) { + public static SqmExpressible toSqmType(BindableType anticipatedType, NodeBuilder nodeBuilder) { return toSqmType( anticipatedType, nodeBuilder.getTypeConfiguration() ); } - public static SqmExpressable toSqmType(BindableType anticipatedType, TypeConfiguration typeConfiguration) { + public static SqmExpressible toSqmType(BindableType anticipatedType, TypeConfiguration typeConfiguration) { return toSqmType( anticipatedType, typeConfiguration.getSessionFactory() ); } - public static SqmExpressable toSqmType(BindableType anticipatedType, SessionFactoryImplementor sessionFactory) { + public static SqmExpressible toSqmType(BindableType anticipatedType, SessionFactoryImplementor sessionFactory) { if ( anticipatedType == null ) { return null; } - final SqmExpressable sqmExpressable = anticipatedType.resolveExpressable( sessionFactory ); - assert sqmExpressable != null; + final SqmExpressible sqmExpressible = anticipatedType.resolveExpressible( sessionFactory ); + assert sqmExpressible != null; - return sqmExpressable; + return sqmExpressible; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmExtractUnit.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmExtractUnit.java index 62949cac49..7c54007a8e 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmExtractUnit.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmExtractUnit.java @@ -10,7 +10,7 @@ import org.hibernate.query.ReturnableType; import org.hibernate.query.sqm.TemporalUnit; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.AbstractSqmNode; import org.hibernate.query.sqm.tree.SqmTypedNode; import org.hibernate.query.sqm.tree.SqmVisitableNode; @@ -42,7 +42,7 @@ public class SqmExtractUnit extends AbstractSqmNode implements SqmTypedNode getNodeType() { + public SqmExpressible getNodeType() { return type; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmFieldLiteral.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmFieldLiteral.java index 7593669387..9eb8edf874 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmFieldLiteral.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmFieldLiteral.java @@ -20,7 +20,7 @@ import org.hibernate.query.hql.spi.SemanticPathPart; import org.hibernate.query.hql.spi.SqmCreationState; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.domain.SqmPath; import org.hibernate.query.sqm.tree.predicate.SqmPredicate; import org.hibernate.query.sqm.tree.select.SqmSelectableNode; @@ -31,13 +31,13 @@ import jakarta.persistence.criteria.Expression; /** * @author Steve Ebersole */ -public class SqmFieldLiteral implements SqmExpression, SqmExpressable, SqmSelectableNode, SemanticPathPart { +public class SqmFieldLiteral implements SqmExpression, SqmExpressible, SqmSelectableNode, SemanticPathPart { private final T value; private final JavaType fieldJavaType; private final String fieldName; private final NodeBuilder nodeBuilder; - private SqmExpressable expressable; + private SqmExpressible expressible; public SqmFieldLiteral( Field field, @@ -71,7 +71,7 @@ public class SqmFieldLiteral implements SqmExpression, SqmExpressable, this.fieldName = fieldName; this.nodeBuilder = nodeBuilder; - this.expressable = this; + this.expressible = this; } public T getValue() { @@ -87,26 +87,26 @@ public class SqmFieldLiteral implements SqmExpression, SqmExpressable, } @Override - public SqmExpressable getNodeType() { - return expressable; + public SqmExpressible getNodeType() { + return expressible; } @Override - public void applyInferableType(SqmExpressable type) { + public void applyInferableType(SqmExpressible type) { } @Override - public JavaType getExpressableJavaType() { - if ( expressable == this ) { + public JavaType getExpressibleJavaType() { + if ( expressible == this ) { return fieldJavaType; } - return expressable.getExpressableJavaType(); + return expressible.getExpressibleJavaType(); } @Override public JavaType getJavaTypeDescriptor() { - return getExpressableJavaType(); + return getExpressibleJavaType(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmFormat.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmFormat.java index 8f3984c8fe..7ba0c8366f 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmFormat.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmFormat.java @@ -11,7 +11,7 @@ import java.util.regex.Pattern; import org.hibernate.query.SemanticException; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; /** * Effectively a query-literal but we want to handle it specially in the SQM -> SQL AST conversion @@ -43,7 +43,7 @@ public class SqmFormat extends SqmLiteral { public SqmFormat( String value, - SqmExpressable inherentType, + SqmExpressible inherentType, NodeBuilder nodeBuilder) { super(value, inherentType, nodeBuilder); if (!FORMAT.matcher(value).matches()) { diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmFunction.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmFunction.java index 37a7a39793..c4b792a12b 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmFunction.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmFunction.java @@ -11,7 +11,7 @@ import org.hibernate.query.hql.spi.SemanticPathPart; import org.hibernate.query.hql.spi.SqmCreationState; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.function.SqmFunctionDescriptor; import org.hibernate.query.sqm.sql.SqmToSqlAstConverter; import org.hibernate.query.sqm.tree.SqmTypedNode; @@ -38,7 +38,7 @@ public abstract class SqmFunction extends AbstractSqmExpression public SqmFunction( String functionName, SqmFunctionDescriptor functionDescriptor, - SqmExpressable type, + SqmExpressible type, List> arguments, NodeBuilder criteriaBuilder) { super( type, criteriaBuilder ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmJpaCriteriaParameterWrapper.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmJpaCriteriaParameterWrapper.java index e51bda154e..6d3cdca151 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmJpaCriteriaParameterWrapper.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmJpaCriteriaParameterWrapper.java @@ -112,12 +112,12 @@ public class SqmJpaCriteriaParameterWrapper // SqmToSqlAstConverter walker, // SqlAstCreationState sqlAstCreationState) { // -// final MappingModelExpressable mappingModelExpressable = DomainModelHelper.resolveMappingModelExpressable( +// final MappingModelExpressible mappingModelExpressible = DomainModelHelper.resolveMappingModelExpressible( // jpaCriteriaParameter, // sqlAstCreationState // ); // -// final List jdbcMappings = mappingModelExpressable.getJdbcMappings( +// final List jdbcMappings = mappingModelExpressible.getJdbcMappings( // sqlAstCreationState.getCreationContext().getDomainModel().getTypeConfiguration() // ); // @@ -125,7 +125,7 @@ public class SqmJpaCriteriaParameterWrapper // return new JdbcParameterImpl( jdbcMappings.get( 0 ) ); // } // -// final SqlTuple.Builder tupleBuilder = new SqlTuple.Builder( mappingModelExpressable ); +// final SqlTuple.Builder tupleBuilder = new SqlTuple.Builder( mappingModelExpressible ); // for ( JdbcMapping jdbcMapping : jdbcMappings ) { // tupleBuilder.addSubExpression( new JdbcParameterImpl( jdbcMapping ) ); // } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmLiteral.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmLiteral.java index 5709acd318..29880271ce 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmLiteral.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmLiteral.java @@ -9,7 +9,7 @@ package org.hibernate.query.sqm.tree.expression; import org.hibernate.query.internal.QueryLiteralHelper; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.type.descriptor.java.JavaType; /** @@ -25,13 +25,13 @@ import org.hibernate.type.descriptor.java.JavaType; public class SqmLiteral extends AbstractSqmExpression { private final T value; - public SqmLiteral(T value, SqmExpressable inherentType, NodeBuilder nodeBuilder) { + public SqmLiteral(T value, SqmExpressible inherentType, NodeBuilder nodeBuilder) { super( inherentType, nodeBuilder ); assert value != null; this.value = value; } - protected SqmLiteral(SqmExpressable inherentType, NodeBuilder nodeBuilder) { + protected SqmLiteral(SqmExpressible inherentType, NodeBuilder nodeBuilder) { super( inherentType, nodeBuilder ); this.value = null; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmLiteralEntityType.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmLiteralEntityType.java index 13231a2aef..daef99f959 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmLiteralEntityType.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmLiteralEntityType.java @@ -12,7 +12,7 @@ import org.hibernate.query.hql.spi.SemanticPathPart; import org.hibernate.query.hql.spi.SqmCreationState; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.domain.SqmPath; import org.hibernate.query.sqm.tree.select.SqmSelectableNode; @@ -41,7 +41,7 @@ public class SqmLiteralEntityType } @Override - public void internalApplyInferableType(SqmExpressable type) { + public void internalApplyInferableType(SqmExpressible type) { } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmLiteralNull.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmLiteralNull.java index a2eb73aa2e..b46786ac20 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmLiteralNull.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmLiteralNull.java @@ -7,7 +7,7 @@ package org.hibernate.query.sqm.tree.expression; import org.hibernate.query.sqm.NodeBuilder; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.SemanticQueryWalker; /** @@ -15,15 +15,15 @@ import org.hibernate.query.sqm.SemanticQueryWalker; */ public class SqmLiteralNull extends SqmLiteral { - private static final SqmExpressable NULL_TYPE = NullSqmExpressable.NULL_SQM_EXPRESSABLE; + private static final SqmExpressible NULL_TYPE = NullSqmExpressible.NULL_SQM_EXPRESSIBLE; public SqmLiteralNull(NodeBuilder nodeBuilder) { //noinspection unchecked - this( (SqmExpressable) NULL_TYPE, nodeBuilder ); + this( (SqmExpressible) NULL_TYPE, nodeBuilder ); } - public SqmLiteralNull(SqmExpressable expressableType, NodeBuilder nodeBuilder) { - super( expressableType, nodeBuilder ); + public SqmLiteralNull(SqmExpressible expressibleType, NodeBuilder nodeBuilder) { + super( expressibleType, nodeBuilder ); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmModifiedSubQueryExpression.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmModifiedSubQueryExpression.java index c1bf7a1657..f81f4a0ce9 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmModifiedSubQueryExpression.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmModifiedSubQueryExpression.java @@ -8,7 +8,7 @@ package org.hibernate.query.sqm.tree.expression; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.select.SqmSubQuery; /** @@ -42,7 +42,7 @@ public class SqmModifiedSubQueryExpression extends AbstractSqmExpression { public SqmModifiedSubQueryExpression( SqmSubQuery subQuery, Modifier modifier, - SqmExpressable resultType, + SqmExpressible resultType, NodeBuilder builder) { super( resultType, builder ); this.subQuery = subQuery; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmNamedParameter.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmNamedParameter.java index d93367fcce..de5baf108a 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmNamedParameter.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmNamedParameter.java @@ -8,7 +8,7 @@ package org.hibernate.query.sqm.tree.expression; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; /** * Represents a named query parameter in the SQM tree. @@ -25,7 +25,7 @@ public class SqmNamedParameter extends AbstractSqmParameter { public SqmNamedParameter( String name, boolean canBeMultiValued, - SqmExpressable inherentType, + SqmExpressible inherentType, NodeBuilder nodeBuilder) { super( canBeMultiValued, inherentType, nodeBuilder ); this.name = name; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmParameter.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmParameter.java index c4be787b26..747ce46b0b 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmParameter.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmParameter.java @@ -8,7 +8,7 @@ package org.hibernate.query.sqm.tree.expression; import org.hibernate.query.BindableType; import org.hibernate.query.criteria.JpaParameterExpression; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; /** * Models a parameter expression declared in the query. @@ -41,7 +41,8 @@ public interface SqmParameter extends SqmExpression, JpaParameterExpressio /** * Can a collection/array of values be bound to this parameter? *

- * This is allowed in very limited contexts within the query:

    + * This is allowed in very limited contexts within the query: + *
      *
    1. as the value of an IN predicate if the only value is a single param
    2. *
    3. (in non-strict JPA mode) as the final vararg to a function
    4. *
    @@ -63,10 +64,10 @@ public interface SqmParameter extends SqmExpression, JpaParameterExpressio BindableType getAnticipatedType(); @Override - SqmExpressable getNodeType(); + SqmExpressible getNodeType(); /** * Make a copy */ - SqmParameter copy(); + SqmParameter copy(); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmParameterizedEntityType.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmParameterizedEntityType.java index d7152a7f1f..25db81ee09 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmParameterizedEntityType.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmParameterizedEntityType.java @@ -8,7 +8,7 @@ package org.hibernate.query.sqm.tree.expression; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.select.SqmSelectableNode; /** @@ -29,8 +29,8 @@ public class SqmParameterizedEntityType extends AbstractSqmExpression impl } @Override - public void internalApplyInferableType(SqmExpressable type) { - setExpressableType( type ); + public void internalApplyInferableType(SqmExpressible type) { + setExpressibleType( type ); //noinspection unchecked discriminatorSource.applyInferableType( type ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmPositionalParameter.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmPositionalParameter.java index a84c67040c..29e6de086b 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmPositionalParameter.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmPositionalParameter.java @@ -8,7 +8,7 @@ package org.hibernate.query.sqm.tree.expression; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; /** * Models a positional parameter expression @@ -28,9 +28,9 @@ public class SqmPositionalParameter extends AbstractSqmParameter { public SqmPositionalParameter( int position, boolean canBeMultiValued, - SqmExpressable expressableType, + SqmExpressible expressibleType, NodeBuilder nodeBuilder) { - super( canBeMultiValued, expressableType, nodeBuilder ); + super( canBeMultiValued, expressibleType, nodeBuilder ); this.position = position; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmSelfRenderingExpression.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmSelfRenderingExpression.java index 8e56215ccd..8727cea20c 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmSelfRenderingExpression.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmSelfRenderingExpression.java @@ -10,7 +10,7 @@ import java.util.function.Function; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.sql.ast.tree.expression.Expression; /** @@ -21,7 +21,7 @@ public class SqmSelfRenderingExpression extends AbstractSqmExpression { public SqmSelfRenderingExpression( Function renderer, - SqmExpressable type, + SqmExpressible type, NodeBuilder criteriaBuilder) { super( type, criteriaBuilder ); this.renderer = renderer; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmTrimSpecification.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmTrimSpecification.java index 58b1e3eb51..a9beb2fc38 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmTrimSpecification.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmTrimSpecification.java @@ -8,7 +8,7 @@ package org.hibernate.query.sqm.tree.expression; import org.hibernate.query.sqm.TrimSpec; import org.hibernate.query.sqm.NodeBuilder; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.query.sqm.tree.AbstractSqmNode; import org.hibernate.query.sqm.tree.SqmTypedNode; @@ -43,7 +43,7 @@ public class SqmTrimSpecification extends AbstractSqmNode implements SqmTypedNod } @Override - public SqmExpressable getNodeType() { + public SqmExpressible getNodeType() { return null; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmTuple.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmTuple.java index 4dc3a304fe..728aec7ce5 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmTuple.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmTuple.java @@ -14,7 +14,7 @@ import org.hibernate.query.criteria.JpaCompoundSelection; import org.hibernate.query.criteria.JpaSelection; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.select.SqmJpaCompoundSelection; /** @@ -36,7 +36,7 @@ public class SqmTuple this( Arrays.asList( groupedExpressions ), nodeBuilder ); } - public SqmTuple(NodeBuilder nodeBuilder, SqmExpressable type, SqmExpression... groupedExpressions) { + public SqmTuple(NodeBuilder nodeBuilder, SqmExpressible type, SqmExpression... groupedExpressions) { this( Arrays.asList( groupedExpressions ), type, nodeBuilder ); } @@ -44,14 +44,14 @@ public class SqmTuple this( groupedExpressions, null, nodeBuilder ); } - public SqmTuple(List> groupedExpressions, SqmExpressable type, NodeBuilder nodeBuilder) { + public SqmTuple(List> groupedExpressions, SqmExpressible type, NodeBuilder nodeBuilder) { super( type, nodeBuilder ); if ( groupedExpressions.isEmpty() ) { throw new QueryException( "tuple grouping cannot be constructed over zero expressions" ); } this.groupedExpressions = groupedExpressions; if ( type == null ) { - setExpressableType( nodeBuilder.getTypeConfiguration().resolveTupleType( groupedExpressions ) ); + setExpressibleType( nodeBuilder.getTypeConfiguration().resolveTupleType( groupedExpressions ) ); } } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmUnaryOperation.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmUnaryOperation.java index 3f5696ca9e..7105e77527 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmUnaryOperation.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmUnaryOperation.java @@ -8,7 +8,7 @@ package org.hibernate.query.sqm.tree.expression; import org.hibernate.query.sqm.UnaryArithmeticOperator; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.select.SqmSelectableNode; /** @@ -27,7 +27,7 @@ public class SqmUnaryOperation extends AbstractSqmExpression implements Sq public SqmUnaryOperation( UnaryArithmeticOperator operation, SqmExpression operand, - SqmExpressable inherentType) { + SqmExpressible inherentType) { super( inherentType, operand.nodeBuilder() ); this.operation = operation; this.operand = operand; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/jpa/AbstractJpaSelection.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/jpa/AbstractJpaSelection.java index 04af19ba5c..c10d39bb34 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/jpa/AbstractJpaSelection.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/jpa/AbstractJpaSelection.java @@ -10,7 +10,7 @@ import java.util.List; import org.hibernate.query.criteria.JpaSelection; import org.hibernate.query.sqm.NodeBuilder; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.select.SqmSelectableNode; /** @@ -21,8 +21,8 @@ import org.hibernate.query.sqm.tree.select.SqmSelectableNode; public abstract class AbstractJpaSelection extends AbstractJpaTupleElement implements SqmSelectableNode, JpaSelection { - protected AbstractJpaSelection(SqmExpressable sqmExpressable, NodeBuilder criteriaBuilder) { - super( sqmExpressable, criteriaBuilder ); + protected AbstractJpaSelection(SqmExpressible sqmExpressible, NodeBuilder criteriaBuilder) { + super(sqmExpressible, criteriaBuilder ); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/jpa/AbstractJpaTupleElement.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/jpa/AbstractJpaTupleElement.java index 4a096fc885..d05ae216c0 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/jpa/AbstractJpaTupleElement.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/jpa/AbstractJpaTupleElement.java @@ -8,7 +8,7 @@ package org.hibernate.query.sqm.tree.jpa; import org.hibernate.query.criteria.JpaTupleElement; import org.hibernate.query.sqm.NodeBuilder; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.AbstractSqmNode; import org.hibernate.query.sqm.tree.SqmVisitableNode; @@ -21,13 +21,13 @@ public abstract class AbstractJpaTupleElement extends AbstractSqmNode implements SqmVisitableNode, JpaTupleElement { - private SqmExpressable expressableType; + private SqmExpressible expressibleType; private String alias; - protected AbstractJpaTupleElement(SqmExpressable expressableType, NodeBuilder criteriaBuilder) { + protected AbstractJpaTupleElement(SqmExpressible expressibleType, NodeBuilder criteriaBuilder) { super( criteriaBuilder ); - setExpressableType( expressableType ); + setExpressibleType(expressibleType); } @Override @@ -42,13 +42,13 @@ public abstract class AbstractJpaTupleElement this.alias = alias; } - public SqmExpressable getNodeType() { - return expressableType; + public SqmExpressible getNodeType() { + return expressibleType; } - protected final void setExpressableType(SqmExpressable expressableType) { + protected final void setExpressibleType(SqmExpressible expressibleType) { //noinspection unchecked - this.expressableType = (SqmExpressable) expressableType; + this.expressibleType = (SqmExpressible) expressibleType; } } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/jpa/ParameterCollector.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/jpa/ParameterCollector.java index 7c473088f0..d35880cd63 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/jpa/ParameterCollector.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/jpa/ParameterCollector.java @@ -12,9 +12,9 @@ import java.util.Set; import java.util.function.Consumer; import org.hibernate.query.BindableType; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.spi.BaseSemanticQueryWalker; -import org.hibernate.query.sqm.tree.SqmExpressableAccessor; +import org.hibernate.query.sqm.tree.SqmExpressibleAccessor; import org.hibernate.query.sqm.tree.SqmStatement; import org.hibernate.query.sqm.tree.domain.SqmIndexedCollectionAccessPath; import org.hibernate.query.sqm.tree.expression.JpaCriteriaParameter; @@ -98,9 +98,9 @@ public class ParameterCollector extends BaseSemanticQueryWalker { private BindableType getInferredParameterType(JpaCriteriaParameter expression) { BindableType parameterType = null; if ( inferenceBasis != null ) { - final SqmExpressable expressable = inferenceBasis.getExpressable(); - if ( expressable instanceof BindableType ) { - parameterType = (BindableType) expressable; + final SqmExpressible expressible = inferenceBasis.getExpressible(); + if ( expressible != null ) { + parameterType = expressible; } } if ( parameterType == null ) { @@ -128,10 +128,10 @@ public class ParameterCollector extends BaseSemanticQueryWalker { return param; } - private SqmExpressableAccessor inferenceBasis; + private SqmExpressibleAccessor inferenceBasis; - private void withTypeInference(SqmExpressableAccessor inferenceBasis, Runnable action) { - SqmExpressableAccessor original = this.inferenceBasis; + private void withTypeInference(SqmExpressibleAccessor inferenceBasis, Runnable action) { + SqmExpressibleAccessor original = this.inferenceBasis; this.inferenceBasis = inferenceBasis; try { action.run(); @@ -143,20 +143,20 @@ public class ParameterCollector extends BaseSemanticQueryWalker { @Override public Object visitSimpleCaseExpression(SqmCaseSimple expression) { - final SqmExpressableAccessor inferenceSupplier = this.inferenceBasis; + final SqmExpressibleAccessor inferenceSupplier = this.inferenceBasis; withTypeInference( () -> { for ( SqmCaseSimple.WhenFragment whenFragment : expression.getWhenFragments() ) { - final SqmExpressable resolved = whenFragment.getCheckValue().getExpressable(); - if ( resolved instanceof BindableType ) { - return (SqmExpressable) resolved; + final SqmExpressible resolved = whenFragment.getCheckValue().getExpressible(); + if ( resolved != null ) { + return (SqmExpressible) resolved; } } return null; }, () -> expression.getFixture().accept( this ) ); - SqmExpressableAccessor resolved = determineCurrentExpressable( expression ); + SqmExpressibleAccessor resolved = determineCurrentExpressible( expression ); for ( SqmCaseSimple.WhenFragment whenFragment : expression.getWhenFragments() ) { withTypeInference( expression.getFixture(), @@ -181,8 +181,8 @@ public class ParameterCollector extends BaseSemanticQueryWalker { @Override public Object visitSearchedCaseExpression(SqmCaseSearched expression) { - final SqmExpressableAccessor inferenceSupplier = this.inferenceBasis; - SqmExpressableAccessor resolved = determineCurrentExpressable( expression ); + final SqmExpressibleAccessor inferenceSupplier = this.inferenceBasis; + SqmExpressibleAccessor resolved = determineCurrentExpressible( expression ); for ( SqmCaseSearched.WhenFragment whenFragment : expression.getWhenFragments() ) { withTypeInference( @@ -206,7 +206,7 @@ public class ParameterCollector extends BaseSemanticQueryWalker { return expression; } - private SqmExpressableAccessor highestPrecedence(SqmExpressableAccessor type1, SqmExpressableAccessor type2) { + private SqmExpressibleAccessor highestPrecedence(SqmExpressibleAccessor type1, SqmExpressibleAccessor type2) { if ( type1 == null ) { return type2; } @@ -214,20 +214,20 @@ public class ParameterCollector extends BaseSemanticQueryWalker { return type1; } - if ( type1.getExpressable() instanceof BindableType ) { + if ( type1.getExpressible() != null ) { return type1; } - if ( type2.getExpressable() instanceof BindableType ) { + if ( type2.getExpressible() != null ) { return type2; } return type1; } - private SqmExpressableAccessor determineCurrentExpressable(SqmExpression expression) { - if ( expression.getExpressable() instanceof BindableType ) { - return () -> (SqmExpressable) expression.getExpressable(); + private SqmExpressibleAccessor determineCurrentExpressible(SqmExpression expression) { + if ( expression.getExpressible() != null ) { + return () -> (SqmExpressible) expression.getExpressible(); } return null; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/AbstractSqmPredicate.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/AbstractSqmPredicate.java index 94b5055811..1685d8d430 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/AbstractSqmPredicate.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/AbstractSqmPredicate.java @@ -10,7 +10,7 @@ import java.util.Collections; import java.util.List; import org.hibernate.query.sqm.NodeBuilder; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.expression.AbstractSqmExpression; import jakarta.persistence.criteria.Expression; @@ -20,7 +20,7 @@ import jakarta.persistence.criteria.Expression; */ public abstract class AbstractSqmPredicate extends AbstractSqmExpression implements SqmPredicate { - public AbstractSqmPredicate(SqmExpressable type, NodeBuilder criteriaBuilder) { + public AbstractSqmPredicate(SqmExpressible type, NodeBuilder criteriaBuilder) { super( type, criteriaBuilder ); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmAndPredicate.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmAndPredicate.java index 49f62f54cd..ee23557081 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmAndPredicate.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmAndPredicate.java @@ -24,7 +24,7 @@ public class SqmAndPredicate extends AbstractSqmPredicate implements SqmJunctive SqmPredicate leftHandPredicate, SqmPredicate rightHandPredicate, NodeBuilder nodeBuilder) { - super( leftHandPredicate.getExpressable(), nodeBuilder ); + super( leftHandPredicate.getExpressible(), nodeBuilder ); this.leftHandPredicate = leftHandPredicate; this.rightHandPredicate = rightHandPredicate; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmBetweenPredicate.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmBetweenPredicate.java index a8b8fcdae0..8d5d25a862 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmBetweenPredicate.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmBetweenPredicate.java @@ -9,7 +9,7 @@ package org.hibernate.query.sqm.tree.predicate; import org.hibernate.query.internal.QueryHelper; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.expression.SqmExpression; /** @@ -31,15 +31,15 @@ public class SqmBetweenPredicate extends AbstractNegatableSqmPredicate { this.lowerBound = lowerBound; this.upperBound = upperBound; - final SqmExpressable expressableType = QueryHelper.highestPrecedenceType( + final SqmExpressible expressibleType = QueryHelper.highestPrecedenceType( expression.getNodeType(), lowerBound.getNodeType(), upperBound.getNodeType() ); - expression.applyInferableType( expressableType ); - lowerBound.applyInferableType( expressableType ); - upperBound.applyInferableType( expressableType ); + expression.applyInferableType( expressibleType ); + lowerBound.applyInferableType( expressibleType ); + upperBound.applyInferableType( expressibleType ); } public SqmExpression getExpression() { diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmBooleanExpressionPredicate.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmBooleanExpressionPredicate.java index cb10501691..c4c147ce29 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmBooleanExpressionPredicate.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmBooleanExpressionPredicate.java @@ -35,7 +35,7 @@ public class SqmBooleanExpressionPredicate extends AbstractNegatableSqmPredicate super( negated, nodeBuilder ); assert booleanExpression.getNodeType() != null; - final Class expressionJavaType = booleanExpression.getNodeType().getExpressableJavaType().getJavaTypeClass(); + final Class expressionJavaType = booleanExpression.getNodeType().getExpressibleJavaType().getJavaTypeClass(); assert boolean.class.equals( expressionJavaType ) || Boolean.class.equals( expressionJavaType ); this.booleanExpression = booleanExpression; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmComparisonPredicate.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmComparisonPredicate.java index 00fc7b7372..c2953821f3 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmComparisonPredicate.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmComparisonPredicate.java @@ -9,7 +9,7 @@ package org.hibernate.query.sqm.tree.predicate; import org.hibernate.query.sqm.ComparisonOperator; import org.hibernate.query.internal.QueryHelper; import org.hibernate.query.sqm.NodeBuilder; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.query.sqm.tree.expression.SqmExpression; @@ -31,13 +31,13 @@ public class SqmComparisonPredicate extends AbstractNegatableSqmPredicate { this.rightHandExpression = rightHandExpression; this.operator = operator; - final SqmExpressable expressableType = QueryHelper.highestPrecedenceType( + final SqmExpressible expressibleType = QueryHelper.highestPrecedenceType( leftHandExpression.getNodeType(), rightHandExpression.getNodeType() ); - leftHandExpression.applyInferableType( expressableType ); - rightHandExpression.applyInferableType( expressableType ); + leftHandExpression.applyInferableType( expressibleType ); + rightHandExpression.applyInferableType( expressibleType ); } private SqmComparisonPredicate(SqmComparisonPredicate affirmativeForm) { diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmGroupedPredicate.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmGroupedPredicate.java index 23dce72133..c94ab41add 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmGroupedPredicate.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmGroupedPredicate.java @@ -20,7 +20,7 @@ public class SqmGroupedPredicate extends AbstractSqmPredicate { private final SqmPredicate subPredicate; public SqmGroupedPredicate(SqmPredicate subPredicate, NodeBuilder nodeBuilder) { - super( subPredicate.getExpressable(), nodeBuilder ); + super( subPredicate.getExpressible(), nodeBuilder ); this.subPredicate = subPredicate; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmInSubQueryPredicate.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmInSubQueryPredicate.java index 9dfe1f84e0..28c3c4b715 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmInSubQueryPredicate.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/predicate/SqmInSubQueryPredicate.java @@ -11,7 +11,7 @@ import jakarta.persistence.criteria.Expression; import org.hibernate.query.criteria.JpaExpression; import org.hibernate.query.internal.QueryHelper; import org.hibernate.query.sqm.NodeBuilder; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.query.sqm.tree.expression.SqmExpression; import org.hibernate.query.sqm.tree.select.SqmSubQuery; @@ -39,13 +39,13 @@ public class SqmInSubQueryPredicate extends AbstractNegatableSqmPredicate imp this.testExpression = testExpression; this.subQueryExpression = subQueryExpression; - final SqmExpressable expressableType = QueryHelper.highestPrecedenceType2( + final SqmExpressible expressibleType = QueryHelper.highestPrecedenceType2( testExpression.getNodeType(), subQueryExpression.getNodeType() ); - testExpression.applyInferableType( expressableType ); - subQueryExpression.applyInferableType( expressableType ); + testExpression.applyInferableType( expressibleType ); + subQueryExpression.applyInferableType( expressibleType ); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/select/SqmAliasedNode.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/select/SqmAliasedNode.java index 5fd77c5753..5ec4a50cca 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/select/SqmAliasedNode.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/select/SqmAliasedNode.java @@ -6,7 +6,7 @@ */ package org.hibernate.query.sqm.tree.select; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.SqmTypedNode; import org.hibernate.query.sqm.sql.internal.DomainResultProducer; @@ -27,7 +27,7 @@ public interface SqmAliasedNode extends SqmTypedNode { String getAlias(); @Override - default SqmExpressable getNodeType() { + default SqmExpressible getNodeType() { return getSelectableNode().getNodeType(); } } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/select/SqmDynamicInstantiation.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/select/SqmDynamicInstantiation.java index 21a464af77..265e1f99fd 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/select/SqmDynamicInstantiation.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/select/SqmDynamicInstantiation.java @@ -214,7 +214,7 @@ public class SqmDynamicInstantiation } @Override - public JavaType getExpressableJavaType() { + public JavaType getExpressibleJavaType() { return getTargetTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/select/SqmDynamicInstantiationTarget.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/select/SqmDynamicInstantiationTarget.java index fefb99143a..f93547b59a 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/select/SqmDynamicInstantiationTarget.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/select/SqmDynamicInstantiationTarget.java @@ -8,7 +8,7 @@ package org.hibernate.query.sqm.tree.select; import org.hibernate.query.sqm.DynamicInstantiationNature; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.type.descriptor.java.JavaType; /** @@ -17,7 +17,7 @@ import org.hibernate.type.descriptor.java.JavaType; * * @author Steve Ebersole */ -public interface SqmDynamicInstantiationTarget extends SqmExpressable { +public interface SqmDynamicInstantiationTarget extends SqmExpressible { /** * Retrieves the enum describing the nature of this target. diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/select/SqmJpaCompoundSelection.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/select/SqmJpaCompoundSelection.java index 6a6d2fac11..cc77105330 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/select/SqmJpaCompoundSelection.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/select/SqmJpaCompoundSelection.java @@ -13,7 +13,7 @@ import org.hibernate.query.criteria.JpaCompoundSelection; import org.hibernate.query.criteria.JpaSelection; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.expression.AbstractSqmExpression; import org.hibernate.type.descriptor.java.JavaType; @@ -37,15 +37,15 @@ import jakarta.persistence.criteria.Selection; */ public class SqmJpaCompoundSelection extends AbstractSqmExpression - implements JpaCompoundSelection, SqmExpressable { + implements JpaCompoundSelection, SqmExpressible { - // todo (6.0) : should this really be SqmExpressable? + // todo (6.0) : should this really be SqmExpressible? // - seems like it ought to be limited to just `SqmSelectableNode`. // otherwise why the distinction? why not just just re-use the same // impl between this and `org.hibernate.query.sqm.tree.expression.SqmTuple`? // Seems like either: // a) this contract should not define support for being used out side the select clause, - // which would mean implementing `SqmSelectableNode`, but not `SqmExpressable` - so it + // which would mean implementing `SqmSelectableNode`, but not `SqmExpressible` - so it // would not be usable as a // b) // @@ -66,7 +66,7 @@ public class SqmJpaCompoundSelection this.selectableNodes = selectableNodes; this.javaType = javaType; - setExpressableType( this ); + setExpressibleType( this ); } @Override @@ -75,7 +75,7 @@ public class SqmJpaCompoundSelection } @Override - public JavaType getExpressableJavaType() { + public JavaType getExpressibleJavaType() { return getJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/select/SqmSubQuery.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/select/SqmSubQuery.java index 93d9285259..d22e1105bc 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/select/SqmSubQuery.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/select/SqmSubQuery.java @@ -28,7 +28,7 @@ import org.hibernate.query.criteria.JpaSelection; import org.hibernate.query.criteria.JpaSubQuery; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.SqmQuery; import org.hibernate.query.sqm.tree.domain.SqmBagJoin; import org.hibernate.query.sqm.tree.domain.SqmCorrelatedBagJoin; @@ -60,7 +60,7 @@ import org.hibernate.type.descriptor.java.JavaType; public class SqmSubQuery extends AbstractSqmSelectQuery implements SqmSelectQuery, JpaSubQuery, SqmExpression { private final SqmQuery parent; - private SqmExpressable expressableType; + private SqmExpressible expressibleType; private String alias; public SqmSubQuery( @@ -312,15 +312,15 @@ public class SqmSubQuery extends AbstractSqmSelectQuery implements SqmSele } @Override - public SqmExpressable getNodeType() { - return expressableType; + public SqmExpressible getNodeType() { + return expressibleType; } @Override - public void applyInferableType(SqmExpressable type) { + public void applyInferableType(SqmExpressible type) { //noinspection unchecked - this.expressableType = (SqmExpressable) type; - setResultType( type == null ? null : expressableType.getExpressableJavaType().getJavaTypeClass() ); + this.expressibleType = (SqmExpressible) type; + setResultType( type == null ? null : expressibleType.getExpressibleJavaType().getJavaTypeClass() ); } @Override @@ -368,7 +368,7 @@ public class SqmSubQuery extends AbstractSqmSelectQuery implements SqmSele if ( getNodeType() == null ) { return null; } - return getNodeType().getExpressableJavaType(); + return getNodeType().getExpressibleJavaType(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/AbstractSqlAstTranslator.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/AbstractSqlAstTranslator.java index 0cbde874f5..1c9947c353 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/AbstractSqlAstTranslator.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/AbstractSqlAstTranslator.java @@ -55,7 +55,7 @@ import org.hibernate.internal.util.collections.StandardStack; import org.hibernate.metamodel.mapping.JdbcMapping; import org.hibernate.metamodel.mapping.ModelPartContainer; import org.hibernate.metamodel.mapping.PluralAttributeMapping; -import org.hibernate.metamodel.mapping.SqlExpressable; +import org.hibernate.metamodel.mapping.SqlExpressible; import org.hibernate.persister.entity.AbstractEntityPersister; import org.hibernate.persister.entity.Loadable; import org.hibernate.query.sqm.ComparisonOperator; @@ -4205,7 +4205,7 @@ public abstract class AbstractSqlAstTranslator implemen public void visitCastTarget(CastTarget castTarget) { appendSql( getDialect().getCastTypeName( - (SqlExpressable) castTarget.getExpressionType(), + (SqlExpressible) castTarget.getExpressionType(), castTarget.getLength(), castTarget.getPrecision(), castTarget.getScale() diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/SqlExpressionResolver.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/SqlExpressionResolver.java index 502463d478..1b6029c194 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/SqlExpressionResolver.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/SqlExpressionResolver.java @@ -66,8 +66,8 @@ public interface SqlExpressionResolver { } /** - * Given a qualifier + a qualifiable SqlExpressable, resolve the - * (Sql)Expression reference. + * Given a qualifier + a qualifiable {@link org.hibernate.metamodel.mapping.SqlExpressible}, + * resolve the (Sql)Expression reference. */ Expression resolveSqlExpression(String key, Function creator); diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/SqlSelection.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/SqlSelection.java index c0e818a944..1f4a8a1740 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/SqlSelection.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/SqlSelection.java @@ -8,7 +8,6 @@ package org.hibernate.sql.ast.spi; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.metamodel.mapping.JdbcMappingContainer; -import org.hibernate.metamodel.mapping.MappingModelExpressable; import org.hibernate.sql.ast.tree.SqlAstNode; import org.hibernate.sql.ast.tree.expression.Expression; import org.hibernate.sql.results.jdbc.spi.JdbcValuesMetadata; diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Any.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Any.java index 04e166f335..be85d221d5 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Any.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Any.java @@ -6,7 +6,7 @@ */ package org.hibernate.sql.ast.tree.expression; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.query.sqm.sql.internal.DomainResultProducer; import org.hibernate.sql.ast.SqlAstWalker; import org.hibernate.sql.ast.spi.SqlAstCreationState; @@ -23,9 +23,9 @@ import org.hibernate.type.descriptor.java.JavaType; public class Any implements Expression, DomainResultProducer { private final QueryPart subquery; - private final MappingModelExpressable type; + private final MappingModelExpressible type; - public Any(QueryPart subquery, MappingModelExpressable type) { + public Any(QueryPart subquery, MappingModelExpressible type) { this.subquery = subquery; this.type = type; } @@ -35,7 +35,7 @@ public class Any implements Expression, DomainResultProducer { } @Override - public MappingModelExpressable getExpressionType() { + public MappingModelExpressible getExpressionType() { return type; } diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/CaseSearchedExpression.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/CaseSearchedExpression.java index e084ede13e..6495d0de80 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/CaseSearchedExpression.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/CaseSearchedExpression.java @@ -12,7 +12,7 @@ import java.util.ArrayList; import java.util.List; import org.hibernate.metamodel.mapping.BasicValuedMapping; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.query.sqm.sql.internal.DomainResultProducer; import org.hibernate.sql.ast.SqlAstWalker; import org.hibernate.sql.ast.spi.SqlExpressionResolver; @@ -31,11 +31,11 @@ public class CaseSearchedExpression implements Expression, DomainResultProducer private List whenFragments = new ArrayList<>(); private Expression otherwise; - public CaseSearchedExpression(MappingModelExpressable type) { + public CaseSearchedExpression(MappingModelExpressible type) { this.type = (BasicValuedMapping) type; } - public CaseSearchedExpression(MappingModelExpressable type, List whenFragments, Expression otherwise) { + public CaseSearchedExpression(MappingModelExpressible type, List whenFragments, Expression otherwise) { this.type = (BasicValuedMapping) type; this.whenFragments = whenFragments; this.otherwise = otherwise; @@ -67,7 +67,7 @@ public class CaseSearchedExpression implements Expression, DomainResultProducer .getSqlExpressionResolver() .resolveSqlSelection( this, - type.getExpressableJavaType(), + type.getExpressibleJavaType(), creationState.getSqlAstCreationState() .getCreationContext() .getSessionFactory() @@ -78,7 +78,7 @@ public class CaseSearchedExpression implements Expression, DomainResultProducer return new BasicResult( sqlSelection.getValuesArrayPosition(), resultVariable, - type.getExpressableJavaType() + type.getExpressibleJavaType() ); } @@ -89,7 +89,7 @@ public class CaseSearchedExpression implements Expression, DomainResultProducer final SqlSelection sqlSelection = sqlExpressionResolver .resolveSqlSelection( this, - type.getExpressableJavaType(), + type.getExpressibleJavaType(), creationState.getSqlAstCreationState() .getCreationContext() .getSessionFactory() @@ -97,7 +97,7 @@ public class CaseSearchedExpression implements Expression, DomainResultProducer ); sqlExpressionResolver.resolveSqlSelection( this, - type.getExpressableJavaType(), + type.getExpressibleJavaType(), creationState.getSqlAstCreationState().getCreationContext().getDomainModel().getTypeConfiguration() ); } @@ -108,7 +108,7 @@ public class CaseSearchedExpression implements Expression, DomainResultProducer } @Override - public MappingModelExpressable getExpressionType() { + public MappingModelExpressible getExpressionType() { return type; } diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/CaseSimpleExpression.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/CaseSimpleExpression.java index 8e661a4f23..3147ebc333 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/CaseSimpleExpression.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/CaseSimpleExpression.java @@ -11,7 +11,7 @@ import java.io.Serializable; import java.util.ArrayList; import java.util.List; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.query.sqm.sql.internal.DomainResultProducer; import org.hibernate.sql.ast.SqlAstWalker; import org.hibernate.sql.ast.spi.SqlAstCreationState; @@ -25,18 +25,18 @@ import org.hibernate.type.descriptor.java.JavaType; * @author Steve Ebersole */ public class CaseSimpleExpression implements Expression, DomainResultProducer { - private final MappingModelExpressable type; + private final MappingModelExpressible type; private final Expression fixture; private List whenFragments = new ArrayList<>(); private Expression otherwise; - public CaseSimpleExpression(MappingModelExpressable type, Expression fixture) { + public CaseSimpleExpression(MappingModelExpressible type, Expression fixture) { this.type = type; this.fixture = fixture; } - public CaseSimpleExpression(MappingModelExpressable type, Expression fixture, List whenFragments, Expression otherwise) { + public CaseSimpleExpression(MappingModelExpressible type, Expression fixture, List whenFragments, Expression otherwise) { this.type = type; this.fixture = fixture; this.whenFragments = whenFragments; @@ -48,7 +48,7 @@ public class CaseSimpleExpression implements Expression, DomainResultProducer { } @Override - public MappingModelExpressable getExpressionType() { + public MappingModelExpressible getExpressionType() { return type; } diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Collation.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Collation.java index 82b0febeac..93f793b0fd 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Collation.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Collation.java @@ -8,14 +8,14 @@ package org.hibernate.sql.ast.tree.expression; import org.hibernate.mapping.IndexedConsumer; import org.hibernate.metamodel.mapping.JdbcMapping; -import org.hibernate.metamodel.mapping.SqlExpressable; +import org.hibernate.metamodel.mapping.SqlExpressible; import org.hibernate.sql.ast.SqlAstWalker; import org.hibernate.sql.ast.tree.SqlAstNode; /** * @author Christian Beikov */ -public class Collation implements SqlExpressable, SqlAstNode { +public class Collation implements SqlExpressible, SqlAstNode { private final String collation; diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/ColumnReference.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/ColumnReference.java index a3883b4da3..04f4542902 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/ColumnReference.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/ColumnReference.java @@ -15,7 +15,7 @@ import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.internal.util.StringHelper; import org.hibernate.metamodel.mapping.SelectableMapping; import org.hibernate.metamodel.mapping.JdbcMapping; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.sql.Template; import org.hibernate.sql.ast.SqlAstWalker; import org.hibernate.sql.ast.tree.from.TableReference; @@ -184,8 +184,8 @@ public class ColumnReference implements Expression, Assignable { } @Override - public MappingModelExpressable getExpressionType() { - return (MappingModelExpressable) jdbcMapping; + public MappingModelExpressible getExpressionType() { + return (MappingModelExpressible) jdbcMapping; } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/ConvertedQueryLiteral.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/ConvertedQueryLiteral.java index 3c5a329439..1d7f0c92e6 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/ConvertedQueryLiteral.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/ConvertedQueryLiteral.java @@ -75,7 +75,7 @@ public class ConvertedQueryLiteral implements Literal, DomainResultProducer final SqlExpressionResolver expressionResolver = sqlAstCreationState.getSqlExpressionResolver(); expressionResolver.resolveSqlSelection( this, - relationalMapping.getExpressableJavaType(), + relationalMapping.getExpressibleJavaType(), sqlAstCreationState.getCreationContext().getDomainModel().getTypeConfiguration() ); } diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Distinct.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Distinct.java index 4d5e5b39ce..59de89ccfe 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Distinct.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Distinct.java @@ -9,14 +9,14 @@ package org.hibernate.sql.ast.tree.expression; import org.hibernate.mapping.IndexedConsumer; import org.hibernate.metamodel.mapping.JdbcMapping; import org.hibernate.metamodel.mapping.JdbcMappingContainer; -import org.hibernate.metamodel.mapping.SqlExpressable; +import org.hibernate.metamodel.mapping.SqlExpressible; import org.hibernate.sql.ast.SqlAstWalker; import org.hibernate.sql.ast.tree.SqlAstNode; /** * @author Gavin King */ -public class Distinct implements Expression, SqlExpressable, SqlAstNode { +public class Distinct implements Expression, SqlExpressible, SqlAstNode { private final Expression expression; public Distinct(Expression expression) { @@ -29,12 +29,12 @@ public class Distinct implements Expression, SqlExpressable, SqlAstNode { @Override public JdbcMapping getJdbcMapping() { - if ( expression instanceof SqlExpressable ) { - return ( (SqlExpressable) expression ).getJdbcMapping(); + if ( expression instanceof SqlExpressible) { + return ( (SqlExpressible) expression ).getJdbcMapping(); } - if ( getExpressionType() instanceof SqlExpressable ) { - return ( (SqlExpressable) getExpressionType() ).getJdbcMapping(); + if ( getExpressionType() instanceof SqlExpressible) { + return ( (SqlExpressible) getExpressionType() ).getJdbcMapping(); } if ( getExpressionType() != null ) { diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/EntityTypeLiteral.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/EntityTypeLiteral.java index 72400055c7..dafdcf571f 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/EntityTypeLiteral.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/EntityTypeLiteral.java @@ -11,7 +11,7 @@ import java.util.List; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.mapping.IndexedConsumer; import org.hibernate.metamodel.mapping.JdbcMapping; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.persister.entity.DiscriminatorType; import org.hibernate.persister.entity.EntityPersister; import org.hibernate.persister.entity.Queryable; @@ -23,12 +23,12 @@ import org.hibernate.sql.results.graph.DomainResult; import org.hibernate.sql.results.graph.DomainResultCreationState; import org.hibernate.sql.results.graph.basic.BasicResult; import org.hibernate.type.descriptor.java.JavaType; -import org.hibernate.type.descriptor.java.JavaTypedExpressable; +import org.hibernate.type.descriptor.java.JavaTypedExpressible; /** * @author Steve Ebersole */ -public class EntityTypeLiteral implements Expression, MappingModelExpressable, DomainResultProducer, JavaTypedExpressable { +public class EntityTypeLiteral implements Expression, MappingModelExpressible, DomainResultProducer, JavaTypedExpressible { private final EntityPersister entityTypeDescriptor; private final DiscriminatorType discriminatorType; @@ -42,10 +42,10 @@ public class EntityTypeLiteral implements Expression, MappingModelExpressable, D } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // MappingModelExpressable + // MappingModelExpressible @Override - public MappingModelExpressable getExpressionType() { + public MappingModelExpressible getExpressionType() { return this; } @@ -104,7 +104,7 @@ public class EntityTypeLiteral implements Expression, MappingModelExpressable, D createSqlSelection( creationState ) .getValuesArrayPosition(), resultVariable, - discriminatorType.getExpressableJavaType() + discriminatorType.getExpressibleJavaType() ); } @@ -112,7 +112,7 @@ public class EntityTypeLiteral implements Expression, MappingModelExpressable, D return creationState.getSqlAstCreationState().getSqlExpressionResolver() .resolveSqlSelection( this, - discriminatorType.getExpressableJavaType(), + discriminatorType.getExpressibleJavaType(), creationState.getSqlAstCreationState().getCreationContext() .getDomainModel().getTypeConfiguration() ); @@ -124,7 +124,7 @@ public class EntityTypeLiteral implements Expression, MappingModelExpressable, D } @Override - public JavaType getExpressableJavaType() { - return discriminatorType.getExpressableJavaType(); + public JavaType getExpressibleJavaType() { + return discriminatorType.getExpressibleJavaType(); } } diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Every.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Every.java index aed4a69772..76573f603f 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Every.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Every.java @@ -6,12 +6,11 @@ */ package org.hibernate.sql.ast.tree.expression; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.query.sqm.sql.internal.DomainResultProducer; import org.hibernate.sql.ast.SqlAstWalker; import org.hibernate.sql.ast.spi.SqlAstCreationState; import org.hibernate.sql.ast.spi.SqlExpressionResolver; -import org.hibernate.sql.ast.tree.select.QueryGroup; import org.hibernate.sql.ast.tree.select.QueryPart; import org.hibernate.sql.results.graph.DomainResult; import org.hibernate.sql.results.graph.DomainResultCreationState; @@ -24,9 +23,9 @@ import org.hibernate.type.descriptor.java.JavaType; public class Every implements Expression, DomainResultProducer { private final QueryPart subquery; - private final MappingModelExpressable type; + private final MappingModelExpressible type; - public Every(QueryPart subquery, MappingModelExpressable type) { + public Every(QueryPart subquery, MappingModelExpressible type) { this.subquery = subquery; this.type = type; } @@ -36,7 +35,7 @@ public class Every implements Expression, DomainResultProducer { } @Override - public MappingModelExpressable getExpressionType() { + public MappingModelExpressible getExpressionType() { return type; } diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Format.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Format.java index 87cc7c0ae1..0dd77179ff 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Format.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Format.java @@ -8,7 +8,7 @@ package org.hibernate.sql.ast.tree.expression; import org.hibernate.mapping.IndexedConsumer; import org.hibernate.metamodel.mapping.JdbcMapping; -import org.hibernate.metamodel.mapping.SqlExpressable; +import org.hibernate.metamodel.mapping.SqlExpressible; import org.hibernate.sql.ast.SqlAstWalker; import org.hibernate.sql.ast.tree.SqlAstNode; @@ -17,7 +17,7 @@ import org.hibernate.sql.ast.tree.SqlAstNode; * * @author Gavin King */ -public class Format implements SqlExpressable, SqlAstNode { +public class Format implements SqlExpressible, SqlAstNode { private String format; public Format(String format) { diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/JdbcLiteral.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/JdbcLiteral.java index cf93cc1314..7eecf77db6 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/JdbcLiteral.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/JdbcLiteral.java @@ -14,7 +14,7 @@ import java.util.List; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.mapping.IndexedConsumer; import org.hibernate.metamodel.mapping.JdbcMapping; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.query.sqm.sql.internal.DomainResultProducer; import org.hibernate.sql.ast.Clause; import org.hibernate.sql.ast.SqlAstWalker; @@ -27,17 +27,17 @@ import org.hibernate.sql.results.graph.DomainResult; import org.hibernate.sql.results.graph.DomainResultCreationState; import org.hibernate.sql.results.graph.basic.BasicResult; import org.hibernate.type.descriptor.java.JavaType; -import org.hibernate.type.descriptor.java.JavaTypedExpressable; +import org.hibernate.type.descriptor.java.JavaTypedExpressible; /** * Represents a literal in the SQL AST. This form accepts a {@link JdbcMapping} and acts - * as its own MappingModelExpressable. + * as its own {@link MappingModelExpressible}. * * @see QueryLiteral * * @author Steve Ebersole */ -public class JdbcLiteral implements Literal, MappingModelExpressable, DomainResultProducer, JavaTypedExpressable { +public class JdbcLiteral implements Literal, MappingModelExpressible, DomainResultProducer, JavaTypedExpressible { private final T literalValue; private final JdbcMapping jdbcMapping; @@ -78,10 +78,10 @@ public class JdbcLiteral implements Literal, MappingModelExpressable, Doma // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // MappingModelExpressable + // MappingModelExpressible @Override - public MappingModelExpressable getExpressionType() { + public MappingModelExpressible getExpressionType() { return this; } @@ -160,7 +160,7 @@ public class JdbcLiteral implements Literal, MappingModelExpressable, Doma } @Override - public JavaType getExpressableJavaType() { + public JavaType getExpressibleJavaType() { return jdbcMapping.getJavaTypeDescriptor(); } } diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/QueryLiteral.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/QueryLiteral.java index d29ed3a4fd..b7026b248d 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/QueryLiteral.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/QueryLiteral.java @@ -23,7 +23,8 @@ import org.hibernate.sql.results.graph.DomainResultCreationState; import org.hibernate.sql.results.graph.basic.BasicResult; /** - * Represents a literal in the SQL AST. This form accepts a {@link BasicValuedMapping} is its MappingModelExpressable. + * Represents a literal in the SQL AST. This form accepts a {@link BasicValuedMapping} + * as its {@link org.hibernate.metamodel.mapping.MappingModelExpressible}. * * @see JdbcLiteral * diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/SqlTuple.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/SqlTuple.java index 12cdb560b3..a060621151 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/SqlTuple.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/SqlTuple.java @@ -11,8 +11,8 @@ import java.util.Collections; import java.util.List; import org.hibernate.NotYetImplementedFor6Exception; -import org.hibernate.metamodel.mapping.MappingModelExpressable; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.sql.internal.DomainResultProducer; import org.hibernate.sql.ast.SqlAstWalker; import org.hibernate.sql.ast.SqlTreeCreationLogger; @@ -26,9 +26,9 @@ import org.hibernate.type.descriptor.java.JavaType; */ public class SqlTuple implements Expression, SqlTupleContainer, DomainResultProducer { private final List expressions; - private final MappingModelExpressable valueMapping; + private final MappingModelExpressible valueMapping; - public SqlTuple(List expressions, MappingModelExpressable valueMapping) { + public SqlTuple(List expressions, MappingModelExpressible valueMapping) { this.expressions = expressions; this.valueMapping = valueMapping; @@ -41,7 +41,7 @@ public class SqlTuple implements Expression, SqlTupleContainer, DomainResultProd } @Override - public MappingModelExpressable getExpressionType() { + public MappingModelExpressible getExpressionType() { return valueMapping; } @@ -63,7 +63,7 @@ public class SqlTuple implements Expression, SqlTupleContainer, DomainResultProd public DomainResult createDomainResult( String resultVariable, DomainResultCreationState creationState) { - final JavaType javaType = ( (SqmExpressable) valueMapping ).getExpressableJavaType(); + final JavaType javaType = ( (SqmExpressible) valueMapping ).getExpressibleJavaType(); final int[] valuesArrayPositions = new int[expressions.size()]; for ( int i = 0; i < expressions.size(); i++ ) { valuesArrayPositions[i] = creationState.getSqlAstCreationState().getSqlExpressionResolver().resolveSqlSelection( @@ -86,15 +86,15 @@ public class SqlTuple implements Expression, SqlTupleContainer, DomainResultProd } public static class Builder { - private final MappingModelExpressable valueMapping; + private final MappingModelExpressible valueMapping; private List expressions; - public Builder(MappingModelExpressable valueMapping) { + public Builder(MappingModelExpressible valueMapping) { this.valueMapping = valueMapping; } - public Builder(MappingModelExpressable valueMapping, int jdbcTypeCount) { + public Builder(MappingModelExpressible valueMapping, int jdbcTypeCount) { this( valueMapping ); expressions = new ArrayList<>( jdbcTypeCount ); } diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Star.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Star.java index b2724d4419..b0112e959c 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Star.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Star.java @@ -6,7 +6,7 @@ */ package org.hibernate.sql.ast.tree.expression; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.sql.ast.SqlAstWalker; /** @@ -19,7 +19,7 @@ public class Star implements Expression { public static final Star INSTANCE = new Star(); @Override - public MappingModelExpressable getExpressionType() { + public MappingModelExpressible getExpressionType() { return null; } diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Summarization.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Summarization.java index 10d3a75841..1113089909 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Summarization.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/Summarization.java @@ -8,7 +8,7 @@ package org.hibernate.sql.ast.tree.expression; import java.util.List; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.sql.ast.SqlAstWalker; /** @@ -33,7 +33,7 @@ public class Summarization implements Expression { } @Override - public MappingModelExpressable getExpressionType() { + public MappingModelExpressible getExpressionType() { return null; } diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/TrimSpecification.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/TrimSpecification.java index 3dece5f220..b92f01fba4 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/TrimSpecification.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/TrimSpecification.java @@ -8,7 +8,7 @@ package org.hibernate.sql.ast.tree.expression; import org.hibernate.mapping.IndexedConsumer; import org.hibernate.metamodel.mapping.JdbcMapping; -import org.hibernate.metamodel.mapping.SqlExpressable; +import org.hibernate.metamodel.mapping.SqlExpressible; import org.hibernate.query.sqm.TrimSpec; import org.hibernate.sql.ast.SqlAstWalker; import org.hibernate.sql.ast.tree.SqlAstNode; @@ -16,7 +16,7 @@ import org.hibernate.sql.ast.tree.SqlAstNode; /** * @author Gavin King */ -public class TrimSpecification implements SqlExpressable, SqlAstNode { +public class TrimSpecification implements SqlExpressible, SqlAstNode { private TrimSpec trimSpec; public TrimSpecification(TrimSpec trimSpec) { diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/UnaryOperation.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/UnaryOperation.java index 36d5f5cbd8..61e03dc817 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/UnaryOperation.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/UnaryOperation.java @@ -8,7 +8,7 @@ package org.hibernate.sql.ast.tree.expression; import org.hibernate.metamodel.mapping.BasicValuedMapping; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.query.sqm.UnaryArithmeticOperator; import org.hibernate.query.sqm.sql.internal.DomainResultProducer; import org.hibernate.sql.ast.SqlAstWalker; @@ -44,7 +44,7 @@ public class UnaryOperation implements Expression, DomainResultProducer { } @Override - public MappingModelExpressable getExpressionType() { + public MappingModelExpressible getExpressionType() { return type; } diff --git a/hibernate-core/src/main/java/org/hibernate/sql/exec/internal/AbstractJdbcParameter.java b/hibernate-core/src/main/java/org/hibernate/sql/exec/internal/AbstractJdbcParameter.java index 6ee8795c23..41c12aa37d 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/exec/internal/AbstractJdbcParameter.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/exec/internal/AbstractJdbcParameter.java @@ -12,8 +12,8 @@ import java.sql.SQLException; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.mapping.IndexedConsumer; import org.hibernate.metamodel.mapping.JdbcMapping; -import org.hibernate.metamodel.mapping.MappingModelExpressable; -import org.hibernate.metamodel.mapping.SqlExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; +import org.hibernate.metamodel.mapping.SqlExpressible; import org.hibernate.query.BindableType; import org.hibernate.sql.ast.Clause; import org.hibernate.sql.ast.spi.SqlSelection; @@ -31,7 +31,7 @@ import org.hibernate.type.spi.TypeConfiguration; * @author Steve Ebersole */ public abstract class AbstractJdbcParameter - implements JdbcParameter, JdbcParameterBinder, MappingModelExpressable, SqlExpressable { + implements JdbcParameter, JdbcParameterBinder, MappingModelExpressible, SqlExpressible { private final JdbcMapping jdbcMapping; @@ -122,7 +122,7 @@ public abstract class AbstractJdbcParameter } @Override - public MappingModelExpressable getExpressionType() { + public MappingModelExpressible getExpressionType() { return this; } diff --git a/hibernate-core/src/main/java/org/hibernate/sql/exec/internal/JdbcCallParameterExtractorImpl.java b/hibernate-core/src/main/java/org/hibernate/sql/exec/internal/JdbcCallParameterExtractorImpl.java index 1032b1f480..1839595348 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/exec/internal/JdbcCallParameterExtractorImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/exec/internal/JdbcCallParameterExtractorImpl.java @@ -63,7 +63,7 @@ public class JdbcCallParameterExtractorImpl implements JdbcCallParameterExtra final boolean useNamed = shouldUseJdbcNamedParameters && parameterName != null; - // todo (6.0) : we should just ask BasicValuedExpressableType for the JdbcValueExtractor... + // todo (6.0) : we should just ask BasicValuedExpressibleType for the JdbcValueExtractor... try { diff --git a/hibernate-core/src/main/java/org/hibernate/sql/results/internal/SqlSelectionImpl.java b/hibernate-core/src/main/java/org/hibernate/sql/results/internal/SqlSelectionImpl.java index c19beec44a..b5515b11f3 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/results/internal/SqlSelectionImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/results/internal/SqlSelectionImpl.java @@ -10,8 +10,7 @@ import java.util.Objects; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.metamodel.mapping.JdbcMappingContainer; -import org.hibernate.metamodel.mapping.SqlExpressable; -import org.hibernate.query.results.ResultSetMappingSqlSelection; +import org.hibernate.metamodel.mapping.SqlExpressible; import org.hibernate.sql.ast.SqlAstWalker; import org.hibernate.sql.ast.spi.SqlExpressionAccess; import org.hibernate.sql.ast.spi.SqlSelection; @@ -58,7 +57,7 @@ public class SqlSelectionImpl implements SqlSelection, SqlExpressionAccess { @Override public ValueExtractor getJdbcValueExtractor() { - return ( (SqlExpressable) sqlExpression.getExpressionType() ).getJdbcMapping().getJdbcValueExtractor(); + return ( (SqlExpressible) sqlExpression.getExpressionType() ).getJdbcMapping().getJdbcValueExtractor(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/type/AbstractStandardBasicType.java b/hibernate-core/src/main/java/org/hibernate/type/AbstractStandardBasicType.java index edcad4fdb9..4d130fd080 100644 --- a/hibernate-core/src/main/java/org/hibernate/type/AbstractStandardBasicType.java +++ b/hibernate-core/src/main/java/org/hibernate/type/AbstractStandardBasicType.java @@ -66,7 +66,7 @@ public abstract class AbstractStandardBasicType @Override public Class getJavaType() { - return this.getExpressableJavaType().getJavaTypeClass(); + return this.getExpressibleJavaType().getJavaTypeClass(); } public T fromString(CharSequence string) { diff --git a/hibernate-core/src/main/java/org/hibernate/type/BasicType.java b/hibernate-core/src/main/java/org/hibernate/type/BasicType.java index 06c5658311..b8205d5231 100644 --- a/hibernate-core/src/main/java/org/hibernate/type/BasicType.java +++ b/hibernate-core/src/main/java/org/hibernate/type/BasicType.java @@ -44,7 +44,7 @@ public interface BasicType extends Type, BasicDomainType, MappingType, Bas } @Override - default JavaType getExpressableJavaType() { + default JavaType getExpressibleJavaType() { return getJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/type/BasicTypeReference.java b/hibernate-core/src/main/java/org/hibernate/type/BasicTypeReference.java index 4650595a6b..f6c9630885 100644 --- a/hibernate-core/src/main/java/org/hibernate/type/BasicTypeReference.java +++ b/hibernate-core/src/main/java/org/hibernate/type/BasicTypeReference.java @@ -11,7 +11,7 @@ import java.io.Serializable; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.metamodel.model.convert.spi.BasicValueConverter; import org.hibernate.query.BindableType; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; /** * A basic type reference. @@ -83,7 +83,7 @@ public final class BasicTypeReference implements BindableType, Serializabl } @Override - public SqmExpressable resolveExpressable(SessionFactoryImplementor sessionFactory) { + public SqmExpressible resolveExpressible(SessionFactoryImplementor sessionFactory) { return sessionFactory.getTypeConfiguration().getBasicTypeRegistry().resolve( this ); } } diff --git a/hibernate-core/src/main/java/org/hibernate/type/ComponentType.java b/hibernate-core/src/main/java/org/hibernate/type/ComponentType.java index f4e28c814d..243405a4b4 100644 --- a/hibernate-core/src/main/java/org/hibernate/type/ComponentType.java +++ b/hibernate-core/src/main/java/org/hibernate/type/ComponentType.java @@ -37,7 +37,7 @@ import org.hibernate.metamodel.EmbeddableInstantiator; import org.hibernate.metamodel.mapping.EmbeddableValuedModelPart; import org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess; import org.hibernate.property.access.spi.PropertyAccess; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.tuple.PropertyFactory; import org.hibernate.tuple.StandardProperty; import org.hibernate.tuple.ValueGeneration; @@ -793,7 +793,7 @@ public class ComponentType extends AbstractType implements CompositeTypeImplemen } @Override - public SqmExpressable resolveExpressable(SessionFactoryImplementor sessionFactory) { + public SqmExpressible resolveExpressible(SessionFactoryImplementor sessionFactory) { return sessionFactory.getRuntimeMetamodels().getJpaMetamodel().embeddable( getReturnedClass() ); } diff --git a/hibernate-core/src/main/java/org/hibernate/type/CustomType.java b/hibernate-core/src/main/java/org/hibernate/type/CustomType.java index 22a9166d59..2977d4307b 100644 --- a/hibernate-core/src/main/java/org/hibernate/type/CustomType.java +++ b/hibernate-core/src/main/java/org/hibernate/type/CustomType.java @@ -23,7 +23,7 @@ import org.hibernate.type.descriptor.ValueBinder; import org.hibernate.type.descriptor.ValueExtractor; import org.hibernate.type.descriptor.java.BasicJavaType; import org.hibernate.type.descriptor.java.JavaType; -import org.hibernate.type.descriptor.java.JavaTypedExpressable; +import org.hibernate.type.descriptor.java.JavaTypedExpressible; import org.hibernate.type.descriptor.jdbc.JdbcType; import org.hibernate.type.internal.UserTypeJavaTypeWrapper; import org.hibernate.type.internal.UserTypeSqlTypeAdapter; @@ -74,9 +74,9 @@ public class CustomType //noinspection unchecked this.mappedJavaType = ( (BasicJavaType) userType ); } - else if ( userType instanceof JavaTypedExpressable ) { + else if ( userType instanceof JavaTypedExpressible) { //noinspection unchecked - this.mappedJavaType = (BasicJavaType) ( (JavaTypedExpressable) userType ).getExpressableJavaType(); + this.mappedJavaType = (BasicJavaType) ( (JavaTypedExpressible) userType ).getExpressibleJavaType(); } else if ( userType instanceof UserVersionType ) { this.mappedJavaType = new UserTypeVersionJavaTypeWrapper<>( (UserVersionType) userType ); @@ -305,7 +305,7 @@ public class CustomType } @Override - public JavaType getExpressableJavaType() { + public JavaType getExpressibleJavaType() { return this.getMappedJavaType(); } diff --git a/hibernate-core/src/main/java/org/hibernate/type/SerializableToBlobType.java b/hibernate-core/src/main/java/org/hibernate/type/SerializableToBlobType.java index 40f6c15527..00b2e75b83 100644 --- a/hibernate-core/src/main/java/org/hibernate/type/SerializableToBlobType.java +++ b/hibernate-core/src/main/java/org/hibernate/type/SerializableToBlobType.java @@ -109,7 +109,7 @@ public class SerializableToBlobType implements BasicType @Override public Class getJavaType() { - return this.getExpressableJavaType().getJavaTypeClass(); + return this.getExpressibleJavaType().getJavaTypeClass(); } public T fromString(CharSequence string) { diff --git a/hibernate-core/src/main/java/org/hibernate/type/descriptor/java/JavaTypedExpressable.java b/hibernate-core/src/main/java/org/hibernate/type/descriptor/java/JavaTypedExpressible.java similarity index 80% rename from hibernate-core/src/main/java/org/hibernate/type/descriptor/java/JavaTypedExpressable.java rename to hibernate-core/src/main/java/org/hibernate/type/descriptor/java/JavaTypedExpressible.java index 84410691d1..066b22bfa4 100644 --- a/hibernate-core/src/main/java/org/hibernate/type/descriptor/java/JavaTypedExpressable.java +++ b/hibernate-core/src/main/java/org/hibernate/type/descriptor/java/JavaTypedExpressible.java @@ -9,6 +9,6 @@ package org.hibernate.type.descriptor.java; /** * Contract for something that has an associated JavaType */ -public interface JavaTypedExpressable { - JavaType getExpressableJavaType(); +public interface JavaTypedExpressible { + JavaType getExpressibleJavaType(); } diff --git a/hibernate-core/src/main/java/org/hibernate/type/spi/TypeConfiguration.java b/hibernate-core/src/main/java/org/hibernate/type/spi/TypeConfiguration.java index 960ec29e0b..c9caa7a400 100644 --- a/hibernate-core/src/main/java/org/hibernate/type/spi/TypeConfiguration.java +++ b/hibernate-core/src/main/java/org/hibernate/type/spi/TypeConfiguration.java @@ -45,13 +45,13 @@ import org.hibernate.internal.SessionFactoryRegistry; import org.hibernate.metamodel.mapping.BasicValuedMapping; import org.hibernate.metamodel.mapping.JdbcMapping; import org.hibernate.metamodel.mapping.JdbcMappingContainer; -import org.hibernate.metamodel.mapping.MappingModelExpressable; +import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.metamodel.model.domain.internal.ArrayTupleType; import org.hibernate.metamodel.model.domain.internal.MappingMetamodelImpl; import org.hibernate.query.sqm.BinaryArithmeticOperator; import org.hibernate.query.sqm.IntervalType; import org.hibernate.query.internal.QueryHelper; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.tree.SqmTypedNode; import org.hibernate.service.ServiceRegistry; import org.hibernate.type.BasicType; @@ -459,12 +459,12 @@ public class TypeConfiguration implements SessionFactoryObserver, Serializable { private final ConcurrentMap arrayTuples = new ConcurrentHashMap<>(); - public SqmExpressable resolveTupleType(List> typedNodes) { - final SqmExpressable[] components = new SqmExpressable[typedNodes.size()]; + public SqmExpressible resolveTupleType(List> typedNodes) { + final SqmExpressible[] components = new SqmExpressible[typedNodes.size()]; for ( int i = 0; i < typedNodes.size(); i++ ) { - final SqmExpressable sqmExpressable = typedNodes.get( i ).getNodeType(); - components[i] = sqmExpressable != null - ? sqmExpressable + final SqmExpressible sqmExpressible = typedNodes.get( i ).getNodeType(); + components[i] = sqmExpressible != null + ? sqmExpressible : getBasicTypeForJavaType( Object.class ); } return arrayTuples.computeIfAbsent( @@ -474,9 +474,9 @@ public class TypeConfiguration implements SessionFactoryObserver, Serializable { } private static class ArrayCacheKey { - final SqmExpressable[] components; + final SqmExpressible[] components; - public ArrayCacheKey(SqmExpressable[] components) { + public ArrayCacheKey(SqmExpressible[] components) { this.components = components; } @@ -494,9 +494,9 @@ public class TypeConfiguration implements SessionFactoryObserver, Serializable { /** * @see QueryHelper#highestPrecedenceType2 */ - public SqmExpressable resolveArithmeticType( - SqmExpressable firstType, - SqmExpressable secondType, + public SqmExpressible resolveArithmeticType( + SqmExpressible firstType, + SqmExpressible secondType, BinaryArithmeticOperator operator) { return resolveArithmeticType( firstType, secondType ); } @@ -507,9 +507,9 @@ public class TypeConfiguration implements SessionFactoryObserver, Serializable { * * @see QueryHelper#highestPrecedenceType2 */ - public SqmExpressable resolveArithmeticType( - SqmExpressable firstType, - SqmExpressable secondType) { + public SqmExpressible resolveArithmeticType( + SqmExpressible firstType, + SqmExpressible secondType) { if ( getSqlTemporalType( firstType ) != null ) { if ( secondType==null || getSqlTemporalType( secondType ) != null ) { @@ -535,15 +535,15 @@ public class TypeConfiguration implements SessionFactoryObserver, Serializable { } if ( secondType == null || firstType != null - && firstType.getExpressableJavaType().isWider( secondType.getExpressableJavaType() ) ) { + && firstType.getExpressibleJavaType().isWider( secondType.getExpressibleJavaType() ) ) { return firstType; } return secondType; } - private static boolean matchesJavaType(SqmExpressable type, Class javaType) { + private static boolean matchesJavaType(SqmExpressible type, Class javaType) { assert javaType != null; - return type != null && javaType.isAssignableFrom( type.getExpressableJavaType().getJavaTypeClass() ); + return type != null && javaType.isAssignableFrom( type.getExpressibleJavaType().getJavaTypeClass() ); } @@ -601,11 +601,11 @@ public class TypeConfiguration implements SessionFactoryObserver, Serializable { ); } - public TemporalType getSqlTemporalType(SqmExpressable type) { + public TemporalType getSqlTemporalType(SqmExpressible type) { if ( type == null ) { return null; } - return getSqlTemporalType( type.getExpressableJavaType().getRecommendedJdbcType( getCurrentBaseSqlTypeIndicators() ) ); + return getSqlTemporalType( type.getExpressibleJavaType().getRecommendedJdbcType( getCurrentBaseSqlTypeIndicators() ) ); } public static TemporalType getSqlTemporalType(JdbcMapping jdbcMapping) { @@ -617,7 +617,7 @@ public class TypeConfiguration implements SessionFactoryObserver, Serializable { return getSqlTemporalType( jdbcMappings.getJdbcMappings().get( 0 ).getJdbcType() ); } - public static TemporalType getSqlTemporalType(MappingModelExpressable type) { + public static TemporalType getSqlTemporalType(MappingModelExpressible type) { if ( type instanceof BasicValuedMapping ) { return getSqlTemporalType( ( (BasicValuedMapping) type ).getJdbcMapping().getJdbcType() ); } @@ -659,11 +659,11 @@ public class TypeConfiguration implements SessionFactoryObserver, Serializable { return null; } - public static boolean isJdbcTemporalType(SqmExpressable type) { + public static boolean isJdbcTemporalType(SqmExpressible type) { return matchesJavaType( type, Date.class ); } - public static boolean isDuration(SqmExpressable type) { + public static boolean isDuration(SqmExpressible type) { return matchesJavaType( type, Duration.class ); } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/hql/ASTParserLoadingTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/ASTParserLoadingTest.java index 6e8f92e5d6..2241e5b6bc 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/hql/ASTParserLoadingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/ASTParserLoadingTest.java @@ -49,7 +49,7 @@ import org.hibernate.orm.test.any.hbm.StringPropertyValue; import org.hibernate.query.Query; import org.hibernate.query.spi.QueryImplementor; import org.hibernate.query.sqm.ParsingException; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.internal.QuerySqmImpl; import org.hibernate.query.sqm.tree.domain.SqmPath; import org.hibernate.query.sqm.tree.expression.SqmFunction; @@ -1578,7 +1578,7 @@ public class ASTParserLoadingTest extends BaseCoreFunctionalTestCase { final SqmSelectStatement sqmStatement = (SqmSelectStatement) query.unwrap( QuerySqmImpl.class ).getSqmStatement(); assertEquals( 1, sqmStatement.getQuerySpec().getSelectClause().getSelections().size() ); final SqmSelection selection = sqmStatement.getQuerySpec().getSelectClause().getSelections().get( 0 ); - final SqmExpressable selectionType = selection.getSelectableNode().getNodeType(); + final SqmExpressible selectionType = selection.getSelectableNode().getNodeType(); assertThat( selectionType, CoreMatchers.instanceOf( EmbeddedSqmPathSource.class ) ); assertEquals( Name.class, selection.getNodeJavaType().getJavaTypeClass() ); @@ -1857,9 +1857,9 @@ public class ASTParserLoadingTest extends BaseCoreFunctionalTestCase { final SqmSelectStatement sqmStatement = (SqmSelectStatement) query.unwrap( QuerySqmImpl.class ).getSqmStatement(); assertEquals( 1, sqmStatement.getQuerySpec().getSelectClause().getSelections().size() ); final SqmSelection selection = sqmStatement.getQuerySpec().getSelectClause().getSelections().get( 0 ); - final SqmExpressable selectionType = selection.getSelectableNode().getNodeType(); + final SqmExpressible selectionType = selection.getSelectableNode().getNodeType(); assertThat( selectionType, instanceOf( EntityDomainType.class ) ); - assertThat( selectionType.getExpressableJavaType().getJavaTypeClass(), equalTo( Animal.class ) ); + assertThat( selectionType.getExpressibleJavaType().getJavaTypeClass(), equalTo( Animal.class ) ); } ); Session s = openSession(); diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/sql/ast/SmokeTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/ast/SmokeTests.java index 325d477d07..6ed6868307 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/sql/ast/SmokeTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/ast/SmokeTests.java @@ -179,9 +179,9 @@ public class SmokeTests { final ColumnReference columnReference = (ColumnReference) selectedExpression; assertThat( columnReference.renderSqlFragment( scope.getSessionFactory() ), is( "s1_0.gender" ) ); - final JdbcMappingContainer selectedExpressable = selectedExpression.getExpressionType(); - assertThat( selectedExpressable, instanceOf( BasicTypeImpl.class ) ); - final BasicTypeImpl basicType = (BasicTypeImpl) selectedExpressable; + final JdbcMappingContainer selectedExpressible = selectedExpression.getExpressionType(); + assertThat( selectedExpressible, instanceOf( BasicTypeImpl.class ) ); + final BasicTypeImpl basicType = (BasicTypeImpl) selectedExpressible; assertThat( basicType.getJavaTypeDescriptor().getJavaTypeClass(), AssignableMatcher.assignableTo( Integer.class ) ); assertThat( basicType.getJdbcType(), @@ -190,11 +190,11 @@ public class SmokeTests { assertThat( sqlAst.getDomainResultDescriptors().size(), is( 1 ) ); - final DomainResult domainResult = sqlAst.getDomainResultDescriptors().get( 0 ); + final DomainResult domainResult = sqlAst.getDomainResultDescriptors().get( 0 ); assertThat( domainResult, instanceOf( BasicResult.class ) ); - final BasicResult scalarDomainResult = (BasicResult) domainResult; + final BasicResult scalarDomainResult = (BasicResult) domainResult; assertThat( scalarDomainResult.getAssembler(), instanceOf( BasicResultAssembler.class ) ); - final BasicResultAssembler assembler = (BasicResultAssembler) scalarDomainResult.getAssembler(); + final BasicResultAssembler assembler = (BasicResultAssembler) scalarDomainResult.getAssembler(); assertThat( assembler.getValueConverter(), notNullValue() ); assertThat( assembler.getValueConverter(), instanceOf( OrdinalEnumValueConverter.class ) ); @@ -207,10 +207,10 @@ public class SmokeTests { // ScalarDomainResultImpl creates and caches the assembler at its creation. // this just gets access to that cached one - final DomainResultAssembler resultAssembler = domainResult.createResultAssembler( null, null ); + final DomainResultAssembler resultAssembler = domainResult.createResultAssembler( null, null ); assertThat( resultAssembler, instanceOf( BasicResultAssembler.class ) ); - final BasicValueConverter valueConverter = ( (BasicResultAssembler) resultAssembler ).getValueConverter(); + final BasicValueConverter valueConverter = ( (BasicResultAssembler) resultAssembler ).getValueConverter(); assertThat( valueConverter, notNullValue() ); assertThat( valueConverter, instanceOf( OrdinalEnumValueConverter.class ) ); diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/type/contributor/ArrayType.java b/hibernate-core/src/test/java/org/hibernate/orm/test/type/contributor/ArrayType.java index 746ad10a68..62eda1ff9e 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/type/contributor/ArrayType.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/type/contributor/ArrayType.java @@ -9,7 +9,7 @@ import org.hibernate.HibernateException; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.query.BindableType; -import org.hibernate.query.sqm.SqmExpressable; +import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.type.descriptor.java.BasicJavaType; import org.hibernate.type.descriptor.jdbc.JdbcType; import org.hibernate.type.descriptor.jdbc.VarcharJdbcType; @@ -31,7 +31,7 @@ public class ArrayType implements UserType, BindableType { } @Override - public SqmExpressable resolveExpressable(SessionFactoryImplementor sessionFactory) { + public SqmExpressible resolveExpressible(SessionFactoryImplementor sessionFactory) { // really a UserType should not implement BindableType throw new UnsupportedOperationException(); }