HHH-15017 - Clean-up Query#setParameter overloads
- https://hibernate.atlassian.net/browse/HHH-15017
This commit is contained in:
parent
b62c23ab29
commit
8f5fefd806
|
@ -64,9 +64,9 @@ EntityIdentifierMapping::EntityIdentifierDefinition
|
|||
|
||||
== AllowableParameterType
|
||||
|
||||
`AllowableParameterType` is a contract that defines types that are valid for parameter binding in terms of an SQM query.
|
||||
`BindableType` is a contract that defines types that are valid for parameter binding in terms of an SQM query.
|
||||
|
||||
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 `AllowableParameterType` be resolved first to a `SqmExpressable`
|
||||
One option is to have the `BindableType` be resolved first to a `SqmExpressable`
|
||||
`SqmExpressableAllowableParameterType#resolveSqmExpressable`
|
|
@ -76,7 +76,7 @@ public class CastFunction extends AbstractSqmSelfRenderingFunctionDescriptor {
|
|||
// @Override
|
||||
// protected <T> SelfRenderingSqmFunction<T> generateSqmFunctionExpression(
|
||||
// List<SqmTypedNode<?>> arguments,
|
||||
// AllowableFunctionReturnType<T> impliedResultType,
|
||||
// ReturnableType<T> impliedResultType,
|
||||
// QueryEngine queryEngine,
|
||||
// TypeConfiguration typeConfiguration) {
|
||||
// SqmCastTarget<?> targetType = (SqmCastTarget<?>) arguments.get(1);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
package org.hibernate.dialect.function;
|
||||
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.spi.QueryEngine;
|
||||
import org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor;
|
||||
import org.hibernate.query.sqm.function.SelfRenderingSqmFunction;
|
||||
|
@ -49,7 +49,7 @@ public class CastStrEmulation
|
|||
@Override
|
||||
protected <T> SelfRenderingSqmFunction<T> generateSqmFunctionExpression(
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
final SqmTypedNode<?> argument = arguments.get( 0 );
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
package org.hibernate.dialect.function;
|
||||
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.spi.QueryEngine;
|
||||
import org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor;
|
||||
import org.hibernate.query.sqm.function.SelfRenderingSqmFunction;
|
||||
|
@ -32,7 +32,7 @@ public class CoalesceIfnullEmulation
|
|||
@Override
|
||||
protected <T> SelfRenderingSqmFunction<T> generateSqmFunctionExpression(
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
return queryEngine.getSqmFunctionRegistry().findFunctionDescriptor( "coalesce" )
|
||||
|
|
|
@ -16,7 +16,7 @@ import java.util.function.Supplier;
|
|||
|
||||
import org.hibernate.dialect.Dialect;
|
||||
import org.hibernate.metamodel.mapping.BasicValuedMapping;
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
|
||||
import org.hibernate.metamodel.mapping.JdbcMapping;
|
||||
import org.hibernate.query.spi.QueryEngine;
|
||||
|
@ -1893,14 +1893,14 @@ public class CommonFunctionFactory {
|
|||
.setReturnTypeResolver(
|
||||
new FunctionReturnTypeResolver() {
|
||||
@Override
|
||||
public AllowableFunctionReturnType<?> resolveFunctionReturnType(
|
||||
AllowableFunctionReturnType<?> impliedType,
|
||||
public ReturnableType<?> resolveFunctionReturnType(
|
||||
ReturnableType<?> impliedType,
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
if ( impliedType != null ) {
|
||||
return impliedType;
|
||||
}
|
||||
final AllowableFunctionReturnType<?> argType = StandardFunctionReturnTypeResolvers.extractArgumentType(
|
||||
final ReturnableType<?> argType = StandardFunctionReturnTypeResolvers.extractArgumentType(
|
||||
arguments,
|
||||
1
|
||||
);
|
||||
|
@ -2435,8 +2435,8 @@ public class CommonFunctionFactory {
|
|||
}
|
||||
|
||||
@Override
|
||||
public AllowableFunctionReturnType<?> resolveFunctionReturnType(
|
||||
AllowableFunctionReturnType<?> impliedType,
|
||||
public ReturnableType<?> resolveFunctionReturnType(
|
||||
ReturnableType<?> impliedType,
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
final JdbcMapping baseType = StandardFunctionReturnTypeResolvers
|
||||
|
@ -2445,10 +2445,10 @@ public class CommonFunctionFactory {
|
|||
.extractArgumentJdbcMapping( typeConfiguration, arguments, 2 );
|
||||
|
||||
if ( baseType.getJdbcTypeDescriptor().isDecimal() ) {
|
||||
return (AllowableFunctionReturnType<?>) arguments.get( 0 ).getNodeType();
|
||||
return (ReturnableType<?>) arguments.get( 0 ).getNodeType();
|
||||
}
|
||||
else if ( powerType.getJdbcTypeDescriptor().isDecimal() ) {
|
||||
return (AllowableFunctionReturnType<?>) arguments.get( 1 ).getNodeType();
|
||||
return (ReturnableType<?>) arguments.get( 1 ).getNodeType();
|
||||
}
|
||||
return typeConfiguration.getBasicTypeForJavaType( Double.class );
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
package org.hibernate.dialect.function;
|
||||
|
||||
import org.hibernate.dialect.Dialect;
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.SemanticException;
|
||||
import org.hibernate.query.TemporalUnit;
|
||||
import org.hibernate.query.spi.QueryEngine;
|
||||
|
@ -55,7 +55,7 @@ public class ExtractFunction
|
|||
@Override
|
||||
protected <T> SelfRenderingSqmFunction generateSqmFunctionExpression(
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
SqmExtractUnit<?> field = (SqmExtractUnit<?>) arguments.get(0);
|
||||
|
@ -257,7 +257,7 @@ public class ExtractFunction
|
|||
|
||||
private SelfRenderingSqmFunction<?> extractDateOrTimeUsingCast(
|
||||
SqmExpression<?> expressionToExtract,
|
||||
AllowableFunctionReturnType<?> type,
|
||||
ReturnableType<?> type,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
final NodeBuilder builder = expressionToExtract.nodeBuilder();
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
package org.hibernate.dialect.function;
|
||||
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.BinaryArithmeticOperator;
|
||||
import org.hibernate.query.ComparisonOperator;
|
||||
import org.hibernate.query.spi.QueryEngine;
|
||||
|
@ -59,7 +59,7 @@ public class InsertSubstringOverlayEmulation
|
|||
@Override
|
||||
protected <T> SelfRenderingSqmFunction<T> generateSqmFunctionExpression(
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
final BasicType<Integer> intType = typeConfiguration.getBasicTypeForJavaType( Integer.class );
|
||||
|
|
|
@ -6,12 +6,11 @@
|
|||
*/
|
||||
package org.hibernate.dialect.function;
|
||||
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.spi.QueryEngine;
|
||||
import org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor;
|
||||
import org.hibernate.query.sqm.function.SelfRenderingSqmFunction;
|
||||
import org.hibernate.query.sqm.produce.function.ArgumentTypesValidator;
|
||||
import org.hibernate.query.sqm.produce.function.FunctionParameterType;
|
||||
import org.hibernate.query.sqm.produce.function.StandardArgumentsValidators;
|
||||
import org.hibernate.query.sqm.produce.function.StandardFunctionReturnTypeResolvers;
|
||||
import org.hibernate.query.sqm.tree.SqmTypedNode;
|
||||
|
@ -40,7 +39,7 @@ public class LocatePositionEmulation extends AbstractSqmFunctionDescriptor {
|
|||
@Override
|
||||
protected <T> SelfRenderingSqmFunction<T> generateSqmFunctionExpression(
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
return queryEngine.getSqmFunctionRegistry().findFunctionDescriptor( "locate" )
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
package org.hibernate.dialect.function;
|
||||
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.TrimSpec;
|
||||
import org.hibernate.query.spi.QueryEngine;
|
||||
import org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor;
|
||||
|
@ -48,7 +48,7 @@ public class LpadRpadPadEmulation
|
|||
@Override
|
||||
protected <T> SelfRenderingSqmFunction<T> generateSqmFunctionExpression(
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
SqmTrimSpecification padSpec = (SqmTrimSpecification) arguments.get(2);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
package org.hibernate.dialect.function;
|
||||
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.spi.QueryEngine;
|
||||
import org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor;
|
||||
import org.hibernate.query.sqm.function.SelfRenderingSqmFunction;
|
||||
|
@ -42,7 +42,7 @@ public class NvlCoalesceEmulation
|
|||
@Override
|
||||
protected <T> SelfRenderingSqmFunction<T> generateSqmFunctionExpression(
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
|
||||
|
@ -54,8 +54,8 @@ public class NvlCoalesceEmulation
|
|||
|
||||
int pos = arguments.size();
|
||||
SqmExpression<?> result = (SqmExpression<?>) arguments.get( --pos );
|
||||
AllowableFunctionReturnType<?> type =
|
||||
(AllowableFunctionReturnType<?>) result.getNodeType();
|
||||
ReturnableType<?> type =
|
||||
(ReturnableType<?>) result.getNodeType();
|
||||
|
||||
while (pos>0) {
|
||||
SqmExpression<?> next = (SqmExpression<?>) arguments.get( --pos );
|
||||
|
|
|
@ -10,7 +10,7 @@ import java.util.List;
|
|||
import java.util.function.Supplier;
|
||||
|
||||
import org.hibernate.metamodel.mapping.BasicValuedMapping;
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.sqm.function.NamedSqmFunctionDescriptor;
|
||||
import org.hibernate.query.sqm.produce.function.FunctionReturnTypeResolver;
|
||||
import org.hibernate.query.sqm.tree.SqmTypedNode;
|
||||
|
@ -39,8 +39,8 @@ public class StandardSQLFunction extends NamedSqmFunctionDescriptor {
|
|||
public StandardSQLFunction(String name, boolean useParentheses, BasicTypeReference<?> type) {
|
||||
super( name, useParentheses, null, new FunctionReturnTypeResolver() {
|
||||
@Override
|
||||
public AllowableFunctionReturnType<?> resolveFunctionReturnType(
|
||||
AllowableFunctionReturnType<?> impliedType,
|
||||
public ReturnableType<?> resolveFunctionReturnType(
|
||||
ReturnableType<?> impliedType,
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
return type == null ? null : typeConfiguration.getBasicTypeRegistry().resolve( type );
|
||||
|
|
|
@ -9,7 +9,7 @@ package org.hibernate.dialect.function;
|
|||
import org.hibernate.dialect.Dialect;
|
||||
import org.hibernate.metamodel.mapping.BasicValuedMapping;
|
||||
import org.hibernate.metamodel.mapping.JdbcMapping;
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.BinaryArithmeticOperator;
|
||||
import org.hibernate.query.TemporalUnit;
|
||||
import org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor;
|
||||
|
@ -160,7 +160,7 @@ public class TimestampaddFunction
|
|||
// @Override
|
||||
// protected <T> SelfRenderingSqlFunctionExpression<T> generateSqmFunctionExpression(
|
||||
// List<SqmTypedNode<?>> arguments,
|
||||
// AllowableFunctionReturnType<T> impliedResultType,
|
||||
// ReturnableType<T> impliedResultType,
|
||||
// QueryEngine queryEngine,
|
||||
// TypeConfiguration typeConfiguration) {
|
||||
// SqmExtractUnit<?> field = (SqmExtractUnit<?>) arguments.get(0);
|
||||
|
@ -185,7 +185,7 @@ public class TimestampaddFunction
|
|||
// }
|
||||
|
||||
public SelfRenderingFunctionSqlAstExpression expression(
|
||||
AllowableFunctionReturnType<?> impliedResultType,
|
||||
ReturnableType<?> impliedResultType,
|
||||
SqlAstNode... sqlAstArguments) {
|
||||
Expression to = (Expression) sqlAstArguments[2];
|
||||
return new SelfRenderingFunctionSqlAstExpression(
|
||||
|
@ -194,7 +194,7 @@ public class TimestampaddFunction
|
|||
asList( sqlAstArguments ),
|
||||
impliedResultType != null
|
||||
? impliedResultType
|
||||
: (AllowableFunctionReturnType<?>) to.getExpressionType().getJdbcMappings().get( 0 ),
|
||||
: (ReturnableType<?>) to.getExpressionType().getJdbcMappings().get( 0 ),
|
||||
to.getExpressionType()
|
||||
);
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ package org.hibernate.dialect.function;
|
|||
import java.util.List;
|
||||
|
||||
import org.hibernate.dialect.Dialect;
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor;
|
||||
import org.hibernate.query.sqm.function.SelfRenderingFunctionSqlAstExpression;
|
||||
import org.hibernate.query.sqm.produce.function.ArgumentTypesValidator;
|
||||
|
@ -71,7 +71,7 @@ public class TimestampdiffFunction
|
|||
// @Override
|
||||
// protected <T> SelfRenderingSqlFunctionExpression<T> generateSqmFunctionExpression(
|
||||
// List<SqmTypedNode<?>> arguments,
|
||||
// AllowableFunctionReturnType<T> impliedResultType,
|
||||
// ReturnableType<T> impliedResultType,
|
||||
// QueryEngine queryEngine,
|
||||
// TypeConfiguration typeConfiguration) {
|
||||
// SqmExtractUnit<?> field = (SqmExtractUnit<?>) arguments.get(0);
|
||||
|
@ -98,7 +98,7 @@ public class TimestampdiffFunction
|
|||
// }
|
||||
|
||||
public SelfRenderingFunctionSqlAstExpression expression(
|
||||
AllowableFunctionReturnType<?> impliedResultType,
|
||||
ReturnableType<?> impliedResultType,
|
||||
SqlAstNode... sqlAstArguments) {
|
||||
DurationUnit field = (DurationUnit) sqlAstArguments[0];
|
||||
return new SelfRenderingFunctionSqlAstExpression(
|
||||
|
@ -107,7 +107,7 @@ public class TimestampdiffFunction
|
|||
asList( sqlAstArguments ),
|
||||
impliedResultType != null
|
||||
? impliedResultType
|
||||
: (AllowableFunctionReturnType<?>) field.getExpressionType().getJdbcMapping(),
|
||||
: (ReturnableType<?>) field.getExpressionType().getJdbcMapping(),
|
||||
field.getExpressionType()
|
||||
);
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ package org.hibernate.dialect.function;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.spi.QueryEngine;
|
||||
import org.hibernate.query.sqm.function.FunctionRenderingSupport;
|
||||
import org.hibernate.query.sqm.function.SelfRenderingSqmFunction;
|
||||
|
@ -42,7 +42,7 @@ public class TransactSQLStrFunction extends CastStrEmulation implements Function
|
|||
@Override
|
||||
protected <T> SelfRenderingSqmFunction<T> generateSqmFunctionExpression(
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
if ( arguments.size() == 1 ) {
|
||||
|
|
|
@ -64,7 +64,7 @@ public class TrimFunction extends AbstractSqmSelfRenderingFunctionDescriptor {
|
|||
// @SuppressWarnings("unchecked")
|
||||
// public <T> SelfRenderingSqlFunctionExpression<T> generateSqmFunctionExpression(
|
||||
// List<SqmTypedNode<?>> arguments,
|
||||
// AllowableFunctionReturnType<T> impliedResultType,
|
||||
// ReturnableType<T> impliedResultType,
|
||||
// QueryEngine queryEngine,
|
||||
// TypeConfiguration typeConfiguration) {
|
||||
// final TrimSpec specification = ( (SqmTrimSpecification) arguments.get( 0 ) ).getSpecification();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
package org.hibernate.engine.query.spi;
|
||||
|
||||
import org.hibernate.Incubating;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.metamodel.model.domain.EmbeddableDomainType;
|
||||
import org.hibernate.metamodel.model.domain.internal.EntityTypeImpl;
|
||||
import org.hibernate.query.QueryParameter;
|
||||
|
@ -21,9 +21,9 @@ import org.hibernate.query.QueryParameter;
|
|||
public abstract class AbstractParameterDescriptor<T> implements QueryParameter<T> {
|
||||
private final int[] sourceLocations;
|
||||
|
||||
private AllowableParameterType<T> expectedType;
|
||||
private BindableType<T> expectedType;
|
||||
|
||||
public AbstractParameterDescriptor(int[] sourceLocations, AllowableParameterType<T> expectedType) {
|
||||
public AbstractParameterDescriptor(int[] sourceLocations, BindableType<T> expectedType) {
|
||||
this.sourceLocations = sourceLocations;
|
||||
this.expectedType = expectedType;
|
||||
}
|
||||
|
@ -44,16 +44,16 @@ public abstract class AbstractParameterDescriptor<T> implements QueryParameter<T
|
|||
}
|
||||
|
||||
@Override
|
||||
public AllowableParameterType<T> getHibernateType() {
|
||||
public BindableType<T> getHibernateType() {
|
||||
return getExpectedType();
|
||||
}
|
||||
|
||||
|
||||
public AllowableParameterType<T> getExpectedType() {
|
||||
public BindableType<T> getExpectedType() {
|
||||
return expectedType;
|
||||
}
|
||||
|
||||
public void resetExpectedType(AllowableParameterType<T> expectedType) {
|
||||
public void resetExpectedType(BindableType<T> expectedType) {
|
||||
this.expectedType = expectedType;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
package org.hibernate.engine.query.spi;
|
||||
|
||||
import org.hibernate.Incubating;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
|
||||
/**
|
||||
* Descriptor regarding a named parameter.
|
||||
|
@ -25,7 +25,7 @@ public class NamedParameterDescriptor<T> extends AbstractParameterDescriptor<T>
|
|||
* @param expectedType The expected type of the parameter, according to the translator
|
||||
* @param sourceLocations The locations of the named parameters (aye aye aye)
|
||||
*/
|
||||
public NamedParameterDescriptor(String name, AllowableParameterType<T> expectedType, int[] sourceLocations) {
|
||||
public NamedParameterDescriptor(String name, BindableType<T> expectedType, int[] sourceLocations) {
|
||||
super( sourceLocations, expectedType );
|
||||
this.name = name;
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
package org.hibernate.engine.query.spi;
|
||||
|
||||
import org.hibernate.Incubating;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
|
||||
/**
|
||||
* Descriptor regarding an ordinal parameter.
|
||||
|
@ -25,7 +25,7 @@ public class OrdinalParameterDescriptor<T> extends AbstractParameterDescriptor<T
|
|||
public OrdinalParameterDescriptor(
|
||||
int label,
|
||||
int valuePosition,
|
||||
AllowableParameterType<T> expectedType,
|
||||
BindableType<T> expectedType,
|
||||
int[] sourceLocations) {
|
||||
super( sourceLocations, expectedType );
|
||||
this.label = label;
|
||||
|
|
|
@ -39,7 +39,7 @@ import org.hibernate.internal.FastSessionServices;
|
|||
import org.hibernate.metadata.ClassMetadata;
|
||||
import org.hibernate.metadata.CollectionMetadata;
|
||||
import org.hibernate.metamodel.RuntimeMetamodels;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.metamodel.model.domain.JpaMetamodel;
|
||||
import org.hibernate.metamodel.spi.MetamodelImplementor;
|
||||
import org.hibernate.persister.collection.CollectionPersister;
|
||||
|
@ -433,12 +433,12 @@ public class SessionFactoryDelegatingImpl implements SessionFactoryImplementor,
|
|||
}
|
||||
|
||||
@Override
|
||||
public <T> AllowableParameterType<T> resolveParameterBindType(T bindValue) {
|
||||
public <T> BindableType<T> resolveParameterBindType(T bindValue) {
|
||||
return delegate.resolveParameterBindType( bindValue );
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> AllowableParameterType<T> resolveParameterBindType(Class<T> clazz) {
|
||||
public <T> BindableType<T> resolveParameterBindType(Class<T> clazz) {
|
||||
return delegate.resolveParameterBindType( clazz );
|
||||
}
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ import org.hibernate.metadata.ClassMetadata;
|
|||
import org.hibernate.metadata.CollectionMetadata;
|
||||
import org.hibernate.metamodel.RuntimeMetamodels;
|
||||
import org.hibernate.metamodel.internal.RuntimeMetamodelsImpl;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.metamodel.model.domain.JpaMetamodel;
|
||||
import org.hibernate.metamodel.model.domain.internal.MappingMetamodelImpl;
|
||||
import org.hibernate.metamodel.spi.MetamodelImplementor;
|
||||
|
@ -1085,7 +1085,7 @@ public class SessionFactoryImpl implements SessionFactoryImplementor {
|
|||
}
|
||||
|
||||
@Override
|
||||
public <T> AllowableParameterType<T> resolveParameterBindType(T bindValue) {
|
||||
public <T> BindableType<T> resolveParameterBindType(T bindValue) {
|
||||
if ( bindValue == null ) {
|
||||
// we can't guess
|
||||
return null;
|
||||
|
@ -1095,7 +1095,7 @@ public class SessionFactoryImpl implements SessionFactoryImplementor {
|
|||
}
|
||||
|
||||
@Override
|
||||
public <T> AllowableParameterType<T> resolveParameterBindType(Class<T> javaType) {
|
||||
public <T> BindableType<T> resolveParameterBindType(Class<T> javaType) {
|
||||
return getMetamodel().resolveQueryParameterType( javaType );
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import java.util.function.Function;
|
|||
import org.hibernate.Incubating;
|
||||
import org.hibernate.graph.RootGraph;
|
||||
import org.hibernate.metamodel.mapping.MappingModelExpressable;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
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;
|
||||
|
@ -45,10 +45,10 @@ public interface MappingMetamodel {
|
|||
MappingModelExpressable lenientlyResolveMappingExpressable(SqmExpressable<?> sqmExpressable, Function<NavigablePath, TableGroup> tableGroupLocator);
|
||||
|
||||
/**
|
||||
* Given a Java type, determine the corresponding AllowableParameterType to
|
||||
* Given a Java type, determine the corresponding BindableType to
|
||||
* use implicitly
|
||||
*/
|
||||
<T> AllowableParameterType<T> resolveQueryParameterType(Class<T> javaType);
|
||||
<T> BindableType<T> resolveQueryParameterType(Class<T> javaType);
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
|
@ -10,8 +10,8 @@ import java.util.Objects;
|
|||
import jakarta.persistence.metamodel.BasicType;
|
||||
|
||||
import org.hibernate.HibernateException;
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.AllowableOutputParameterType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.OutputableType;
|
||||
import org.hibernate.query.sqm.SqmExpressable;
|
||||
|
||||
/**
|
||||
|
@ -20,7 +20,7 @@ import org.hibernate.query.sqm.SqmExpressable;
|
|||
* @author Steve Ebersole
|
||||
*/
|
||||
public interface BasicDomainType<J>
|
||||
extends SimpleDomainType<J>, BasicType<J>, SqmExpressable<J>, AllowableOutputParameterType<J>, AllowableFunctionReturnType<J> {
|
||||
extends SimpleDomainType<J>, BasicType<J>, SqmExpressable<J>, OutputableType<J>, ReturnableType<J> {
|
||||
@Override
|
||||
default PersistenceType getPersistenceType() {
|
||||
return PersistenceType.BASIC;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
package org.hibernate.metamodel.model.domain;
|
||||
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.sqm.SqmExpressable;
|
||||
|
||||
import jakarta.persistence.metamodel.EmbeddableType;
|
||||
|
@ -20,5 +20,5 @@ import jakarta.persistence.metamodel.EmbeddableType;
|
|||
* @author Steve Ebersole
|
||||
*/
|
||||
public interface EmbeddableDomainType<J>
|
||||
extends ManagedDomainType<J>, EmbeddableType<J>, AllowableParameterType<J>, SqmExpressable<J> {
|
||||
extends ManagedDomainType<J>, EmbeddableType<J>, BindableType<J>, SqmExpressable<J> {
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
package org.hibernate.metamodel.model.domain.internal;
|
||||
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.metamodel.UnsupportedMappingException;
|
||||
import org.hibernate.metamodel.model.domain.AnyMappingDomainType;
|
||||
import org.hibernate.metamodel.model.domain.BasicDomainType;
|
||||
|
@ -20,7 +20,7 @@ import static jakarta.persistence.metamodel.Bindable.BindableType.SINGULAR_ATTRI
|
|||
/**
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
public class AnyMappingSqmPathSource<J> extends AbstractSqmPathSource<J> implements AllowableParameterType<J> {
|
||||
public class AnyMappingSqmPathSource<J> extends AbstractSqmPathSource<J> implements BindableType<J> {
|
||||
private final SqmPathSource<?> keyPathSource;
|
||||
|
||||
@SuppressWarnings("WeakerAccess")
|
||||
|
|
|
@ -15,9 +15,9 @@ 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.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.metamodel.model.domain.TupleType;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.sqm.SqmExpressable;
|
||||
import org.hibernate.sql.ast.Clause;
|
||||
import org.hibernate.type.descriptor.java.JavaType;
|
||||
|
@ -27,8 +27,8 @@ import org.hibernate.type.descriptor.java.ObjectArrayJavaTypeDescriptor;
|
|||
* @author Christian Beikov
|
||||
*/
|
||||
public class ArrayTupleType implements TupleType<Object[]>,
|
||||
AllowableParameterType<Object[]>,
|
||||
AllowableFunctionReturnType<Object[]>,
|
||||
BindableType<Object[]>,
|
||||
ReturnableType<Object[]>,
|
||||
MappingModelExpressable<Object[]> {
|
||||
|
||||
private final ObjectArrayJavaTypeDescriptor javaTypeDescriptor;
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
package org.hibernate.metamodel.model.domain.internal;
|
||||
|
||||
import org.hibernate.metamodel.model.domain.BasicDomainType;
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.NavigablePath;
|
||||
import org.hibernate.query.sqm.SqmPathSource;
|
||||
import org.hibernate.query.sqm.tree.domain.SqmBasicValuedSimplePath;
|
||||
|
@ -19,7 +19,7 @@ import org.hibernate.query.sqm.tree.domain.SqmPath;
|
|||
*/
|
||||
public class BasicSqmPathSource<J>
|
||||
extends AbstractSqmPathSource<J>
|
||||
implements AllowableParameterType<J>, AllowableFunctionReturnType<J> {
|
||||
implements BindableType<J>, ReturnableType<J> {
|
||||
@SuppressWarnings("WeakerAccess")
|
||||
public BasicSqmPathSource(
|
||||
String localPathName,
|
||||
|
|
|
@ -10,8 +10,8 @@ import org.hibernate.metamodel.mapping.EntityDiscriminatorMapping;
|
|||
import org.hibernate.metamodel.mapping.EntityMappingType;
|
||||
import org.hibernate.metamodel.model.domain.DomainType;
|
||||
import org.hibernate.metamodel.model.domain.EntityDomainType;
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.NavigablePath;
|
||||
import org.hibernate.query.sqm.SqmPathSource;
|
||||
import org.hibernate.query.sqm.tree.domain.SqmPath;
|
||||
|
@ -22,7 +22,7 @@ import org.hibernate.query.sqm.tree.domain.SqmPath;
|
|||
* @author Steve Ebersole
|
||||
*/
|
||||
public class DiscriminatorSqmPathSource<D> extends AbstractSqmPathSource<D>
|
||||
implements AllowableParameterType<D>, AllowableFunctionReturnType<D> {
|
||||
implements BindableType<D>, ReturnableType<D> {
|
||||
private final EntityDomainType<?> entityDomainType;
|
||||
private final EntityMappingType entityMapping;
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import org.hibernate.graph.spi.SubGraphImplementor;
|
|||
import org.hibernate.metamodel.model.domain.AbstractManagedType;
|
||||
import org.hibernate.metamodel.model.domain.EmbeddableDomainType;
|
||||
import org.hibernate.metamodel.model.domain.JpaMetamodel;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.type.descriptor.java.JavaType;
|
||||
|
||||
/**
|
||||
|
@ -25,7 +25,7 @@ import org.hibernate.type.descriptor.java.JavaType;
|
|||
*/
|
||||
public class EmbeddableTypeImpl<J>
|
||||
extends AbstractManagedType<J>
|
||||
implements EmbeddableDomainType<J>, AllowableParameterType<J>, Serializable {
|
||||
implements EmbeddableDomainType<J>, BindableType<J>, Serializable {
|
||||
|
||||
private final boolean isDynamic;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
package org.hibernate.metamodel.model.domain.internal;
|
||||
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.metamodel.model.domain.EmbeddableDomainType;
|
||||
import org.hibernate.query.NavigablePath;
|
||||
import org.hibernate.query.sqm.SqmPathSource;
|
||||
|
@ -18,7 +18,7 @@ import org.hibernate.query.sqm.tree.domain.SqmPath;
|
|||
*/
|
||||
public class EmbeddedSqmPathSource<J>
|
||||
extends AbstractSqmPathSource<J>
|
||||
implements CompositeSqmPathSource<J>, AllowableParameterType<J> {
|
||||
implements CompositeSqmPathSource<J>, BindableType<J> {
|
||||
|
||||
public EmbeddedSqmPathSource(
|
||||
String localPathName,
|
||||
|
|
|
@ -51,7 +51,7 @@ import org.hibernate.metamodel.internal.JpaMetaModelPopulationSetting;
|
|||
import org.hibernate.metamodel.internal.JpaStaticMetaModelPopulationSetting;
|
||||
import org.hibernate.metamodel.mapping.MappingModelExpressable;
|
||||
import org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.metamodel.model.domain.EmbeddableDomainType;
|
||||
import org.hibernate.metamodel.model.domain.EntityDomainType;
|
||||
import org.hibernate.metamodel.model.domain.JpaMetamodel;
|
||||
|
@ -821,7 +821,7 @@ public class MappingMetamodelImpl implements MappingMetamodel, MetamodelImplemen
|
|||
}
|
||||
|
||||
@Override
|
||||
public <T> AllowableParameterType<T> resolveQueryParameterType(Class<T> javaClass) {
|
||||
public <T> BindableType<T> resolveQueryParameterType(Class<T> javaClass) {
|
||||
final BasicType<T> basicType = getTypeConfiguration().getBasicTypeForJavaType( javaClass );
|
||||
// For enums, we simply don't know the exact mapping if there is no basic type registered
|
||||
if ( basicType != null || javaClass.isEnum() ) {
|
||||
|
|
|
@ -11,8 +11,8 @@ import java.sql.Types;
|
|||
|
||||
import org.hibernate.NotYetImplementedFor6Exception;
|
||||
import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
||||
import org.hibernate.query.AllowableOutputParameterType;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.OutputableType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.procedure.spi.FunctionReturnImplementor;
|
||||
import org.hibernate.procedure.spi.NamedCallableQueryMemento;
|
||||
import org.hibernate.procedure.spi.ProcedureCallImplementor;
|
||||
|
@ -33,14 +33,14 @@ public class FunctionReturnImpl<T> implements FunctionReturnImplementor<T> {
|
|||
private final ProcedureCallImplementor<T> procedureCall;
|
||||
private final int jdbcTypeCode;
|
||||
|
||||
private AllowableOutputParameterType<T> ormType;
|
||||
private OutputableType<T> ormType;
|
||||
|
||||
public FunctionReturnImpl(ProcedureCallImplementor<T> procedureCall, int jdbcTypeCode) {
|
||||
this.procedureCall = procedureCall;
|
||||
this.jdbcTypeCode = jdbcTypeCode;
|
||||
}
|
||||
|
||||
public FunctionReturnImpl(ProcedureCallImplementor<T> procedureCall, AllowableOutputParameterType<T> ormType) {
|
||||
public FunctionReturnImpl(ProcedureCallImplementor<T> procedureCall, OutputableType<T> ormType) {
|
||||
this.procedureCall = procedureCall;
|
||||
this.jdbcTypeCode = ormType.getJdbcTypeDescriptor().getJdbcTypeCode();
|
||||
this.ormType = ormType;
|
||||
|
@ -48,7 +48,7 @@ public class FunctionReturnImpl<T> implements FunctionReturnImplementor<T> {
|
|||
|
||||
@Override
|
||||
public JdbcCallFunctionReturn toJdbcFunctionReturn(SharedSessionContractImplementor persistenceContext) {
|
||||
final AllowableParameterType<T> ormType;
|
||||
final BindableType<T> ormType;
|
||||
final JdbcCallRefCursorExtractorImpl refCursorExtractor;
|
||||
final JdbcCallParameterExtractorImpl<T> parameterExtractor;
|
||||
|
||||
|
@ -64,7 +64,7 @@ public class FunctionReturnImpl<T> implements FunctionReturnImplementor<T> {
|
|||
final BasicJavaType<?> javaTypeMapping = sqlTypeDescriptor
|
||||
.getJdbcRecommendedJavaTypeMapping( null, null, typeConfiguration );
|
||||
//noinspection unchecked
|
||||
ormType = (AllowableParameterType<T>) typeConfiguration.standardBasicTypeForJavaType( javaTypeMapping.getJavaTypeClass() );
|
||||
ormType = (BindableType<T>) typeConfiguration.standardBasicTypeForJavaType( javaTypeMapping.getJavaTypeClass() );
|
||||
parameterExtractor = new JdbcCallParameterExtractorImpl<>( procedureCall.getProcedureName(), null, 1, ormType );
|
||||
refCursorExtractor = null;
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ public class FunctionReturnImpl<T> implements FunctionReturnImplementor<T> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public AllowableParameterType<T> getHibernateType() {
|
||||
public BindableType<T> getHibernateType() {
|
||||
return ormType;
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ public class FunctionReturnImpl<T> implements FunctionReturnImplementor<T> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void applyAnticipatedType(AllowableParameterType type) {
|
||||
public void applyAnticipatedType(BindableType type) {
|
||||
throw new NotYetImplementedFor6Exception( getClass() );
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import jakarta.persistence.ParameterMode;
|
|||
import org.hibernate.CacheMode;
|
||||
import org.hibernate.FlushMode;
|
||||
import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.procedure.ProcedureCall;
|
||||
import org.hibernate.procedure.spi.NamedCallableQueryMemento;
|
||||
import org.hibernate.procedure.spi.ParameterStrategy;
|
||||
|
@ -176,7 +176,7 @@ public class NamedCallableQueryMementoImpl extends AbstractNamedQueryMemento imp
|
|||
private final String name;
|
||||
private final ParameterMode mode;
|
||||
private final Class type;
|
||||
private final AllowableParameterType hibernateType;
|
||||
private final BindableType hibernateType;
|
||||
|
||||
/**
|
||||
* Create the memento
|
||||
|
@ -186,7 +186,7 @@ public class NamedCallableQueryMementoImpl extends AbstractNamedQueryMemento imp
|
|||
String name,
|
||||
ParameterMode mode,
|
||||
Class type,
|
||||
AllowableParameterType hibernateType) {
|
||||
BindableType hibernateType) {
|
||||
this.position = position;
|
||||
this.name = name;
|
||||
this.mode = mode;
|
||||
|
@ -210,7 +210,7 @@ public class NamedCallableQueryMementoImpl extends AbstractNamedQueryMemento imp
|
|||
return type;
|
||||
}
|
||||
|
||||
public AllowableParameterType getHibernateType() {
|
||||
public BindableType getHibernateType() {
|
||||
return hibernateType;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ import org.hibernate.procedure.spi.NamedCallableQueryMemento;
|
|||
import org.hibernate.procedure.spi.ParameterStrategy;
|
||||
import org.hibernate.procedure.spi.ProcedureCallImplementor;
|
||||
import org.hibernate.procedure.spi.ProcedureParameterImplementor;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.Query;
|
||||
import org.hibernate.query.QueryParameter;
|
||||
import org.hibernate.query.internal.QueryOptionsImpl;
|
||||
|
@ -456,7 +456,7 @@ public class ProcedureCallImpl<R>
|
|||
|
||||
@Override
|
||||
public <T> ProcedureParameter<T> registerParameter(int position, Class<T> javaType, ParameterMode mode) {
|
||||
final AllowableParameterType<T> parameterType = getSessionFactory()
|
||||
final BindableType<T> parameterType = getSessionFactory()
|
||||
.getDomainModel()
|
||||
.resolveQueryParameterType( javaType );
|
||||
|
||||
|
@ -511,7 +511,7 @@ public class ProcedureCallImpl<R>
|
|||
|
||||
@Override
|
||||
public <T> ProcedureParameterImplementor<T> registerParameter(String name, Class<T> javaType, ParameterMode mode) {
|
||||
final AllowableParameterType<T> parameterType = getSessionFactory().getDomainModel().resolveQueryParameterType(
|
||||
final BindableType<T> parameterType = getSessionFactory().getDomainModel().resolveQueryParameterType(
|
||||
javaType
|
||||
);
|
||||
final ProcedureParameterImpl<T> parameter = new ProcedureParameterImpl<>(
|
||||
|
@ -1097,7 +1097,7 @@ public class ProcedureCallImpl<R>
|
|||
public <P> ProcedureCallImplementor<R> setParameter(
|
||||
QueryParameter<P> parameter,
|
||||
P value,
|
||||
AllowableParameterType<P> type) {
|
||||
BindableType<P> type) {
|
||||
super.setParameter( parameter, value, type );
|
||||
return this;
|
||||
}
|
||||
|
@ -1109,7 +1109,7 @@ public class ProcedureCallImpl<R>
|
|||
// }
|
||||
|
||||
@Override
|
||||
public <P> ProcedureCallImplementor<R> setParameter(String name, P value, AllowableParameterType<P> type) {
|
||||
public <P> ProcedureCallImplementor<R> setParameter(String name, P value, BindableType<P> type) {
|
||||
super.setParameter( name, value, type );
|
||||
return this;
|
||||
}
|
||||
|
@ -1121,7 +1121,7 @@ public class ProcedureCallImpl<R>
|
|||
// }
|
||||
|
||||
@Override
|
||||
public <P> ProcedureCallImplementor<R> setParameter(int position, P value, AllowableParameterType<P> type) {
|
||||
public <P> ProcedureCallImplementor<R> setParameter(int position, P value, BindableType<P> type) {
|
||||
super.setParameter( position, value, type );
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ import org.hibernate.procedure.spi.ParameterStrategy;
|
|||
import org.hibernate.procedure.spi.ProcedureCallImplementor;
|
||||
import org.hibernate.procedure.spi.ProcedureParameterImplementor;
|
||||
import org.hibernate.query.AbstractQueryParameter;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.internal.BindingTypeHelper;
|
||||
import org.hibernate.query.spi.QueryParameterBinding;
|
||||
import org.hibernate.sql.exec.internal.JdbcCallParameterExtractorImpl;
|
||||
|
@ -49,7 +49,7 @@ public class ProcedureParameterImpl<T> extends AbstractQueryParameter<T> impleme
|
|||
String name,
|
||||
ParameterMode mode,
|
||||
Class<T> javaType,
|
||||
AllowableParameterType<T> hibernateType) {
|
||||
BindableType<T> hibernateType) {
|
||||
super( false, hibernateType );
|
||||
this.name = name;
|
||||
this.position = null;
|
||||
|
@ -61,7 +61,7 @@ public class ProcedureParameterImpl<T> extends AbstractQueryParameter<T> impleme
|
|||
Integer position,
|
||||
ParameterMode mode,
|
||||
Class<T> javaType,
|
||||
AllowableParameterType<T> hibernateType) {
|
||||
BindableType<T> hibernateType) {
|
||||
super( false, hibernateType );
|
||||
this.name = null;
|
||||
this.position = position;
|
||||
|
@ -116,7 +116,7 @@ public class ProcedureParameterImpl<T> extends AbstractQueryParameter<T> impleme
|
|||
int startIndex,
|
||||
ProcedureCallImplementor<?> procedureCall) {
|
||||
final QueryParameterBinding<T> binding = procedureCall.getParameterBindings().getBinding( this );
|
||||
final AllowableParameterType<T> typeToUse = BindingTypeHelper.INSTANCE.resolveTemporalPrecision(
|
||||
final BindableType<T> typeToUse = BindingTypeHelper.INSTANCE.resolveTemporalPrecision(
|
||||
binding == null || binding.getExplicitTemporalPrecision() == null
|
||||
? null
|
||||
: binding.getExplicitTemporalPrecision(),
|
||||
|
@ -163,7 +163,7 @@ public class ProcedureParameterImpl<T> extends AbstractQueryParameter<T> impleme
|
|||
return new JdbcCallParameterRegistrationImpl( name, startIndex, mode, typeToUse, parameterBinder, parameterExtractor, refCursorExtractor );
|
||||
}
|
||||
|
||||
private JdbcParameterBinder getParameterBinder(AllowableParameterType<T> typeToUse, String name) {
|
||||
private JdbcParameterBinder getParameterBinder(BindableType<T> typeToUse, String name) {
|
||||
if ( typeToUse instanceof BasicType<?> ) {
|
||||
if ( name == null ) {
|
||||
return new JdbcParameterImpl( (BasicType<T>) typeToUse );
|
||||
|
@ -193,7 +193,7 @@ public class ProcedureParameterImpl<T> extends AbstractQueryParameter<T> impleme
|
|||
}
|
||||
|
||||
private boolean canDoNameParameterBinding(
|
||||
AllowableParameterType<?> hibernateType,
|
||||
BindableType<?> hibernateType,
|
||||
ProcedureCallImplementor<?> procedureCall) {
|
||||
final ExtractedDatabaseMetaData databaseMetaData = procedureCall.getSession()
|
||||
.getJdbcCoordinator()
|
||||
|
|
|
@ -13,11 +13,11 @@ import org.hibernate.query.spi.QueryParameterImplementor;
|
|||
*/
|
||||
public abstract class AbstractQueryParameter<T> implements QueryParameterImplementor<T> {
|
||||
private boolean allowMultiValuedBinding;
|
||||
private AllowableParameterType<T> anticipatedType;
|
||||
private BindableType<T> anticipatedType;
|
||||
|
||||
public AbstractQueryParameter(
|
||||
boolean allowMultiValuedBinding,
|
||||
AllowableParameterType<T> anticipatedType) {
|
||||
BindableType<T> anticipatedType) {
|
||||
this.allowMultiValuedBinding = allowMultiValuedBinding;
|
||||
this.anticipatedType = anticipatedType;
|
||||
}
|
||||
|
@ -34,12 +34,12 @@ public abstract class AbstractQueryParameter<T> implements QueryParameterImpleme
|
|||
}
|
||||
|
||||
@Override
|
||||
public AllowableParameterType<T> getHibernateType() {
|
||||
public BindableType<T> getHibernateType() {
|
||||
return anticipatedType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyAnticipatedType(AllowableParameterType type) {
|
||||
public void applyAnticipatedType(BindableType type) {
|
||||
//noinspection unchecked
|
||||
this.anticipatedType = type;
|
||||
}
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
/*
|
||||
* Hibernate, Relational Persistence for Idiomatic Java
|
||||
*
|
||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
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 jakarta.persistence.AttributeConverter;
|
||||
import jakarta.persistence.metamodel.ManagedType;
|
||||
|
||||
/**
|
||||
* Types that can be used to handle binding {@link org.hibernate.query.Query} parameters
|
||||
*
|
||||
* @see org.hibernate.type.BasicTypeReference
|
||||
* @see org.hibernate.type.StandardBasicTypes
|
||||
*
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
@Incubating
|
||||
public interface AllowableParameterType<J> {
|
||||
/**
|
||||
* The expected Java type
|
||||
*/
|
||||
Class<J> getBindableJavaType();
|
||||
|
||||
static <T> AllowableParameterType<? extends T> parameterType(Class<T> type) {
|
||||
throw new NotYetImplementedFor6Exception( "AllowableParameterType#parameterType" );
|
||||
}
|
||||
|
||||
static <T> AllowableParameterType<? extends T> parameterType(Class<?> javaType, AttributeConverter<T,?> converter) {
|
||||
throw new NotYetImplementedFor6Exception( "AllowableParameterType#parameterType" );
|
||||
}
|
||||
|
||||
static <T> AllowableParameterType<? extends T> parameterType(Class<?> javaType, Class<? extends AttributeConverter<T,?>> converter) {
|
||||
throw new NotYetImplementedFor6Exception( "AllowableParameterType#parameterType" );
|
||||
}
|
||||
|
||||
static <T> AllowableParameterType<? extends T> parameterType(ManagedType<T> managedType) {
|
||||
throw new NotYetImplementedFor6Exception( "AllowableParameterType#parameterType" );
|
||||
}
|
||||
|
||||
static <T> AllowableParameterType<? extends T> parameterType(jakarta.persistence.metamodel.Bindable<T> jpaBindable) {
|
||||
throw new NotYetImplementedFor6Exception( "AllowableParameterType#parameterType" );
|
||||
}
|
||||
|
||||
static <T> AllowableParameterType<? extends T> parameterType(org.hibernate.metamodel.mapping.Bindable bindable) {
|
||||
throw new NotYetImplementedFor6Exception( "AllowableParameterType#parameterType" );
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve this parameter type to the corresponding SqmExpressable
|
||||
*
|
||||
* @todo (6.0) - use SessionFactory (API) here instead - we'll just cast "below"
|
||||
*/
|
||||
SqmExpressable<J> resolveExpressable(SessionFactoryImplementor sessionFactory);
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* Hibernate, Relational Persistence for Idiomatic Java
|
||||
*
|
||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
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 jakarta.persistence.AttributeConverter;
|
||||
import jakarta.persistence.metamodel.ManagedType;
|
||||
|
||||
/**
|
||||
* Types that can be used to handle binding {@link org.hibernate.query.Query} parameters
|
||||
*
|
||||
* @see org.hibernate.type.BasicTypeReference
|
||||
* @see org.hibernate.type.StandardBasicTypes
|
||||
*
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
@Incubating
|
||||
public interface BindableType<J> {
|
||||
/**
|
||||
* The expected Java type
|
||||
*/
|
||||
Class<J> getBindableJavaType();
|
||||
|
||||
static <T> BindableType<? extends T> parameterType(Class<T> type) {
|
||||
throw new NotYetImplementedFor6Exception( "BindableType#parameterType" );
|
||||
}
|
||||
|
||||
static <T> BindableType<? extends T> parameterType(Class<?> javaType, AttributeConverter<T,?> converter) {
|
||||
throw new NotYetImplementedFor6Exception( "BindableType#parameterType" );
|
||||
}
|
||||
|
||||
static <T> BindableType<? extends T> parameterType(Class<?> javaType, Class<? extends AttributeConverter<T,?>> converter) {
|
||||
throw new NotYetImplementedFor6Exception( "BindableType#parameterType" );
|
||||
}
|
||||
|
||||
static <T> BindableType<? extends T> parameterType(ManagedType<T> managedType) {
|
||||
throw new NotYetImplementedFor6Exception( "BindableType#parameterType" );
|
||||
}
|
||||
|
||||
static <T> BindableType<? extends T> parameterType(jakarta.persistence.metamodel.Bindable<T> jpaBindable) {
|
||||
throw new NotYetImplementedFor6Exception( "BindableType#parameterType" );
|
||||
}
|
||||
|
||||
static <T> BindableType<? extends T> parameterType(org.hibernate.metamodel.mapping.Bindable bindable) {
|
||||
throw new NotYetImplementedFor6Exception( "BindableType#parameterType" );
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve this parameter type to the corresponding SqmExpressable
|
||||
*
|
||||
* @todo (6.0) - use SessionFactory (API) here instead - we'll just cast "below"
|
||||
*/
|
||||
SqmExpressable<J> resolveExpressable(SessionFactoryImplementor sessionFactory);
|
||||
}
|
|
@ -7,9 +7,6 @@
|
|||
package org.hibernate.query;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
@ -576,7 +573,7 @@ public interface NativeQuery<T> extends Query<T>, SynchronizeableQuery {
|
|||
<P> NativeQuery<T> setParameter(String name, P val, Class<P> type);
|
||||
|
||||
@Override
|
||||
<P> NativeQuery<T> setParameter(String name, P val, AllowableParameterType<P> type);
|
||||
<P> NativeQuery<T> setParameter(String name, P val, BindableType<P> type);
|
||||
|
||||
@Override
|
||||
NativeQuery<T> setParameter(String name, Instant value, TemporalType temporalType);
|
||||
|
@ -594,7 +591,7 @@ public interface NativeQuery<T> extends Query<T>, SynchronizeableQuery {
|
|||
<P> NativeQuery<T> setParameter(int position, P val, Class<P> type);
|
||||
|
||||
@Override
|
||||
<P> NativeQuery<T> setParameter(int position, P val, AllowableParameterType<P> type);
|
||||
<P> NativeQuery<T> setParameter(int position, P val, BindableType<P> type);
|
||||
|
||||
@Override
|
||||
NativeQuery<T> setParameter(int position, Instant value, TemporalType temporalType);
|
||||
|
@ -612,7 +609,7 @@ public interface NativeQuery<T> extends Query<T>, SynchronizeableQuery {
|
|||
<P> NativeQuery<T> setParameter(QueryParameter<P> parameter, P val, Class<P> type);
|
||||
|
||||
@Override
|
||||
<P> NativeQuery<T> setParameter(QueryParameter<P> parameter, P val, AllowableParameterType<P> type);
|
||||
<P> NativeQuery<T> setParameter(QueryParameter<P> parameter, P val, BindableType<P> type);
|
||||
|
||||
@Override
|
||||
<P> NativeQuery<T> setParameter(Parameter<P> param, P value);
|
||||
|
@ -630,7 +627,7 @@ public interface NativeQuery<T> extends Query<T>, SynchronizeableQuery {
|
|||
<P> NativeQuery<T> setParameterList(String name, Collection<? extends P> values, Class<P> type);
|
||||
|
||||
@Override
|
||||
<P> NativeQuery<T> setParameterList(String name, Collection<? extends P> values, AllowableParameterType<P> type);
|
||||
<P> NativeQuery<T> setParameterList(String name, Collection<? extends P> values, BindableType<P> type);
|
||||
|
||||
@Override
|
||||
NativeQuery<T> setParameterList(String name, Object[] values);
|
||||
|
@ -639,7 +636,7 @@ public interface NativeQuery<T> extends Query<T>, SynchronizeableQuery {
|
|||
<P> NativeQuery<T> setParameterList(String name, P[] values, Class<P> type);
|
||||
|
||||
@Override
|
||||
<P> NativeQuery<T> setParameterList(String name, P[] values, AllowableParameterType<P> type);
|
||||
<P> NativeQuery<T> setParameterList(String name, P[] values, BindableType<P> type);
|
||||
|
||||
@Override
|
||||
NativeQuery<T> setParameterList(int position, @SuppressWarnings("rawtypes") Collection values);
|
||||
|
@ -648,7 +645,7 @@ public interface NativeQuery<T> extends Query<T>, SynchronizeableQuery {
|
|||
<P> NativeQuery<T> setParameterList(int position, Collection<? extends P> values, Class<P> type);
|
||||
|
||||
@Override
|
||||
<P> NativeQuery<T> setParameterList(int position, Collection<? extends P> values, AllowableParameterType<P> javaType);
|
||||
<P> NativeQuery<T> setParameterList(int position, Collection<? extends P> values, BindableType<P> javaType);
|
||||
|
||||
@Override
|
||||
NativeQuery<T> setParameterList(int position, Object[] values);
|
||||
|
@ -657,7 +654,7 @@ public interface NativeQuery<T> extends Query<T>, SynchronizeableQuery {
|
|||
<P> NativeQuery<T> setParameterList(int position, P[] values, Class<P> javaType);
|
||||
|
||||
@Override
|
||||
<P> NativeQuery<T> setParameterList(int position, P[] values, AllowableParameterType<P> javaType);
|
||||
<P> NativeQuery<T> setParameterList(int position, P[] values, BindableType<P> javaType);
|
||||
|
||||
@Override
|
||||
<P> NativeQuery<T> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values);
|
||||
|
@ -666,7 +663,7 @@ public interface NativeQuery<T> extends Query<T>, SynchronizeableQuery {
|
|||
<P> NativeQuery<T> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, Class<P> javaType);
|
||||
|
||||
@Override
|
||||
<P> NativeQuery<T> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, AllowableParameterType<P> type);
|
||||
<P> NativeQuery<T> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, BindableType<P> type);
|
||||
|
||||
@Override
|
||||
<P> NativeQuery<T> setParameterList(QueryParameter<P> parameter, P[] values);
|
||||
|
@ -675,7 +672,7 @@ public interface NativeQuery<T> extends Query<T>, SynchronizeableQuery {
|
|||
<P> NativeQuery<T> setParameterList(QueryParameter<P> parameter, P[] values, Class<P> javaType);
|
||||
|
||||
@Override
|
||||
<P> NativeQuery<T> setParameterList(QueryParameter<P> parameter, P[] values, AllowableParameterType<P> type);
|
||||
<P> NativeQuery<T> setParameterList(QueryParameter<P> parameter, P[] values, BindableType<P> type);
|
||||
|
||||
@Override
|
||||
NativeQuery<T> setProperties(Object bean);
|
||||
|
|
|
@ -10,7 +10,6 @@ import java.sql.CallableStatement;
|
|||
import java.sql.SQLException;
|
||||
|
||||
import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.type.descriptor.jdbc.JdbcType;
|
||||
|
||||
/**
|
||||
|
@ -21,7 +20,7 @@ import org.hibernate.type.descriptor.jdbc.JdbcType;
|
|||
*
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
public interface AllowableOutputParameterType<J> extends AllowableParameterType<J> {
|
||||
public interface OutputableType<J> extends BindableType<J> {
|
||||
/**
|
||||
* Can the given instance of this type actually perform the parameter value extractions?
|
||||
*
|
|
@ -57,7 +57,7 @@ public interface ParameterMetadata {
|
|||
*/
|
||||
<P> QueryParameter<P> resolve(Parameter<P> param);
|
||||
|
||||
default <T> AllowableParameterType<T> getInferredParameterType(QueryParameter<T> parameter) {
|
||||
default <T> BindableType<T> getInferredParameterType(QueryParameter<T> parameter) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -339,29 +339,29 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
|
|||
* it occurs, use one of the forms accept a "type".
|
||||
*
|
||||
* @see #setParameter(String, Object, Class)
|
||||
* @see #setParameter(String, Object, AllowableParameterType)
|
||||
* @see #setParameter(String, Object, BindableType)
|
||||
*/
|
||||
@Override
|
||||
Query<R> setParameter(String name, Object value);
|
||||
|
||||
/**
|
||||
* Bind the given argument to a named query parameter using the given
|
||||
* Class reference to attempt to determine the {@link AllowableParameterType}
|
||||
* to use. If unable to determine an appropriate {@link AllowableParameterType},
|
||||
* Class reference to attempt to determine the {@link BindableType}
|
||||
* to use. If unable to determine an appropriate {@link BindableType},
|
||||
* {@link #setParameter(String, Object)} is used
|
||||
*
|
||||
* @see AllowableParameterType#parameterType(Class)
|
||||
* @see #setParameter(String, Object, AllowableParameterType)
|
||||
* @see BindableType#parameterType(Class)
|
||||
* @see #setParameter(String, Object, BindableType)
|
||||
*/
|
||||
<P> Query<R> setParameter(String name, P value, Class<P> type);
|
||||
|
||||
/**
|
||||
* Bind the given argument to a named query parameter using the given
|
||||
* {@link AllowableParameterType}.
|
||||
* {@link BindableType}.
|
||||
*
|
||||
* @see AllowableParameterType#parameterType
|
||||
* @see BindableType#parameterType
|
||||
*/
|
||||
<P> Query<R> setParameter(String name, P value, AllowableParameterType<P> type);
|
||||
<P> Query<R> setParameter(String name, P value, BindableType<P> type);
|
||||
|
||||
/**
|
||||
* Bind an {@link Instant} value to the named query parameter using just the portion
|
||||
|
@ -390,29 +390,29 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
|
|||
* it occurs, use one of the forms accept a "type".
|
||||
*
|
||||
* @see #setParameter(int, Object, Class)
|
||||
* @see #setParameter(int, Object, AllowableParameterType)
|
||||
* @see #setParameter(int, Object, BindableType)
|
||||
*/
|
||||
@Override
|
||||
Query<R> setParameter(int position, Object value);
|
||||
|
||||
/**
|
||||
* Bind the given argument to a positional query parameter using the given
|
||||
* Class reference to attempt to determine the {@link AllowableParameterType}
|
||||
* to use. If unable to determine an appropriate {@link AllowableParameterType},
|
||||
* Class reference to attempt to determine the {@link BindableType}
|
||||
* to use. If unable to determine an appropriate {@link BindableType},
|
||||
* {@link #setParameter(int, Object)} is used
|
||||
*
|
||||
* @see AllowableParameterType#parameterType(Class)
|
||||
* @see #setParameter(int, Object, AllowableParameterType)
|
||||
* @see BindableType#parameterType(Class)
|
||||
* @see #setParameter(int, Object, BindableType)
|
||||
*/
|
||||
<P> Query<R> setParameter(int position, P value, Class<P> type);
|
||||
|
||||
/**
|
||||
* Bind the given argument to a positional query parameter using the given
|
||||
* {@link AllowableParameterType}.
|
||||
* {@link BindableType}.
|
||||
*
|
||||
* @see AllowableParameterType#parameterType
|
||||
* @see BindableType#parameterType
|
||||
*/
|
||||
<P> Query<R> setParameter(int position, P value, AllowableParameterType<P> type);
|
||||
<P> Query<R> setParameter(int position, P value, BindableType<P> type);
|
||||
|
||||
/**
|
||||
* Bind an {@link Instant} value to the positional query parameter using just the portion
|
||||
|
@ -439,7 +439,7 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
|
|||
* If the type of the parameter cannot be inferred from the context in which
|
||||
* it occurs, use on of the forms accept a "type".
|
||||
*
|
||||
* @see #setParameter(QueryParameter, Object, AllowableParameterType)
|
||||
* @see #setParameter(QueryParameter, Object, BindableType)
|
||||
*
|
||||
* @param parameter the query parameter memento
|
||||
* @param value the argument, which might be null
|
||||
|
@ -451,31 +451,31 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
|
|||
/**
|
||||
* Bind an argument to the query parameter represented by the given
|
||||
* {@link QueryParameter} using the given Class reference to attempt to
|
||||
* determine the {@link AllowableParameterType} to use. If unable to determine
|
||||
* an appropriate {@link AllowableParameterType}, {@link #setParameter(QueryParameter, Object)} is used
|
||||
* determine the {@link BindableType} to use. If unable to determine
|
||||
* an appropriate {@link BindableType}, {@link #setParameter(QueryParameter, Object)} is used
|
||||
*
|
||||
* @param parameter the query parameter memento
|
||||
* @param value the argument, which might be null
|
||||
* @param type a {@link AllowableParameterType} representing the type of the parameter
|
||||
* @param type a {@link BindableType} representing the type of the parameter
|
||||
*
|
||||
* @return {@code this}, for method chaining
|
||||
*
|
||||
* @see AllowableParameterType#parameterType(Class)
|
||||
* @see #setParameter(QueryParameter, Object, AllowableParameterType)
|
||||
* @see BindableType#parameterType(Class)
|
||||
* @see #setParameter(QueryParameter, Object, BindableType)
|
||||
*/
|
||||
<P> Query<R> setParameter(QueryParameter<P> parameter, P value, Class<P> type);
|
||||
|
||||
/**
|
||||
* Bind an argument to the query parameter represented by the given
|
||||
* {@link QueryParameter} using the given {@link AllowableParameterType}.
|
||||
* {@link QueryParameter} using the given {@link BindableType}.
|
||||
*
|
||||
* @param parameter the query parameter memento
|
||||
* @param val the argument, which might be null
|
||||
* @param type an {@link AllowableParameterType} representing the type of the parameter
|
||||
* @param type an {@link BindableType} representing the type of the parameter
|
||||
*
|
||||
* @return {@code this}, for method chaining
|
||||
*/
|
||||
<P> Query<R> setParameter(QueryParameter<P> parameter, P val, AllowableParameterType<P> type);
|
||||
<P> Query<R> setParameter(QueryParameter<P> parameter, P val, BindableType<P> type);
|
||||
|
||||
/**
|
||||
* {@link jakarta.persistence.Query} override
|
||||
|
@ -503,7 +503,7 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
|
|||
* The "type mapping" for the binding is inferred from the type of
|
||||
* the first collection element
|
||||
*
|
||||
* @see #setParameterList(java.lang.String, java.util.Collection, org.hibernate.query.AllowableParameterType)
|
||||
* @see #setParameterList(java.lang.String, java.util.Collection, BindableType)
|
||||
*
|
||||
* @apiNote This is used for binding a list of values to an expression such as {@code entity.field in (:values)}.
|
||||
*
|
||||
|
@ -513,12 +513,12 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
|
|||
|
||||
/**
|
||||
* Bind multiple arguments to a named query parameter using the given
|
||||
* Class reference to attempt to determine the {@link AllowableParameterType}
|
||||
* to use. If unable to determine an appropriate {@link AllowableParameterType},
|
||||
* Class reference to attempt to determine the {@link BindableType}
|
||||
* to use. If unable to determine an appropriate {@link BindableType},
|
||||
* {@link #setParameterList(String, Collection)} is used
|
||||
*
|
||||
* @see AllowableParameterType#parameterType(Class)
|
||||
* @see #setParameterList(java.lang.String, java.util.Collection, org.hibernate.query.AllowableParameterType)
|
||||
* @see BindableType#parameterType(Class)
|
||||
* @see #setParameterList(java.lang.String, java.util.Collection, BindableType)
|
||||
*
|
||||
* @apiNote This is used for binding a list of values to an expression such as {@code entity.field in (:values)}.
|
||||
*
|
||||
|
@ -533,7 +533,7 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
|
|||
*
|
||||
* @return {@code this}, for method chaining
|
||||
*/
|
||||
<P> Query<R> setParameterList(String name, Collection<? extends P> values, AllowableParameterType<P> type);
|
||||
<P> Query<R> setParameterList(String name, Collection<? extends P> values, BindableType<P> type);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -550,12 +550,12 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
|
|||
|
||||
/**
|
||||
* Bind multiple arguments to a named query parameter using the given
|
||||
* Class reference to attempt to determine the {@link AllowableParameterType}
|
||||
* to use. If unable to determine an appropriate {@link AllowableParameterType},
|
||||
* Class reference to attempt to determine the {@link BindableType}
|
||||
* to use. If unable to determine an appropriate {@link BindableType},
|
||||
* {@link #setParameterList(String, Collection)} is used
|
||||
*
|
||||
* @see AllowableParameterType#parameterType(Class)
|
||||
* @see #setParameterList(java.lang.String, Object[], org.hibernate.query.AllowableParameterType)
|
||||
* @see BindableType#parameterType(Class)
|
||||
* @see #setParameterList(java.lang.String, Object[], BindableType)
|
||||
*
|
||||
* @apiNote This is used for binding a list of values to an expression such as {@code entity.field in (:values)}.
|
||||
*
|
||||
|
@ -571,7 +571,7 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
|
|||
*
|
||||
* @return {@code this}, for method chaining
|
||||
*/
|
||||
<P> Query<R> setParameterList(String name, P[] values, AllowableParameterType<P> type);
|
||||
<P> Query<R> setParameterList(String name, P[] values, BindableType<P> type);
|
||||
|
||||
/**
|
||||
* Bind multiple arguments to a positional query parameter.
|
||||
|
@ -587,12 +587,12 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
|
|||
|
||||
/**
|
||||
* Bind multiple arguments to a positional query parameter using the given
|
||||
* Class reference to attempt to determine the {@link AllowableParameterType}
|
||||
* to use. If unable to determine an appropriate {@link AllowableParameterType},
|
||||
* Class reference to attempt to determine the {@link BindableType}
|
||||
* to use. If unable to determine an appropriate {@link BindableType},
|
||||
* {@link #setParameterList(String, Collection)} is used
|
||||
*
|
||||
* @see AllowableParameterType#parameterType(Class)
|
||||
* @see #setParameterList(int, Collection, org.hibernate.query.AllowableParameterType)
|
||||
* @see BindableType#parameterType(Class)
|
||||
* @see #setParameterList(int, Collection, BindableType)
|
||||
*
|
||||
* @apiNote This is used for binding a list of values to an expression such as {@code entity.field in (:values)}.
|
||||
*
|
||||
|
@ -607,7 +607,7 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
|
|||
*
|
||||
* @return {@code this}, for method chaining
|
||||
*/
|
||||
<P> Query<R> setParameterList(int position, Collection<? extends P> values, AllowableParameterType<P> type);
|
||||
<P> Query<R> setParameterList(int position, Collection<? extends P> values, BindableType<P> type);
|
||||
|
||||
/**
|
||||
* Bind multiple arguments to a positional query parameter.
|
||||
|
@ -623,12 +623,12 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
|
|||
|
||||
/**
|
||||
* Bind multiple arguments to a positional query parameter using the given
|
||||
* Class reference to attempt to determine the {@link AllowableParameterType}
|
||||
* to use. If unable to determine an appropriate {@link AllowableParameterType},
|
||||
* Class reference to attempt to determine the {@link BindableType}
|
||||
* to use. If unable to determine an appropriate {@link BindableType},
|
||||
* {@link #setParameterList(String, Collection)} is used
|
||||
*
|
||||
* @see AllowableParameterType#parameterType(Class)
|
||||
* @see #setParameterList(int, Object[], org.hibernate.query.AllowableParameterType)
|
||||
* @see BindableType#parameterType(Class)
|
||||
* @see #setParameterList(int, Object[], BindableType)
|
||||
*
|
||||
* @apiNote This is used for binding a list of values to an expression such as {@code entity.field in (:values)}.
|
||||
*
|
||||
|
@ -643,7 +643,7 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
|
|||
*
|
||||
* @return {@code this}, for method chaining
|
||||
*/
|
||||
<P> Query<R> setParameterList(int position, P[] values, AllowableParameterType<P> type);
|
||||
<P> Query<R> setParameterList(int position, P[] values, BindableType<P> type);
|
||||
|
||||
/**
|
||||
* Bind multiple arguments to the query parameter represented by the
|
||||
|
@ -662,12 +662,12 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
|
|||
/**
|
||||
* Bind multiple arguments to the query parameter represented by the
|
||||
* given {@link QueryParameter} using the given Class reference to attempt
|
||||
* to determine the {@link AllowableParameterType} to use. If unable to
|
||||
* determine an appropriate {@link AllowableParameterType},
|
||||
* to determine the {@link BindableType} to use. If unable to
|
||||
* determine an appropriate {@link BindableType},
|
||||
* {@link #setParameterList(String, Collection)} is used
|
||||
*
|
||||
* @see AllowableParameterType#parameterType(Class)
|
||||
* @see #setParameterList(QueryParameter, java.util.Collection, org.hibernate.query.AllowableParameterType)
|
||||
* @see BindableType#parameterType(Class)
|
||||
* @see #setParameterList(QueryParameter, java.util.Collection, BindableType)
|
||||
*
|
||||
* @apiNote This is used for binding a list of values to an expression such as {@code entity.field in (:values)}.
|
||||
*
|
||||
|
@ -677,7 +677,7 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
|
|||
|
||||
/**
|
||||
* Bind multiple arguments to the query parameter represented by the
|
||||
* given {@link QueryParameter}, inferring the {@link AllowableParameterType}.
|
||||
* given {@link QueryParameter}, inferring the {@link BindableType}.
|
||||
*
|
||||
* Bind multiple arguments to a named query parameter.
|
||||
* <p/>
|
||||
|
@ -688,7 +688,7 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
|
|||
*
|
||||
* @return {@code this}, for method chaining
|
||||
*/
|
||||
<P> Query<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, AllowableParameterType<P> type);
|
||||
<P> Query<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, BindableType<P> type);
|
||||
|
||||
/**
|
||||
* Bind multiple arguments to the query parameter represented by the
|
||||
|
@ -708,12 +708,12 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
|
|||
/**
|
||||
* Bind multiple arguments to the query parameter represented by the
|
||||
* given {@link QueryParameter} using the given Class reference to attempt
|
||||
* to determine the {@link AllowableParameterType} to use. If unable to
|
||||
* determine an appropriate {@link AllowableParameterType},
|
||||
* to determine the {@link BindableType} to use. If unable to
|
||||
* determine an appropriate {@link BindableType},
|
||||
* {@link #setParameterList(String, Collection)} is used
|
||||
*
|
||||
* @see AllowableParameterType#parameterType(Class)
|
||||
* @see #setParameterList(QueryParameter, Object[], org.hibernate.query.AllowableParameterType)
|
||||
* @see BindableType#parameterType(Class)
|
||||
* @see #setParameterList(QueryParameter, Object[], BindableType)
|
||||
*
|
||||
* @apiNote This is used for binding a list of values to an expression such as {@code entity.field in (:values)}.
|
||||
*
|
||||
|
@ -723,7 +723,7 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
|
|||
|
||||
/**
|
||||
* Bind multiple arguments to the query parameter represented by the
|
||||
* given {@link QueryParameter}, inferring the {@link AllowableParameterType}.
|
||||
* given {@link QueryParameter}, inferring the {@link BindableType}.
|
||||
*
|
||||
* Bind multiple arguments to a named query parameter.
|
||||
* <p/>
|
||||
|
@ -734,7 +734,7 @@ public interface Query<R> extends TypedQuery<R>, CommonQueryContract {
|
|||
*
|
||||
* @return {@code this}, for method chaining
|
||||
*/
|
||||
<P> Query<R> setParameterList(QueryParameter<P> parameter, P[] values, AllowableParameterType<P> type);
|
||||
<P> Query<R> setParameterList(QueryParameter<P> parameter, P[] values, BindableType<P> type);
|
||||
|
||||
/**
|
||||
* Bind the property values of the given bean to named parameters of the query,
|
||||
|
|
|
@ -32,5 +32,5 @@ public interface QueryParameter<T> extends jakarta.persistence.Parameter<T> {
|
|||
*
|
||||
* @return The associated Hibernate Type, may be {@code null}.
|
||||
*/
|
||||
AllowableParameterType<T> getHibernateType();
|
||||
BindableType<T> getHibernateType();
|
||||
}
|
||||
|
|
|
@ -13,5 +13,5 @@ import org.hibernate.metamodel.model.domain.SimpleDomainType;
|
|||
*
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
public interface AllowableFunctionReturnType<T> extends SimpleDomainType<T> {
|
||||
public interface ReturnableType<T> extends SimpleDomainType<T> {
|
||||
}
|
|
@ -17,10 +17,10 @@ import org.hibernate.type.BasicTypeReference;
|
|||
*/
|
||||
public final class TypedParameterValue<J> {
|
||||
|
||||
private final Object type;
|
||||
private final BindableType<J> type;
|
||||
private final J value;
|
||||
|
||||
public TypedParameterValue(AllowableParameterType<J> type, J value) {
|
||||
public TypedParameterValue(BindableType<J> type, J value) {
|
||||
this.type = type;
|
||||
this.value = value;
|
||||
}
|
||||
|
@ -44,8 +44,8 @@ public final class TypedParameterValue<J> {
|
|||
*
|
||||
* @return The Hibernate type to use.
|
||||
*/
|
||||
public AllowableParameterType<J> getType() {
|
||||
return type instanceof AllowableParameterType ? (AllowableParameterType<J>) type : null;
|
||||
public BindableType<J> getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -47,7 +47,7 @@ import org.hibernate.internal.util.collections.Stack;
|
|||
import org.hibernate.internal.util.collections.StandardStack;
|
||||
import org.hibernate.metamodel.CollectionClassification;
|
||||
import org.hibernate.metamodel.mapping.CollectionPart;
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.metamodel.model.domain.BasicDomainType;
|
||||
import org.hibernate.metamodel.model.domain.DomainType;
|
||||
import org.hibernate.metamodel.model.domain.EntityDomainType;
|
||||
|
@ -3560,7 +3560,7 @@ public class SemanticQueryBuilder<R> extends HqlParserBaseVisitor<Object> implem
|
|||
}
|
||||
|
||||
return new SqmCastTarget<>(
|
||||
(AllowableFunctionReturnType<?>)
|
||||
(ReturnableType<?>)
|
||||
creationContext.getJpaMetamodel().getTypeConfiguration()
|
||||
.resolveCastTargetType( targetName ),
|
||||
//TODO: is there some way to interpret as length vs precision/scale here at this point?
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
package org.hibernate.query.internal;
|
||||
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.QueryParameter;
|
||||
|
||||
/**
|
||||
|
@ -18,20 +18,20 @@ import org.hibernate.query.QueryParameter;
|
|||
* @author Steve Ebersole
|
||||
*/
|
||||
public abstract class AbstractQueryParameterImpl<T> implements QueryParameter<T> {
|
||||
private AllowableParameterType<T> expectedType;
|
||||
private BindableType<T> expectedType;
|
||||
|
||||
public AbstractQueryParameterImpl(AllowableParameterType<T> expectedType) {
|
||||
public AbstractQueryParameterImpl(BindableType<T> expectedType) {
|
||||
this.expectedType = expectedType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AllowableParameterType<T> getHibernateType() {
|
||||
public BindableType<T> getHibernateType() {
|
||||
return expectedType;
|
||||
}
|
||||
|
||||
public void setHibernateType(AllowableParameterType<?> expectedType) {
|
||||
public void setHibernateType(BindableType<?> expectedType) {
|
||||
//noinspection unchecked
|
||||
this.expectedType = (AllowableParameterType<T>) expectedType;
|
||||
this.expectedType = (BindableType<T>) expectedType;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -14,7 +14,7 @@ import java.util.Calendar;
|
|||
|
||||
import org.hibernate.engine.spi.SessionFactoryImplementor;
|
||||
import org.hibernate.metamodel.mapping.JdbcMapping;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.sqm.SqmExpressable;
|
||||
import org.hibernate.type.StandardBasicTypes;
|
||||
import org.hibernate.type.descriptor.java.TemporalJavaTypeDescriptor;
|
||||
|
@ -34,9 +34,9 @@ public class BindingTypeHelper {
|
|||
private BindingTypeHelper() {
|
||||
}
|
||||
|
||||
public <T> AllowableParameterType<T> resolveTemporalPrecision(
|
||||
public <T> BindableType<T> resolveTemporalPrecision(
|
||||
TemporalType precision,
|
||||
AllowableParameterType<T> declaredParameterType,
|
||||
BindableType<T> declaredParameterType,
|
||||
SessionFactoryImplementor sessionFactory) {
|
||||
if ( precision != null ) {
|
||||
final SqmExpressable<T> sqmExpressable = declaredParameterType.resolveExpressable( sessionFactory );
|
||||
|
@ -71,13 +71,13 @@ public class BindingTypeHelper {
|
|||
final TemporalType temporalType = ( (TemporalJavaTypeDescriptor<?>) baseType.getJavaTypeDescriptor() ).getPrecision();
|
||||
switch ( temporalType ) {
|
||||
case TIMESTAMP: {
|
||||
return (JdbcMapping) resolveTimestampTemporalTypeVariant( javaType, (AllowableParameterType<?>) baseType, typeConfiguration );
|
||||
return (JdbcMapping) resolveTimestampTemporalTypeVariant( javaType, (BindableType<?>) baseType, typeConfiguration );
|
||||
}
|
||||
case DATE: {
|
||||
return (JdbcMapping) resolveDateTemporalTypeVariant( javaType, (AllowableParameterType<?>) baseType, typeConfiguration );
|
||||
return (JdbcMapping) resolveDateTemporalTypeVariant( javaType, (BindableType<?>) baseType, typeConfiguration );
|
||||
}
|
||||
case TIME: {
|
||||
return (JdbcMapping) resolveTimeTemporalTypeVariant( javaType, (AllowableParameterType<?>) baseType, typeConfiguration );
|
||||
return (JdbcMapping) resolveTimeTemporalTypeVariant( javaType, (BindableType<?>) baseType, typeConfiguration );
|
||||
}
|
||||
default: {
|
||||
throw new IllegalArgumentException( "Unexpected TemporalType [" + temporalType + "]; expecting TIMESTAMP, DATE or TIME" );
|
||||
|
@ -86,9 +86,9 @@ public class BindingTypeHelper {
|
|||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
public AllowableParameterType resolveTimestampTemporalTypeVariant(
|
||||
public BindableType resolveTimestampTemporalTypeVariant(
|
||||
Class javaType,
|
||||
AllowableParameterType baseType,
|
||||
BindableType baseType,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
if ( baseType.getBindableJavaType().isAssignableFrom( javaType ) ) {
|
||||
return baseType;
|
||||
|
@ -121,9 +121,9 @@ public class BindingTypeHelper {
|
|||
throw new IllegalArgumentException( "Unsure how to handle given Java type [" + javaType.getName() + "] as TemporalType#TIMESTAMP" );
|
||||
}
|
||||
|
||||
public AllowableParameterType<?> resolveDateTemporalTypeVariant(
|
||||
public BindableType<?> resolveDateTemporalTypeVariant(
|
||||
Class<?> javaType,
|
||||
AllowableParameterType<?> baseType,
|
||||
BindableType<?> baseType,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
if ( baseType.getBindableJavaType().isAssignableFrom( javaType ) ) {
|
||||
return baseType;
|
||||
|
@ -152,9 +152,9 @@ public class BindingTypeHelper {
|
|||
throw new IllegalArgumentException( "Unsure how to handle given Java type [" + javaType.getName() + "] as TemporalType#DATE" );
|
||||
}
|
||||
|
||||
public AllowableParameterType resolveTimeTemporalTypeVariant(
|
||||
public BindableType resolveTimeTemporalTypeVariant(
|
||||
Class javaType,
|
||||
AllowableParameterType baseType,
|
||||
BindableType baseType,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
if ( Calendar.class.isAssignableFrom( javaType ) ) {
|
||||
return typeConfiguration.getBasicTypeRegistry().resolve( StandardBasicTypes.CALENDAR_TIME );
|
||||
|
|
|
@ -22,7 +22,7 @@ import org.hibernate.QueryException;
|
|||
import org.hibernate.internal.util.StringHelper;
|
||||
import org.hibernate.internal.util.collections.CollectionHelper;
|
||||
import org.hibernate.internal.util.compare.ComparableComparator;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.QueryParameter;
|
||||
import org.hibernate.query.spi.ParameterMetadataImplementor;
|
||||
import org.hibernate.query.spi.QueryParameterImplementor;
|
||||
|
@ -167,13 +167,13 @@ public class ParameterMetadataImpl implements ParameterMetadataImplementor {
|
|||
}
|
||||
|
||||
@Override
|
||||
public <T> AllowableParameterType<T> getInferredParameterType(QueryParameter<T> parameter) {
|
||||
public <T> BindableType<T> getInferredParameterType(QueryParameter<T> parameter) {
|
||||
final List<SqmParameter<?>> sqmParameters = queryParameters.get( parameter );
|
||||
if ( sqmParameters == null || sqmParameters.isEmpty() ) {
|
||||
return null;
|
||||
}
|
||||
for ( SqmParameter<?> sqmParameter : sqmParameters ) {
|
||||
final AllowableParameterType<T> nodeType = (AllowableParameterType<T>) sqmParameter.getNodeType();
|
||||
final BindableType<T> nodeType = (BindableType<T>) sqmParameter.getNodeType();
|
||||
if ( nodeType != null ) {
|
||||
return nodeType;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ 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.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.QueryParameter;
|
||||
import org.hibernate.query.spi.QueryParameterBinding;
|
||||
import org.hibernate.query.spi.QueryParameterBindingValidator;
|
||||
|
@ -38,7 +38,7 @@ public class QueryParameterBindingImpl<T> implements QueryParameterBinding<T>, J
|
|||
private boolean isBound;
|
||||
private boolean isMultiValued;
|
||||
|
||||
private AllowableParameterType<T> bindType;
|
||||
private BindableType<T> bindType;
|
||||
private MappingModelExpressable<T> type;
|
||||
private TemporalType explicitTemporalPrecision;
|
||||
|
||||
|
@ -64,7 +64,7 @@ public class QueryParameterBindingImpl<T> implements QueryParameterBinding<T>, J
|
|||
public QueryParameterBindingImpl(
|
||||
QueryParameter<T> queryParameter,
|
||||
SessionFactoryImplementor sessionFactory,
|
||||
AllowableParameterType<T> bindType,
|
||||
BindableType<T> bindType,
|
||||
boolean isBindingValidationRequired) {
|
||||
this.queryParameter = queryParameter;
|
||||
this.sessionFactory = sessionFactory;
|
||||
|
@ -73,7 +73,7 @@ public class QueryParameterBindingImpl<T> implements QueryParameterBinding<T>, J
|
|||
}
|
||||
|
||||
@Override
|
||||
public AllowableParameterType<T> getBindType() {
|
||||
public BindableType<T> getBindType() {
|
||||
return bindType;
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,7 @@ public class QueryParameterBindingImpl<T> implements QueryParameterBinding<T>, J
|
|||
bindValue( value );
|
||||
}
|
||||
|
||||
private T coerce(T value, AllowableParameterType<T> parameterType) {
|
||||
private T coerce(T value, BindableType<T> parameterType) {
|
||||
if ( value == null ) {
|
||||
return null;
|
||||
}
|
||||
|
@ -187,7 +187,7 @@ public class QueryParameterBindingImpl<T> implements QueryParameterBinding<T>, J
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setBindValue(T value, AllowableParameterType<T> clarifiedType) {
|
||||
public void setBindValue(T value, BindableType<T> clarifiedType) {
|
||||
if ( handleAsMultiValue( value ) ) {
|
||||
return;
|
||||
}
|
||||
|
@ -284,7 +284,7 @@ public class QueryParameterBindingImpl<T> implements QueryParameterBinding<T>, J
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setBindValues(Collection<? extends T> values, AllowableParameterType<T> clarifiedType) {
|
||||
public void setBindValues(Collection<? extends T> values, BindableType<T> clarifiedType) {
|
||||
if ( clarifiedType != null ) {
|
||||
this.bindType = clarifiedType;
|
||||
}
|
||||
|
@ -312,7 +312,7 @@ public class QueryParameterBindingImpl<T> implements QueryParameterBinding<T>, J
|
|||
this.explicitTemporalPrecision = temporalTypePrecision;
|
||||
}
|
||||
|
||||
private JavaType<T> determineJavaType(AllowableParameterType<T> bindType) {
|
||||
private JavaType<T> determineJavaType(BindableType<T> bindType) {
|
||||
final SqmExpressable<T> sqmExpressable = bindType.resolveExpressable( sessionFactory );
|
||||
assert sqmExpressable != null;
|
||||
|
||||
|
@ -328,16 +328,16 @@ public class QueryParameterBindingImpl<T> implements QueryParameterBinding<T>, J
|
|||
public boolean setType(MappingModelExpressable<T> type) {
|
||||
this.type = type;
|
||||
if ( bindType == null || bindType.getBindableJavaType() == Object.class ) {
|
||||
if ( type instanceof AllowableParameterType<?> ) {
|
||||
if ( type instanceof BindableType<?> ) {
|
||||
final boolean changed = bindType != null && type != bindType;
|
||||
this.bindType = (AllowableParameterType<T>) type;
|
||||
this.bindType = (BindableType<T>) type;
|
||||
return changed;
|
||||
}
|
||||
else if ( type instanceof BasicValuedMapping ) {
|
||||
final JdbcMapping jdbcMapping = ( (BasicValuedMapping) type ).getJdbcMapping();
|
||||
if ( jdbcMapping instanceof AllowableParameterType<?> ) {
|
||||
if ( jdbcMapping instanceof BindableType<?> ) {
|
||||
final boolean changed = bindType != null && jdbcMapping != bindType;
|
||||
this.bindType = (AllowableParameterType<T>) jdbcMapping;
|
||||
this.bindType = (BindableType<T>) jdbcMapping;
|
||||
return changed;
|
||||
}
|
||||
}
|
||||
|
@ -349,7 +349,7 @@ public class QueryParameterBindingImpl<T> implements QueryParameterBinding<T>, J
|
|||
QueryParameterBindingValidator.INSTANCE.validate( getBindType(), value, sessionFactory );
|
||||
}
|
||||
|
||||
private void validate(T value, AllowableParameterType<?> clarifiedType) {
|
||||
private void validate(T value, BindableType<?> clarifiedType) {
|
||||
QueryParameterBindingValidator.INSTANCE.validate( clarifiedType, value, sessionFactory );
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ package org.hibernate.query.internal;
|
|||
|
||||
import java.util.Objects;
|
||||
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.AbstractQueryParameter;
|
||||
import org.hibernate.query.named.NamedQueryMemento;
|
||||
import org.hibernate.query.sqm.tree.expression.SqmParameter;
|
||||
|
@ -50,7 +50,7 @@ public class QueryParameterNamedImpl<T> extends AbstractQueryParameter<T> {
|
|||
private QueryParameterNamedImpl(
|
||||
String name,
|
||||
boolean allowMultiValuedBinding,
|
||||
AllowableParameterType anticipatedType) {
|
||||
BindableType anticipatedType) {
|
||||
//noinspection unchecked
|
||||
super( allowMultiValuedBinding, anticipatedType );
|
||||
this.name = name;
|
||||
|
|
|
@ -9,7 +9,7 @@ package org.hibernate.query.internal;
|
|||
|
||||
import java.util.Objects;
|
||||
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.AbstractQueryParameter;
|
||||
import org.hibernate.query.named.NamedQueryMemento;
|
||||
import org.hibernate.query.sqm.tree.expression.SqmParameter;
|
||||
|
@ -52,7 +52,7 @@ public class QueryParameterPositionalImpl<T> extends AbstractQueryParameter<T> {
|
|||
public QueryParameterPositionalImpl(
|
||||
Integer position,
|
||||
boolean allowMultiValuedBinding,
|
||||
AllowableParameterType<T> anticipatedType) {
|
||||
BindableType<T> anticipatedType) {
|
||||
super( allowMultiValuedBinding, anticipatedType );
|
||||
this.position = position;
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ import org.hibernate.metamodel.model.domain.ManagedDomainType;
|
|||
import org.hibernate.property.access.spi.BuiltInPropertyAccessStrategies;
|
||||
import org.hibernate.property.access.spi.Getter;
|
||||
import org.hibernate.property.access.spi.PropertyAccess;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.IllegalQueryOperationException;
|
||||
import org.hibernate.query.QueryLogging;
|
||||
import org.hibernate.query.QueryParameter;
|
||||
|
@ -957,7 +957,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
if ( value instanceof TypedParameterValue ) {
|
||||
@SuppressWarnings("unchecked")
|
||||
final TypedParameterValue<Object> typedValue = (TypedParameterValue<Object>) value;
|
||||
final AllowableParameterType<Object> type = typedValue.getType();
|
||||
final BindableType<Object> type = typedValue.getType();
|
||||
if ( type != null ) {
|
||||
return setParameter( name, typedValue.getValue(), type );
|
||||
}
|
||||
|
@ -973,7 +973,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
}
|
||||
|
||||
if ( param.allowsMultiValuedBinding() ) {
|
||||
final AllowableParameterType<?> hibernateType = param.getHibernateType();
|
||||
final BindableType<?> hibernateType = param.getHibernateType();
|
||||
if ( hibernateType == null || isInstance( hibernateType, value ) ) {
|
||||
if ( value instanceof Collection ) {
|
||||
//noinspection rawtypes
|
||||
|
@ -987,7 +987,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
return this;
|
||||
}
|
||||
|
||||
private boolean isInstance(AllowableParameterType<?> parameterType, Object value) {
|
||||
private boolean isInstance(BindableType<?> parameterType, Object value) {
|
||||
final SqmExpressable<?> sqmExpressable = parameterType.resolveExpressable( session.getFactory() );
|
||||
assert sqmExpressable != null;
|
||||
|
||||
|
@ -1004,7 +1004,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
setParameter( name, value );
|
||||
}
|
||||
else {
|
||||
final AllowableParameterType<P> paramType;
|
||||
final BindableType<P> paramType;
|
||||
final BasicType<P> basicType = getSession().getFactory().getTypeConfiguration().standardBasicTypeForJavaType( javaType );
|
||||
if ( basicType != null ) {
|
||||
paramType = basicType;
|
||||
|
@ -1018,7 +1018,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
paramType = managedDomainType;
|
||||
}
|
||||
else {
|
||||
throw new HibernateException( "Unable to determine AllowableParameterType : " + javaType.getName() );
|
||||
throw new HibernateException( "Unable to determine BindableType : " + javaType.getName() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1029,7 +1029,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public <P> QueryImplementor<R> setParameter(String name, P value, AllowableParameterType<P> type) {
|
||||
public <P> QueryImplementor<R> setParameter(String name, P value, BindableType<P> type) {
|
||||
this.<P>locateBinding( name ).setBindValue( value, type );
|
||||
return this;
|
||||
}
|
||||
|
@ -1045,7 +1045,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
if ( value instanceof TypedParameterValue ) {
|
||||
@SuppressWarnings("unchecked")
|
||||
final TypedParameterValue<Object> typedValue = (TypedParameterValue<Object>) value;
|
||||
final AllowableParameterType<Object> type = typedValue.getType();
|
||||
final BindableType<Object> type = typedValue.getType();
|
||||
if ( type != null ) {
|
||||
return setParameter( position, typedValue.getValue(), type );
|
||||
}
|
||||
|
@ -1061,7 +1061,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
}
|
||||
|
||||
if ( param.allowsMultiValuedBinding() ) {
|
||||
final AllowableParameterType<?> hibernateType = param.getHibernateType();
|
||||
final BindableType<?> hibernateType = param.getHibernateType();
|
||||
if ( hibernateType == null || isInstance( hibernateType, value ) ) {
|
||||
if ( value instanceof Collection ) {
|
||||
//noinspection rawtypes,unchecked
|
||||
|
@ -1084,7 +1084,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
setParameter( position, value );
|
||||
}
|
||||
else {
|
||||
final AllowableParameterType<P> paramType;
|
||||
final BindableType<P> paramType;
|
||||
final BasicType<P> basicType = getSession().getFactory().getTypeConfiguration().standardBasicTypeForJavaType( javaType );
|
||||
if ( basicType != null ) {
|
||||
paramType = basicType;
|
||||
|
@ -1098,7 +1098,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
paramType = managedDomainType;
|
||||
}
|
||||
else {
|
||||
throw new HibernateException( "Unable to determine AllowableParameterType : " + javaType.getName() );
|
||||
throw new HibernateException( "Unable to determine BindableType : " + javaType.getName() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1109,7 +1109,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public <P> QueryImplementor<R> setParameter(int position, P value, AllowableParameterType<P> type) {
|
||||
public <P> QueryImplementor<R> setParameter(int position, P value, BindableType<P> type) {
|
||||
this.<P>locateBinding( position ).setBindValue( value, type );
|
||||
return this;
|
||||
}
|
||||
|
@ -1138,7 +1138,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
setParameter( parameter, value );
|
||||
}
|
||||
else {
|
||||
final AllowableParameterType<P> paramType;
|
||||
final BindableType<P> paramType;
|
||||
final BasicType<P> basicType = getSession().getFactory().getTypeConfiguration().standardBasicTypeForJavaType( javaType );
|
||||
if ( basicType != null ) {
|
||||
paramType = basicType;
|
||||
|
@ -1152,7 +1152,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
paramType = managedDomainType;
|
||||
}
|
||||
else {
|
||||
throw new HibernateException( "Unable to determine AllowableParameterType : " + javaType.getName() );
|
||||
throw new HibernateException( "Unable to determine BindableType : " + javaType.getName() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1163,7 +1163,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public <P> QueryImplementor<R> setParameter(QueryParameter<P> parameter, P value, AllowableParameterType<P> type) {
|
||||
public <P> QueryImplementor<R> setParameter(QueryParameter<P> parameter, P value, BindableType<P> type) {
|
||||
locateBinding( parameter ).setBindValue( value, type );
|
||||
return this;
|
||||
}
|
||||
|
@ -1174,7 +1174,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
if ( value instanceof TypedParameterValue ) {
|
||||
@SuppressWarnings("unchecked")
|
||||
final TypedParameterValue<P> typedValue = (TypedParameterValue<P>) value;
|
||||
final AllowableParameterType<P> type = typedValue.getType();
|
||||
final BindableType<P> type = typedValue.getType();
|
||||
if ( type != null ) {
|
||||
setParameter( parameter, typedValue.getValue(), type );
|
||||
}
|
||||
|
@ -1189,7 +1189,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
return this;
|
||||
}
|
||||
|
||||
private <P> void setParameter(Parameter<P> parameter, P value, AllowableParameterType<P> type) {
|
||||
private <P> void setParameter(Parameter<P> parameter, P value, BindableType<P> type) {
|
||||
if ( parameter instanceof QueryParameter ) {
|
||||
setParameter( (QueryParameter<P>) parameter, value, type );
|
||||
}
|
||||
|
@ -1227,7 +1227,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
setParameterList( name, values );
|
||||
}
|
||||
else {
|
||||
final AllowableParameterType<P> paramType;
|
||||
final BindableType<P> paramType;
|
||||
final BasicType<P> basicType = getSession().getFactory().getTypeConfiguration().standardBasicTypeForJavaType( javaType );
|
||||
if ( basicType != null ) {
|
||||
paramType = basicType;
|
||||
|
@ -1241,7 +1241,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
paramType = managedDomainType;
|
||||
}
|
||||
else {
|
||||
throw new HibernateException( "Unable to determine AllowableParameterType : " + javaType.getName() );
|
||||
throw new HibernateException( "Unable to determine BindableType : " + javaType.getName() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1253,7 +1253,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
|
||||
|
||||
@Override
|
||||
public <P> QueryImplementor<R> setParameterList(String name, Collection<? extends P> values, AllowableParameterType<P> type) {
|
||||
public <P> QueryImplementor<R> setParameterList(String name, Collection<? extends P> values, BindableType<P> type) {
|
||||
this.<P>locateBinding( name ).setBindValues( values, type );
|
||||
return this;
|
||||
}
|
||||
|
@ -1274,7 +1274,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
setParameterList( name, values );
|
||||
}
|
||||
else {
|
||||
final AllowableParameterType<P> paramType;
|
||||
final BindableType<P> paramType;
|
||||
final BasicType<P> basicType = getSession().getFactory().getTypeConfiguration().standardBasicTypeForJavaType( javaType );
|
||||
if ( basicType != null ) {
|
||||
paramType = basicType;
|
||||
|
@ -1288,7 +1288,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
paramType = managedDomainType;
|
||||
}
|
||||
else {
|
||||
throw new HibernateException( "Unable to determine AllowableParameterType : " + javaType.getName() );
|
||||
throw new HibernateException( "Unable to determine BindableType : " + javaType.getName() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1298,7 +1298,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public <P> QueryImplementor<R> setParameterList(String name, P[] values, AllowableParameterType<P> type) {
|
||||
public <P> QueryImplementor<R> setParameterList(String name, P[] values, BindableType<P> type) {
|
||||
this.<P>locateBinding( name ).setBindValues( Arrays.asList( values ), type );
|
||||
return this;
|
||||
}
|
||||
|
@ -1319,7 +1319,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
setParameterList( position, values );
|
||||
}
|
||||
else {
|
||||
final AllowableParameterType<P> paramType;
|
||||
final BindableType<P> paramType;
|
||||
final BasicType<P> basicType = getSession().getFactory().getTypeConfiguration().standardBasicTypeForJavaType( javaType );
|
||||
if ( basicType != null ) {
|
||||
paramType = basicType;
|
||||
|
@ -1333,7 +1333,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
paramType = managedDomainType;
|
||||
}
|
||||
else {
|
||||
throw new HibernateException( "Unable to determine AllowableParameterType : " + javaType.getName() );
|
||||
throw new HibernateException( "Unable to determine BindableType : " + javaType.getName() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1344,7 +1344,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public <P> QueryImplementor<R> setParameterList(int position, Collection<? extends P> values, AllowableParameterType<P> type) {
|
||||
public <P> QueryImplementor<R> setParameterList(int position, Collection<? extends P> values, BindableType<P> type) {
|
||||
this.<P>locateBinding( position ).setBindValues( values, type );
|
||||
return this;
|
||||
}
|
||||
|
@ -1365,7 +1365,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
setParameterList( position, values );
|
||||
}
|
||||
else {
|
||||
final AllowableParameterType<P> paramType;
|
||||
final BindableType<P> paramType;
|
||||
final BasicType<P> basicType = getSession().getFactory().getTypeConfiguration().standardBasicTypeForJavaType( javaType );
|
||||
if ( basicType != null ) {
|
||||
paramType = basicType;
|
||||
|
@ -1379,7 +1379,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
paramType = managedDomainType;
|
||||
}
|
||||
else {
|
||||
throw new HibernateException( "Unable to determine AllowableParameterType : " + javaType.getName() );
|
||||
throw new HibernateException( "Unable to determine BindableType : " + javaType.getName() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1390,8 +1390,8 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public <P> QueryImplementor<R> setParameterList(int position, P[] values, AllowableParameterType<P> type) {
|
||||
locateBinding( position ).setBindValues( Arrays.asList( values ), (AllowableParameterType) type );
|
||||
public <P> QueryImplementor<R> setParameterList(int position, P[] values, BindableType<P> type) {
|
||||
locateBinding( position ).setBindValues( Arrays.asList( values ), (BindableType) type );
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -1418,7 +1418,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
setParameterList( parameter, values );
|
||||
}
|
||||
else {
|
||||
final AllowableParameterType<P> paramType;
|
||||
final BindableType<P> paramType;
|
||||
final BasicType<P> basicType = getSession().getFactory().getTypeConfiguration().standardBasicTypeForJavaType( javaType );
|
||||
if ( basicType != null ) {
|
||||
paramType = basicType;
|
||||
|
@ -1432,7 +1432,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
paramType = managedDomainType;
|
||||
}
|
||||
else {
|
||||
throw new HibernateException( "Unable to determine AllowableParameterType : " + javaType.getName() );
|
||||
throw new HibernateException( "Unable to determine BindableType : " + javaType.getName() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1443,7 +1443,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public <P> QueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, AllowableParameterType<P> type) {
|
||||
public <P> QueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, BindableType<P> type) {
|
||||
locateBinding( parameter ).setBindValues( values, type );
|
||||
return this;
|
||||
}
|
||||
|
@ -1464,7 +1464,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
setParameterList( parameter, values );
|
||||
}
|
||||
else {
|
||||
final AllowableParameterType<P> paramType;
|
||||
final BindableType<P> paramType;
|
||||
final BasicType<P> basicType = getSession().getFactory().getTypeConfiguration().standardBasicTypeForJavaType( javaType );
|
||||
if ( basicType != null ) {
|
||||
paramType = basicType;
|
||||
|
@ -1478,7 +1478,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
paramType = managedDomainType;
|
||||
}
|
||||
else {
|
||||
throw new HibernateException( "Unable to determine AllowableParameterType : " + javaType.getName() );
|
||||
throw new HibernateException( "Unable to determine BindableType : " + javaType.getName() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1490,7 +1490,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
|
||||
|
||||
@Override
|
||||
public <P> QueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values, AllowableParameterType<P> type) {
|
||||
public <P> QueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values, BindableType<P> type) {
|
||||
locateBinding( parameter ).setBindValues( Arrays.asList( values ), type );
|
||||
return this;
|
||||
}
|
||||
|
@ -1585,7 +1585,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
setParameterList( paramName, (Object[]) object );
|
||||
}
|
||||
else {
|
||||
AllowableParameterType<Object> type = determineType( paramName, retType );
|
||||
BindableType<Object> type = determineType( paramName, retType );
|
||||
setParameter( paramName, object, type );
|
||||
}
|
||||
}
|
||||
|
@ -1597,8 +1597,8 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
}
|
||||
|
||||
@SuppressWarnings("WeakerAccess")
|
||||
protected AllowableParameterType<Object> determineType(String namedParam, Class<?> retType) {
|
||||
AllowableParameterType<?> type = locateBinding( namedParam ).getBindType();
|
||||
protected BindableType<Object> determineType(String namedParam, Class<?> retType) {
|
||||
BindableType<?> type = locateBinding( namedParam ).getBindType();
|
||||
if ( type == null ) {
|
||||
type = getParameterMetadata().getQueryParameter( namedParam ).getHibernateType();
|
||||
}
|
||||
|
@ -1606,7 +1606,7 @@ public abstract class AbstractQuery<R> implements QueryImplementor<R> {
|
|||
type = getSession().getFactory().resolveParameterBindType( retType );
|
||||
}
|
||||
//noinspection unchecked
|
||||
return (AllowableParameterType<Object>) type;
|
||||
return (BindableType<Object>) type;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -16,7 +16,7 @@ import java.util.Map;
|
|||
import org.hibernate.Incubating;
|
||||
import org.hibernate.ScrollMode;
|
||||
import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.Query;
|
||||
import org.hibernate.query.QueryParameter;
|
||||
|
||||
|
@ -53,7 +53,7 @@ public interface QueryImplementor<R> extends Query<R> {
|
|||
<P> QueryImplementor<R> setParameter(String name, P value, Class<P> type);
|
||||
|
||||
@Override
|
||||
<P> QueryImplementor<R> setParameter(String name, P value, AllowableParameterType<P> type);
|
||||
<P> QueryImplementor<R> setParameter(String name, P value, BindableType<P> type);
|
||||
|
||||
@Override
|
||||
QueryImplementor<R> setParameter(String name, Instant value, TemporalType temporalType);
|
||||
|
@ -71,7 +71,7 @@ public interface QueryImplementor<R> extends Query<R> {
|
|||
<P> QueryImplementor<R> setParameter(int position, P value, Class<P> type);
|
||||
|
||||
@Override
|
||||
<P> QueryImplementor<R> setParameter(int position, P value, AllowableParameterType<P> type);
|
||||
<P> QueryImplementor<R> setParameter(int position, P value, BindableType<P> type);
|
||||
|
||||
@Override
|
||||
QueryImplementor<R> setParameter(int position, Instant value, TemporalType temporalType);
|
||||
|
@ -89,7 +89,7 @@ public interface QueryImplementor<R> extends Query<R> {
|
|||
<P> QueryImplementor<R> setParameter(QueryParameter<P> parameter, P value, Class<P> type);
|
||||
|
||||
@Override
|
||||
<P> QueryImplementor<R> setParameter(QueryParameter<P> parameter, P val, AllowableParameterType<P> type);
|
||||
<P> QueryImplementor<R> setParameter(QueryParameter<P> parameter, P val, BindableType<P> type);
|
||||
|
||||
@Override
|
||||
<T> QueryImplementor<R> setParameter(Parameter<T> param, T value);
|
||||
|
@ -107,7 +107,7 @@ public interface QueryImplementor<R> extends Query<R> {
|
|||
<P> QueryImplementor<R> setParameterList(String name, Collection<? extends P> values, Class<P> javaType);
|
||||
|
||||
@Override
|
||||
<P> QueryImplementor<R> setParameterList(String name, Collection<? extends P> values, AllowableParameterType<P> type);
|
||||
<P> QueryImplementor<R> setParameterList(String name, Collection<? extends P> values, BindableType<P> type);
|
||||
|
||||
@Override
|
||||
QueryImplementor<R> setParameterList(String name, Object[] values);
|
||||
|
@ -116,7 +116,7 @@ public interface QueryImplementor<R> extends Query<R> {
|
|||
<P> QueryImplementor<R> setParameterList(String name, P[] values, Class<P> javaType);
|
||||
|
||||
@Override
|
||||
<P> QueryImplementor<R> setParameterList(String name, P[] values, AllowableParameterType<P> type);
|
||||
<P> QueryImplementor<R> setParameterList(String name, P[] values, BindableType<P> type);
|
||||
|
||||
@Override
|
||||
QueryImplementor<R> setParameterList(int position, Collection values);
|
||||
|
@ -125,7 +125,7 @@ public interface QueryImplementor<R> extends Query<R> {
|
|||
<P> QueryImplementor<R> setParameterList(int position, Collection<? extends P> values, Class<P> javaType);
|
||||
|
||||
@Override
|
||||
<P> QueryImplementor<R> setParameterList(int position, Collection<? extends P> values, AllowableParameterType<P> type);
|
||||
<P> QueryImplementor<R> setParameterList(int position, Collection<? extends P> values, BindableType<P> type);
|
||||
|
||||
@Override
|
||||
QueryImplementor<R> setParameterList(int position, Object[] values);
|
||||
|
@ -134,7 +134,7 @@ public interface QueryImplementor<R> extends Query<R> {
|
|||
<P> QueryImplementor<R> setParameterList(int position, P[] values, Class<P> javaType);
|
||||
|
||||
@Override
|
||||
<P> QueryImplementor<R> setParameterList(int position, P[] values, AllowableParameterType<P> type);
|
||||
<P> QueryImplementor<R> setParameterList(int position, P[] values, BindableType<P> type);
|
||||
|
||||
@Override
|
||||
<P> QueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values);
|
||||
|
@ -143,7 +143,7 @@ public interface QueryImplementor<R> extends Query<R> {
|
|||
<P> QueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, Class<P> javaType);
|
||||
|
||||
@Override
|
||||
<P> QueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, AllowableParameterType<P> type);
|
||||
<P> QueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, BindableType<P> type);
|
||||
|
||||
@Override
|
||||
<P> QueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values);
|
||||
|
@ -152,7 +152,7 @@ public interface QueryImplementor<R> extends Query<R> {
|
|||
<P> QueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values, Class<P> javaType);
|
||||
|
||||
@Override
|
||||
<P> QueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values, AllowableParameterType<P> type);
|
||||
<P> QueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values, BindableType<P> type);
|
||||
|
||||
@Override
|
||||
QueryImplementor<R> setProperties(Object bean);
|
||||
|
|
|
@ -11,7 +11,7 @@ import jakarta.persistence.TemporalType;
|
|||
|
||||
import org.hibernate.Incubating;
|
||||
import org.hibernate.metamodel.mapping.MappingModelExpressable;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.type.spi.TypeConfiguration;
|
||||
|
||||
/**
|
||||
|
@ -39,7 +39,7 @@ public interface QueryParameterBinding<T> {
|
|||
*
|
||||
* @return The currently associated Type
|
||||
*/
|
||||
AllowableParameterType<T> getBindType();
|
||||
BindableType<T> getBindType();
|
||||
|
||||
/**
|
||||
* If the parameter represents a temporal type, return the explicitly
|
||||
|
@ -65,7 +65,7 @@ public interface QueryParameterBinding<T> {
|
|||
* @param value The bind value
|
||||
* @param clarifiedType The explicit Type to use
|
||||
*/
|
||||
void setBindValue(T value, AllowableParameterType<T> clarifiedType);
|
||||
void setBindValue(T value, BindableType<T> clarifiedType);
|
||||
|
||||
/**
|
||||
* Sets the parameter binding value using the explicit TemporalType.
|
||||
|
@ -94,7 +94,7 @@ public interface QueryParameterBinding<T> {
|
|||
* @param values The bind values
|
||||
* @param clarifiedType The explicit Type to use
|
||||
*/
|
||||
void setBindValues(Collection<? extends T> values, AllowableParameterType<T> clarifiedType);
|
||||
void setBindValues(Collection<? extends T> values, BindableType<T> clarifiedType);
|
||||
|
||||
/**Sets the parameter binding value using the explicit TemporalType in regards to the individual values.
|
||||
*
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
package org.hibernate.query.spi;
|
||||
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.type.spi.TypeConfiguration;
|
||||
|
||||
/**
|
||||
|
@ -16,7 +16,7 @@ import org.hibernate.type.spi.TypeConfiguration;
|
|||
* @author Steve Ebersole
|
||||
*/
|
||||
public interface QueryParameterBindingTypeResolver {
|
||||
<T> AllowableParameterType<T> resolveParameterBindType(T bindValue);
|
||||
<T> AllowableParameterType<T> resolveParameterBindType(Class<T> clazz);
|
||||
<T> BindableType<T> resolveParameterBindType(T bindValue);
|
||||
<T> BindableType<T> resolveParameterBindType(Class<T> clazz);
|
||||
TypeConfiguration getTypeConfiguration();
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import java.util.Collection;
|
|||
import java.util.Date;
|
||||
|
||||
import org.hibernate.engine.spi.SessionFactoryImplementor;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.sqm.SqmExpressable;
|
||||
import org.hibernate.type.descriptor.converter.AttributeConverterTypeAdapter;
|
||||
import org.hibernate.type.descriptor.java.JavaType;
|
||||
|
@ -28,12 +28,12 @@ public class QueryParameterBindingValidator {
|
|||
private QueryParameterBindingValidator() {
|
||||
}
|
||||
|
||||
public void validate(AllowableParameterType<?> paramType, Object bind, SessionFactoryImplementor sessionFactory) {
|
||||
public void validate(BindableType<?> paramType, Object bind, SessionFactoryImplementor sessionFactory) {
|
||||
validate( paramType, bind, null, sessionFactory );
|
||||
}
|
||||
|
||||
public void validate(
|
||||
AllowableParameterType<?> paramType,
|
||||
BindableType<?> paramType,
|
||||
Object bind,
|
||||
TemporalType temporalPrecision,
|
||||
SessionFactoryImplementor sessionFactory) {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
package org.hibernate.query.spi;
|
||||
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.QueryParameter;
|
||||
import org.hibernate.query.named.NamedQueryMemento;
|
||||
|
||||
|
@ -16,7 +16,7 @@ import org.hibernate.query.named.NamedQueryMemento;
|
|||
public interface QueryParameterImplementor<T> extends QueryParameter<T> {
|
||||
void disallowMultiValuedBinding();
|
||||
|
||||
void applyAnticipatedType(AllowableParameterType<?> type);
|
||||
void applyAnticipatedType(BindableType<?> type);
|
||||
|
||||
NamedQueryMemento.ParameterMemento toMemento();
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import java.util.Collection;
|
|||
import jakarta.persistence.TemporalType;
|
||||
|
||||
import org.hibernate.Incubating;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.internal.QueryParameterBindingsImpl;
|
||||
import org.hibernate.type.Type;
|
||||
|
||||
|
@ -37,7 +37,7 @@ public interface QueryParameterListBinding<T> {
|
|||
* @param values The bind values
|
||||
* @param clarifiedType The explicit Type to use
|
||||
*/
|
||||
void setBindValues(Collection<T> values, AllowableParameterType clarifiedType);
|
||||
void setBindValues(Collection<T> values, BindableType clarifiedType);
|
||||
|
||||
/**Sets the parameter binding value using the explicit TemporalType in regards to the individual values.
|
||||
*
|
||||
|
|
|
@ -42,7 +42,7 @@ import org.hibernate.internal.util.collections.CollectionHelper;
|
|||
import org.hibernate.jpa.internal.util.LockModeTypeHelper;
|
||||
import org.hibernate.jpa.spi.NativeQueryTupleTransformer;
|
||||
import org.hibernate.metamodel.model.domain.BasicDomainType;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.NativeQuery;
|
||||
import org.hibernate.query.ParameterMetadata;
|
||||
import org.hibernate.query.Query;
|
||||
|
@ -1221,7 +1221,7 @@ public class NativeQueryImpl<R>
|
|||
}
|
||||
|
||||
@Override
|
||||
public <P> NativeQueryImplementor<R> setParameter(String name, P value, AllowableParameterType<P> type) {
|
||||
public <P> NativeQueryImplementor<R> setParameter(String name, P value, BindableType<P> type) {
|
||||
super.setParameter( name, value, type );
|
||||
return this;
|
||||
}
|
||||
|
@ -1257,7 +1257,7 @@ public class NativeQueryImpl<R>
|
|||
}
|
||||
|
||||
@Override
|
||||
public <P> NativeQueryImplementor<R> setParameter(int position, P value, AllowableParameterType<P> type) {
|
||||
public <P> NativeQueryImplementor<R> setParameter(int position, P value, BindableType<P> type) {
|
||||
super.setParameter( position, value, type );
|
||||
return this;
|
||||
}
|
||||
|
@ -1293,7 +1293,7 @@ public class NativeQueryImpl<R>
|
|||
}
|
||||
|
||||
@Override
|
||||
public <P> NativeQueryImplementor<R> setParameter(QueryParameter<P> parameter, P value, AllowableParameterType<P> type) {
|
||||
public <P> NativeQueryImplementor<R> setParameter(QueryParameter<P> parameter, P value, BindableType<P> type) {
|
||||
super.setParameter( parameter, value, type );
|
||||
return this;
|
||||
}
|
||||
|
@ -1337,7 +1337,7 @@ public class NativeQueryImpl<R>
|
|||
}
|
||||
|
||||
@Override
|
||||
public <P> NativeQueryImplementor<R> setParameterList(String name, Collection<? extends P> values, AllowableParameterType<P> type) {
|
||||
public <P> NativeQueryImplementor<R> setParameterList(String name, Collection<? extends P> values, BindableType<P> type) {
|
||||
super.setParameterList( name, values, type );
|
||||
return this;
|
||||
}
|
||||
|
@ -1355,7 +1355,7 @@ public class NativeQueryImpl<R>
|
|||
}
|
||||
|
||||
@Override
|
||||
public <P> NativeQueryImplementor<R> setParameterList(String name, P[] values, AllowableParameterType<P> type) {
|
||||
public <P> NativeQueryImplementor<R> setParameterList(String name, P[] values, BindableType<P> type) {
|
||||
super.setParameterList( name, values, type );
|
||||
return this;
|
||||
}
|
||||
|
@ -1376,7 +1376,7 @@ public class NativeQueryImpl<R>
|
|||
}
|
||||
|
||||
@Override
|
||||
public <P> NativeQueryImplementor<R> setParameterList(int position, Collection<? extends P> values, AllowableParameterType<P> type) {
|
||||
public <P> NativeQueryImplementor<R> setParameterList(int position, Collection<? extends P> values, BindableType<P> type) {
|
||||
super.setParameterList( position, values, type );
|
||||
return this;
|
||||
}
|
||||
|
@ -1394,7 +1394,7 @@ public class NativeQueryImpl<R>
|
|||
}
|
||||
|
||||
@Override
|
||||
public <P> NativeQueryImplementor<R> setParameterList(int position, P[] values, AllowableParameterType<P> type) {
|
||||
public <P> NativeQueryImplementor<R> setParameterList(int position, P[] values, BindableType<P> type) {
|
||||
super.setParameterList( position, values, type );
|
||||
return this;
|
||||
}
|
||||
|
@ -1414,7 +1414,7 @@ public class NativeQueryImpl<R>
|
|||
}
|
||||
|
||||
@Override
|
||||
public <P> NativeQueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, AllowableParameterType<P> type) {
|
||||
public <P> NativeQueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, BindableType<P> type) {
|
||||
super.setParameterList( parameter, values, type );
|
||||
return this;
|
||||
}
|
||||
|
@ -1432,7 +1432,7 @@ public class NativeQueryImpl<R>
|
|||
}
|
||||
|
||||
@Override
|
||||
public <P> NativeQueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values, AllowableParameterType<P> type) {
|
||||
public <P> NativeQueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values, BindableType<P> type) {
|
||||
super.setParameterList( parameter, values, type );
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ import org.hibernate.LockMode;
|
|||
import org.hibernate.LockOptions;
|
||||
import org.hibernate.MappingException;
|
||||
import org.hibernate.metamodel.model.domain.BasicDomainType;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.NativeQuery;
|
||||
import org.hibernate.query.QueryParameter;
|
||||
import org.hibernate.query.ResultListTransformer;
|
||||
|
@ -199,7 +199,7 @@ public interface NativeQueryImplementor<R> extends QueryImplementor<R>, NativeQu
|
|||
NativeQueryImplementor<R> setParameter(String name, Object val);
|
||||
|
||||
@Override
|
||||
<P> NativeQueryImplementor<R> setParameter(String name, P val, AllowableParameterType<P> type);
|
||||
<P> NativeQueryImplementor<R> setParameter(String name, P val, BindableType<P> type);
|
||||
|
||||
@Override
|
||||
<P> NativeQueryImplementor<R> setParameter(String name, P val, Class<P> type);
|
||||
|
@ -220,7 +220,7 @@ public interface NativeQueryImplementor<R> extends QueryImplementor<R>, NativeQu
|
|||
<P> NativeQueryImplementor<R> setParameter(int position, P val, Class<P> type);
|
||||
|
||||
@Override
|
||||
<P> NativeQueryImplementor<R> setParameter(int position, P val, AllowableParameterType<P> type);
|
||||
<P> NativeQueryImplementor<R> setParameter(int position, P val, BindableType<P> type);
|
||||
|
||||
@Override
|
||||
NativeQueryImplementor<R> setParameter(int position, Instant value, TemporalType temporalType);
|
||||
|
@ -238,7 +238,7 @@ public interface NativeQueryImplementor<R> extends QueryImplementor<R>, NativeQu
|
|||
<P> NativeQueryImplementor<R> setParameter(QueryParameter<P> parameter, P val, Class<P> type);
|
||||
|
||||
@Override
|
||||
<P> NativeQueryImplementor<R> setParameter(QueryParameter<P> parameter, P val, AllowableParameterType<P> type);
|
||||
<P> NativeQueryImplementor<R> setParameter(QueryParameter<P> parameter, P val, BindableType<P> type);
|
||||
|
||||
@Override
|
||||
<P> NativeQueryImplementor<R> setParameter(Parameter<P> param, P value);
|
||||
|
@ -256,7 +256,7 @@ public interface NativeQueryImplementor<R> extends QueryImplementor<R>, NativeQu
|
|||
<P> NativeQueryImplementor<R> setParameterList(String name, Collection<? extends P> values, Class<P> type);
|
||||
|
||||
@Override
|
||||
<P> NativeQueryImplementor<R> setParameterList(String name, Collection<? extends P> values, AllowableParameterType<P> type);
|
||||
<P> NativeQueryImplementor<R> setParameterList(String name, Collection<? extends P> values, BindableType<P> type);
|
||||
|
||||
@Override
|
||||
NativeQueryImplementor<R> setParameterList(String name, Object[] values);
|
||||
|
@ -265,7 +265,7 @@ public interface NativeQueryImplementor<R> extends QueryImplementor<R>, NativeQu
|
|||
<P> NativeQueryImplementor<R> setParameterList(String name, P[] values, Class<P> type);
|
||||
|
||||
@Override
|
||||
<P> NativeQueryImplementor<R> setParameterList(String name, P[] values, AllowableParameterType<P> type);
|
||||
<P> NativeQueryImplementor<R> setParameterList(String name, P[] values, BindableType<P> type);
|
||||
|
||||
@Override
|
||||
NativeQueryImplementor<R> setParameterList(int position, @SuppressWarnings("rawtypes") Collection values);
|
||||
|
@ -274,7 +274,7 @@ public interface NativeQueryImplementor<R> extends QueryImplementor<R>, NativeQu
|
|||
<P> NativeQueryImplementor<R> setParameterList(int position, Collection<? extends P> values, Class<P> type);
|
||||
|
||||
@Override
|
||||
<P> NativeQueryImplementor<R> setParameterList(int position, Collection<? extends P> values, AllowableParameterType<P> type);
|
||||
<P> NativeQueryImplementor<R> setParameterList(int position, Collection<? extends P> values, BindableType<P> type);
|
||||
|
||||
@Override
|
||||
NativeQueryImplementor<R> setParameterList(int position, Object[] values);
|
||||
|
@ -283,7 +283,7 @@ public interface NativeQueryImplementor<R> extends QueryImplementor<R>, NativeQu
|
|||
<P> NativeQueryImplementor<R> setParameterList(int position, P[] values, Class<P> javaType);
|
||||
|
||||
@Override
|
||||
<P> NativeQueryImplementor<R> setParameterList(int position, P[] values, AllowableParameterType<P> type);
|
||||
<P> NativeQueryImplementor<R> setParameterList(int position, P[] values, BindableType<P> type);
|
||||
|
||||
|
||||
@Override
|
||||
|
@ -293,7 +293,7 @@ public interface NativeQueryImplementor<R> extends QueryImplementor<R>, NativeQu
|
|||
<P> NativeQueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, Class<P> javaType);
|
||||
|
||||
@Override
|
||||
<P> NativeQueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, AllowableParameterType<P> type);
|
||||
<P> NativeQueryImplementor<R> setParameterList(QueryParameter<P> parameter, Collection<? extends P> values, BindableType<P> type);
|
||||
|
||||
@Override
|
||||
<P> NativeQueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values);
|
||||
|
@ -302,7 +302,7 @@ public interface NativeQueryImplementor<R> extends QueryImplementor<R>, NativeQu
|
|||
<P> NativeQueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values, Class<P> javaType);
|
||||
|
||||
@Override
|
||||
<P> NativeQueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values, AllowableParameterType<P> type);
|
||||
<P> NativeQueryImplementor<R> setParameterList(QueryParameter<P> parameter, P[] values, BindableType<P> type);
|
||||
|
||||
@Override
|
||||
NativeQueryImplementor<R> setProperties(Object bean);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
package org.hibernate.query.sqm;
|
||||
|
||||
import org.hibernate.engine.spi.SessionFactoryImplementor;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.sqm.tree.expression.SqmExpression;
|
||||
import org.hibernate.type.descriptor.java.JavaType;
|
||||
|
||||
|
@ -19,7 +19,7 @@ import org.hibernate.type.descriptor.java.JavaType;
|
|||
*
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
public interface SqmExpressable<J> extends AllowableParameterType<J> {
|
||||
public interface SqmExpressable<J> extends BindableType<J> {
|
||||
/**
|
||||
* The Java type descriptor for this expressable
|
||||
*/
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
package org.hibernate.query.sqm.function;
|
||||
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.spi.QueryEngine;
|
||||
import org.hibernate.query.sqm.produce.function.ArgumentsValidator;
|
||||
import org.hibernate.query.sqm.produce.function.FunctionReturnTypeResolver;
|
||||
|
@ -100,7 +100,7 @@ public abstract class AbstractSqmFunctionDescriptor implements SqmFunctionDescri
|
|||
@Override
|
||||
public final <T> SelfRenderingSqmFunction<T> generateSqmExpression(
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
argumentsValidator.validate( arguments, getName(), queryEngine);
|
||||
|
@ -117,7 +117,7 @@ public abstract class AbstractSqmFunctionDescriptor implements SqmFunctionDescri
|
|||
public final <T> SelfRenderingSqmFunction<T> generateAggregateSqmExpression(
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
SqmPredicate filter,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
argumentsValidator.validate( arguments, getName(), queryEngine );
|
||||
|
@ -140,7 +140,7 @@ public abstract class AbstractSqmFunctionDescriptor implements SqmFunctionDescri
|
|||
*/
|
||||
protected abstract <T> SelfRenderingSqmFunction<T> generateSqmFunctionExpression(
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration);
|
||||
|
||||
|
@ -155,7 +155,7 @@ public abstract class AbstractSqmFunctionDescriptor implements SqmFunctionDescri
|
|||
protected <T> SelfRenderingSqmAggregateFunction<T> generateSqmAggregateFunctionExpression(
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
SqmPredicate filter,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
return (SelfRenderingSqmAggregateFunction<T>) generateSqmExpression(
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
package org.hibernate.query.sqm.function;
|
||||
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.spi.QueryEngine;
|
||||
import org.hibernate.query.sqm.produce.function.ArgumentsValidator;
|
||||
import org.hibernate.query.sqm.produce.function.FunctionReturnTypeResolver;
|
||||
|
@ -53,7 +53,7 @@ public abstract class AbstractSqmSelfRenderingFunctionDescriptor
|
|||
@Override
|
||||
protected <T> SelfRenderingSqmFunction<T> generateSqmFunctionExpression(
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
if ( functionKind == FunctionKind.AGGREGATE ) {
|
||||
|
@ -75,7 +75,7 @@ public abstract class AbstractSqmSelfRenderingFunctionDescriptor
|
|||
public <T> SelfRenderingSqmAggregateFunction<T> generateSqmAggregateFunctionExpression(
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
SqmPredicate filter,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
if ( functionKind != FunctionKind.AGGREGATE ) {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
package org.hibernate.query.sqm.function;
|
||||
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.spi.QueryEngine;
|
||||
import org.hibernate.query.sqm.tree.SqmTypedNode;
|
||||
import org.hibernate.type.spi.TypeConfiguration;
|
||||
|
@ -33,7 +33,7 @@ public class JdbcEscapeFunctionDescriptor
|
|||
@Override
|
||||
protected <T> SelfRenderingSqmFunction<T> generateSqmFunctionExpression(
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
package org.hibernate.query.sqm.function;
|
||||
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.spi.QueryEngine;
|
||||
import org.hibernate.query.sqm.produce.function.ArgumentTypesValidator;
|
||||
import org.hibernate.query.sqm.produce.function.FunctionParameterType;
|
||||
|
@ -77,7 +77,7 @@ public class MultipatternSqmFunctionDescriptor extends AbstractSqmFunctionDescri
|
|||
@Override
|
||||
protected <T> SelfRenderingSqmFunction<T> generateSqmFunctionExpression(
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
return functions[ arguments.size() ]
|
||||
|
|
|
@ -10,7 +10,7 @@ import java.util.List;
|
|||
|
||||
import org.hibernate.engine.spi.SessionFactoryImplementor;
|
||||
import org.hibernate.metamodel.mapping.JdbcMappingContainer;
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.sql.ast.SqlAstTranslator;
|
||||
import org.hibernate.sql.ast.spi.SqlAppender;
|
||||
import org.hibernate.sql.ast.tree.SqlAstNode;
|
||||
|
@ -33,7 +33,7 @@ public class SelfRenderingAggregateFunctionSqlAstExpression extends SelfRenderin
|
|||
FunctionRenderingSupport renderer,
|
||||
List<? extends SqlAstNode> sqlAstArguments,
|
||||
Predicate filter,
|
||||
AllowableFunctionReturnType<?> type,
|
||||
ReturnableType<?> type,
|
||||
JdbcMappingContainer expressable) {
|
||||
super( functionName, renderer, sqlAstArguments, type, expressable );
|
||||
this.filter = filter;
|
||||
|
|
|
@ -17,10 +17,9 @@ 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.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.sqm.sql.internal.DomainResultProducer;
|
||||
import org.hibernate.sql.ast.SqlAstTranslator;
|
||||
import org.hibernate.sql.ast.SqlAstWalker;
|
||||
import org.hibernate.sql.ast.spi.SqlAppender;
|
||||
import org.hibernate.sql.ast.spi.SqlAstCreationState;
|
||||
import org.hibernate.sql.ast.spi.SqlExpressionResolver;
|
||||
|
@ -46,14 +45,14 @@ public class SelfRenderingFunctionSqlAstExpression
|
|||
private final String functionName;
|
||||
private final FunctionRenderingSupport renderer;
|
||||
private final List<? extends SqlAstNode> sqlAstArguments;
|
||||
private final AllowableFunctionReturnType<?> type;
|
||||
private final ReturnableType<?> type;
|
||||
private final JdbcMappingContainer expressable;
|
||||
|
||||
public SelfRenderingFunctionSqlAstExpression(
|
||||
String functionName,
|
||||
FunctionRenderingSupport renderer,
|
||||
List<? extends SqlAstNode> sqlAstArguments,
|
||||
AllowableFunctionReturnType<?> type,
|
||||
ReturnableType<?> type,
|
||||
JdbcMappingContainer expressable) {
|
||||
this.functionName = functionName;
|
||||
this.renderer = renderer;
|
||||
|
|
|
@ -8,7 +8,7 @@ package org.hibernate.query.sqm.function;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.sqm.NodeBuilder;
|
||||
import org.hibernate.query.sqm.produce.function.ArgumentsValidator;
|
||||
import org.hibernate.query.sqm.produce.function.FunctionReturnTypeResolver;
|
||||
|
@ -34,7 +34,7 @@ public class SelfRenderingSqmAggregateFunction<T> extends SelfRenderingSqmFuncti
|
|||
FunctionRenderingSupport renderingSupport,
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
SqmPredicate filter,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
ArgumentsValidator argumentsValidator,
|
||||
FunctionReturnTypeResolver returnTypeResolver,
|
||||
NodeBuilder nodeBuilder,
|
||||
|
@ -45,7 +45,7 @@ public class SelfRenderingSqmAggregateFunction<T> extends SelfRenderingSqmFuncti
|
|||
|
||||
@Override
|
||||
public SelfRenderingFunctionSqlAstExpression convertToSqlAst(SqmToSqlAstConverter walker) {
|
||||
final AllowableFunctionReturnType<?> resultType = resolveResultType(
|
||||
final ReturnableType<?> resultType = resolveResultType(
|
||||
walker.getCreationContext().getDomainModel().getTypeConfiguration()
|
||||
);
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import java.util.List;
|
|||
import org.hibernate.metamodel.MappingMetamodel;
|
||||
import org.hibernate.metamodel.mapping.BasicValuedMapping;
|
||||
import org.hibernate.metamodel.mapping.MappingModelExpressable;
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.sqm.NodeBuilder;
|
||||
import org.hibernate.query.sqm.SqmExpressable;
|
||||
import org.hibernate.query.sqm.produce.function.ArgumentsValidator;
|
||||
|
@ -30,17 +30,17 @@ import static java.util.Collections.emptyList;
|
|||
* @author Steve Ebersole
|
||||
*/
|
||||
public class SelfRenderingSqmFunction<T> extends SqmFunction<T> {
|
||||
private final AllowableFunctionReturnType<T> impliedResultType;
|
||||
private final ReturnableType<T> impliedResultType;
|
||||
private final ArgumentsValidator argumentsValidator;
|
||||
private final FunctionReturnTypeResolver returnTypeResolver;
|
||||
private final FunctionRenderingSupport renderingSupport;
|
||||
private AllowableFunctionReturnType<?> resultType;
|
||||
private ReturnableType<?> resultType;
|
||||
|
||||
public SelfRenderingSqmFunction(
|
||||
SqmFunctionDescriptor descriptor,
|
||||
FunctionRenderingSupport renderingSupport,
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
ArgumentsValidator argumentsValidator,
|
||||
FunctionReturnTypeResolver returnTypeResolver,
|
||||
NodeBuilder nodeBuilder,
|
||||
|
@ -74,7 +74,7 @@ public class SelfRenderingSqmFunction<T> extends SqmFunction<T> {
|
|||
|
||||
@Override
|
||||
public SelfRenderingFunctionSqlAstExpression convertToSqlAst(SqmToSqlAstConverter walker) {
|
||||
final AllowableFunctionReturnType<?> resultType = resolveResultType(
|
||||
final ReturnableType<?> resultType = resolveResultType(
|
||||
walker.getCreationContext().getDomainModel().getTypeConfiguration()
|
||||
);
|
||||
|
||||
|
@ -100,7 +100,7 @@ public class SelfRenderingSqmFunction<T> extends SqmFunction<T> {
|
|||
return nodeType;
|
||||
}
|
||||
|
||||
protected AllowableFunctionReturnType<?> resolveResultType(TypeConfiguration typeConfiguration) {
|
||||
protected ReturnableType<?> resolveResultType(TypeConfiguration typeConfiguration) {
|
||||
if ( resultType == null ) {
|
||||
resultType = returnTypeResolver.resolveFunctionReturnType(
|
||||
impliedResultType,
|
||||
|
@ -114,7 +114,7 @@ public class SelfRenderingSqmFunction<T> extends SqmFunction<T> {
|
|||
|
||||
protected MappingModelExpressable<?> getMappingModelExpressable(
|
||||
SqmToSqlAstConverter walker,
|
||||
AllowableFunctionReturnType<?> resultType) {
|
||||
ReturnableType<?> resultType) {
|
||||
MappingModelExpressable<?> mapping;
|
||||
if ( resultType instanceof MappingModelExpressable ) {
|
||||
// here we have a BasicType, which can be cast
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
package org.hibernate.query.sqm.function;
|
||||
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.spi.QueryEngine;
|
||||
import org.hibernate.query.sqm.produce.function.ArgumentsValidator;
|
||||
import org.hibernate.query.sqm.tree.SqmTypedNode;
|
||||
|
@ -43,18 +43,18 @@ public interface SqmFunctionDescriptor {
|
|||
*/
|
||||
<T> SelfRenderingSqmFunction<T> generateSqmExpression(
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration);
|
||||
|
||||
/**
|
||||
* Like {@link #generateSqmExpression(List, AllowableFunctionReturnType, QueryEngine, TypeConfiguration)}
|
||||
* Like {@link #generateSqmExpression(List, ReturnableType, QueryEngine, TypeConfiguration)}
|
||||
* but also accepts a filter predicate. This method is intended for aggregate functions.
|
||||
*/
|
||||
default <T> SelfRenderingSqmFunction<T> generateAggregateSqmExpression(
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
SqmPredicate filter,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
throw new UnsupportedOperationException( "Not an aggregate function!" );
|
||||
|
@ -65,7 +65,7 @@ public interface SqmFunctionDescriptor {
|
|||
*/
|
||||
default <T> SelfRenderingSqmFunction<T> generateSqmExpression(
|
||||
SqmTypedNode<?> argument,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
return generateSqmExpression(
|
||||
|
@ -80,7 +80,7 @@ public interface SqmFunctionDescriptor {
|
|||
* Convenience for no arguments
|
||||
*/
|
||||
default <T> SelfRenderingSqmFunction<T> generateSqmExpression(
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
return generateSqmExpression(
|
||||
|
|
|
@ -36,8 +36,8 @@ import org.hibernate.internal.util.collections.CollectionHelper;
|
|||
import org.hibernate.metamodel.model.domain.BasicDomainType;
|
||||
import org.hibernate.metamodel.model.domain.DomainType;
|
||||
import org.hibernate.metamodel.model.domain.JpaMetamodel;
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.BinaryArithmeticOperator;
|
||||
import org.hibernate.query.ComparisonOperator;
|
||||
import org.hibernate.query.NullPrecedence;
|
||||
|
@ -589,7 +589,7 @@ public class SqmCriteriaNodeBuilder implements NodeBuilder, SqmCreationContext,
|
|||
final SqmTypedNode<N> typedNode = (SqmTypedNode<N>) argument;
|
||||
return getFunctionDescriptor( "sum" ).generateSqmExpression(
|
||||
typedNode,
|
||||
(AllowableFunctionReturnType<N>) typedNode.getNodeType(),
|
||||
(ReturnableType<N>) typedNode.getNodeType(),
|
||||
queryEngine,
|
||||
getJpaMetamodel().getTypeConfiguration()
|
||||
);
|
||||
|
@ -917,7 +917,7 @@ public class SqmCriteriaNodeBuilder implements NodeBuilder, SqmCreationContext,
|
|||
return new SqmLiteralNull<>( this );
|
||||
}
|
||||
|
||||
final AllowableParameterType<T> valueParamType = queryEngine.getTypeConfiguration()
|
||||
final BindableType<T> valueParamType = queryEngine.getTypeConfiguration()
|
||||
.getSessionFactory()
|
||||
.resolveParameterBindType( value );
|
||||
final SqmExpressable<T> sqmExpressable = valueParamType == null
|
||||
|
@ -1009,7 +1009,7 @@ public class SqmCriteriaNodeBuilder implements NodeBuilder, SqmCreationContext,
|
|||
private <T> JpaParameterExpression<T> parameter(Class<T> paramClass, String name, T value) {
|
||||
final BasicType<T> basicType = getTypeConfiguration().getBasicTypeForJavaType( paramClass );
|
||||
if ( basicType == null ) {
|
||||
final AllowableParameterType<T> parameterType;
|
||||
final BindableType<T> parameterType;
|
||||
if ( Collection.class.isAssignableFrom( paramClass ) ) {
|
||||
// a Collection-valued, multi-valued parameter
|
||||
parameterType = new MultiValueParameterType<>( (Class<T>) Collection.class );
|
||||
|
@ -1431,19 +1431,19 @@ public class SqmCriteriaNodeBuilder implements NodeBuilder, SqmCreationContext,
|
|||
);
|
||||
}
|
||||
|
||||
private static <T> AllowableParameterType<T> resolveInferredParameterType(
|
||||
private static <T> BindableType<T> resolveInferredParameterType(
|
||||
T value,
|
||||
SqmExpression<? extends T> typeInferenceSource,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
if ( typeInferenceSource != null ) {
|
||||
if ( typeInferenceSource instanceof AllowableParameterType ) {
|
||||
if ( typeInferenceSource instanceof BindableType ) {
|
||||
//noinspection unchecked
|
||||
return (AllowableParameterType<T>) typeInferenceSource;
|
||||
return (BindableType<T>) typeInferenceSource;
|
||||
}
|
||||
|
||||
if ( typeInferenceSource.getNodeType() != null ) {
|
||||
//noinspection unchecked
|
||||
return (AllowableParameterType<T>) typeInferenceSource.getNodeType();
|
||||
return (BindableType<T>) typeInferenceSource.getNodeType();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1533,7 +1533,7 @@ public class SqmCriteriaNodeBuilder implements NodeBuilder, SqmCreationContext,
|
|||
|
||||
private <Y> SqmExpression<Y> createNullifFunctionNode(SqmExpression<Y> first, SqmExpression<Y> second) {
|
||||
//noinspection unchecked
|
||||
final AllowableFunctionReturnType<Y> type = (AllowableFunctionReturnType<Y>) highestPrecedenceType(
|
||||
final ReturnableType<Y> type = (ReturnableType<Y>) highestPrecedenceType(
|
||||
first.getNodeType(),
|
||||
second.getNodeType()
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
package org.hibernate.query.sqm.produce.function;
|
||||
|
||||
import org.hibernate.metamodel.mapping.BasicValuedMapping;
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.sqm.tree.SqmTypedNode;
|
||||
import org.hibernate.sql.ast.tree.SqlAstNode;
|
||||
import org.hibernate.type.spi.TypeConfiguration;
|
||||
|
@ -32,8 +32,8 @@ public interface FunctionReturnTypeResolver {
|
|||
*
|
||||
* @return The resolved type.
|
||||
*/
|
||||
AllowableFunctionReturnType<?> resolveFunctionReturnType(
|
||||
AllowableFunctionReturnType<?> impliedType,
|
||||
ReturnableType<?> resolveFunctionReturnType(
|
||||
ReturnableType<?> impliedType,
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
TypeConfiguration typeConfiguration);
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import org.hibernate.QueryException;
|
|||
import org.hibernate.metamodel.mapping.BasicValuedMapping;
|
||||
import org.hibernate.metamodel.mapping.JdbcMapping;
|
||||
import org.hibernate.metamodel.mapping.JdbcMappingContainer;
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.sqm.SqmExpressable;
|
||||
import org.hibernate.query.sqm.tree.SqmTypedNode;
|
||||
import org.hibernate.sql.ast.tree.SqlAstNode;
|
||||
|
@ -46,8 +46,8 @@ public class StandardFunctionReturnTypeResolvers {
|
|||
|
||||
return new FunctionReturnTypeResolver() {
|
||||
@Override
|
||||
public AllowableFunctionReturnType<?> resolveFunctionReturnType(
|
||||
AllowableFunctionReturnType<?> impliedType,
|
||||
public ReturnableType<?> resolveFunctionReturnType(
|
||||
ReturnableType<?> impliedType,
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
return isAssignableTo( invariantType, impliedType )
|
||||
|
@ -69,8 +69,8 @@ public class StandardFunctionReturnTypeResolvers {
|
|||
public static FunctionReturnTypeResolver useArgType(int argPosition) {
|
||||
return new FunctionReturnTypeResolver() {
|
||||
@Override
|
||||
public AllowableFunctionReturnType<?> resolveFunctionReturnType(AllowableFunctionReturnType<?> impliedType, List<? extends SqmTypedNode<?>> arguments, TypeConfiguration typeConfiguration) {
|
||||
AllowableFunctionReturnType<?> argType = extractArgumentType( arguments, argPosition );
|
||||
public ReturnableType<?> resolveFunctionReturnType(ReturnableType<?> impliedType, List<? extends SqmTypedNode<?>> arguments, TypeConfiguration typeConfiguration) {
|
||||
ReturnableType<?> argType = extractArgumentType( arguments, argPosition );
|
||||
return isAssignableTo( argType, impliedType ) ? impliedType : argType;
|
||||
}
|
||||
|
||||
|
@ -102,10 +102,10 @@ public class StandardFunctionReturnTypeResolvers {
|
|||
}
|
||||
|
||||
@Override
|
||||
public AllowableFunctionReturnType<?> resolveFunctionReturnType(AllowableFunctionReturnType<?> impliedType, List<? extends SqmTypedNode<?>> arguments, TypeConfiguration typeConfiguration) {
|
||||
public ReturnableType<?> resolveFunctionReturnType(ReturnableType<?> impliedType, List<? extends SqmTypedNode<?>> arguments, TypeConfiguration typeConfiguration) {
|
||||
for (SqmTypedNode<?> arg: arguments) {
|
||||
if (arg!=null && arg.getNodeType() instanceof AllowableFunctionReturnType) {
|
||||
AllowableFunctionReturnType<?> argType = (AllowableFunctionReturnType<?>) arg.getNodeType();
|
||||
if (arg!=null && arg.getNodeType() instanceof ReturnableType ) {
|
||||
ReturnableType<?> argType = (ReturnableType<?>) arg.getNodeType();
|
||||
return isAssignableTo( argType, impliedType ) ? impliedType : argType;
|
||||
}
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ public class StandardFunctionReturnTypeResolvers {
|
|||
// Internal helpers
|
||||
|
||||
private static boolean isAssignableTo(
|
||||
AllowableFunctionReturnType<?> defined, AllowableFunctionReturnType<?> implied) {
|
||||
ReturnableType<?> defined, ReturnableType<?> implied) {
|
||||
if ( implied == null ) {
|
||||
return false;
|
||||
}
|
||||
|
@ -201,12 +201,12 @@ public class StandardFunctionReturnTypeResolvers {
|
|||
return false;
|
||||
}
|
||||
|
||||
public static AllowableFunctionReturnType<?> extractArgumentType(
|
||||
public static ReturnableType<?> extractArgumentType(
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
int position) {
|
||||
final SqmTypedNode<?> specifiedArgument = arguments.get( position - 1 );
|
||||
final SqmExpressable<?> specifiedArgType = specifiedArgument.getNodeType();
|
||||
if ( !(specifiedArgType instanceof AllowableFunctionReturnType) ) {
|
||||
if ( !(specifiedArgType instanceof ReturnableType ) ) {
|
||||
throw new QueryException(
|
||||
String.format(
|
||||
Locale.ROOT,
|
||||
|
@ -218,7 +218,7 @@ public class StandardFunctionReturnTypeResolvers {
|
|||
);
|
||||
}
|
||||
|
||||
return (AllowableFunctionReturnType<?>) specifiedArgType;
|
||||
return (ReturnableType<?>) specifiedArgType;
|
||||
}
|
||||
|
||||
public static JdbcMapping extractArgumentJdbcMapping(
|
||||
|
|
|
@ -91,8 +91,8 @@ import org.hibernate.metamodel.model.domain.internal.DiscriminatorSqmPath;
|
|||
import org.hibernate.persister.entity.AbstractEntityPersister;
|
||||
import org.hibernate.persister.entity.EntityPersister;
|
||||
import org.hibernate.persister.entity.Joinable;
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.BinaryArithmeticOperator;
|
||||
import org.hibernate.query.CastType;
|
||||
import org.hibernate.query.ComparisonOperator;
|
||||
|
@ -3180,7 +3180,7 @@ public abstract class BaseSqmToSqlAstConverter<T extends Statement> extends Base
|
|||
// given date or timestamp, producing an
|
||||
// adjusted date or timestamp
|
||||
result = timestampadd().expression(
|
||||
(AllowableFunctionReturnType<?>) adjustedTimestampType,
|
||||
(ReturnableType<?>) adjustedTimestampType,
|
||||
new DurationUnit( SECOND, basicType( Long.class ) ),
|
||||
scaledExpression,
|
||||
adjustedTimestamp
|
||||
|
@ -3588,7 +3588,7 @@ public abstract class BaseSqmToSqlAstConverter<T extends Statement> extends Base
|
|||
functionDescriptor,
|
||||
arguments,
|
||||
null,
|
||||
(AllowableFunctionReturnType<?>) modelPart.getJdbcMappings().get( 0 ),
|
||||
(ReturnableType<?>) modelPart.getJdbcMappings().get( 0 ),
|
||||
modelPart
|
||||
);
|
||||
subQuerySpec.getSelectClause().addSqlSelection( new SqlSelectionImpl( 1, 0, expression ) );
|
||||
|
@ -4384,7 +4384,7 @@ public abstract class BaseSqmToSqlAstConverter<T extends Statement> extends Base
|
|||
}
|
||||
}
|
||||
|
||||
AllowableParameterType<?> paramType = binding.getBindType();
|
||||
BindableType<?> paramType = binding.getBindType();
|
||||
if ( paramType == null ) {
|
||||
paramType = queryParameter.getHibernateType();
|
||||
if ( paramType == null ) {
|
||||
|
@ -4832,7 +4832,7 @@ public abstract class BaseSqmToSqlAstConverter<T extends Statement> extends Base
|
|||
DurationUnit unit = new DurationUnit( baseUnit, basicType( Integer.class ) );
|
||||
Expression magnitude = applyScale( timestampdiff().expression( null, unit, right, left ) );
|
||||
return timestampadd().expression(
|
||||
(AllowableFunctionReturnType<?>) adjustedTimestampType, //TODO should be adjustedTimestamp.getType()
|
||||
(ReturnableType<?>) adjustedTimestampType, //TODO should be adjustedTimestamp.getType()
|
||||
unit, magnitude, adjustedTimestamp
|
||||
);
|
||||
}
|
||||
|
@ -4848,7 +4848,7 @@ public abstract class BaseSqmToSqlAstConverter<T extends Statement> extends Base
|
|||
DurationUnit unit = new DurationUnit( baseUnit, basicType( Integer.class ) );
|
||||
BasicValuedMapping durationType = (BasicValuedMapping) expression.getNodeType();
|
||||
Expression scaledMagnitude = applyScale( timestampdiff().expression(
|
||||
(AllowableFunctionReturnType<?>) expression.getNodeType(),
|
||||
(ReturnableType<?>) expression.getNodeType(),
|
||||
unit, right, left
|
||||
) );
|
||||
return new Duration( scaledMagnitude, baseUnit, durationType );
|
||||
|
@ -4979,7 +4979,7 @@ public abstract class BaseSqmToSqlAstConverter<T extends Statement> extends Base
|
|||
throw new IllegalStateException();
|
||||
}
|
||||
return timestampadd().expression(
|
||||
(AllowableFunctionReturnType<?>) adjustedTimestampType, //TODO should be adjustedTimestamp.getType()
|
||||
(ReturnableType<?>) adjustedTimestampType, //TODO should be adjustedTimestamp.getType()
|
||||
unit, scaledMagnitude, adjustedTimestamp
|
||||
);
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ 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.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.SemanticException;
|
||||
import org.hibernate.query.spi.QueryParameterBinding;
|
||||
import org.hibernate.query.spi.QueryParameterImplementor;
|
||||
|
@ -96,7 +96,7 @@ public class SqmParameterInterpretation implements Expression, DomainResultProdu
|
|||
throw new SemanticException( "Composite query parameter cannot be used in select" );
|
||||
}
|
||||
|
||||
AllowableParameterType<?> nodeType = sqmParameter.getNodeType();
|
||||
BindableType<?> nodeType = sqmParameter.getNodeType();
|
||||
if ( nodeType == null ) {
|
||||
final QueryParameterBinding<?> binding = queryParameterBindingResolver.apply( queryParameter );
|
||||
nodeType = binding.getBindType();
|
||||
|
@ -137,7 +137,7 @@ public class SqmParameterInterpretation implements Expression, DomainResultProdu
|
|||
throw new SemanticException( "Composite query parameter cannot be used in select" );
|
||||
}
|
||||
|
||||
AllowableParameterType<?> nodeType = sqmParameter.getNodeType();
|
||||
BindableType<?> nodeType = sqmParameter.getNodeType();
|
||||
if ( nodeType == null ) {
|
||||
final QueryParameterBinding<?> binding = queryParameterBindingResolver.apply( queryParameter );
|
||||
nodeType = binding.getBindType();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
package org.hibernate.query.sqm.tree.domain;
|
||||
|
||||
import org.hibernate.metamodel.model.domain.EntityDomainType;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.NavigablePath;
|
||||
import org.hibernate.query.PathException;
|
||||
import org.hibernate.query.SemanticException;
|
||||
|
@ -24,7 +24,7 @@ import org.hibernate.type.descriptor.java.JavaType;
|
|||
*/
|
||||
public class SqmBasicValuedSimplePath<T>
|
||||
extends AbstractSqmSimplePath<T>
|
||||
implements AllowableParameterType<T>, SqmExpressable<T> {
|
||||
implements BindableType<T>, SqmExpressable<T> {
|
||||
public SqmBasicValuedSimplePath(
|
||||
NavigablePath navigablePath,
|
||||
SqmPathSource<T> referencedPathSource,
|
||||
|
|
|
@ -8,7 +8,7 @@ package org.hibernate.query.sqm.tree.domain;
|
|||
|
||||
import org.hibernate.metamodel.model.domain.EmbeddableDomainType;
|
||||
import org.hibernate.metamodel.model.domain.EntityDomainType;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.NavigablePath;
|
||||
import org.hibernate.query.PathException;
|
||||
import org.hibernate.query.hql.spi.SqmCreationState;
|
||||
|
@ -23,7 +23,7 @@ import org.hibernate.type.descriptor.java.JavaType;
|
|||
*/
|
||||
public class SqmEmbeddedValuedSimplePath<T>
|
||||
extends AbstractSqmSimplePath<T>
|
||||
implements AllowableParameterType<T>, SqmExpressable<T> {
|
||||
implements BindableType<T>, SqmExpressable<T> {
|
||||
public SqmEmbeddedValuedSimplePath(
|
||||
NavigablePath navigablePath,
|
||||
SqmPathSource<T> referencedPathSource,
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
package org.hibernate.query.sqm.tree.expression;
|
||||
|
||||
import org.hibernate.metamodel.model.domain.PluralPersistentAttribute;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.internal.QueryHelper;
|
||||
import org.hibernate.query.sqm.NodeBuilder;
|
||||
import org.hibernate.query.sqm.SqmExpressable;
|
||||
|
@ -60,7 +60,7 @@ public abstract class AbstractSqmParameter<T> extends AbstractSqmExpression<T> i
|
|||
}
|
||||
|
||||
@Override
|
||||
public AllowableParameterType<T> getAnticipatedType() {
|
||||
public BindableType<T> getAnticipatedType() {
|
||||
return this.getNodeType();
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ package org.hibernate.query.sqm.tree.expression;
|
|||
|
||||
import org.hibernate.NotYetImplementedFor6Exception;
|
||||
import org.hibernate.procedure.spi.NamedCallableQueryMemento;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.ParameterMetadata;
|
||||
import org.hibernate.query.criteria.JpaParameterExpression;
|
||||
import org.hibernate.query.spi.QueryParameterImplementor;
|
||||
|
@ -37,7 +37,7 @@ public class JpaCriteriaParameter<T>
|
|||
private boolean allowsMultiValuedBinding;
|
||||
|
||||
public JpaCriteriaParameter(
|
||||
AllowableParameterType<T> type,
|
||||
BindableType<T> type,
|
||||
boolean allowsMultiValuedBinding,
|
||||
NodeBuilder nodeBuilder) {
|
||||
this( null, type, allowsMultiValuedBinding, nodeBuilder );
|
||||
|
@ -45,7 +45,7 @@ public class JpaCriteriaParameter<T>
|
|||
|
||||
public JpaCriteriaParameter(
|
||||
String name,
|
||||
AllowableParameterType<T> type,
|
||||
BindableType<T> type,
|
||||
boolean allowsMultiValuedBinding,
|
||||
NodeBuilder nodeBuilder) {
|
||||
super( toSqmType( type, nodeBuilder ), nodeBuilder );
|
||||
|
@ -56,7 +56,7 @@ public class JpaCriteriaParameter<T>
|
|||
|
||||
public JpaCriteriaParameter(
|
||||
String name,
|
||||
AllowableParameterType<T> type,
|
||||
BindableType<T> type,
|
||||
T value,
|
||||
boolean allowsMultiValuedBinding,
|
||||
NodeBuilder nodeBuilder) {
|
||||
|
@ -66,7 +66,7 @@ public class JpaCriteriaParameter<T>
|
|||
this.allowsMultiValuedBinding = allowsMultiValuedBinding;
|
||||
}
|
||||
|
||||
private static <T> SqmExpressable<T> toSqmType(AllowableParameterType<T> type, NodeBuilder nodeBuilder) {
|
||||
private static <T> SqmExpressable<T> toSqmType(BindableType<T> type, NodeBuilder nodeBuilder) {
|
||||
if ( type == null ) {
|
||||
return null;
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ public class JpaCriteriaParameter<T>
|
|||
);
|
||||
}
|
||||
|
||||
public JpaCriteriaParameter(AllowableParameterType<T> type, T value, NodeBuilder nodeBuilder) {
|
||||
public JpaCriteriaParameter(BindableType<T> type, T value, NodeBuilder nodeBuilder) {
|
||||
super( toSqmType( type, nodeBuilder ), nodeBuilder );
|
||||
this.name = null;
|
||||
this.value = value;
|
||||
|
@ -112,13 +112,13 @@ public class JpaCriteriaParameter<T>
|
|||
}
|
||||
|
||||
@Override
|
||||
public AllowableParameterType<T> getAnticipatedType() {
|
||||
public BindableType<T> getAnticipatedType() {
|
||||
return getHibernateType();
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@Override
|
||||
public void applyAnticipatedType(AllowableParameterType type) {
|
||||
public void applyAnticipatedType(BindableType type) {
|
||||
super.internalApplyInferableType( toSqmType( type, nodeBuilder() ) );
|
||||
}
|
||||
|
||||
|
@ -133,7 +133,7 @@ public class JpaCriteriaParameter<T>
|
|||
}
|
||||
|
||||
@Override
|
||||
public AllowableParameterType<T> getHibernateType() {
|
||||
public BindableType<T> getHibernateType() {
|
||||
return this.getNodeType();
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
package org.hibernate.query.sqm.tree.expression;
|
||||
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.sqm.NodeBuilder;
|
||||
import org.hibernate.query.sqm.SemanticQueryWalker;
|
||||
import org.hibernate.query.sqm.SqmExpressable;
|
||||
|
@ -19,7 +19,7 @@ import org.hibernate.query.sqm.tree.SqmVisitableNode;
|
|||
* @author Gavin King
|
||||
*/
|
||||
public class SqmCastTarget<T> extends AbstractSqmNode implements SqmTypedNode<T>, SqmVisitableNode {
|
||||
private final AllowableFunctionReturnType<T> type;
|
||||
private final ReturnableType<T> type;
|
||||
private final Long length;
|
||||
private final Integer precision;
|
||||
private final Integer scale;
|
||||
|
@ -37,20 +37,20 @@ public class SqmCastTarget<T> extends AbstractSqmNode implements SqmTypedNode<T>
|
|||
}
|
||||
|
||||
public SqmCastTarget(
|
||||
AllowableFunctionReturnType<T> type,
|
||||
ReturnableType<T> type,
|
||||
NodeBuilder nodeBuilder) {
|
||||
this( type, null, nodeBuilder );
|
||||
}
|
||||
|
||||
public SqmCastTarget(
|
||||
AllowableFunctionReturnType<T> type,
|
||||
ReturnableType<T> type,
|
||||
Long length,
|
||||
NodeBuilder nodeBuilder) {
|
||||
this( type, length, null, null, nodeBuilder );
|
||||
}
|
||||
|
||||
public SqmCastTarget(
|
||||
AllowableFunctionReturnType<T> type,
|
||||
ReturnableType<T> type,
|
||||
Integer precision,
|
||||
Integer scale,
|
||||
NodeBuilder nodeBuilder) {
|
||||
|
@ -58,7 +58,7 @@ public class SqmCastTarget<T> extends AbstractSqmNode implements SqmTypedNode<T>
|
|||
}
|
||||
|
||||
public SqmCastTarget(
|
||||
AllowableFunctionReturnType<T> type,
|
||||
ReturnableType<T> type,
|
||||
Long length,
|
||||
Integer precision,
|
||||
Integer scale,
|
||||
|
@ -70,7 +70,7 @@ public class SqmCastTarget<T> extends AbstractSqmNode implements SqmTypedNode<T>
|
|||
this.scale = scale;
|
||||
}
|
||||
|
||||
public AllowableFunctionReturnType<T> getType() {
|
||||
public ReturnableType<T> getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
package org.hibernate.query.sqm.tree.expression;
|
||||
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.TemporalUnit;
|
||||
import org.hibernate.query.sqm.NodeBuilder;
|
||||
import org.hibernate.query.sqm.SemanticQueryWalker;
|
||||
|
@ -20,15 +20,15 @@ import org.hibernate.query.sqm.tree.SqmVisitableNode;
|
|||
*/
|
||||
public class SqmDurationUnit<T> extends AbstractSqmNode implements SqmTypedNode<T>, SqmVisitableNode {
|
||||
private final TemporalUnit unit;
|
||||
private final AllowableFunctionReturnType<T> type;
|
||||
private final ReturnableType<T> type;
|
||||
|
||||
public SqmDurationUnit(TemporalUnit unit, AllowableFunctionReturnType<T> type, NodeBuilder nodeBuilder) {
|
||||
public SqmDurationUnit(TemporalUnit unit, ReturnableType<T> type, NodeBuilder nodeBuilder) {
|
||||
super( nodeBuilder );
|
||||
this.type = type;
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public AllowableFunctionReturnType<T> getType() {
|
||||
public ReturnableType<T> getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import java.util.function.Consumer;
|
|||
import jakarta.persistence.criteria.Expression;
|
||||
|
||||
import org.hibernate.annotations.Remove;
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.metamodel.model.domain.DomainType;
|
||||
import org.hibernate.query.criteria.JpaExpression;
|
||||
import org.hibernate.query.spi.QueryEngine;
|
||||
|
@ -104,12 +104,12 @@ public interface SqmExpression<T> extends SqmSelectableNode<T>, JpaExpression<T>
|
|||
|
||||
default <X> SqmExpression<X> castAs(DomainType<X> type) {
|
||||
QueryEngine queryEngine = nodeBuilder().getQueryEngine();
|
||||
SqmCastTarget<T> target = new SqmCastTarget<>( (AllowableFunctionReturnType<T>) type, nodeBuilder() );
|
||||
SqmCastTarget<T> target = new SqmCastTarget<>( (ReturnableType<T>) type, nodeBuilder() );
|
||||
return queryEngine.getSqmFunctionRegistry()
|
||||
.findFunctionDescriptor("cast")
|
||||
.generateSqmExpression(
|
||||
asList( this, target ),
|
||||
(AllowableFunctionReturnType<X>) type,
|
||||
(ReturnableType<X>) type,
|
||||
queryEngine,
|
||||
nodeBuilder().getTypeConfiguration()
|
||||
);
|
||||
|
|
|
@ -14,7 +14,7 @@ import java.time.LocalDateTime;
|
|||
import java.time.LocalTime;
|
||||
|
||||
import org.hibernate.engine.spi.SessionFactoryImplementor;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.hql.spi.SqmCreationState;
|
||||
import org.hibernate.query.spi.QueryEngine;
|
||||
import org.hibernate.query.sqm.NodeBuilder;
|
||||
|
@ -28,19 +28,19 @@ import org.hibernate.type.spi.TypeConfiguration;
|
|||
* @author Steve Ebersole
|
||||
*/
|
||||
public class SqmExpressionHelper {
|
||||
public static <T> SqmExpressable<T> toSqmType(AllowableParameterType<T> parameterType, SqmCreationState creationState) {
|
||||
public static <T> SqmExpressable<T> toSqmType(BindableType<T> parameterType, SqmCreationState creationState) {
|
||||
return toSqmType( parameterType, creationState.getCreationContext().getJpaMetamodel().getTypeConfiguration() );
|
||||
}
|
||||
|
||||
public static <T> SqmExpressable<T> toSqmType(AllowableParameterType<T> anticipatedType, NodeBuilder nodeBuilder) {
|
||||
public static <T> SqmExpressable<T> toSqmType(BindableType<T> anticipatedType, NodeBuilder nodeBuilder) {
|
||||
return toSqmType( anticipatedType, nodeBuilder.getTypeConfiguration() );
|
||||
}
|
||||
|
||||
public static <T> SqmExpressable<T> toSqmType(AllowableParameterType<T> anticipatedType, TypeConfiguration typeConfiguration) {
|
||||
public static <T> SqmExpressable<T> toSqmType(BindableType<T> anticipatedType, TypeConfiguration typeConfiguration) {
|
||||
return toSqmType( anticipatedType, typeConfiguration.getSessionFactory() );
|
||||
}
|
||||
|
||||
public static <T> SqmExpressable<T> toSqmType(AllowableParameterType<T> anticipatedType, SessionFactoryImplementor sessionFactory) {
|
||||
public static <T> SqmExpressable<T> toSqmType(BindableType<T> anticipatedType, SessionFactoryImplementor sessionFactory) {
|
||||
if ( anticipatedType == null ) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
package org.hibernate.query.sqm.tree.expression;
|
||||
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.TemporalUnit;
|
||||
import org.hibernate.query.sqm.NodeBuilder;
|
||||
import org.hibernate.query.sqm.SemanticQueryWalker;
|
||||
|
@ -20,9 +20,9 @@ import org.hibernate.query.sqm.tree.SqmVisitableNode;
|
|||
*/
|
||||
public class SqmExtractUnit<T> extends AbstractSqmNode implements SqmTypedNode<T>, SqmVisitableNode {
|
||||
private final TemporalUnit unit;
|
||||
private final AllowableFunctionReturnType<T> type;
|
||||
private final ReturnableType<T> type;
|
||||
|
||||
public SqmExtractUnit(TemporalUnit unit, AllowableFunctionReturnType<T> type, NodeBuilder nodeBuilder) {
|
||||
public SqmExtractUnit(TemporalUnit unit, ReturnableType<T> type, NodeBuilder nodeBuilder) {
|
||||
super( nodeBuilder );
|
||||
this.unit = unit;
|
||||
this.type = type;
|
||||
|
@ -32,7 +32,7 @@ public class SqmExtractUnit<T> extends AbstractSqmNode implements SqmTypedNode<T
|
|||
return unit;
|
||||
}
|
||||
|
||||
public AllowableFunctionReturnType<T> getType() {
|
||||
public ReturnableType<T> getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ package org.hibernate.query.sqm.tree.expression;
|
|||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.sqm.NodeBuilder;
|
||||
import org.hibernate.query.sqm.SemanticQueryWalker;
|
||||
import org.hibernate.query.sqm.tree.select.SqmSelectableNode;
|
||||
|
@ -28,7 +28,7 @@ public class SqmJpaCriteriaParameterWrapper<T>
|
|||
private final JpaCriteriaParameter<T> jpaCriteriaParameter;
|
||||
|
||||
public SqmJpaCriteriaParameterWrapper(
|
||||
AllowableParameterType<T> type,
|
||||
BindableType<T> type,
|
||||
JpaCriteriaParameter<T> jpaCriteriaParameter,
|
||||
NodeBuilder criteriaBuilder) {
|
||||
super( toSqmType( type, criteriaBuilder ), criteriaBuilder );
|
||||
|
@ -61,7 +61,7 @@ public class SqmJpaCriteriaParameterWrapper<T>
|
|||
}
|
||||
|
||||
@Override
|
||||
public AllowableParameterType<T> getAnticipatedType() {
|
||||
public BindableType<T> getAnticipatedType() {
|
||||
return getNodeType();
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
package org.hibernate.query.sqm.tree.expression;
|
||||
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.criteria.JpaParameterExpression;
|
||||
import org.hibernate.query.sqm.SqmExpressable;
|
||||
|
||||
|
@ -60,7 +60,7 @@ public interface SqmParameter<T> extends SqmExpression<T>, JpaParameterExpressio
|
|||
*
|
||||
* @return The anticipated Type.
|
||||
*/
|
||||
AllowableParameterType<T> getAnticipatedType();
|
||||
BindableType<T> getAnticipatedType();
|
||||
|
||||
@Override
|
||||
SqmExpressable<T> getNodeType();
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
package org.hibernate.query.sqm.tree.expression;
|
||||
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.sqm.NodeBuilder;
|
||||
import org.hibernate.query.sqm.SemanticQueryWalker;
|
||||
|
||||
|
@ -20,7 +20,7 @@ public class SqmToDuration<T> extends AbstractSqmExpression<T> {
|
|||
public SqmToDuration(
|
||||
SqmExpression<?> magnitude,
|
||||
SqmDurationUnit<?> unit,
|
||||
AllowableFunctionReturnType<T> type,
|
||||
ReturnableType<T> type,
|
||||
NodeBuilder nodeBuilder) {
|
||||
super( type, nodeBuilder );
|
||||
this.magnitude = magnitude;
|
||||
|
|
|
@ -11,7 +11,7 @@ import java.util.HashSet;
|
|||
import java.util.Set;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.sqm.SqmExpressable;
|
||||
import org.hibernate.query.sqm.spi.BaseSemanticQueryWalker;
|
||||
import org.hibernate.query.sqm.tree.SqmExpressableAccessor;
|
||||
|
@ -95,19 +95,19 @@ public class ParameterCollector extends BaseSemanticQueryWalker {
|
|||
);
|
||||
}
|
||||
|
||||
private <T> AllowableParameterType<T> getInferredParameterType(JpaCriteriaParameter<?> expression) {
|
||||
AllowableParameterType<?> parameterType = null;
|
||||
private <T> BindableType<T> getInferredParameterType(JpaCriteriaParameter<?> expression) {
|
||||
BindableType<?> parameterType = null;
|
||||
if ( inferenceBasis != null ) {
|
||||
final SqmExpressable<?> expressable = inferenceBasis.getExpressable();
|
||||
if ( expressable instanceof AllowableParameterType<?> ) {
|
||||
parameterType = (AllowableParameterType<?>) expressable;
|
||||
if ( expressable instanceof BindableType<?> ) {
|
||||
parameterType = (BindableType<?>) expressable;
|
||||
}
|
||||
}
|
||||
if ( parameterType == null ) {
|
||||
parameterType = expression.getHibernateType();
|
||||
}
|
||||
//noinspection unchecked
|
||||
return (AllowableParameterType<T>) parameterType;
|
||||
return (BindableType<T>) parameterType;
|
||||
}
|
||||
|
||||
private <T extends SqmParameter<?>> T visitParameter(T param) {
|
||||
|
@ -148,7 +148,7 @@ public class ParameterCollector extends BaseSemanticQueryWalker {
|
|||
() -> {
|
||||
for ( SqmCaseSimple.WhenFragment<?, ?> whenFragment : expression.getWhenFragments() ) {
|
||||
final SqmExpressable<?> resolved = whenFragment.getCheckValue().getExpressable();
|
||||
if ( resolved instanceof AllowableParameterType<?> ) {
|
||||
if ( resolved instanceof BindableType<?> ) {
|
||||
return (SqmExpressable<Object>) resolved;
|
||||
}
|
||||
}
|
||||
|
@ -214,11 +214,11 @@ public class ParameterCollector extends BaseSemanticQueryWalker {
|
|||
return type1;
|
||||
}
|
||||
|
||||
if ( type1.getExpressable() instanceof AllowableParameterType<?> ) {
|
||||
if ( type1.getExpressable() instanceof BindableType<?> ) {
|
||||
return type1;
|
||||
}
|
||||
|
||||
if ( type2.getExpressable() instanceof AllowableParameterType<?> ) {
|
||||
if ( type2.getExpressable() instanceof BindableType<?> ) {
|
||||
return type2;
|
||||
}
|
||||
|
||||
|
@ -226,7 +226,7 @@ public class ParameterCollector extends BaseSemanticQueryWalker {
|
|||
}
|
||||
|
||||
private SqmExpressableAccessor<?> determineCurrentExpressable(SqmExpression<?> expression) {
|
||||
if ( expression.getExpressable() instanceof AllowableParameterType<?> ) {
|
||||
if ( expression.getExpressable() instanceof BindableType<?> ) {
|
||||
return () -> (SqmExpressable<Object>) expression.getExpressable();
|
||||
}
|
||||
return null;
|
||||
|
|
|
@ -14,7 +14,7 @@ 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.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.sql.ast.Clause;
|
||||
import org.hibernate.sql.ast.spi.SqlSelection;
|
||||
import org.hibernate.sql.ast.tree.expression.JdbcParameter;
|
||||
|
@ -112,7 +112,7 @@ public abstract class AbstractJdbcParameter
|
|||
return jdbcMapping;
|
||||
}
|
||||
|
||||
final AllowableParameterType<?> parameterType = executionContext.getSession()
|
||||
final BindableType<?> parameterType = executionContext.getSession()
|
||||
.getFactory()
|
||||
.resolveParameterBindType( bindValue );
|
||||
if ( parameterType instanceof JdbcMapping ) {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
package org.hibernate.sql.exec.internal;
|
||||
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.sql.exec.spi.JdbcCallFunctionReturn;
|
||||
|
||||
import jakarta.persistence.ParameterMode;
|
||||
|
@ -16,7 +16,7 @@ import jakarta.persistence.ParameterMode;
|
|||
*/
|
||||
public class JdbcCallFunctionReturnImpl extends JdbcCallParameterRegistrationImpl implements JdbcCallFunctionReturn {
|
||||
public JdbcCallFunctionReturnImpl(
|
||||
AllowableParameterType ormType,
|
||||
BindableType ormType,
|
||||
JdbcCallParameterExtractorImpl parameterExtractor,
|
||||
JdbcCallRefCursorExtractorImpl refCursorExtractor) {
|
||||
super(
|
||||
|
|
|
@ -11,7 +11,7 @@ import java.sql.SQLException;
|
|||
|
||||
import org.hibernate.NotYetImplementedFor6Exception;
|
||||
import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.metamodel.model.domain.BasicDomainType;
|
||||
import org.hibernate.sql.exec.spi.JdbcCallParameterExtractor;
|
||||
|
||||
|
@ -30,7 +30,7 @@ public class JdbcCallParameterExtractorImpl<T> implements JdbcCallParameterExtra
|
|||
String callableName,
|
||||
String parameterName,
|
||||
int parameterPosition,
|
||||
AllowableParameterType ormType) {
|
||||
BindableType ormType) {
|
||||
if ( ! (ormType instanceof BasicDomainType ) ) {
|
||||
throw new NotYetImplementedFor6Exception(
|
||||
"Support for JDBC CallableStatement parameter extraction not yet supported for non-basic types"
|
||||
|
|
|
@ -11,7 +11,7 @@ import java.sql.SQLException;
|
|||
|
||||
import org.hibernate.engine.jdbc.cursor.spi.RefCursorSupport;
|
||||
import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.metamodel.model.domain.BasicDomainType;
|
||||
import org.hibernate.sql.exec.spi.JdbcCallParameterExtractor;
|
||||
import org.hibernate.sql.exec.spi.JdbcCallParameterRegistration;
|
||||
|
@ -27,7 +27,7 @@ public class JdbcCallParameterRegistrationImpl implements JdbcCallParameterRegis
|
|||
private final String name;
|
||||
private final int jdbcParameterPositionStart;
|
||||
private final ParameterMode parameterMode;
|
||||
private final AllowableParameterType ormType;
|
||||
private final BindableType ormType;
|
||||
private final JdbcParameterBinder parameterBinder;
|
||||
private final JdbcCallParameterExtractorImpl parameterExtractor;
|
||||
private final JdbcCallRefCursorExtractorImpl refCursorExtractor;
|
||||
|
@ -36,7 +36,7 @@ public class JdbcCallParameterRegistrationImpl implements JdbcCallParameterRegis
|
|||
String name,
|
||||
int jdbcParameterPositionStart,
|
||||
ParameterMode parameterMode,
|
||||
AllowableParameterType ormType,
|
||||
BindableType ormType,
|
||||
JdbcParameterBinder parameterBinder,
|
||||
JdbcCallParameterExtractorImpl parameterExtractor,
|
||||
JdbcCallRefCursorExtractorImpl refCursorExtractor) {
|
||||
|
@ -70,7 +70,7 @@ public class JdbcCallParameterRegistrationImpl implements JdbcCallParameterRegis
|
|||
}
|
||||
|
||||
@Override
|
||||
public AllowableParameterType getParameterType() {
|
||||
public BindableType getParameterType() {
|
||||
return ormType;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import java.sql.CallableStatement;
|
|||
import jakarta.persistence.ParameterMode;
|
||||
|
||||
import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.sql.exec.internal.JdbcCallRefCursorExtractorImpl;
|
||||
|
||||
/**
|
||||
|
@ -30,5 +30,5 @@ public interface JdbcCallParameterRegistration {
|
|||
|
||||
JdbcCallRefCursorExtractorImpl getRefCursorExtractor();
|
||||
|
||||
AllowableParameterType getParameterType();
|
||||
BindableType getParameterType();
|
||||
}
|
||||
|
|
|
@ -18,14 +18,13 @@ import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
|||
import org.hibernate.metamodel.mapping.BasicValuedMapping;
|
||||
import org.hibernate.metamodel.mapping.Bindable;
|
||||
import org.hibernate.metamodel.mapping.JdbcMapping;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.internal.BindingTypeHelper;
|
||||
import org.hibernate.query.spi.QueryParameterBinding;
|
||||
import org.hibernate.query.spi.QueryParameterBindings;
|
||||
import org.hibernate.query.spi.QueryParameterImplementor;
|
||||
import org.hibernate.query.sql.internal.NativeQueryImpl;
|
||||
import org.hibernate.query.sql.spi.ParameterOccurrence;
|
||||
import org.hibernate.query.sqm.SqmExpressable;
|
||||
import org.hibernate.sql.ast.Clause;
|
||||
import org.hibernate.sql.ast.tree.expression.JdbcParameter;
|
||||
import org.hibernate.sql.exec.internal.JdbcParameterBindingImpl;
|
||||
|
@ -127,7 +126,7 @@ public interface JdbcParameterBindings {
|
|||
|
||||
final JdbcMapping jdbcMapping;
|
||||
|
||||
final AllowableParameterType<?> type = determineParamType( param, binding );
|
||||
final BindableType<?> type = determineParamType( param, binding );
|
||||
if ( type == null ) {
|
||||
jdbcMapping = factory.getTypeConfiguration().getBasicTypeForJavaType( Object.class );
|
||||
}
|
||||
|
@ -177,8 +176,8 @@ public interface JdbcParameterBindings {
|
|||
}
|
||||
}
|
||||
|
||||
private AllowableParameterType<?> determineParamType(QueryParameterImplementor<?> param, QueryParameterBinding<?> binding) {
|
||||
AllowableParameterType<?> type = binding.getBindType();
|
||||
private BindableType<?> determineParamType(QueryParameterImplementor<?> param, QueryParameterBinding<?> binding) {
|
||||
BindableType<?> type = binding.getBindType();
|
||||
if ( type == null ) {
|
||||
type = param.getHibernateType();
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import java.io.Serializable;
|
|||
|
||||
import org.hibernate.engine.spi.SessionFactoryImplementor;
|
||||
import org.hibernate.metamodel.model.convert.spi.BasicValueConverter;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.sqm.SqmExpressable;
|
||||
|
||||
/**
|
||||
|
@ -18,7 +18,7 @@ import org.hibernate.query.sqm.SqmExpressable;
|
|||
*
|
||||
* @author Christian Beikov
|
||||
*/
|
||||
public final class BasicTypeReference<T> implements AllowableParameterType<T>, Serializable {
|
||||
public final class BasicTypeReference<T> implements BindableType<T>, Serializable {
|
||||
private final String name;
|
||||
private final Class<T> javaType;
|
||||
private final int sqlTypeCode;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
package org.hibernate.type;
|
||||
|
||||
import org.hibernate.query.AllowableOutputParameterType;
|
||||
import org.hibernate.query.OutputableType;
|
||||
|
||||
/**
|
||||
* Optional {@link Type} contract for implementations that are aware of how to extract values from
|
||||
|
@ -14,5 +14,5 @@ import org.hibernate.query.AllowableOutputParameterType;
|
|||
*
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
public interface ProcedureParameterExtractionAware<T> extends AllowableOutputParameterType<T> {
|
||||
public interface ProcedureParameterExtractionAware<T> extends OutputableType<T> {
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ import jakarta.persistence.Id;
|
|||
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.metamodel.spi.MetamodelImplementor;
|
||||
import org.hibernate.query.Query;
|
||||
import org.hibernate.type.Type;
|
||||
|
@ -81,7 +81,7 @@ public class ConverterTest extends BaseEntityManagerFunctionalTestCase {
|
|||
"from Photo p " +
|
||||
"where upper(caption) = upper(:caption) ", Photo.class )
|
||||
.unwrap( Query.class )
|
||||
.setParameter( "caption", new Caption("Nicolae Grigorescu"), (AllowableParameterType) captionType )
|
||||
.setParameter( "caption", new Caption("Nicolae Grigorescu"), (BindableType) captionType )
|
||||
.getSingleResult();
|
||||
//end::basic-attribute-converter-query-parameter-converter-object-example[]
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.sql.SQLException;
|
|||
import org.hibernate.HibernateException;
|
||||
import org.hibernate.engine.spi.SessionFactoryImplementor;
|
||||
import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
||||
import org.hibernate.query.AllowableParameterType;
|
||||
import org.hibernate.query.BindableType;
|
||||
import org.hibernate.query.sqm.SqmExpressable;
|
||||
import org.hibernate.type.descriptor.java.BasicJavaType;
|
||||
import org.hibernate.type.descriptor.jdbc.JdbcType;
|
||||
|
@ -18,7 +18,7 @@ import org.hibernate.usertype.UserType;
|
|||
/**
|
||||
* @author Vlad Mihalcea
|
||||
*/
|
||||
public class ArrayType implements UserType<Array>, AllowableParameterType<Array> {
|
||||
public class ArrayType implements UserType<Array>, BindableType<Array> {
|
||||
public static final ArrayType INSTANCE = new ArrayType();
|
||||
|
||||
private final BasicJavaType<Array> javaType = ArrayTypeDescriptor.INSTANCE;
|
||||
|
@ -26,13 +26,13 @@ public class ArrayType implements UserType<Array>, AllowableParameterType<Array>
|
|||
|
||||
@Override
|
||||
public Class<Array> getBindableJavaType() {
|
||||
// really a UserType should not implement AllowableParameterType
|
||||
// really a UserType should not implement BindableType
|
||||
return Array.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SqmExpressable<Array> resolveExpressable(SessionFactoryImplementor sessionFactory) {
|
||||
// really a UserType should not implement AllowableParameterType
|
||||
// really a UserType should not implement BindableType
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import java.util.List;
|
|||
|
||||
import org.hibernate.metamodel.mapping.PluralAttributeMapping;
|
||||
import org.hibernate.metamodel.mapping.ordering.OrderByFragment;
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.persister.collection.QueryableCollection;
|
||||
import org.hibernate.persister.entity.Joinable;
|
||||
import org.hibernate.query.NavigablePath;
|
||||
|
@ -53,7 +53,7 @@ public class OrderByFragmentFunction extends AbstractSqmFunctionDescriptor {
|
|||
@Override
|
||||
protected <T> SelfRenderingSqmFunction<T> generateSqmFunctionExpression(
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
return new SelfRenderingSqmFunction<T>(
|
||||
|
@ -69,7 +69,7 @@ public class OrderByFragmentFunction extends AbstractSqmFunctionDescriptor {
|
|||
|
||||
@Override
|
||||
public SelfRenderingFunctionSqlAstExpression convertToSqlAst(SqmToSqlAstConverter walker) {
|
||||
final AllowableFunctionReturnType<?> resultType = resolveResultType(
|
||||
final ReturnableType<?> resultType = resolveResultType(
|
||||
walker.getCreationContext().getDomainModel().getTypeConfiguration()
|
||||
);
|
||||
final String sqmAlias = ( (SqmLiteral<String>) getArguments().get( 0 ) ).getLiteralValue();
|
||||
|
|
|
@ -12,7 +12,7 @@ import org.hibernate.QueryException;
|
|||
import org.hibernate.cfg.NotYetImplementedException;
|
||||
import org.hibernate.engine.spi.Mapping;
|
||||
import org.hibernate.engine.spi.SessionFactoryImplementor;
|
||||
import org.hibernate.query.AllowableFunctionReturnType;
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.query.spi.QueryEngine;
|
||||
import org.hibernate.query.sqm.function.SelfRenderingSqmFunction;
|
||||
import org.hibernate.query.sqm.function.SqmFunctionDescriptor;
|
||||
|
@ -95,7 +95,7 @@ class SDOObjectProperty implements SqmFunctionDescriptor {
|
|||
@Override
|
||||
public <T> SelfRenderingSqmFunction<T> generateSqmExpression(
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
throw new NotYetImplementedException();
|
||||
|
@ -105,7 +105,7 @@ class SDOObjectProperty implements SqmFunctionDescriptor {
|
|||
public <T> SelfRenderingSqmFunction<T> generateAggregateSqmExpression(
|
||||
List<? extends SqmTypedNode<?>> arguments,
|
||||
SqmPredicate filter,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
return SqmFunctionDescriptor.super.generateAggregateSqmExpression(
|
||||
|
@ -120,7 +120,7 @@ class SDOObjectProperty implements SqmFunctionDescriptor {
|
|||
@Override
|
||||
public <T> SelfRenderingSqmFunction<T> generateSqmExpression(
|
||||
SqmTypedNode<?> argument,
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
return SqmFunctionDescriptor.super.generateSqmExpression(
|
||||
|
@ -133,7 +133,7 @@ class SDOObjectProperty implements SqmFunctionDescriptor {
|
|||
|
||||
@Override
|
||||
public <T> SelfRenderingSqmFunction<T> generateSqmExpression(
|
||||
AllowableFunctionReturnType<T> impliedResultType,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine,
|
||||
TypeConfiguration typeConfiguration) {
|
||||
return SqmFunctionDescriptor.super.generateSqmExpression( impliedResultType, queryEngine, typeConfiguration );
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue