diff --git a/hibernate-core/src/main/java/org/hibernate/query/QueryParameter.java b/hibernate-core/src/main/java/org/hibernate/query/QueryParameter.java index f2dd75a617..a453fab596 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/QueryParameter.java +++ b/hibernate-core/src/main/java/org/hibernate/query/QueryParameter.java @@ -10,7 +10,7 @@ package org.hibernate.query; import javax.persistence.ParameterMode; import org.hibernate.Incubating; -import org.hibernate.metamodel.model.mapping.spi.AllowableParameterType; +import org.hibernate.metamodel.model.domain.AllowableParameterType; /** * Represents a parameter defined in the source (HQL/JPQL or criteria) query. diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/consume/spi/BaseSqmToSqlAstConverter.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/consume/spi/BaseSqmToSqlAstConverter.java index bcb55224c9..f129511986 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/consume/spi/BaseSqmToSqlAstConverter.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/consume/spi/BaseSqmToSqlAstConverter.java @@ -20,7 +20,6 @@ import org.hibernate.engine.spi.LoadQueryInfluencers; import org.hibernate.graph.spi.GraphImplementor; import org.hibernate.internal.util.collections.Stack; import org.hibernate.internal.util.collections.StandardStack; -import org.hibernate.metamodel.model.mapping.spi.AllowableParameterType; import org.hibernate.metamodel.model.mapping.spi.EmbeddedValuedNavigable; import org.hibernate.metamodel.model.mapping.EntityTypeDescriptor; import org.hibernate.metamodel.model.mapping.spi.NavigableContainer; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/SqmCreationHelper.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/SqmCreationHelper.java index 800719a8d5..f50cce70db 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/SqmCreationHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/SqmCreationHelper.java @@ -48,7 +48,7 @@ public class SqmCreationHelper { public static void resolveAsLhs( SqmPath lhs, SqmPath processingPath, - SqmPathSource subNavigable, + SqmPathSource subNavigable, boolean isSubRefTerminal, SqmCreationState creationState) { SqmTreeCreationLogger.LOGGER.tracef( diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/FunctionReturnTypeResolver.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/FunctionReturnTypeResolver.java index 5b9850d172..c34c0e4529 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/FunctionReturnTypeResolver.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/FunctionReturnTypeResolver.java @@ -8,7 +8,7 @@ package org.hibernate.query.sqm.produce.function; import java.util.List; -import org.hibernate.metamodel.model.mapping.spi.AllowableFunctionReturnType; +import org.hibernate.metamodel.model.domain.AllowableFunctionReturnType; import org.hibernate.query.sqm.tree.SqmTypedNode; /** diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/JdbcFunctionEscapeWrapperTemplate.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/JdbcFunctionEscapeWrapperTemplate.java index f27ffda9bf..6a4ff7e12b 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/JdbcFunctionEscapeWrapperTemplate.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/JdbcFunctionEscapeWrapperTemplate.java @@ -8,7 +8,7 @@ package org.hibernate.query.sqm.produce.function; import java.util.List; -import org.hibernate.metamodel.model.mapping.spi.AllowableFunctionReturnType; +import org.hibernate.metamodel.model.domain.AllowableFunctionReturnType; import org.hibernate.query.spi.QueryEngine; import org.hibernate.query.sqm.produce.function.internal.SelfRenderingSqmFunction; import org.hibernate.query.sqm.produce.function.spi.AbstractSqmFunctionTemplate; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/NamedFunctionTemplateBuilder.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/NamedFunctionTemplateBuilder.java index 4da3c116f1..ff7c1fadef 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/NamedFunctionTemplateBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/NamedFunctionTemplateBuilder.java @@ -6,7 +6,7 @@ */ package org.hibernate.query.sqm.produce.function; -import org.hibernate.metamodel.model.mapping.spi.AllowableFunctionReturnType; +import org.hibernate.metamodel.model.domain.AllowableFunctionReturnType; import org.hibernate.query.sqm.produce.function.spi.NamedSqmFunctionTemplate; import org.jboss.logging.Logger; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/PatternFunctionTemplateBuilder.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/PatternFunctionTemplateBuilder.java index 208bc24f9f..658dec36c9 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/PatternFunctionTemplateBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/PatternFunctionTemplateBuilder.java @@ -6,7 +6,7 @@ */ package org.hibernate.query.sqm.produce.function; -import org.hibernate.metamodel.model.mapping.spi.AllowableFunctionReturnType; +import org.hibernate.metamodel.model.domain.AllowableFunctionReturnType; import org.hibernate.query.sqm.produce.function.internal.PatternRenderer; import org.hibernate.query.sqm.produce.function.spi.PatternBasedSqmFunctionTemplate; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/SqmFunctionRegistry.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/SqmFunctionRegistry.java index bc76bb610c..706b8edf32 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/SqmFunctionRegistry.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/SqmFunctionRegistry.java @@ -9,7 +9,7 @@ package org.hibernate.query.sqm.produce.function; import java.util.Map; import java.util.TreeMap; -import org.hibernate.metamodel.model.mapping.spi.AllowableFunctionReturnType; +import org.hibernate.metamodel.model.domain.AllowableFunctionReturnType; import org.jboss.logging.Logger; 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 3db6236bc2..79140ab988 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 @@ -10,10 +10,10 @@ import java.sql.Types; import java.util.List; import java.util.Locale; -import org.hibernate.metamodel.model.mapping.spi.AllowableFunctionReturnType; import org.hibernate.QueryException; +import org.hibernate.metamodel.model.domain.AllowableFunctionReturnType; +import org.hibernate.query.sqm.SqmExpressable; import org.hibernate.query.sqm.tree.SqmTypedNode; -import org.hibernate.sql.ast.produce.metamodel.spi.ExpressableType; /** * @author Steve Ebersole @@ -107,7 +107,7 @@ public class StandardFunctionReturnTypeResolvers { private static AllowableFunctionReturnType extractArgumentType(List> arguments, int position) { final SqmTypedNode specifiedArgument = arguments.get( position-1 ); - final ExpressableType specifiedArgType = specifiedArgument.getNodeType(); + final SqmExpressable specifiedArgType = specifiedArgument.getNodeType(); if ( !(specifiedArgType instanceof AllowableFunctionReturnType) ) { throw new QueryException( String.format( diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/VarArgsFunctionTemplateBuilder.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/VarArgsFunctionTemplateBuilder.java index 17bf65e4f9..3eef7c488b 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/VarArgsFunctionTemplateBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/VarArgsFunctionTemplateBuilder.java @@ -6,7 +6,7 @@ */ package org.hibernate.query.sqm.produce.function; -import org.hibernate.metamodel.model.mapping.spi.AllowableFunctionReturnType; +import org.hibernate.metamodel.model.domain.AllowableFunctionReturnType; import org.hibernate.query.sqm.produce.function.spi.FunctionAsExpressionTemplate; import org.jboss.logging.Logger; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/internal/SelfRenderingSqmFunction.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/internal/SelfRenderingSqmFunction.java index 5e1dfdf3a2..ae69e07b56 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/internal/SelfRenderingSqmFunction.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/internal/SelfRenderingSqmFunction.java @@ -6,7 +6,7 @@ */ package org.hibernate.query.sqm.produce.function.internal; -import org.hibernate.metamodel.model.mapping.spi.AllowableFunctionReturnType; +import org.hibernate.metamodel.model.domain.AllowableFunctionReturnType; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.produce.function.spi.SelfRenderingFunctionSupport; import org.hibernate.query.sqm.tree.SqmTypedNode; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/spi/AbstractSelfRenderingFunctionTemplate.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/spi/AbstractSelfRenderingFunctionTemplate.java index b97cc4f568..115706aaa3 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/spi/AbstractSelfRenderingFunctionTemplate.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/spi/AbstractSelfRenderingFunctionTemplate.java @@ -8,7 +8,7 @@ package org.hibernate.query.sqm.produce.function.spi; import java.util.List; -import org.hibernate.metamodel.model.mapping.spi.AllowableFunctionReturnType; +import org.hibernate.metamodel.model.domain.AllowableFunctionReturnType; import org.hibernate.query.spi.QueryEngine; import org.hibernate.query.sqm.produce.function.ArgumentsValidator; import org.hibernate.query.sqm.produce.function.FunctionReturnTypeResolver; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/spi/AbstractSqmFunctionTemplate.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/spi/AbstractSqmFunctionTemplate.java index 7ad474372a..9c653e8b19 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/spi/AbstractSqmFunctionTemplate.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/spi/AbstractSqmFunctionTemplate.java @@ -8,7 +8,7 @@ package org.hibernate.query.sqm.produce.function.spi; import java.util.List; -import org.hibernate.metamodel.model.mapping.spi.AllowableFunctionReturnType; +import org.hibernate.metamodel.model.domain.AllowableFunctionReturnType; import org.hibernate.query.spi.QueryEngine; import org.hibernate.query.sqm.produce.function.ArgumentsValidator; import org.hibernate.query.sqm.produce.function.FunctionReturnTypeResolver; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/spi/FunctionAsExpressionTemplate.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/spi/FunctionAsExpressionTemplate.java index eb6ff0f4a5..79be655c6a 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/spi/FunctionAsExpressionTemplate.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/spi/FunctionAsExpressionTemplate.java @@ -9,7 +9,7 @@ package org.hibernate.query.sqm.produce.function.spi; import java.util.List; import org.hibernate.engine.spi.SessionFactoryImplementor; -import org.hibernate.metamodel.model.mapping.spi.AllowableFunctionReturnType; +import org.hibernate.metamodel.model.domain.AllowableFunctionReturnType; import org.hibernate.query.spi.QueryEngine; import org.hibernate.query.sqm.produce.function.ArgumentsValidator; import org.hibernate.query.sqm.produce.function.FunctionReturnTypeResolver; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/spi/NamedSqmFunctionTemplate.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/spi/NamedSqmFunctionTemplate.java index d9b80ed36f..11585c983f 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/spi/NamedSqmFunctionTemplate.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/spi/NamedSqmFunctionTemplate.java @@ -7,7 +7,7 @@ package org.hibernate.query.sqm.produce.function.spi; import org.hibernate.engine.spi.SessionFactoryImplementor; -import org.hibernate.metamodel.model.mapping.spi.AllowableFunctionReturnType; +import org.hibernate.metamodel.model.domain.AllowableFunctionReturnType; import org.hibernate.query.spi.QueryEngine; import org.hibernate.query.sqm.produce.function.ArgumentsValidator; import org.hibernate.query.sqm.produce.function.FunctionReturnTypeResolver; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/spi/PairedFunctionTemplate.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/spi/PairedFunctionTemplate.java index fdd22231e8..34ae6a3011 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/spi/PairedFunctionTemplate.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/spi/PairedFunctionTemplate.java @@ -6,7 +6,7 @@ */ package org.hibernate.query.sqm.produce.function.spi; -import org.hibernate.metamodel.model.mapping.spi.AllowableFunctionReturnType; +import org.hibernate.metamodel.model.domain.AllowableFunctionReturnType; import org.hibernate.query.spi.QueryEngine; import org.hibernate.query.sqm.produce.function.SqmFunctionTemplate; import org.hibernate.query.sqm.produce.function.StandardArgumentsValidators; @@ -35,7 +35,8 @@ public class PairedFunctionTemplate extends AbstractSqmFunctionTemplate { QueryEngine queryEngine, String name, AllowableFunctionReturnType type, - String pattern2, String pattern3) { + String pattern2, + String pattern3) { queryEngine.getSqmFunctionRegistry().register( name, new PairedFunctionTemplate( @@ -53,6 +54,7 @@ public class PairedFunctionTemplate extends AbstractSqmFunctionTemplate { ); } + @Override protected SelfRenderingSqmFunction generateSqmFunctionExpression( List> arguments, diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/spi/PatternBasedSqmFunctionTemplate.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/spi/PatternBasedSqmFunctionTemplate.java index 902fbeb9bc..e9ec0d7a00 100755 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/spi/PatternBasedSqmFunctionTemplate.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/spi/PatternBasedSqmFunctionTemplate.java @@ -7,7 +7,7 @@ package org.hibernate.query.sqm.produce.function.spi; import org.hibernate.engine.spi.SessionFactoryImplementor; -import org.hibernate.metamodel.model.mapping.spi.AllowableFunctionReturnType; +import org.hibernate.metamodel.model.domain.AllowableFunctionReturnType; import org.hibernate.query.spi.QueryEngine; import org.hibernate.query.sqm.produce.function.ArgumentsValidator; import org.hibernate.query.sqm.produce.function.FunctionReturnTypeResolver; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/path/internal/SqmStaticEnumReference.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/path/internal/SqmStaticEnumReference.java index 1b7ade9c14..4738ce745a 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/path/internal/SqmStaticEnumReference.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/path/internal/SqmStaticEnumReference.java @@ -13,6 +13,7 @@ import javax.persistence.criteria.Expression; import org.hibernate.metamodel.model.mapping.spi.BasicValuedNavigable; import org.hibernate.query.sqm.NodeBuilder; +import org.hibernate.query.sqm.SqmExpressable; import org.hibernate.query.sqm.consume.spi.SemanticQueryWalker; import org.hibernate.query.sqm.produce.path.spi.SemanticPathPart; import org.hibernate.query.sqm.produce.spi.SqmCreationState; @@ -22,7 +23,6 @@ import org.hibernate.query.sqm.tree.expression.SqmExpression; import org.hibernate.query.sqm.tree.expression.SqmLiteral; import org.hibernate.query.sqm.tree.predicate.SqmPredicate; import org.hibernate.sql.ast.produce.metamodel.spi.BasicValuedExpressableType; -import org.hibernate.sql.ast.produce.metamodel.spi.ExpressableType; import org.hibernate.type.descriptor.java.spi.EnumJavaDescriptor; import org.hibernate.type.spi.StandardSpiBasicTypes; @@ -65,7 +65,7 @@ public class SqmStaticEnumReference> } @Override - protected void internalApplyInferableType(ExpressableType newType) { + protected void internalApplyInferableType(SqmExpressable newType) { //noinspection StatementWithEmptyBody if ( newType instanceof BasicValuedNavigable ) { final BasicValuedNavigable basicValuedNavigable = (BasicValuedNavigable) newType; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/path/internal/SqmStaticFieldReference.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/path/internal/SqmStaticFieldReference.java index 11e912a391..93af49860a 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/path/internal/SqmStaticFieldReference.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/path/internal/SqmStaticFieldReference.java @@ -12,6 +12,7 @@ import java.math.BigInteger; import org.hibernate.metamodel.model.mapping.spi.BasicValuedNavigable; import org.hibernate.query.sqm.NodeBuilder; +import org.hibernate.query.sqm.SqmExpressable; import org.hibernate.query.sqm.consume.spi.SemanticQueryWalker; import org.hibernate.query.sqm.produce.SqmProductionException; import org.hibernate.query.sqm.produce.path.spi.SemanticPathPart; @@ -21,7 +22,6 @@ import org.hibernate.query.sqm.tree.expression.AbstractSqmExpression; import org.hibernate.query.sqm.tree.expression.SqmExpression; import org.hibernate.query.sqm.tree.expression.SqmLiteral; import org.hibernate.sql.ast.produce.metamodel.spi.BasicValuedExpressableType; -import org.hibernate.sql.ast.produce.metamodel.spi.ExpressableType; import org.hibernate.type.descriptor.java.spi.BasicJavaDescriptor; /** @@ -78,7 +78,7 @@ public class SqmStaticFieldReference } @Override - protected void internalApplyInferableType(ExpressableType newType) { + protected void internalApplyInferableType(SqmExpressable newType) { //noinspection StatementWithEmptyBody if ( newType instanceof BasicValuedNavigable ) { // basic valued navigable may have a ValueConverter associated diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/AbstractSqmAttributeJoin.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/AbstractSqmAttributeJoin.java index 0eb6f24920..9316532530 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/AbstractSqmAttributeJoin.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/AbstractSqmAttributeJoin.java @@ -45,7 +45,7 @@ public abstract class AbstractSqmAttributeJoin @SuppressWarnings("WeakerAccess") public AbstractSqmAttributeJoin( SqmFrom lhs, - SqmJoinable joinedNavigable, + SqmJoinable joinedNavigable, String alias, SqmJoinType joinType, boolean fetched, 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 2ae0047f97..20e7ca499d 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 @@ -60,7 +60,7 @@ public interface SqmPath extends SqmExpression, SemanticPathPart, JpaPath< SqmPathSource getNodeType(); @Override - default void applyInferableType(SqmExpressable type) { + default void applyInferableType(SqmExpressable type) { // do nothing } 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 0053ce7970..38d276a79a 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 @@ -17,6 +17,7 @@ import org.hibernate.query.sqm.SqmExpressable; import org.hibernate.query.sqm.produce.SqmTreeCreationLogger; import org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection; import org.hibernate.query.sqm.tree.predicate.SqmPredicate; +import org.hibernate.type.descriptor.java.JavaTypeDescriptor; import static org.hibernate.query.internal.QueryHelper.highestPrecedenceType; @@ -130,4 +131,9 @@ public abstract class AbstractSqmExpression extends AbstractJpaSelection i setAlias( name ); return this; } + + @Override + public JavaTypeDescriptor getJavaTypeDescriptor() { + return getNodeType().getExpressableJavaTypeDescriptor(); + } } 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 df01e1dff5..9eddc30a23 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 @@ -6,7 +6,7 @@ */ package org.hibernate.query.sqm.tree.expression; -import org.hibernate.metamodel.model.mapping.spi.AllowableParameterType; +import org.hibernate.metamodel.model.domain.AllowableParameterType; import org.hibernate.query.sqm.NodeBuilder; /** diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/Compatibility.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/Compatibility.java index cc927d5293..f16d656b6a 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/Compatibility.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/Compatibility.java @@ -9,7 +9,7 @@ package org.hibernate.query.sqm.tree.expression; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import org.hibernate.type.descriptor.java.spi.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaTypeDescriptor; /** * @author Steve Ebersole 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 76755af305..4553bc4496 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 @@ -9,9 +9,9 @@ package org.hibernate.query.sqm.tree.expression; import org.hibernate.metamodel.spi.MetamodelImplementor; import org.hibernate.query.BinaryArithmeticOperator; import org.hibernate.query.sqm.NodeBuilder; +import org.hibernate.query.sqm.SqmExpressable; import org.hibernate.query.sqm.consume.spi.SemanticQueryWalker; import org.hibernate.sql.ast.produce.metamodel.spi.BasicValuedExpressableType; -import org.hibernate.sql.ast.produce.metamodel.spi.ExpressableType; /** * @author Steve Ebersole @@ -29,7 +29,7 @@ public class SqmBinaryArithmetic extends AbstractSqmExpression { NodeBuilder nodeBuilder) { //noinspection unchecked super( - (ExpressableType) domainModel.getTypeConfiguration().resolveArithmeticType( + (SqmExpressable) domainModel.getTypeConfiguration().resolveArithmeticType( (BasicValuedExpressableType) lhsOperand.getNodeType(), (BasicValuedExpressableType) rhsOperand.getNodeType(), operator @@ -99,7 +99,7 @@ public class SqmBinaryArithmetic extends AbstractSqmExpression { } @Override - protected void internalApplyInferableType(ExpressableType type) { + protected void internalApplyInferableType(SqmExpressable type) { rhsOperand.applyInferableType( type ); lhsOperand.applyInferableType( type ); 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 99618764ed..9e05a6ef7a 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 @@ -14,10 +14,9 @@ import javax.persistence.criteria.Expression; import org.hibernate.query.criteria.JpaExpression; import org.hibernate.query.criteria.JpaSearchedCase; import org.hibernate.query.sqm.NodeBuilder; +import org.hibernate.query.sqm.SqmExpressable; import org.hibernate.query.sqm.consume.spi.SemanticQueryWalker; import org.hibernate.query.sqm.tree.predicate.SqmPredicate; -import org.hibernate.sql.ast.produce.metamodel.spi.BasicValuedExpressableType; -import org.hibernate.sql.ast.produce.metamodel.spi.ExpressableType; /** * @author Steve Ebersole @@ -53,7 +52,7 @@ public class SqmCaseSearched extends AbstractSqmExpression implements JpaS } @Override - protected void internalApplyInferableType(ExpressableType newType) { + protected void internalApplyInferableType(SqmExpressable newType) { super.internalApplyInferableType( newType ); if ( otherwise != null ) { diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCriteriaParameter.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCriteriaParameter.java index a2c5f6e011..3d02691017 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCriteriaParameter.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmCriteriaParameter.java @@ -6,14 +6,13 @@ */ package org.hibernate.query.sqm.tree.expression; -import org.hibernate.metamodel.model.mapping.spi.AllowableParameterType; +import org.hibernate.metamodel.model.domain.AllowableParameterType; import org.hibernate.query.ParameterMetadata; import org.hibernate.query.named.spi.ParameterMemento; import org.hibernate.query.spi.QueryParameterImplementor; import org.hibernate.query.sqm.NodeBuilder; +import org.hibernate.query.sqm.SqmExpressable; import org.hibernate.query.sqm.consume.spi.SemanticQueryWalker; -import org.hibernate.sql.ast.produce.metamodel.spi.ExpressableType; -import org.hibernate.type.descriptor.java.spi.JavaTypeDescriptor; /** * SqmParameter created via JPA {@link javax.persistence.criteria.CriteriaBuilder} @@ -102,15 +101,10 @@ public class SqmCriteriaParameter } @Override - protected void internalApplyInferableType(ExpressableType newType) { + protected void internalApplyInferableType(SqmExpressable newType) { super.internalApplyInferableType( newType ); } - @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { - return this.getNodeType().getJavaTypeDescriptor(); - } - @Override public X accept(SemanticQueryWalker walker) { return walker.visitCriteriaParameter( this ); 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 f982a717cb..abb9007cbf 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 @@ -6,7 +6,7 @@ */ package org.hibernate.query.sqm.tree.expression; -import org.hibernate.metamodel.model.mapping.spi.AllowableParameterType; +import org.hibernate.metamodel.model.domain.AllowableParameterType; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.consume.spi.SemanticQueryWalker; 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 0e0eb6b2db..3b09505c13 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 @@ -6,7 +6,7 @@ */ package org.hibernate.query.sqm.tree.expression; -import org.hibernate.metamodel.model.mapping.spi.AllowableParameterType; +import org.hibernate.metamodel.model.domain.AllowableParameterType; import org.hibernate.query.criteria.JpaParameterExpression; /** 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 2ccc958686..1c070ec22d 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 @@ -7,13 +7,12 @@ package org.hibernate.query.sqm.tree.expression; import org.hibernate.query.sqm.NodeBuilder; +import org.hibernate.query.sqm.SqmExpressable; import org.hibernate.query.sqm.consume.spi.SemanticQueryWalker; import org.hibernate.sql.ast.produce.metamodel.spi.EntityValuedExpressableType; -import org.hibernate.sql.ast.produce.metamodel.spi.ExpressableType; import org.hibernate.sql.results.spi.DomainResult; import org.hibernate.sql.results.spi.DomainResultCreationState; import org.hibernate.sql.results.spi.DomainResultProducer; -import org.hibernate.type.descriptor.java.spi.JavaTypeDescriptor; /** * Entity type expression based on a parameter - `TYPE( :someParam )` @@ -35,7 +34,7 @@ public class SqmParameterizedEntityType extends AbstractSqmExpression impl } @Override - public void internalApplyInferableType(ExpressableType type) { + public void internalApplyInferableType(SqmExpressable type) { setExpressableType( type ); //noinspection unchecked @@ -60,8 +59,4 @@ public class SqmParameterizedEntityType extends AbstractSqmExpression impl // todo (6.0) : but could be ^^ - consider adding support for this (returning Class) } - @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { - return getNodeType().getJavaTypeDescriptor(); - } } 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 a19e6eb073..5f5fc0680e 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 @@ -6,7 +6,7 @@ */ package org.hibernate.query.sqm.tree.expression; -import org.hibernate.metamodel.model.mapping.spi.AllowableParameterType; +import org.hibernate.metamodel.model.domain.AllowableParameterType; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.consume.spi.SemanticQueryWalker; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmRestrictedSubQueryExpression.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmRestrictedSubQueryExpression.java index 13b32481ca..d84e265feb 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmRestrictedSubQueryExpression.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmRestrictedSubQueryExpression.java @@ -7,9 +7,9 @@ package org.hibernate.query.sqm.tree.expression; import org.hibernate.query.sqm.NodeBuilder; +import org.hibernate.query.sqm.SqmExpressable; import org.hibernate.query.sqm.tree.select.SqmSubQuery; import org.hibernate.query.sqm.consume.spi.SemanticQueryWalker; -import org.hibernate.sql.ast.produce.metamodel.spi.ExpressableType; /** * Represents a {@link Modifier#ALL}, {@link Modifier#ANY}, {@link Modifier#SOME} modifier appplied to a subquery as @@ -42,7 +42,7 @@ public class SqmRestrictedSubQueryExpression extends AbstractSqmExpression public SqmRestrictedSubQueryExpression( SqmSubQuery subQuery, Modifier modifier, - ExpressableType resultType, + SqmExpressable resultType, NodeBuilder builder) { super( resultType, builder ); this.subQuery = subQuery; 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 a4c50b28d9..1e871cd59e 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 @@ -13,10 +13,9 @@ import org.hibernate.QueryException; import org.hibernate.query.criteria.JpaCompoundSelection; import org.hibernate.query.criteria.JpaSelection; import org.hibernate.query.sqm.NodeBuilder; +import org.hibernate.query.sqm.SqmExpressable; import org.hibernate.query.sqm.consume.spi.SemanticQueryWalker; -import org.hibernate.sql.ast.produce.metamodel.spi.ExpressableType; -import org.hibernate.type.descriptor.java.spi.JavaTypeDescriptor; - +import org.hibernate.type.descriptor.java.JavaTypeDescriptor; /** * Models a tuple of values, generally defined as a series of values @@ -37,7 +36,7 @@ public class SqmTuple extends AbstractSqmExpression implements JpaCompound this( Arrays.asList( groupedExpressions ), nodeBuilder ); } - public SqmTuple(NodeBuilder nodeBuilder, ExpressableType type, SqmExpression... groupedExpressions) { + public SqmTuple(NodeBuilder nodeBuilder, SqmExpressable type, SqmExpression... groupedExpressions) { this( Arrays.asList( groupedExpressions ), nodeBuilder ); applyInferableType( type ); } @@ -50,21 +49,21 @@ public class SqmTuple extends AbstractSqmExpression implements JpaCompound this.groupedExpressions = groupedExpressions; } - public SqmTuple(List> groupedExpressions, ExpressableType type, NodeBuilder nodeBuilder) { + public SqmTuple(List> groupedExpressions, SqmExpressable type, NodeBuilder nodeBuilder) { this( groupedExpressions, nodeBuilder ); applyInferableType( type ); } @Override - public ExpressableType getNodeType() { - final ExpressableType expressableType = super.getNodeType(); + public SqmExpressable getNodeType() { + final SqmExpressable expressableType = super.getNodeType(); if ( expressableType != null ) { return expressableType; } for ( SqmExpression groupedExpression : groupedExpressions ) { //noinspection unchecked - final ExpressableType groupedExpressionExpressableType = groupedExpression.getNodeType(); + final SqmExpressable groupedExpressionExpressableType = groupedExpression.getNodeType(); if ( groupedExpressionExpressableType != null ) { return groupedExpressionExpressableType; } @@ -85,7 +84,7 @@ public class SqmTuple extends AbstractSqmExpression implements JpaCompound @Override public JavaTypeDescriptor getJavaTypeDescriptor() { - return getNodeType().getJavaTypeDescriptor(); + return getNodeType().getExpressableJavaTypeDescriptor(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/function/SqmCastTarget.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/function/SqmCastTarget.java index 2369c3a1cb..fe4acf7e96 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/function/SqmCastTarget.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/function/SqmCastTarget.java @@ -6,13 +6,13 @@ */ package org.hibernate.query.sqm.tree.expression.function; -import org.hibernate.metamodel.model.mapping.spi.AllowableFunctionReturnType; +import org.hibernate.metamodel.model.domain.AllowableFunctionReturnType; import org.hibernate.query.sqm.NodeBuilder; +import org.hibernate.query.sqm.SqmExpressable; import org.hibernate.query.sqm.consume.spi.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.sql.ast.produce.metamodel.spi.ExpressableType; /** * @author Gavin King @@ -35,7 +35,7 @@ public class SqmCastTarget extends AbstractSqmNode implements SqmTypedNode } @Override - public ExpressableType getNodeType() { + public SqmExpressable getNodeType() { return type; } } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/function/SqmCoalesce.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/function/SqmCoalesce.java index 5862eb35b3..2918fef174 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/function/SqmCoalesce.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/function/SqmCoalesce.java @@ -11,7 +11,7 @@ import java.util.List; import javax.persistence.criteria.Expression; -import org.hibernate.metamodel.model.mapping.spi.AllowableFunctionReturnType; +import org.hibernate.metamodel.model.domain.AllowableFunctionReturnType; import org.hibernate.query.criteria.JpaCoalesce; import org.hibernate.query.criteria.JpaExpression; import org.hibernate.query.sqm.NodeBuilder; @@ -19,7 +19,6 @@ import org.hibernate.query.sqm.consume.spi.SemanticQueryWalker; import org.hibernate.query.sqm.produce.function.SqmFunctionTemplate; import org.hibernate.query.sqm.tree.expression.AbstractSqmExpression; import org.hibernate.query.sqm.tree.expression.SqmExpression; -import org.hibernate.type.descriptor.java.spi.JavaTypeDescriptor; /** * @author Steve Ebersole @@ -39,15 +38,6 @@ public class SqmCoalesce extends AbstractSqmExpression implements JpaCoale coalesceFunction = nodeBuilder.getQueryEngine().getSqmFunctionRegistry().findFunctionTemplate("coalesce"); } - @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { - if ( getNodeType() == null ) { - return null; - } - - return getNodeType().getExpressableJavaTypeDescriptor(); - } - public void value(SqmExpression expression) { arguments.add( expression ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/function/SqmDistinct.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/function/SqmDistinct.java index 7e259e2298..d2344cf387 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/function/SqmDistinct.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/function/SqmDistinct.java @@ -7,12 +7,12 @@ package org.hibernate.query.sqm.tree.expression.function; import org.hibernate.query.sqm.NodeBuilder; +import org.hibernate.query.sqm.SqmExpressable; import org.hibernate.query.sqm.consume.spi.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; -import org.hibernate.sql.ast.produce.metamodel.spi.ExpressableType; /** * @author Gavin King @@ -31,7 +31,7 @@ public class SqmDistinct extends AbstractSqmNode implements SqmTypedNode, } @Override - public ExpressableType getNodeType() { + public SqmExpressable getNodeType() { return expression.getNodeType(); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/function/SqmExtractUnit.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/function/SqmExtractUnit.java index 94df412049..9cf20f3ee2 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/function/SqmExtractUnit.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/function/SqmExtractUnit.java @@ -6,13 +6,13 @@ */ package org.hibernate.query.sqm.tree.expression.function; -import org.hibernate.metamodel.model.mapping.spi.AllowableFunctionReturnType; +import org.hibernate.metamodel.model.domain.AllowableFunctionReturnType; import org.hibernate.query.sqm.NodeBuilder; +import org.hibernate.query.sqm.SqmExpressable; import org.hibernate.query.sqm.consume.spi.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.sql.ast.produce.metamodel.spi.ExpressableType; /** * @author Gavin King @@ -41,7 +41,7 @@ public class SqmExtractUnit extends AbstractSqmNode implements SqmTypedNode getNodeType() { return type; } } 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 3d65022c07..f6419b6c1f 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 @@ -11,10 +11,10 @@ import java.util.List; import org.hibernate.query.criteria.JpaCompoundSelection; import org.hibernate.query.criteria.JpaSelection; import org.hibernate.query.sqm.NodeBuilder; +import org.hibernate.query.sqm.SqmExpressable; import org.hibernate.query.sqm.consume.spi.SemanticQueryWalker; import org.hibernate.query.sqm.tree.expression.AbstractSqmExpression; -import org.hibernate.sql.ast.produce.metamodel.spi.ExpressableType; -import org.hibernate.type.descriptor.java.spi.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaTypeDescriptor; /** * @asciidoctor @@ -26,7 +26,7 @@ import org.hibernate.type.descriptor.java.spi.JavaTypeDescriptor; */ public class SqmJpaCompoundSelection extends AbstractSqmExpression - implements JpaCompoundSelection, ExpressableType { + implements JpaCompoundSelection, SqmExpressable { private final List> selectableNodes; private final JavaTypeDescriptor javaTypeDescriptor; 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 c4ad384556..6a8127b8a9 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 @@ -22,10 +22,10 @@ import javax.persistence.criteria.Selection; import javax.persistence.criteria.SetJoin; import org.hibernate.NotYetImplementedFor6Exception; -import org.hibernate.metamodel.model.domain.DomainType; import org.hibernate.query.criteria.JpaSelection; import org.hibernate.query.criteria.JpaSubQuery; import org.hibernate.query.sqm.NodeBuilder; +import org.hibernate.query.sqm.SqmExpressable; import org.hibernate.query.sqm.consume.spi.SemanticQueryWalker; import org.hibernate.query.sqm.tree.SqmQuery; import org.hibernate.query.sqm.tree.domain.SqmBagJoin; @@ -37,8 +37,7 @@ import org.hibernate.query.sqm.tree.expression.SqmExpression; import org.hibernate.query.sqm.tree.from.SqmRoot; import org.hibernate.query.sqm.tree.predicate.SqmInPredicate; import org.hibernate.query.sqm.tree.predicate.SqmPredicate; -import org.hibernate.sql.ast.produce.metamodel.spi.ExpressableType; -import org.hibernate.type.descriptor.java.spi.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaTypeDescriptor; import org.hibernate.type.spi.StandardSpiBasicTypes; /** @@ -47,7 +46,7 @@ import org.hibernate.type.spi.StandardSpiBasicTypes; public class SqmSubQuery extends AbstractSqmSelectQuery implements SqmSelectQuery, JpaSubQuery, SqmExpression { private final SqmQuery parent; - private ExpressableType expressableType; + private SqmExpressable expressableType; private String alias; public SqmSubQuery( @@ -226,15 +225,15 @@ public class SqmSubQuery extends AbstractSqmSelectQuery implements SqmSele } @Override - public ExpressableType getNodeType() { + public SqmExpressable getNodeType() { return expressableType; } @Override - public void applyInferableType(DomainType type) { + public void applyInferableType(SqmExpressable type) { //noinspection unchecked - this.expressableType = (ExpressableType) type; - setResultType( type == null ? null : type.getJavaType() ); + this.expressableType = (SqmExpressable) type; + setResultType( type == null ? null : type.getExpressableJavaTypeDescriptor().getJavaType() ); } @Override @@ -282,7 +281,7 @@ public class SqmSubQuery extends AbstractSqmSelectQuery implements SqmSele if ( getNodeType() == null ) { return null; } - return getNodeType().getJavaTypeDescriptor(); + return getNodeType().getExpressableJavaTypeDescriptor(); } @Override