Skip to content

Commit 77fcc67

Browse files
committed
HHH-19449 rename to SqmBindableType for consistency
and to reduce possible confusion with JPA Bindable
1 parent 7277038 commit 77fcc67

File tree

111 files changed

+325
-325
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+325
-325
lines changed

hibernate-core/src/main/java/org/hibernate/dialect/function/GenerateSeriesSetReturningFunctionTypeResolver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import org.hibernate.metamodel.mapping.SelectablePath;
1414
import org.hibernate.metamodel.mapping.SqlTypedMapping;
1515
import org.hibernate.metamodel.mapping.internal.SelectableMappingImpl;
16-
import org.hibernate.query.sqm.SqmBindable;
16+
import org.hibernate.query.sqm.SqmBindableType;
1717
import org.hibernate.query.sqm.tree.domain.SqmDomainType;
1818
import org.hibernate.query.sqm.tuple.internal.AnonymousTupleType;
1919
import org.hibernate.query.sqm.SqmExpressible;
@@ -54,7 +54,7 @@ public AnonymousTupleType<?> resolveTupleType(List<? extends SqmTypedNode<?>> ar
5454
throw new IllegalArgumentException( "Couldn't determine types of arguments to function 'generate_series'" );
5555
}
5656

57-
final SqmBindable<?>[] componentTypes = new SqmBindable<?>[]{ type, typeConfiguration.getBasicTypeForJavaType( Long.class ) };
57+
final SqmBindableType<?>[] componentTypes = new SqmBindableType<?>[]{ type, typeConfiguration.getBasicTypeForJavaType( Long.class ) };
5858
final String[] componentNames = new String[]{ CollectionPart.Nature.ELEMENT.getName(), CollectionPart.Nature.INDEX.getName() };
5959
return new AnonymousTupleType<>( componentTypes, componentNames );
6060
}

hibernate-core/src/main/java/org/hibernate/dialect/function/UnnestSetReturningFunctionTypeResolver.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import org.hibernate.metamodel.mapping.SelectablePath;
1818
import org.hibernate.metamodel.mapping.SqlTypedMapping;
1919
import org.hibernate.metamodel.mapping.internal.SelectableMappingImpl;
20-
import org.hibernate.query.sqm.SqmBindable;
20+
import org.hibernate.query.sqm.SqmBindableType;
2121
import org.hibernate.query.sqm.tuple.internal.AnonymousTupleType;
2222
import org.hibernate.query.sqm.SqmExpressible;
2323
import org.hibernate.query.sqm.produce.function.SetReturningFunctionTypeResolver;
@@ -56,7 +56,7 @@ public AnonymousTupleType<?> resolveTupleType(List<? extends SqmTypedNode<?>> ar
5656
}
5757

5858
final BasicType<?> elementType = pluralType.getElementType();
59-
final SqmBindable<?>[] componentTypes;
59+
final SqmBindableType<?>[] componentTypes;
6060
final String[] componentNames;
6161
if ( elementType.getJdbcType() instanceof AggregateJdbcType aggregateJdbcType
6262
&& aggregateJdbcType.getEmbeddableMappingType() != null ) {
@@ -76,7 +76,7 @@ public AnonymousTupleType<?> resolveTupleType(List<? extends SqmTypedNode<?>> ar
7676
componentNames[index] = CollectionPart.Nature.INDEX.getName();
7777
}
7878
else {
79-
componentTypes = new SqmBindable<?>[]{ elementType, typeConfiguration.getBasicTypeForJavaType( Long.class ) };
79+
componentTypes = new SqmBindableType<?>[]{ elementType, typeConfiguration.getBasicTypeForJavaType( Long.class ) };
8080
componentNames = new String[]{ CollectionPart.Nature.ELEMENT.getName(), CollectionPart.Nature.INDEX.getName() };
8181
}
8282
return new AnonymousTupleType<>( componentTypes, componentNames );
@@ -209,17 +209,17 @@ public SelectableMapping[] resolveFunctionReturnType(
209209
return returnType;
210210
}
211211

212-
private static SqmBindable<?>[] determineComponentTypes(EmbeddableMappingType embeddableMappingType) {
212+
private static SqmBindableType<?>[] determineComponentTypes(EmbeddableMappingType embeddableMappingType) {
213213
final int numberOfAttributeMappings = embeddableMappingType.getNumberOfAttributeMappings();
214-
final ArrayList<SqmBindable<?>> expressibles = new ArrayList<>( numberOfAttributeMappings + 1 );
214+
final ArrayList<SqmBindableType<?>> expressibles = new ArrayList<>( numberOfAttributeMappings + 1 );
215215

216216
for ( int i = 0; i < numberOfAttributeMappings; i++ ) {
217217
final AttributeMapping attributeMapping = embeddableMappingType.getAttributeMapping( i );
218218
final MappingType mappedType = attributeMapping.getMappedType();
219-
if ( mappedType instanceof SqmBindable<?> sqmExpressible ) {
219+
if ( mappedType instanceof SqmBindableType<?> sqmExpressible ) {
220220
expressibles.add( sqmExpressible );
221221
}
222222
}
223-
return expressibles.toArray( new SqmBindable<?>[expressibles.size() + 1] );
223+
return expressibles.toArray( new SqmBindableType<?>[expressibles.size() + 1] );
224224
}
225225
}

hibernate-core/src/main/java/org/hibernate/dialect/function/array/ArrayConstructorFunction.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import org.hibernate.metamodel.mapping.JdbcMappingContainer;
1010
import org.hibernate.metamodel.model.domain.ReturnableType;
1111
import org.hibernate.type.BindingContext;
12-
import org.hibernate.query.sqm.SqmBindable;
12+
import org.hibernate.query.sqm.SqmBindableType;
1313
import org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor;
1414
import org.hibernate.query.sqm.produce.function.ArgumentsValidator;
1515
import org.hibernate.query.sqm.produce.function.FunctionArgumentException;
@@ -77,9 +77,9 @@ public void validate(
7777
String functionName,
7878
BindingContext bindingContext) {
7979
final int size = arguments.size();
80-
SqmBindable<?> firstType = null;
80+
SqmBindableType<?> firstType = null;
8181
for ( int i = 0; i < size; i++ ) {
82-
final SqmBindable<?> argument = arguments.get( i ).getExpressible();
82+
final SqmBindableType<?> argument = arguments.get( i ).getExpressible();
8383
if ( firstType == null ) {
8484
firstType = argument;
8585
}

hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AnyDiscriminatorSqmPathSource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import org.hibernate.annotations.AnyDiscriminator;
88
import org.hibernate.metamodel.model.domain.SimpleDomainType;
99
import org.hibernate.metamodel.model.domain.ReturnableType;
10-
import org.hibernate.query.sqm.SqmBindable;
10+
import org.hibernate.query.sqm.SqmBindableType;
1111
import org.hibernate.query.sqm.SqmPathSource;
1212
import org.hibernate.query.sqm.tree.domain.SqmPath;
1313
import org.hibernate.spi.NavigablePath;
@@ -21,7 +21,7 @@
2121
*
2222
*/
2323
public class AnyDiscriminatorSqmPathSource<D> extends AbstractSqmPathSource<D>
24-
implements ReturnableType<D>, SqmBindable<D> {
24+
implements ReturnableType<D>, SqmBindableType<D> {
2525

2626
private final BasicType<D> domainType;
2727

hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/ArrayTupleType.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import org.hibernate.metamodel.UnsupportedMappingException;
1414
import org.hibernate.metamodel.mapping.JdbcMapping;
1515
import org.hibernate.metamodel.mapping.MappingModelExpressible;
16-
import org.hibernate.query.sqm.SqmBindable;
16+
import org.hibernate.query.sqm.SqmBindableType;
1717
import org.hibernate.query.sqm.tree.domain.SqmDomainType;
1818
import org.hibernate.query.sqm.tuple.TupleType;
1919
import org.hibernate.query.sqm.SqmExpressible;
@@ -29,9 +29,9 @@ public class ArrayTupleType
2929
implements TupleType<Object[]>, SqmDomainType<Object[]>, MappingModelExpressible<Object[]> {
3030

3131
private final ObjectArrayJavaType javaType;
32-
private final SqmBindable<?>[] components;
32+
private final SqmBindableType<?>[] components;
3333

34-
public ArrayTupleType(SqmBindable<?>[] components) {
34+
public ArrayTupleType(SqmBindableType<?>[] components) {
3535
this.components = components;
3636
this.javaType = new ObjectArrayJavaType( getTypeDescriptors( components ) );
3737
}
@@ -75,12 +75,12 @@ public List<String> getComponentNames() {
7575
}
7676

7777
@Override
78-
public SqmBindable<?> get(int index) {
78+
public SqmBindableType<?> get(int index) {
7979
return components[index];
8080
}
8181

8282
@Override
83-
public SqmBindable<?> get(String componentName) {
83+
public SqmBindableType<?> get(String componentName) {
8484
throw new UnsupportedMappingException( "Array tuple has no component names" );
8585
}
8686

hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/SingularAttributeImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import org.hibernate.metamodel.model.domain.SimpleDomainType;
1818
import org.hibernate.query.SemanticException;
1919
import org.hibernate.query.sqm.NodeBuilder;
20-
import org.hibernate.query.sqm.SqmBindable;
20+
import org.hibernate.query.sqm.SqmBindableType;
2121
import org.hibernate.query.sqm.SqmPathSource;
2222
import org.hibernate.query.hql.spi.SqmCreationState;
2323
import org.hibernate.query.sqm.internal.SqmMappingModelHelper;
@@ -141,7 +141,7 @@ public SqmPathSource<J> getSqmPathSource() {
141141
}
142142

143143
@Override
144-
public SqmBindable<J> getExpressible() {
144+
public SqmBindableType<J> getExpressible() {
145145
return sqmPathSource.getExpressible();
146146
}
147147

hibernate-core/src/main/java/org/hibernate/persister/entity/DiscriminatorHelper.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import org.hibernate.mapping.Component;
1212
import org.hibernate.mapping.PersistentClass;
1313
import org.hibernate.query.sqm.NodeBuilder;
14-
import org.hibernate.query.sqm.SqmBindable;
14+
import org.hibernate.query.sqm.SqmBindableType;
1515
import org.hibernate.query.sqm.SqmPathSource;
1616
import org.hibernate.sql.InFragment;
1717
import org.hibernate.type.BasicType;
@@ -117,13 +117,13 @@ public static <T> String jdbcLiteral(T value, JdbcLiteralFormatter<T> formatter,
117117
* either the {@link org.hibernate.metamodel.mapping.DiscriminatorType}, for polymorphic
118118
* domain types, or to {@link StandardBasicTypes#CLASS Class} for non-inherited ones.
119119
*/
120-
public static <T> SqmBindable<? super T> getDiscriminatorType(
120+
public static <T> SqmBindableType<? super T> getDiscriminatorType(
121121
SqmPathSource<T> domainType, NodeBuilder nodeBuilder) {
122122
final SqmPathSource<?> subPathSource = domainType.findSubPathSource( DISCRIMINATOR_ROLE_NAME );
123-
final SqmBindable<?> type = subPathSource != null
123+
final SqmBindableType<?> type = subPathSource != null
124124
? subPathSource.getPathType()
125125
: nodeBuilder.getTypeConfiguration().getBasicTypeRegistry().resolve( StandardBasicTypes.CLASS );
126126
//noinspection unchecked
127-
return (SqmBindable<? super T>) type;
127+
return (SqmBindableType<? super T>) type;
128128
}
129129
}

hibernate-core/src/main/java/org/hibernate/procedure/internal/ProcedureCallImpl.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
import org.hibernate.query.KeyedResultList;
4646
import org.hibernate.type.BindableType;
4747
import org.hibernate.query.sqm.NodeBuilder;
48-
import org.hibernate.query.sqm.SqmBindable;
48+
import org.hibernate.query.sqm.SqmBindableType;
4949
import org.hibernate.type.OutputableType;
5050
import org.hibernate.query.Query;
5151
import org.hibernate.query.QueryParameter;
@@ -500,14 +500,14 @@ public <T> ProcedureParameter<T> registerParameter(
500500
int position,
501501
Type<T> typeReference,
502502
ParameterMode mode) {
503-
final SqmBindable<T> expressible = resolveExpressible( typeReference );
503+
final SqmBindableType<T> expressible = resolveExpressible( typeReference );
504504
final ProcedureParameterImpl<T> procedureParameter =
505505
new ProcedureParameterImpl<>( position, mode, ((BindableType<T>) typeReference).getJavaType(), expressible );
506506
registerParameter( procedureParameter );
507507
return procedureParameter;
508508
}
509509

510-
private <T> SqmBindable<T> resolveExpressible(Type<T> typeReference) {
510+
private <T> SqmBindableType<T> resolveExpressible(Type<T> typeReference) {
511511
return getSessionFactory().getRuntimeMetamodels().resolveExpressible( typeReference );
512512
}
513513

@@ -550,7 +550,7 @@ public <T> ProcedureParameterImplementor<T> registerParameter(
550550
String name,
551551
Type<T> typeReference,
552552
ParameterMode mode) {
553-
final SqmBindable<T> expressible = resolveExpressible( typeReference );
553+
final SqmBindableType<T> expressible = resolveExpressible( typeReference );
554554
final ProcedureParameterImpl<T> parameter =
555555
new ProcedureParameterImpl<>( name, mode, ((BindableType<T>) typeReference).getJavaType(), expressible );
556556
registerParameter( parameter );

hibernate-core/src/main/java/org/hibernate/query/hql/internal/FullyQualifiedReflectivePathTerminal.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import org.hibernate.query.hql.HqlInterpretationException;
1818
import org.hibernate.query.hql.spi.SqmCreationState;
1919
import org.hibernate.query.sqm.NodeBuilder;
20-
import org.hibernate.query.sqm.SqmBindable;
20+
import org.hibernate.query.sqm.SqmBindableType;
2121
import org.hibernate.query.sqm.SemanticQueryWalker;
2222
import org.hibernate.query.sqm.spi.SqmCreationContext;
2323
import org.hibernate.query.sqm.tree.SqmCopyContext;
@@ -41,7 +41,7 @@
4141
public class FullyQualifiedReflectivePathTerminal<E>
4242
extends FullyQualifiedReflectivePath
4343
implements SqmExpression<E> {
44-
private final @Nullable SqmBindable<E> expressibleType;
44+
private final @Nullable SqmBindableType<E> expressibleType;
4545
private final SqmCreationState creationState;
4646

4747
private final Function<SemanticQueryWalker<?>,?> handler;
@@ -137,7 +137,7 @@ private JavaTypeRegistry javaTypeRegistry() {
137137
}
138138

139139
@Override
140-
public @Nullable SqmBindable<E> getNodeType() {
140+
public @Nullable SqmBindableType<E> getNodeType() {
141141
return expressibleType;
142142
}
143143

@@ -153,7 +153,7 @@ public JavaType<E> getJavaTypeDescriptor() {
153153

154154

155155
@Override
156-
public void applyInferableType(@Nullable SqmBindable<?> type) {
156+
public void applyInferableType(@Nullable SqmBindableType<?> type) {
157157
}
158158

159159
@Override

hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
import org.hibernate.query.criteria.JpaRoot;
7272
import org.hibernate.query.criteria.JpaSearchOrder;
7373
import org.hibernate.query.criteria.JpaXmlTableColumnNode;
74-
import org.hibernate.query.sqm.SqmBindable;
74+
import org.hibernate.query.sqm.SqmBindableType;
7575
import org.hibernate.query.sqm.tree.domain.SqmEntityDomainType;
7676
import org.hibernate.query.sqm.tuple.internal.AnonymousTupleType;
7777
import org.hibernate.query.hql.HqlLogging;
@@ -4458,7 +4458,7 @@ public SqmNamedParameter<?> visitNamedParameter(HqlParser.NamedParameterContext
44584458

44594459
private <T> SqmNamedParameter<T> visitNamedParameter(
44604460
HqlParser.NamedParameterContext ctx,
4461-
SqmBindable<T> expressibleType) {
4461+
SqmBindableType<T> expressibleType) {
44624462
parameterStyle = parameterStyle.withNamed();
44634463
return resolveParameter(
44644464
new SqmNamedParameter<>(
@@ -4477,7 +4477,7 @@ public SqmPositionalParameter<?> visitPositionalParameter(HqlParser.PositionalPa
44774477

44784478
private <T> SqmPositionalParameter<T> visitPositionalParameter(
44794479
HqlParser.PositionalParameterContext ctx,
4480-
SqmBindable<T> expressibleType) {
4480+
SqmBindableType<T> expressibleType) {
44814481
if ( ctx.getChildCount() == 1 ) {
44824482
throw new ParameterLabelException( "Unlabeled ordinal parameter ('?' rather than ?1)" );
44834483
}

0 commit comments

Comments
 (0)