From 7c089a5c4bf5a20c62ea899b7128323b25295e62 Mon Sep 17 00:00:00 2001 From: Sanne Grinovero Date: Fri, 2 Jun 2023 16:22:05 +0100 Subject: [PATCH] HHH-16741 Fully remove the deprecated method getJdbcMappings() --- .../metamodel/mapping/AttributeMapping.java | 13 +------------ .../mapping/BasicEntityIdentifierMapping.java | 11 ----------- .../metamodel/mapping/BasicValuedMapping.java | 10 ---------- .../metamodel/mapping/BasicValuedModelPart.java | 8 -------- .../hibernate/metamodel/mapping/Bindable.java | 16 ---------------- .../mapping/EmbeddableMappingType.java | 5 ----- .../mapping/EmbeddableValuedModelPart.java | 7 ------- .../metamodel/mapping/JdbcMapping.java | 11 +---------- .../metamodel/mapping/JdbcMappingContainer.java | 15 --------------- .../mapping/PluralAttributeMapping.java | 10 ---------- .../metamodel/mapping/SelectableMappings.java | 15 --------------- .../metamodel/mapping/ValuedModelPart.java | 10 ---------- .../internal/AbstractEmbeddableMapping.java | 6 ------ .../AbstractSingularAttributeMapping.java | 13 +------------ .../metamodel/mapping/internal/AnyKeyPart.java | 8 -------- .../internal/BasicValuedCollectionPart.java | 8 -------- .../internal/CompoundNaturalIdMapping.java | 6 ------ .../internal/EmbeddedIdentifierMappingImpl.java | 11 ----------- .../internal/SimpleForeignKeyDescriptor.java | 7 ------- .../internal/SimpleNaturalIdMapping.java | 17 +++++++++-------- ...AnonymousTupleEmbeddableValuedModelPart.java | 8 -------- .../AnonymousTupleEntityValuedModelPart.java | 8 -------- .../AnonymousTupleTableGroupProducer.java | 9 --------- .../ast/tree/expression/EntityTypeLiteral.java | 10 +--------- .../sql/ast/tree/expression/JdbcLiteral.java | 8 -------- .../main/java/org/hibernate/type/BasicType.java | 11 +---------- 26 files changed, 14 insertions(+), 247 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/AttributeMapping.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/AttributeMapping.java index b77501cf24..2273f489f0 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/AttributeMapping.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/AttributeMapping.java @@ -6,14 +6,11 @@ */ package org.hibernate.metamodel.mapping; -import java.util.ArrayList; -import java.util.List; - +import org.hibernate.generator.Generator; import org.hibernate.metamodel.mapping.internal.EmbeddedAttributeMapping; import org.hibernate.property.access.spi.PropertyAccess; import org.hibernate.sql.results.graph.DatabaseSnapshotContributor; import org.hibernate.sql.results.graph.Fetchable; -import org.hibernate.generator.Generator; import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.MutabilityPlan; import org.hibernate.type.descriptor.java.MutabilityPlanExposer; @@ -122,12 +119,4 @@ public interface AttributeMapping return false; } - @Deprecated(forRemoval = true) - @Override - default List getJdbcMappings() { - final List results = new ArrayList<>(); - forEachSelectable( (index, selection) -> results.add( selection.getJdbcMapping() ) ); - return results; - } - } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/BasicEntityIdentifierMapping.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/BasicEntityIdentifierMapping.java index 93b4d6f346..561cb3ec80 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/BasicEntityIdentifierMapping.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/BasicEntityIdentifierMapping.java @@ -6,9 +6,6 @@ */ package org.hibernate.metamodel.mapping; -import java.util.ArrayList; -import java.util.List; - import org.hibernate.metamodel.mapping.internal.SingleAttributeIdentifierMapping; /** @@ -28,12 +25,4 @@ public interface BasicEntityIdentifierMapping extends SingleAttributeIdentifierM @Override boolean isInsertable(); - @Deprecated(forRemoval = true) - @Override - default List getJdbcMappings() { - final List results = new ArrayList<>(); - forEachSelectable( (index, selection) -> results.add( selection.getJdbcMapping() ) ); - return results; - } - } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/BasicValuedMapping.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/BasicValuedMapping.java index a8bdf535e9..c5c3cbed69 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/BasicValuedMapping.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/BasicValuedMapping.java @@ -6,10 +6,6 @@ */ package org.hibernate.metamodel.mapping; -import java.io.Serializable; -import java.util.Collections; -import java.util.List; - import org.hibernate.cache.MutableCacheKeyBuilder; import org.hibernate.engine.spi.SharedSessionContractImplementor; @@ -31,12 +27,6 @@ public interface BasicValuedMapping extends ValueMapping, SqlExpressible { return 1; } - @Deprecated(forRemoval = true) - @Override - default List getJdbcMappings() { - return Collections.singletonList( getJdbcMapping() ); - } - @Override default JdbcMapping getJdbcMapping(int index) { if ( index != 0 ) { diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/BasicValuedModelPart.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/BasicValuedModelPart.java index 6699195822..a98d27a418 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/BasicValuedModelPart.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/BasicValuedModelPart.java @@ -6,8 +6,6 @@ */ package org.hibernate.metamodel.mapping; -import java.util.List; - import org.hibernate.sql.results.graph.Fetchable; /** @@ -30,12 +28,6 @@ public interface BasicValuedModelPart extends BasicValuedMapping, ValuedModelPar return 1; } - @Deprecated(forRemoval = true) - @Override - default List getJdbcMappings() { - return BasicValuedMapping.super.getJdbcMappings(); - } - @Override default JdbcMapping getJdbcMapping(int index) { return BasicValuedMapping.super.getJdbcMapping( index ); diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/Bindable.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/Bindable.java index 2091db87e6..48476ad351 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/Bindable.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/Bindable.java @@ -6,9 +6,6 @@ */ package org.hibernate.metamodel.mapping; -import java.util.ArrayList; -import java.util.List; - import org.hibernate.Incubating; import org.hibernate.cache.MutableCacheKeyBuilder; import org.hibernate.engine.spi.SharedSessionContractImplementor; @@ -31,19 +28,6 @@ public interface Bindable extends JdbcMappingContainer { return forEachJdbcType( (index, jdbcMapping) -> {} ); } - /** - * The list of JDBC mappings - * @deprecated Prefer using {@link #getJdbcMapping(int)} or {@link #forEachJdbcType(IndexedConsumer)} - * and its variations. - */ - @Deprecated(forRemoval = true) - @Override - default List getJdbcMappings() { - final List results = new ArrayList<>(); - forEachJdbcType( (index, jdbcMapping) -> results.add( jdbcMapping ) ); - return results; - } - /** * Visit each of JdbcMapping * diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/EmbeddableMappingType.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/EmbeddableMappingType.java index 44fdbb3fc7..04cc5da424 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/EmbeddableMappingType.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/EmbeddableMappingType.java @@ -6,7 +6,6 @@ */ package org.hibernate.metamodel.mapping; -import java.util.List; import java.util.function.BiConsumer; import org.hibernate.internal.util.IndexedConsumer; @@ -217,10 +216,6 @@ public interface EmbeddableMappingType extends ManagedMappingType, SelectableMap @Override int getJdbcTypeCount(); - @Deprecated(forRemoval = true) - @Override - List getJdbcMappings(); - @Override int forEachJdbcType(int offset, IndexedConsumer action); diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/EmbeddableValuedModelPart.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/EmbeddableValuedModelPart.java index ea31ba6503..e54f93f7fb 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/EmbeddableValuedModelPart.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/EmbeddableValuedModelPart.java @@ -6,7 +6,6 @@ */ package org.hibernate.metamodel.mapping; -import java.util.List; import java.util.function.Consumer; import org.hibernate.cache.MutableCacheKeyBuilder; @@ -63,12 +62,6 @@ public interface EmbeddableValuedModelPart extends ValuedModelPart, Fetchable, F return getEmbeddableTypeDescriptor().getJdbcTypeCount(); } - @Deprecated(forRemoval = true) - @Override - default List getJdbcMappings() { - return getEmbeddableTypeDescriptor().getJdbcMappings(); - } - @Override default JdbcMapping getJdbcMapping(int index) { return getEmbeddableTypeDescriptor().getJdbcMapping( index ); diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/JdbcMapping.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/JdbcMapping.java index d6366d1415..308b182bef 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/JdbcMapping.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/JdbcMapping.java @@ -6,15 +6,12 @@ */ package org.hibernate.metamodel.mapping; -import java.util.Collections; -import java.util.List; - import org.hibernate.Incubating; import org.hibernate.internal.util.IndexedConsumer; -import org.hibernate.type.descriptor.converter.spi.BasicValueConverter; import org.hibernate.query.sqm.CastType; import org.hibernate.type.descriptor.ValueBinder; import org.hibernate.type.descriptor.ValueExtractor; +import org.hibernate.type.descriptor.converter.spi.BasicValueConverter; import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.jdbc.JdbcLiteralFormatter; import org.hibernate.type.descriptor.jdbc.JdbcType; @@ -131,12 +128,6 @@ public interface JdbcMapping extends MappingType, JdbcMappingContainer { return 1; } - @Deprecated(forRemoval = true) - @Override - default List getJdbcMappings() { - return Collections.singletonList( this ); - } - @Override default JdbcMapping getJdbcMapping(int index) { if ( index != 0 ) { diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/JdbcMappingContainer.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/JdbcMappingContainer.java index 1688be1d95..6c58b68257 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/JdbcMappingContainer.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/JdbcMappingContainer.java @@ -6,9 +6,6 @@ */ package org.hibernate.metamodel.mapping; -import java.util.ArrayList; -import java.util.List; - import org.hibernate.internal.util.IndexedConsumer; /** @@ -22,18 +19,6 @@ public interface JdbcMappingContainer { return forEachJdbcType( (index, jdbcMapping) -> {} ); } - /** - * The list of JDBC mappings - * @deprecated Prefer using {@link #getJdbcMapping(int)} or {@link #forEachJdbcType(IndexedConsumer)} - * and its variations. - */ - @Deprecated(forRemoval = true) - default List getJdbcMappings() { - final List results = new ArrayList<>(); - forEachJdbcType( (index, jdbcMapping) -> results.add( jdbcMapping ) ); - return results; - } - JdbcMapping getJdbcMapping(int index); default JdbcMapping getSingleJdbcMapping() { diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/PluralAttributeMapping.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/PluralAttributeMapping.java index 97ce3626f8..2c85664dbd 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/PluralAttributeMapping.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/PluralAttributeMapping.java @@ -6,8 +6,6 @@ */ package org.hibernate.metamodel.mapping; -import java.util.ArrayList; -import java.util.List; import java.util.Map; import java.util.Set; import java.util.function.Consumer; @@ -188,12 +186,4 @@ public interface PluralAttributeMapping return true; } - @Override - @Deprecated(forRemoval = true) - default List getJdbcMappings() { - final List results = new ArrayList<>(); - forEachJdbcType( (index, jdbcMapping) -> results.add( jdbcMapping ) ); - return results; - } - } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/SelectableMappings.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/SelectableMappings.java index c169547db6..98f775eda3 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/SelectableMappings.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/SelectableMappings.java @@ -6,9 +6,6 @@ */ package org.hibernate.metamodel.mapping; -import java.util.ArrayList; -import java.util.List; - /** * A container for multiple selectable (column, formula) mappings. * @@ -45,16 +42,4 @@ public interface SelectableMappings { return forEachSelectable( 0, consumer ); } - /** - * Obtain the JdbcMappings for the underlying selectable mappings - * - * @see SelectableMapping#getJdbcMapping() - * @deprecated - */ - @Deprecated(forRemoval = true) - default List getJdbcMappings() { - final List results = new ArrayList<>(); - forEachSelectable( (index, selection) -> results.add( selection.getJdbcMapping() ) ); - return results; - } } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ValuedModelPart.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ValuedModelPart.java index e2255f16f9..6f57ea3430 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ValuedModelPart.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ValuedModelPart.java @@ -6,9 +6,6 @@ */ package org.hibernate.metamodel.mapping; -import java.util.ArrayList; -import java.util.List; - /** * Describes a ModelPart that is also a ValueMapping (and therefore also a SelectableMappings). *

@@ -79,11 +76,4 @@ public interface ValuedModelPart extends ModelPart, ValueMapping, SelectableMapp ); } - @Override - @Deprecated(forRemoval = true) - default List getJdbcMappings() { - final List results = new ArrayList<>(); - forEachSelectable( (index, selection) -> results.add( selection.getJdbcMapping() ) ); - return results; - } } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractEmbeddableMapping.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractEmbeddableMapping.java index b4f1ab0b3b..782337d382 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractEmbeddableMapping.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractEmbeddableMapping.java @@ -536,12 +536,6 @@ public abstract class AbstractEmbeddableMapping implements EmbeddableMappingType ); } - @Deprecated(forRemoval = true) - @Override - public List getJdbcMappings() { - return getSelectableMappings().getJdbcMappings(); - } - @Override public JdbcMapping getJdbcMapping(int index) { return getSelectable( index ).getJdbcMapping(); diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractSingularAttributeMapping.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractSingularAttributeMapping.java index 660e59e57f..8fb1cf02df 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractSingularAttributeMapping.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractSingularAttributeMapping.java @@ -6,18 +6,14 @@ */ package org.hibernate.metamodel.mapping.internal; -import java.util.ArrayList; -import java.util.List; - import org.hibernate.engine.FetchStyle; import org.hibernate.engine.FetchTiming; +import org.hibernate.generator.Generator; import org.hibernate.metamodel.mapping.AttributeMetadata; -import org.hibernate.metamodel.mapping.JdbcMapping; import org.hibernate.metamodel.mapping.ManagedMappingType; import org.hibernate.metamodel.mapping.SingularAttributeMapping; import org.hibernate.property.access.spi.PropertyAccess; import org.hibernate.sql.results.graph.FetchOptions; -import org.hibernate.generator.Generator; /** * @author Steve Ebersole @@ -71,11 +67,4 @@ public abstract class AbstractSingularAttributeMapping return findContainingEntityMapping().getEntityPersister().getEntityMetamodel().getGenerators()[getStateArrayPosition()]; } - @Deprecated(forRemoval = true) - @Override - public List getJdbcMappings() { - final List results = new ArrayList<>(); - forEachSelectable( (index, selection) -> results.add( selection.getJdbcMapping() ) ); - return results; - } } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AnyKeyPart.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AnyKeyPart.java index d099aa1e0f..f9357d3df0 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AnyKeyPart.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AnyKeyPart.java @@ -6,8 +6,6 @@ */ package org.hibernate.metamodel.mapping.internal; -import java.util.Collections; -import java.util.List; import java.util.function.BiConsumer; import org.hibernate.engine.FetchStyle; @@ -288,12 +286,6 @@ public class AnyKeyPart implements BasicValuedModelPart, FetchOptions { return getJdbcTypeCount(); } - @Deprecated(forRemoval = true) - @Override - public List getJdbcMappings() { - return Collections.singletonList( jdbcMapping ); - } - @Override public JdbcMapping getJdbcMapping(int index) { if ( index != 0 ) { diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/BasicValuedCollectionPart.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/BasicValuedCollectionPart.java index 534201aff8..e5488f475b 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/BasicValuedCollectionPart.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/BasicValuedCollectionPart.java @@ -6,8 +6,6 @@ */ package org.hibernate.metamodel.mapping.internal; -import java.util.Collections; -import java.util.List; import java.util.function.BiConsumer; import org.hibernate.engine.FetchStyle; @@ -281,12 +279,6 @@ public class BasicValuedCollectionPart ); } - @Deprecated(forRemoval = true) - @Override - public List getJdbcMappings() { - return Collections.singletonList( getJdbcMapping() ); - } - @Override public JdbcMapping getJdbcMapping(int index) { if ( index != 0 ) { diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/CompoundNaturalIdMapping.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/CompoundNaturalIdMapping.java index 866b2f9a97..d9a55b6df4 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/CompoundNaturalIdMapping.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/CompoundNaturalIdMapping.java @@ -376,12 +376,6 @@ public class CompoundNaturalIdMapping extends AbstractNaturalIdMapping implement return jdbcMappings.size(); } - @Deprecated(forRemoval = true) - @Override - public List getJdbcMappings() { - return jdbcMappings; - } - @Override public JdbcMapping getJdbcMapping(int index) { return jdbcMappings.get( index ); diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EmbeddedIdentifierMappingImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EmbeddedIdentifierMappingImpl.java index 0ac7270638..aa2e685d60 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EmbeddedIdentifierMappingImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EmbeddedIdentifierMappingImpl.java @@ -6,8 +6,6 @@ */ package org.hibernate.metamodel.mapping.internal; -import java.util.ArrayList; -import java.util.List; import java.util.function.BiConsumer; import org.hibernate.engine.spi.SharedSessionContractImplementor; @@ -23,7 +21,6 @@ import org.hibernate.spi.NavigablePath; import org.hibernate.sql.ast.spi.SqlSelection; import org.hibernate.sql.ast.tree.from.TableGroup; import org.hibernate.sql.results.graph.DomainResultCreationState; -import org.hibernate.sql.results.graph.Fetchable; /** * Support for {@link jakarta.persistence.EmbeddedId} @@ -121,12 +118,4 @@ public class EmbeddedIdentifierMappingImpl return name; } - @Deprecated(forRemoval = true) - @Override - public List getJdbcMappings() { - final List results = new ArrayList<>(); - forEachSelectable( (index, selection) -> results.add( selection.getJdbcMapping() ) ); - return results; - } - } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/SimpleForeignKeyDescriptor.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/SimpleForeignKeyDescriptor.java index 7e8e692deb..6d7840838a 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/SimpleForeignKeyDescriptor.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/SimpleForeignKeyDescriptor.java @@ -562,13 +562,6 @@ public class SimpleForeignKeyDescriptor implements ForeignKeyDescriptor, BasicVa return associationKey; } - @Deprecated(forRemoval = true) - @Override - public List getJdbcMappings() { - return Collections.singletonList( targetSide.getModelPart().getJdbcMapping() ); - } - - @Override public JdbcMapping getJdbcMapping(int index) { if ( index != 0 ) { diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/SimpleNaturalIdMapping.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/SimpleNaturalIdMapping.java index 5889e1b86f..e363f68ca2 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/SimpleNaturalIdMapping.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/SimpleNaturalIdMapping.java @@ -18,10 +18,17 @@ import org.hibernate.engine.spi.PersistenceContext; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.internal.util.IndexedConsumer; -import org.hibernate.loader.ast.internal.*; +import org.hibernate.loader.ast.internal.MultiNaturalIdLoaderArrayParam; +import org.hibernate.loader.ast.internal.MultiNaturalIdLoaderInPredicate; +import org.hibernate.loader.ast.internal.SimpleNaturalIdLoader; import org.hibernate.loader.ast.spi.MultiNaturalIdLoader; import org.hibernate.loader.ast.spi.NaturalIdLoader; -import org.hibernate.metamodel.mapping.*; +import org.hibernate.metamodel.mapping.AttributeMapping; +import org.hibernate.metamodel.mapping.EntityMappingType; +import org.hibernate.metamodel.mapping.JdbcMapping; +import org.hibernate.metamodel.mapping.MappingType; +import org.hibernate.metamodel.mapping.SelectableConsumer; +import org.hibernate.metamodel.mapping.SingularAttributeMapping; import org.hibernate.persister.entity.EntityPersister; import org.hibernate.spi.NavigablePath; import org.hibernate.sql.ast.spi.SqlSelection; @@ -224,12 +231,6 @@ public class SimpleNaturalIdMapping extends AbstractNaturalIdMapping implements return attribute.getJdbcTypeCount(); } - @Deprecated(forRemoval = true) - @Override - public List getJdbcMappings() { - return attribute.getJdbcMappings(); - } - @Override public JdbcMapping getJdbcMapping(int index) { return attribute.getJdbcMapping( index ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/derived/AnonymousTupleEmbeddableValuedModelPart.java b/hibernate-core/src/main/java/org/hibernate/query/derived/AnonymousTupleEmbeddableValuedModelPart.java index f047e98259..7b00349596 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/derived/AnonymousTupleEmbeddableValuedModelPart.java +++ b/hibernate-core/src/main/java/org/hibernate/query/derived/AnonymousTupleEmbeddableValuedModelPart.java @@ -287,14 +287,6 @@ public class AnonymousTupleEmbeddableValuedModelPart implements EmbeddableValued return getSelectable( index ).getJdbcMapping(); } - @Deprecated(forRemoval = true) - @Override - public List getJdbcMappings() { - final List results = new ArrayList<>(); - forEachSelectable( (index, selection) -> results.add( selection.getJdbcMapping() ) ); - return results; - } - @Override public int forEachSelectable(SelectableConsumer consumer) { return forEachSelectable( 0, consumer ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/derived/AnonymousTupleEntityValuedModelPart.java b/hibernate-core/src/main/java/org/hibernate/query/derived/AnonymousTupleEntityValuedModelPart.java index 145edf5378..c17a736c43 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/derived/AnonymousTupleEntityValuedModelPart.java +++ b/hibernate-core/src/main/java/org/hibernate/query/derived/AnonymousTupleEntityValuedModelPart.java @@ -214,14 +214,6 @@ public class AnonymousTupleEntityValuedModelPart .setValue( instance, value ); } - @Deprecated(forRemoval = true) - @Override - public List getJdbcMappings() { - final List results = new ArrayList<>(); - forEachSelectable( (index, selection) -> results.add( selection.getJdbcMapping() ) ); - return results; - } - @Override public JdbcMapping getJdbcMapping(int index) { return identifierMapping.getJdbcMapping( index ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/derived/AnonymousTupleTableGroupProducer.java b/hibernate-core/src/main/java/org/hibernate/query/derived/AnonymousTupleTableGroupProducer.java index 5b7c6890c0..f000e25a8a 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/derived/AnonymousTupleTableGroupProducer.java +++ b/hibernate-core/src/main/java/org/hibernate/query/derived/AnonymousTupleTableGroupProducer.java @@ -6,7 +6,6 @@ */ package org.hibernate.query.derived; -import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Map; @@ -346,14 +345,6 @@ public class AnonymousTupleTableGroupProducer implements TableGroupProducer, Map throw new UnsupportedOperationException( "Not yet implemented" ); } - @Deprecated(forRemoval = true) - @Override - public List getJdbcMappings() { - final List results = new ArrayList<>(); - forEachJdbcType( (index, jdbcMapping) -> results.add( jdbcMapping ) ); - return results; - } - @Override public Object disassemble(Object value, SharedSessionContractImplementor session) { throw new UnsupportedOperationException( "Not yet implemented" ); diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/EntityTypeLiteral.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/EntityTypeLiteral.java index 133ba29ee2..b99ec95206 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/EntityTypeLiteral.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/EntityTypeLiteral.java @@ -6,14 +6,12 @@ */ package org.hibernate.sql.ast.tree.expression; -import java.util.List; - import org.hibernate.cache.MutableCacheKeyBuilder; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.internal.util.IndexedConsumer; +import org.hibernate.metamodel.mapping.DiscriminatorType; import org.hibernate.metamodel.mapping.JdbcMapping; import org.hibernate.metamodel.mapping.MappingModelExpressible; -import org.hibernate.metamodel.mapping.DiscriminatorType; import org.hibernate.persister.entity.EntityPersister; import org.hibernate.persister.entity.Queryable; import org.hibernate.query.sqm.sql.internal.DomainResultProducer; @@ -55,12 +53,6 @@ public class EntityTypeLiteral return discriminatorType.getJdbcTypeCount(); } - @Deprecated(forRemoval = true) - @Override - public List getJdbcMappings() { - return discriminatorType.getJdbcMappings(); - } - @Override public JdbcMapping getJdbcMapping(int index) { return discriminatorType.getJdbcMapping( index ); diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/JdbcLiteral.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/JdbcLiteral.java index fe099bd598..16a7f11dad 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/JdbcLiteral.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/JdbcLiteral.java @@ -9,8 +9,6 @@ package org.hibernate.sql.ast.tree.expression; import java.io.Serializable; import java.sql.PreparedStatement; import java.sql.SQLException; -import java.util.Collections; -import java.util.List; import org.hibernate.cache.MutableCacheKeyBuilder; import org.hibernate.engine.spi.SharedSessionContractImplementor; @@ -92,12 +90,6 @@ public class JdbcLiteral implements Literal, MappingModelExpressible, Doma return 1; } - @Deprecated(forRemoval = true) - @Override - public List getJdbcMappings() { - return Collections.singletonList( jdbcMapping ); - } - @Override public JdbcMapping getJdbcMapping(int index) { if ( index != 0 ) { diff --git a/hibernate-core/src/main/java/org/hibernate/type/BasicType.java b/hibernate-core/src/main/java/org/hibernate/type/BasicType.java index cdd0104f6e..5158a20608 100644 --- a/hibernate-core/src/main/java/org/hibernate/type/BasicType.java +++ b/hibernate-core/src/main/java/org/hibernate/type/BasicType.java @@ -6,9 +6,6 @@ */ package org.hibernate.type; -import java.util.Collections; -import java.util.List; - import org.hibernate.Incubating; import org.hibernate.dialect.Dialect; import org.hibernate.engine.spi.SessionFactoryImplementor; @@ -17,10 +14,10 @@ import org.hibernate.internal.util.IndexedConsumer; import org.hibernate.metamodel.mapping.BasicValuedMapping; import org.hibernate.metamodel.mapping.JdbcMapping; import org.hibernate.metamodel.mapping.MappingType; -import org.hibernate.type.descriptor.converter.spi.BasicValueConverter; import org.hibernate.metamodel.model.domain.BasicDomainType; import org.hibernate.type.descriptor.ValueBinder; import org.hibernate.type.descriptor.ValueExtractor; +import org.hibernate.type.descriptor.converter.spi.BasicValueConverter; import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.jdbc.JdbcLiteralFormatter; @@ -68,12 +65,6 @@ public interface BasicType extends Type, BasicDomainType, MappingType, Bas return 1; } - @Deprecated(forRemoval = true) - @Override - default List getJdbcMappings() { - return Collections.singletonList( this ); - } - @Override default JdbcMapping getJdbcMapping(int index) { if ( index != 0 ) {