From 3a0065eea4ed3d98e73b8f57dc68c3999740ddcd Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Mon, 11 Oct 2021 11:17:07 -0500 Subject: [PATCH] HHH-14870 - Rename {Xyz}TypeDescriptor as {Xyz}Type * `JavaTypeDescriptor` -> `JavaType` * `JdbcTypeDescriptor` -> `JdbcType` --- .../appendices/LegacyBasicTypeResolution.adoc | 2 +- .../chapters/domain/basic_types.adoc | 8 +- .../userguide/collections/MapKeyTypeTest.java | 2 - .../mapping/basic/CustomBinaryJdbcType.java | 6 +- .../dialect/InformixDialectTestCase.java | 3 - .../annotations/AnyKeyJavaClass.java | 4 +- .../hibernate/annotations/AnyKeyJavaType.java | 4 +- .../annotations/CollectionIdJavaType.java | 4 +- .../org/hibernate/annotations/JavaType.java | 6 +- .../annotations/JavaTypeRegistration.java | 4 +- .../annotations/ListIndexJavaType.java | 4 +- .../hibernate/annotations/MapKeyJavaType.java | 4 +- .../InFlightMetadataCollectorImpl.java | 4 +- .../boot/internal/MetadataBuilderImpl.java | 4 +- .../boot/model/TypeContributions.java | 12 +-- .../hibernate/boot/model/TypeDefinition.java | 14 ++-- .../boot/model/TypeDefinitionRegistry.java | 4 +- .../TypeDefinitionRegistryStandardImpl.java | 4 +- .../internal/AbstractConverterDescriptor.java | 4 +- .../ConvertedBasicTypeResolution.java | 6 +- .../internal/EnumeratedValueResolution.java | 14 ++-- .../InferredBasicValueResolution.java | 14 ++-- .../internal/InferredBasicValueResolver.java | 24 +++--- .../internal/NamedBasicTypeResolution.java | 10 +-- .../internal/NamedConverterResolution.java | 28 +++---- .../process/internal/UserTypeResolution.java | 6 +- .../internal/ValueConverterTypeAdapter.java | 6 +- .../process/internal/VersionResolution.java | 18 ++--- .../process/spi/MetadataBuildingProcess.java | 8 +- .../query/SqlResultSetMappingDescriptor.java | 4 +- .../boot/spi/InFlightMetadataCollector.java | 4 +- .../org/hibernate/cfg/AnnotationBinder.java | 6 +- .../java/org/hibernate/cfg/BinderHelper.java | 4 +- .../cfg/annotations/BasicValueBinder.java | 45 ++++++----- .../dialect/AbstractHANADialect.java | 18 ++--- .../java/org/hibernate/dialect/Dialect.java | 8 +- .../org/hibernate/dialect/MySQLDialect.java | 4 +- .../hibernate/dialect/SQLServerDialect.java | 2 - .../hibernate/dialect/SybaseASEDialect.java | 4 +- .../engine/internal/UnsavedValueFactory.java | 14 ++-- .../hibernate/engine/internal/Versioning.java | 14 ++-- .../spi/SharedSessionContractImplementor.java | 4 +- .../internal/DefaultLoadEventListener.java | 4 +- .../internal/util/ReflectHelper.java | 6 +- .../access/IdentifierLoadAccessImpl.java | 4 +- .../java/org/hibernate/mapping/Array.java | 5 +- .../org/hibernate/mapping/BasicValue.java | 26 +++---- .../org/hibernate/mapping/SimpleValue.java | 4 +- .../AbstractCompositeIdentifierMapping.java | 4 +- ...tractEmbeddableRepresentationStrategy.java | 11 ++- .../AbstractEntityInstantiatorPojo.java | 4 +- .../metamodel/internal/AttributeFactory.java | 9 +-- .../EmbeddableInstantiatorPojoOptimized.java | 4 +- .../EmbeddableInstantiatorPojoStandard.java | 4 +- .../EmbeddableRepresentationStrategyMap.java | 6 +- .../EntityInstantiatorPojoOptimized.java | 4 +- .../EntityInstantiatorPojoStandard.java | 4 +- .../EntityRepresentationStrategyMap.java | 8 +- ...ityRepresentationStrategyPojoStandard.java | 10 +-- .../metamodel/internal/MetadataContext.java | 6 +- .../internal/PojoInstantiatorImpl.java | 6 +- .../mapping/EmbeddableMappingType.java | 6 +- .../metamodel/mapping/EntityMappingType.java | 6 +- .../metamodel/mapping/JdbcMapping.java | 6 +- .../metamodel/mapping/ManagedMappingType.java | 5 +- .../metamodel/mapping/MappingType.java | 4 +- .../metamodel/mapping/ModelPart.java | 4 +- .../metamodel/mapping/ValueMapping.java | 4 +- .../internal/AbstractAttributeMapping.java | 4 +- .../AbstractDiscriminatorMapping.java | 18 ++--- .../internal/AnyDiscriminatorPart.java | 4 +- .../mapping/internal/AnyKeyPart.java | 4 +- .../internal/BasicAttributeMapping.java | 6 +- .../BasicEntityIdentifierMappingImpl.java | 4 +- .../internal/BasicValuedCollectionPart.java | 4 +- .../CollectionIdentifierDescriptorImpl.java | 6 +- .../internal/CompoundNaturalIdMapping.java | 22 +++--- ...criminatedAssociationAttributeMapping.java | 4 +- .../DiscriminatedAssociationMapping.java | 28 +++---- .../internal/DiscriminatedCollectionPart.java | 6 +- .../internal/EmbeddedCollectionPart.java | 4 +- .../EmbeddedForeignKeyDescriptor.java | 4 +- .../internal/EntityCollectionPart.java | 5 +- .../internal/EntityRowIdMappingImpl.java | 4 +- .../internal/EntityVersionMappingImpl.java | 4 +- .../internal/MappingModelCreationHelper.java | 10 +-- .../internal/SimpleForeignKeyDescriptor.java | 4 +- .../internal/SimpleNaturalIdMapping.java | 8 +- .../metamodel/model/convert/Converters.java | 8 +- .../internal/JpaAttributeConverterImpl.java | 30 ++++---- .../internal/NamedEnumValueConverter.java | 8 +- .../internal/OrdinalEnumValueConverter.java | 8 +- .../convert/spi/BasicValueConverter.java | 6 +- .../convert/spi/JpaAttributeConverter.java | 8 +- .../spi/SimpleBasicValueConverter.java | 14 ++-- .../model/domain/AbstractDomainType.java | 8 +- .../domain/AbstractIdentifiableType.java | 5 +- .../model/domain/AbstractManagedType.java | 4 +- .../model/domain/AllowableParameterType.java | 4 +- .../metamodel/model/domain/DomainType.java | 6 +- .../model/domain/PersistentAttribute.java | 4 +- .../metamodel/model/domain/TupleType.java | 1 - .../domain/internal/AbstractAttribute.java | 15 ++-- .../internal/AbstractPluralAttribute.java | 4 +- .../internal/AbstractSqmPathSource.java | 4 +- .../internal/AnyMappingDomainTypeImpl.java | 8 +- .../model/domain/internal/ArrayTupleType.java | 8 +- .../model/domain/internal/BasicTypeImpl.java | 8 +- .../domain/internal/EmbeddableTypeImpl.java | 6 +- .../model/domain/internal/EntityTypeImpl.java | 4 +- .../domain/internal/JpaMetamodelImpl.java | 7 +- .../internal/MappedSuperclassTypeImpl.java | 4 +- .../internal/PluralAttributeBuilder.java | 10 +-- .../internal/SingularAttributeImpl.java | 4 +- .../spi/EntityRepresentationStrategy.java | 6 +- .../ManagedTypeRepresentationStrategy.java | 4 +- .../entity/AbstractEntityPersister.java | 11 ++- .../persister/entity/DiscriminatorType.java | 10 +-- .../persister/entity/EntityPersister.java | 6 +- .../entity/JoinedSubclassEntityPersister.java | 4 +- .../entity/SingleTableEntityPersister.java | 4 +- .../internal/FunctionReturnImpl.java | 4 +- .../internal/ScalarDomainResultBuilder.java | 6 +- .../hibernate/procedure/internal/Util.java | 4 +- .../query/criteria/JpaTupleElement.java | 4 +- .../internal/BasicDotIdentifierConsumer.java | 5 +- .../FullyQualifiedReflectivePathTerminal.java | 4 +- .../query/hql/internal/QuerySplitter.java | 6 +- .../hql/internal/SemanticQueryBuilder.java | 12 ++- .../internal/QueryParameterBindingImpl.java | 4 +- .../internal/QueryParameterBindingsImpl.java | 7 +- .../internal/ResultMementoBasicStandard.java | 6 +- .../ResultMementoInstantiationStandard.java | 6 +- .../query/named/ResultMementoBasic.java | 2 - .../org/hibernate/query/results/Builders.java | 6 +- .../DomainResultCreationStateImpl.java | 4 +- .../query/results/SqlSelectionImpl.java | 4 +- ...pleteResultBuilderBasicValuedStandard.java | 6 +- .../CompleteResultBuilderInstantiation.java | 6 +- .../DynamicResultBuilderBasicConverted.java | 10 +-- .../DynamicResultBuilderBasicStandard.java | 8 +- .../DynamicResultBuilderInstantiation.java | 6 +- .../hibernate/query/spi/AbstractQuery.java | 6 +- .../spi/QueryParameterBindingValidator.java | 6 +- .../hibernate/query/sqm/SqmExpressable.java | 4 +- ...SelfRenderingFunctionSqlAstExpression.java | 4 +- .../sqm/internal/SqmCriteriaNodeBuilder.java | 8 +- .../sqm/sql/BaseSqmToSqlAstConverter.java | 15 ++-- .../DiscriminatorPathInterpretation.java | 4 +- .../internal/SqlAstProcessingStateImpl.java | 4 +- .../SqlAstQueryPartProcessingStateImpl.java | 4 +- .../sqm/sql/internal/SqmMapEntryResult.java | 10 +-- .../sqm/tree/SqmExpressableAccessor.java | 4 +- .../query/sqm/tree/SqmTypedNode.java | 4 +- .../tree/domain/AbstractSqmAttributeJoin.java | 4 +- .../query/sqm/tree/domain/SqmBagJoin.java | 1 - .../tree/domain/SqmBasicValuedSimplePath.java | 10 +-- .../domain/SqmEmbeddedValuedSimplePath.java | 4 +- .../sqm/tree/domain/SqmMapEntryReference.java | 12 +-- .../query/sqm/tree/domain/SqmPath.java | 5 +- .../domain/SqmPolymorphicRootDescriptor.java | 8 +- .../expression/AbstractSqmExpression.java | 5 +- .../sqm/tree/expression/Compatibility.java | 6 +- .../sqm/tree/expression/LiteralHelper.java | 1 - .../sqm/tree/expression/SqmFieldLiteral.java | 14 ++-- .../query/sqm/tree/expression/SqmLiteral.java | 4 +- .../query/sqm/tree/from/SqmAttributeJoin.java | 4 +- .../sqm/tree/predicate/SqmPredicate.java | 4 +- .../tree/select/SqmDynamicInstantiation.java | 18 ++--- .../select/SqmDynamicInstantiationTarget.java | 4 +- .../tree/select/SqmJpaCompoundSelection.java | 10 +-- .../query/sqm/tree/select/SqmQueryGroup.java | 4 +- .../sqm/tree/select/SqmSelectClause.java | 4 +- .../query/sqm/tree/select/SqmSubQuery.java | 5 +- .../result/internal/OutputsImpl.java | 5 +- .../sql/ast/spi/SqlExpressionResolver.java | 4 +- .../sql/ast/spi/SqlSelectionProducer.java | 4 +- .../sql/ast/tree/expression/Any.java | 6 +- .../tree/expression/CaseSimpleExpression.java | 5 +- .../sql/ast/tree/expression/Collate.java | 4 +- .../tree/expression/EntityTypeLiteral.java | 4 +- .../sql/ast/tree/expression/Every.java | 6 +- .../sql/ast/tree/expression/Expression.java | 4 +- .../sql/ast/tree/expression/JdbcLiteral.java | 4 +- .../sql/ast/tree/expression/SqlTuple.java | 4 +- .../sql/ast/tree/predicate/Predicate.java | 6 +- .../sql/ast/tree/select/QuerySpec.java | 4 +- .../exec/internal/AbstractJdbcParameter.java | 4 +- ...VersionTypeSeedParameterSpecification.java | 6 +- .../results/graph/AbstractFetchParent.java | 4 +- .../results/graph/DomainResultAssembler.java | 4 +- .../results/graph/DomainResultGraphNode.java | 4 +- .../UnfetchedBasicPartResultAssembler.java | 8 +- .../graph/UnfetchedResultAssembler.java | 8 +- .../sql/results/graph/basic/BasicFetch.java | 6 +- .../sql/results/graph/basic/BasicResult.java | 14 ++-- .../graph/basic/BasicResultAssembler.java | 12 +-- .../internal/AbstractCollectionAssembler.java | 4 +- .../AbstractCollectionResultNode.java | 4 +- .../internal/CollectionDomainResult.java | 4 +- .../internal/DelayedCollectionFetch.java | 4 +- .../internal/EagerCollectionFetch.java | 4 +- .../internal/SelectEagerCollectionFetch.java | 4 +- .../internal/EmbeddableAssembler.java | 5 +- .../internal/EmbeddableResultImpl.java | 4 +- .../entity/AbstractEntityResultGraphNode.java | 4 +- .../graph/entity/EntityResultGraphNode.java | 4 +- .../entity/internal/EntityAssembler.java | 8 +- .../internal/EntityDelayedResultImpl.java | 4 +- .../internal/ArgumentDomainResult.java | 4 +- .../internal/ArgumentReader.java | 4 +- .../internal/DynamicInstantiation.java | 8 +- ...InstantiationAssemblerConstructorImpl.java | 8 +- ...icInstantiationAssemblerInjectionImpl.java | 8 +- ...DynamicInstantiationAssemblerListImpl.java | 8 +- .../DynamicInstantiationAssemblerMapImpl.java | 8 +- .../DynamicInstantiationResultImpl.java | 14 ++-- .../sql/results/graph/tuple/TupleResult.java | 10 +-- .../graph/tuple/TupleResultAssembler.java | 8 +- .../results/internal/NullValueAssembler.java | 8 +- .../results/internal/StandardRowReader.java | 7 +- .../CircularBiDirectionalFetchImpl.java | 12 +-- .../internal/domain/CircularFetchImpl.java | 12 +-- .../jdbc/internal/ResultSetAccess.java | 6 +- .../results/jdbc/spi/JdbcValuesMetadata.java | 4 +- .../sql/results/spi/ListResultsConsumer.java | 6 +- .../hibernate/sql/results/spi/RowReader.java | 5 +- .../org/hibernate/tuple/PropertyFactory.java | 4 +- ...AbstractSingleColumnStandardBasicType.java | 4 +- .../type/AbstractStandardBasicType.java | 15 ++-- .../hibernate/type/AdjustableBasicType.java | 4 +- .../java/org/hibernate/type/BasicType.java | 8 +- .../org/hibernate/type/BasicTypeRegistry.java | 20 ++--- .../java/org/hibernate/type/BooleanType.java | 4 +- .../org/hibernate/type/ComponentType.java | 4 +- .../java/org/hibernate/type/CustomType.java | 18 ++--- .../org/hibernate/type/DbTimestampType.java | 4 +- .../java/org/hibernate/type/EnumType.java | 10 +-- .../java/org/hibernate/type/InstantType.java | 2 - .../org/hibernate/type/JavaObjectType.java | 4 +- .../java/org/hibernate/type/NullType.java | 4 +- .../type/NumericBooleanConverter.java | 6 +- .../hibernate/type/OffsetDateTimeType.java | 1 - .../org/hibernate/type/PostgresUUIDType.java | 14 ++-- .../org/hibernate/type/SerializableType.java | 6 +- .../type/StandardBasicTypeTemplate.java | 4 +- .../org/hibernate/type/TimestampType.java | 4 +- .../hibernate/type/TrueFalseConverter.java | 6 +- .../org/hibernate/type/TrueFalseType.java | 3 - .../org/hibernate/type/YesNoConverter.java | 6 +- .../java/org/hibernate/type/YesNoType.java | 4 - .../org/hibernate/type/ZonedDateTimeType.java | 1 - ...uteConverterJdbcTypeDescriptorAdapter.java | 10 +-- .../AttributeConverterTypeAdapter.java | 18 ++--- .../java/AbstractClassJavaTypeDescriptor.java | 2 +- .../java/AbstractJavaTypeDescriptor.java | 2 +- ...TypeDescriptor.java => BasicJavaType.java} | 2 +- .../java/BooleanJavaTypeDescriptor.java | 4 +- .../java/ByteArrayJavaTypeDescriptor.java | 1 - .../java/ByteJavaTypeDescriptor.java | 4 +- .../java/CalendarDateJavaTypeDescriptor.java | 2 - .../java/CalendarJavaTypeDescriptor.java | 5 +- .../java/CalendarTimeJavaTypeDescriptor.java | 2 - .../CharacterArrayJavaTypeDescriptor.java | 1 - .../java/CharacterJavaTypeDescriptor.java | 4 +- .../java/ComponentArrayComparator.java | 4 +- .../java/ComponentArrayMutabilityPlan.java | 4 +- .../java/DateJavaTypeDescriptor.java | 3 +- .../java/DbTimestampJavaTypeDescriptor.java | 6 +- .../java/DoubleJavaTypeDescriptor.java | 4 +- .../descriptor/java/FloatTypeDescriptor.java | 4 +- .../java/InstantJavaTypeDescriptor.java | 2 +- .../java/IntegerJavaTypeDescriptor.java | 4 +- ...{JavaTypeDescriptor.java => JavaType.java} | 2 +- .../java/JavaTypeDescriptorHelper.java | 4 +- .../descriptor/java/JavaTypedExpressable.java | 2 +- .../java/JdbcDateJavaTypeDescriptor.java | 1 - .../java/JdbcTimeJavaTypeDescriptor.java | 1 - .../java/JdbcTimestampJavaTypeDescriptor.java | 4 +- .../java/LocalDateJavaTypeDescriptor.java | 1 - .../java/LocalDateTimeJavaTypeDescriptor.java | 3 +- .../java/LocalTimeJavaTypeDescriptor.java | 2 - .../java/LongJavaTypeDescriptor.java | 4 +- .../java/NClobJavaTypeDescriptor.java | 1 - .../java/ObjectArrayJavaTypeDescriptor.java | 10 +-- .../OffsetDateTimeJavaTypeDescriptor.java | 2 +- .../java/OffsetTimeJavaTypeDescriptor.java | 3 - .../PrimitiveByteArrayJavaTypeDescriptor.java | 2 +- ...itiveCharacterArrayJavaTypeDescriptor.java | 1 - .../java/RowVersionJavaTypeDescriptor.java | 3 +- .../java/ShortJavaTypeDescriptor.java | 4 +- .../java/TemporalJavaTypeDescriptor.java | 2 +- .../java/UUIDJavaTypeDescriptor.java | 1 - ...peDescriptor.java => VersionJavaType.java} | 2 +- .../java/ZonedDateTimeJavaTypeDescriptor.java | 2 +- .../descriptor/java/spi/DynamicModelJtd.java | 4 +- .../java/spi/JavaTypeDescriptorBaseline.java | 10 +-- .../java/spi/JavaTypeDescriptorRegistry.java | 32 ++++---- .../spi/JdbcTypeRecommendationException.java | 4 +- ...Descriptor.java => PrimitiveJavaType.java} | 4 +- .../descriptor/java/spi/RegistryHelper.java | 6 +- .../jdbc/AdjustableJdbcTypeDescriptor.java | 4 +- .../type/descriptor/jdbc/BasicBinder.java | 8 +- .../type/descriptor/jdbc/BasicExtractor.java | 8 +- .../jdbc/BigIntJdbcTypeDescriptor.java | 14 ++-- .../jdbc/BlobJdbcTypeDescriptor.java | 22 +++--- .../jdbc/BooleanJdbcTypeDescriptor.java | 16 ++-- .../jdbc/CharJdbcTypeDescriptor.java | 4 +- .../jdbc/ClobJdbcTypeDescriptor.java | 24 +++--- .../jdbc/DateJdbcTypeDescriptor.java | 14 ++-- .../jdbc/DecimalJdbcTypeDescriptor.java | 14 ++-- .../jdbc/DoubleJdbcTypeDescriptor.java | 14 ++-- .../jdbc/FloatJdbcTypeDescriptor.java | 16 ++-- .../jdbc/IntegerJdbcTypeDescriptor.java | 14 ++-- .../descriptor/jdbc/JdbcTypeDescriptor.java | 14 ++-- .../jdbc/JdbcTypeDescriptorIndicators.java | 4 +- .../jdbc/LongVarcharJdbcTypeDescriptor.java | 4 +- .../jdbc/NClobJdbcTypeDescriptor.java | 14 ++-- .../jdbc/NVarcharJdbcTypeDescriptor.java | 14 ++-- .../jdbc/NullJdbcTypeDescriptor.java | 6 +- .../jdbc/ObjectJdbcTypeDescriptor.java | 6 +- ...ectNullAsBinaryTypeJdbcTypeDescriptor.java | 4 +- ...bjectNullAsNullTypeJdbcTypeDescriptor.java | 4 +- ...ObjectNullResolvingJdbcTypeDescriptor.java | 4 +- .../jdbc/RealJdbcTypeDescriptor.java | 6 +- .../jdbc/SmallIntJdbcTypeDescriptor.java | 14 ++-- .../jdbc/TimeJdbcTypeDescriptor.java | 14 ++-- .../jdbc/TimestampJdbcTypeDescriptor.java | 14 ++-- ...mestampWithTimeZoneJdbcTypeDescriptor.java | 14 ++-- .../jdbc/TinyIntJdbcTypeDescriptor.java | 14 ++-- .../jdbc/VarbinaryJdbcTypeDescriptor.java | 16 ++-- .../jdbc/VarcharJdbcTypeDescriptor.java | 18 ++--- .../internal/JdbcLiteralFormatterBinary.java | 4 +- .../internal/JdbcLiteralFormatterBoolean.java | 4 +- .../JdbcLiteralFormatterCharacterData.java | 6 +- .../JdbcLiteralFormatterNumericData.java | 4 +- .../JdbcLiteralFormatterTemporal.java | 4 +- .../spi/AbstractJdbcLiteralFormatter.java | 8 +- .../jdbc/spi/BasicJdbcLiteralFormatter.java | 4 +- .../type/internal/BasicTypeImpl.java | 4 +- .../type/internal/ConvertedBasicTypeImpl.java | 4 +- .../ImmutableConvertedBasicTypeImpl.java | 4 +- .../internal/ImmutableNamedBasicTypeImpl.java | 4 +- .../type/internal/NamedBasicTypeImpl.java | 4 +- .../internal/UserTypeJavaTypeWrapper.java | 4 +- .../type/internal/UserTypeSqlTypeAdapter.java | 16 ++-- .../UserTypeVersionJavaTypeWrapper.java | 4 +- .../hibernate/type/spi/TypeConfiguration.java | 8 +- .../usertype/BaseUserTypeSupport.java | 8 +- .../usertype/StaticUserTypeSupport.java | 14 ++-- .../usertype/UserTypeLegacyBridge.java | 2 - .../hibernate/usertype/UserTypeSupport.java | 6 +- .../annotations/basics/sql/JdbcTypeTests.java | 6 +- .../GoofyPersisterClassProvider.java | 4 +- .../UUIDBasedIdInterpretationTest.java | 1 - .../orm/test/immutable/ImmutableTest.java | 1 - .../PersisterClassProviderTest.java | 4 +- .../orm/test/legacy/CustomPersister.java | 4 +- .../ExplicitJavaTypeDescriptorTest.java | 8 +- ...mpleEmbeddableOverriddenConverterTest.java | 1 - .../SimpleOverriddenConverterTest.java | 2 - .../converter/SimpleXmlOverriddenTest.java | 1 - .../custom/CustomTypeConverterTest.java | 14 ++-- .../custom/MyCustomJavaTypeDescriptor.java | 76 ------------------- .../converted/converter/custom/MyEntity.java | 8 +- ...ustomJavaType.java => PayloadWrapper.java} | 8 +- ...rter.java => PayloadWrapperConverter.java} | 6 +- .../custom/PayloadWrapperJavaType.java | 76 +++++++++++++++++++ ...iptor.java => PayloadWrapperJdbcType.java} | 12 +-- .../AbstractGeneratedPropertyTest.java | 2 +- .../type/java/AbstractDescriptorTest.java | 6 +- .../test/mapping/type/java/CoercionTests.java | 16 ++-- .../java/JavaTypeDescriptorRegistryTest.java | 12 +-- .../MaterializedNClobBindTest.java | 2 - .../nationalized/SimpleNationalizedTest.java | 12 --- .../UseNationalizedCharDataSettingTest.java | 4 - .../onetoone/formula/OneToOneFormulaTest.java | 1 - .../QueryParametersValidationArrayTest.java | 6 +- .../orm/test/type/Java8DateTimeTests.java | 4 +- .../orm/test/type/contributor/ArrayType.java | 6 +- .../StoredPrefixedStringType.java | 7 +- .../orm/test/version/db/DbVersionTest.java | 2 +- ...aseTimestampComparisonAnnotationsTest.java | 4 +- .../sybase/SybaseTimestampVersioningTest.java | 5 +- .../usertype/inet/InetJdbcTypeDescriptor.java | 6 +- .../usertype/json/JsonJdbcTypeDescriptor.java | 6 +- .../customtype/ParametrizedTestUserType.java | 1 - .../JTSGeometryJavaTypeDescriptor.java | 4 +- .../db2/DB2GeometryTypeDescriptor.java | 6 +- .../dialect/db2/DB2SpatialDialect.java | 20 ----- .../spatial/dialect/h2geodb/GeoDBDialect.java | 18 ----- .../h2geodb/GeoDBGeometryTypeDescriptor.java | 6 +- .../hana/HANAGeometryTypeDescriptor.java | 6 +- .../dialect/hana/HANAPointTypeDescriptor.java | 6 +- .../dialect/hana/HANASpatialDialect.java | 17 ----- .../MariaDBGeometryTypeDescriptor.java | 6 +- .../mysql/MySQLGeometryTypeDescriptor.java | 6 +- .../oracle/SDOGeometryTypeDescriptor.java | 6 +- .../oracle/SDOGeometryValueBinder.java | 6 +- .../oracle/SDOGeometryValueExtractor.java | 4 +- .../postgis/PGGeometryTypeDescriptor.java | 8 +- .../postgis/PostgisDialectContributor.java | 2 - .../SqlServer2008GeometryTypeDescriptor.java | 6 +- .../dialect/sqlserver/SqlServerSupport.java | 1 - .../CommaDelimitedStringsMapType.java | 5 -- 405 files changed, 1338 insertions(+), 1529 deletions(-) rename hibernate-core/src/main/java/org/hibernate/type/descriptor/java/{BasicJavaTypeDescriptor.java => BasicJavaType.java} (94%) rename hibernate-core/src/main/java/org/hibernate/type/descriptor/java/{JavaTypeDescriptor.java => JavaType.java} (99%) rename hibernate-core/src/main/java/org/hibernate/type/descriptor/java/{VersionJavaTypeDescriptor.java => VersionJavaType.java} (92%) rename hibernate-core/src/main/java/org/hibernate/type/descriptor/java/spi/{PrimitiveJavaTypeDescriptor.java => PrimitiveJavaType.java} (84%) delete mode 100644 hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/custom/MyCustomJavaTypeDescriptor.java rename hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/custom/{MyCustomJavaType.java => PayloadWrapper.java} (79%) rename hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/custom/{MyCustomConverter.java => PayloadWrapperConverter.java} (69%) create mode 100644 hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/custom/PayloadWrapperJavaType.java rename hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/custom/{MyCustomJdbcTypeDescriptor.java => PayloadWrapperJdbcType.java} (84%) diff --git a/documentation/src/main/asciidoc/userguide/appendices/LegacyBasicTypeResolution.adoc b/documentation/src/main/asciidoc/userguide/appendices/LegacyBasicTypeResolution.adoc index fd54b90b4e..99825e8357 100644 --- a/documentation/src/main/asciidoc/userguide/appendices/LegacyBasicTypeResolution.adoc +++ b/documentation/src/main/asciidoc/userguide/appendices/LegacyBasicTypeResolution.adoc @@ -5,7 +5,7 @@ [[basic-legacy]] == Legacy BasicType resolution -Versions prior to 6.0 statically combined the `JavaTypeDescriptor`, `JdbcTypeDescriptor`, `BasicValueConverter` and +Versions prior to 6.0 statically combined the `JavaType`, `JdbcTypeDescriptor`, `BasicValueConverter` and `MutabilityPlan` aspects within the `org.hibernate.type.BasicType` contract. Hibernate's legacy strategy for resolving a basic type is based on finding the implementation of `org.hibernate.type.BasicType` to use. diff --git a/documentation/src/main/asciidoc/userguide/chapters/domain/basic_types.adoc b/documentation/src/main/asciidoc/userguide/chapters/domain/basic_types.adoc index 26c1bd1680..b28cf4fe53 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/domain/basic_types.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/domain/basic_types.adoc @@ -1556,7 +1556,7 @@ system. There are many ways to integrate a `TypeContributor`. The most common is to define the `TypeContributor` as a Java service (see `java.util.ServiceLoader`). -`TypeContributor` is passed a `TypeContributions` reference, which allows registration of custom `JavaTypeDescriptor`, +`TypeContributor` is passed a `TypeContributions` reference, which allows registration of custom `JavaType`, `JdbcTypeDescriptor` and `BasicType` references. @@ -1618,7 +1618,7 @@ If the Java type is not known to Hibernate, you will encounter the following mes > Consider registering a custom JavaTypeDescriptor or at least implementing equals/hashCode. A Java type is "known" if it has an entry in the `JavaTypeDescriptorRegistry`. While Hibernate does load many JDK types into -the `JavaTypeDescriptorRegistry`, an application can also expand the `JavaTypeDescriptorRegistry` by adding new `JavaTypeDescriptor` +the `JavaTypeDescriptorRegistry`, an application can also expand the `JavaTypeDescriptorRegistry` by adding new `JavaType` entries. This way, Hibernate will also know how to handle a specific Java Object type at the JDBC level. @@ -1867,7 +1867,7 @@ See also <>. [[basic-bitset-java-type]] ===== Using a custom `JavaTypeDescriptor` -As covered in <>, we will define a `JavaTypeDescriptor` +As covered in <>, we will define a `JavaType` for `BitSet` that maps values to `VARCHAR` for storage by default. [[basic-bitset-example-java-type]] @@ -1891,7 +1891,7 @@ include::{sourcedir}/basic/bitset/BitSetJavaTypeTests.java[tags=basic-bitset-exa ---- ==== -Or we can apply it globally using `@JavaTypeRegistration`. This allows the registered `JavaTypeDescriptor` +Or we can apply it globally using `@JavaTypeRegistration`. This allows the registered `JavaType` to be used as the default whenever we encounter the `BitSet` type [[basic-bitset-example-java-type-global]] diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/MapKeyTypeTest.java b/documentation/src/test/java/org/hibernate/userguide/collections/MapKeyTypeTest.java index d0ece0200f..474057b653 100644 --- a/documentation/src/test/java/org/hibernate/userguide/collections/MapKeyTypeTest.java +++ b/documentation/src/test/java/org/hibernate/userguide/collections/MapKeyTypeTest.java @@ -32,9 +32,7 @@ import jakarta.persistence.EntityManagerFactory; import jakarta.persistence.Id; import jakarta.persistence.JoinColumn; import jakarta.persistence.MapKeyColumn; -import jakarta.persistence.MapKeyTemporal; import jakarta.persistence.Table; -import jakarta.persistence.TemporalType; import static org.hibernate.testing.transaction.TransactionUtil.doInJPA; import static org.junit.Assert.assertEquals; diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/CustomBinaryJdbcType.java b/documentation/src/test/java/org/hibernate/userguide/mapping/basic/CustomBinaryJdbcType.java index 6129e87bf3..2603d8b87f 100644 --- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/CustomBinaryJdbcType.java +++ b/documentation/src/test/java/org/hibernate/userguide/mapping/basic/CustomBinaryJdbcType.java @@ -10,7 +10,7 @@ import java.sql.Types; import org.hibernate.type.descriptor.ValueBinder; import org.hibernate.type.descriptor.ValueExtractor; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; import org.hibernate.type.descriptor.jdbc.VarbinaryJdbcTypeDescriptor; @@ -26,12 +26,12 @@ public class CustomBinaryJdbcType implements JdbcTypeDescriptor { } @Override - public ValueBinder getBinder(JavaTypeDescriptor javaTypeDescriptor) { + public ValueBinder getBinder(JavaType javaTypeDescriptor) { return VarbinaryJdbcTypeDescriptor.INSTANCE.getBinder( javaTypeDescriptor ); } @Override - public ValueExtractor getExtractor(JavaTypeDescriptor javaTypeDescriptor) { + public ValueExtractor getExtractor(JavaType javaTypeDescriptor) { return VarbinaryJdbcTypeDescriptor.INSTANCE.getExtractor( javaTypeDescriptor ); } } diff --git a/hibernate-community-dialects/src/test/java/org/hibernate/community/dialect/InformixDialectTestCase.java b/hibernate-community-dialects/src/test/java/org/hibernate/community/dialect/InformixDialectTestCase.java index 46d05b8a05..bab0c620ab 100644 --- a/hibernate-community-dialects/src/test/java/org/hibernate/community/dialect/InformixDialectTestCase.java +++ b/hibernate-community-dialects/src/test/java/org/hibernate/community/dialect/InformixDialectTestCase.java @@ -19,10 +19,7 @@ import org.hibernate.query.sqm.function.SqmFunctionDescriptor; import org.hibernate.service.ServiceRegistry; import org.hibernate.sql.ast.spi.SqlAppender; import org.hibernate.type.BasicType; -import org.hibernate.type.StandardBasicTypes; import org.hibernate.type.descriptor.java.DateJavaTypeDescriptor; -import org.hibernate.type.descriptor.java.JdbcDateJavaTypeDescriptor; -import org.hibernate.type.descriptor.java.JdbcTimestampJavaTypeDescriptor; import org.hibernate.type.descriptor.jdbc.DateJdbcTypeDescriptor; import org.hibernate.type.descriptor.jdbc.TimestampJdbcTypeDescriptor; import org.hibernate.type.spi.TypeConfiguration; diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/AnyKeyJavaClass.java b/hibernate-core/src/main/java/org/hibernate/annotations/AnyKeyJavaClass.java index cf99841733..fed8ebe73a 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/AnyKeyJavaClass.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/AnyKeyJavaClass.java @@ -8,6 +8,8 @@ package org.hibernate.annotations; import java.lang.annotation.Retention; +import org.hibernate.type.descriptor.java.BasicJavaType; + import static java.lang.annotation.ElementType.ANNOTATION_TYPE; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; @@ -16,7 +18,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; /** * Specifies the Java Class to use for the foreign-key handling related to an ANY mapping. * - * The specified class is resolved to a {@link org.hibernate.type.descriptor.java.BasicJavaTypeDescriptor} + * The specified class is resolved to a {@link BasicJavaType} * via the {@link org.hibernate.type.descriptor.java.spi.JavaTypeDescriptorRegistry} * * @see Any diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/AnyKeyJavaType.java b/hibernate-core/src/main/java/org/hibernate/annotations/AnyKeyJavaType.java index d8490a53be..31cd6ecf94 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/AnyKeyJavaType.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/AnyKeyJavaType.java @@ -8,7 +8,7 @@ package org.hibernate.annotations; import java.lang.annotation.Retention; -import org.hibernate.type.descriptor.java.BasicJavaTypeDescriptor; +import org.hibernate.type.descriptor.java.BasicJavaType; import static java.lang.annotation.ElementType.ANNOTATION_TYPE; import static java.lang.annotation.ElementType.FIELD; @@ -31,5 +31,5 @@ public @interface AnyKeyJavaType { * * @see JavaType#value */ - Class> value(); + Class> value(); } diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/CollectionIdJavaType.java b/hibernate-core/src/main/java/org/hibernate/annotations/CollectionIdJavaType.java index 9c0f365b69..7cd38427cf 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/CollectionIdJavaType.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/CollectionIdJavaType.java @@ -9,7 +9,7 @@ package org.hibernate.annotations; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; -import org.hibernate.type.descriptor.java.BasicJavaTypeDescriptor; +import org.hibernate.type.descriptor.java.BasicJavaType; import static java.lang.annotation.ElementType.ANNOTATION_TYPE; import static java.lang.annotation.ElementType.FIELD; @@ -30,5 +30,5 @@ public @interface CollectionIdJavaType { * * @see JavaType#value */ - Class> value(); + Class> value(); } diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/JavaType.java b/hibernate-core/src/main/java/org/hibernate/annotations/JavaType.java index fb39b84b7d..ea8ebcc46d 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/JavaType.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/JavaType.java @@ -9,7 +9,7 @@ package org.hibernate.annotations; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; -import org.hibernate.type.descriptor.java.BasicJavaTypeDescriptor; +import org.hibernate.type.descriptor.java.BasicJavaType; import static java.lang.annotation.ElementType.ANNOTATION_TYPE; import static java.lang.annotation.ElementType.FIELD; @@ -53,7 +53,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; @Retention(RUNTIME) public @interface JavaType { /** - * The {@link BasicJavaTypeDescriptor} to use for the mapped column + * The {@link BasicJavaType} to use for the mapped column */ - Class> value(); + Class> value(); } diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/JavaTypeRegistration.java b/hibernate-core/src/main/java/org/hibernate/annotations/JavaTypeRegistration.java index ffcd5a893d..c27e790c4a 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/JavaTypeRegistration.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/JavaTypeRegistration.java @@ -10,7 +10,7 @@ import java.lang.annotation.Inherited; import java.lang.annotation.Repeatable; import java.lang.annotation.Retention; -import org.hibernate.type.descriptor.java.BasicJavaTypeDescriptor; +import org.hibernate.type.descriptor.java.BasicJavaType; import static java.lang.annotation.ElementType.ANNOTATION_TYPE; import static java.lang.annotation.ElementType.PACKAGE; @@ -40,5 +40,5 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; public @interface JavaTypeRegistration { Class javaType(); - Class> descriptorClass(); + Class> descriptorClass(); } diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/ListIndexJavaType.java b/hibernate-core/src/main/java/org/hibernate/annotations/ListIndexJavaType.java index 37436a35a3..0636b65262 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/ListIndexJavaType.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/ListIndexJavaType.java @@ -9,7 +9,7 @@ package org.hibernate.annotations; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; -import org.hibernate.type.descriptor.java.BasicJavaTypeDescriptor; +import org.hibernate.type.descriptor.java.BasicJavaType; import static java.lang.annotation.ElementType.ANNOTATION_TYPE; import static java.lang.annotation.ElementType.FIELD; @@ -30,5 +30,5 @@ public @interface ListIndexJavaType { * * @see JavaType#value */ - Class> value(); + Class> value(); } diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/MapKeyJavaType.java b/hibernate-core/src/main/java/org/hibernate/annotations/MapKeyJavaType.java index d4643cd44b..3a30c15458 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/MapKeyJavaType.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/MapKeyJavaType.java @@ -9,7 +9,7 @@ package org.hibernate.annotations; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; -import org.hibernate.type.descriptor.java.BasicJavaTypeDescriptor; +import org.hibernate.type.descriptor.java.BasicJavaType; import jakarta.persistence.MapKeyClass; @@ -34,5 +34,5 @@ public @interface MapKeyJavaType { * * @see JavaType#value */ - Class> value(); + Class> value(); } diff --git a/hibernate-core/src/main/java/org/hibernate/boot/internal/InFlightMetadataCollectorImpl.java b/hibernate-core/src/main/java/org/hibernate/boot/internal/InFlightMetadataCollectorImpl.java index 5f3251aec7..2a4ffdddb0 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/internal/InFlightMetadataCollectorImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/internal/InFlightMetadataCollectorImpl.java @@ -102,7 +102,7 @@ import org.hibernate.mapping.Table; import org.hibernate.mapping.UniqueKey; import org.hibernate.query.named.NamedObjectRepository; import org.hibernate.query.sqm.function.SqmFunctionDescriptor; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; import org.hibernate.type.spi.TypeConfiguration; @@ -392,7 +392,7 @@ public class InFlightMetadataCollectorImpl implements InFlightMetadataCollector } @Override - public void addJavaTypeRegistration(Class javaType, JavaTypeDescriptor jtd) { + public void addJavaTypeRegistration(Class javaType, JavaType jtd) { getTypeConfiguration().getJavaTypeDescriptorRegistry().addBaselineDescriptor( javaType, jtd ); } diff --git a/hibernate-core/src/main/java/org/hibernate/boot/internal/MetadataBuilderImpl.java b/hibernate-core/src/main/java/org/hibernate/boot/internal/MetadataBuilderImpl.java index f3f2671b3e..c3868e1299 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/internal/MetadataBuilderImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/internal/MetadataBuilderImpl.java @@ -72,7 +72,7 @@ import org.hibernate.internal.util.collections.CollectionHelper; import org.hibernate.query.sqm.function.SqmFunctionDescriptor; import org.hibernate.service.ServiceRegistry; import org.hibernate.type.BasicType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; import org.hibernate.type.spi.TypeConfiguration; import org.hibernate.usertype.UserType; @@ -283,7 +283,7 @@ public class MetadataBuilderImpl implements MetadataBuilderImplementor, TypeCont } @Override - public void contributeJavaTypeDescriptor(JavaTypeDescriptor descriptor) { + public void contributeJavaTypeDescriptor(JavaType descriptor) { this.bootstrapContext.getTypeConfiguration().getJavaTypeDescriptorRegistry().addDescriptor( descriptor ); } diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/TypeContributions.java b/hibernate-core/src/main/java/org/hibernate/boot/model/TypeContributions.java index 124a5797b8..ab9ac83786 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/TypeContributions.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/TypeContributions.java @@ -8,10 +8,10 @@ package org.hibernate.boot.model; import org.hibernate.type.BasicType; import org.hibernate.type.StandardBasicTypeTemplate; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.spi.JavaTypeDescriptorRegistry; import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeDescriptorRegistry; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; import org.hibernate.type.spi.TypeConfiguration; import org.hibernate.usertype.UserType; @@ -27,7 +27,7 @@ public interface TypeContributions { * Add the JavaTypeDescriptor to the {@link TypeConfiguration}'s * {@link JavaTypeDescriptorRegistry} */ - void contributeJavaTypeDescriptor(JavaTypeDescriptor descriptor); + void contributeJavaTypeDescriptor(JavaType descriptor); /** * Add the JdbcTypeDescriptor to the {@link TypeConfiguration}'s @@ -40,9 +40,9 @@ public interface TypeContributions { /** * @deprecated (since 5.3) Use {@link #contributeType(BasicType)} instead. Basic * types will be defined and handled much differently in 6.0 based on a combination - * of {@link JavaTypeDescriptor}, {@link JdbcTypeDescriptor} and a concept of a "value + * of {@link JavaType}, {@link JdbcTypeDescriptor} and a concept of a "value * converter" (a JPA AttributeConverter, an enum value resolver, etc). To get as - * close as possible in 5.3 use existing {@link JavaTypeDescriptor} and + * close as possible in 5.3 use existing {@link JavaType} and * {@link JdbcTypeDescriptor} implementations (or write your own for custom types) * and use {@link StandardBasicTypeTemplate} to combine those with * registration keys and call {@link #contributeType(BasicType)} instead @@ -54,8 +54,8 @@ public interface TypeContributions { * @deprecated (since 5.3) Use {@link #contributeType(BasicType)} instead. * {@link UserType}, as currently defined, will be done very differently in 6.0. * In most cases a {@link UserType} can be simply replaced with proper - * {@link JavaTypeDescriptor}. To get as close as possible to 6.0 in 5.3 use - * existing {@link JavaTypeDescriptor} and {@link JdbcTypeDescriptor} + * {@link JavaType}. To get as close as possible to 6.0 in 5.3 use + * existing {@link JavaType} and {@link JdbcTypeDescriptor} * implementations (or write your own for custom impls) and use * {@link StandardBasicTypeTemplate} to combine those with registration keys * and call {@link #contributeType(BasicType)} instead diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/TypeDefinition.java b/hibernate-core/src/main/java/org/hibernate/boot/model/TypeDefinition.java index a892ced860..3419ae2aa3 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/TypeDefinition.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/TypeDefinition.java @@ -30,7 +30,7 @@ import org.hibernate.type.CustomType; import org.hibernate.type.SerializableType; import org.hibernate.type.Type; import org.hibernate.type.descriptor.java.ImmutableMutabilityPlan; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.MutabilityPlan; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators; @@ -202,12 +202,12 @@ public class TypeDefinition implements Serializable { } @Override - public JavaTypeDescriptor getDomainJavaDescriptor() { + public JavaType getDomainJavaDescriptor() { return resolvedBasicType.getMappedJavaTypeDescriptor(); } @Override - public JavaTypeDescriptor getRelationalJavaDescriptor() { + public JavaType getRelationalJavaDescriptor() { return resolvedBasicType.getMappedJavaTypeDescriptor(); } @@ -235,7 +235,7 @@ public class TypeDefinition implements Serializable { // Series of backward compatible special cases if ( Serializable.class.isAssignableFrom( typeImplementorClass ) ) { - final JavaTypeDescriptor jtd = typeConfiguration + final JavaType jtd = typeConfiguration .getJavaTypeDescriptorRegistry() .resolveDescriptor( typeImplementorClass ); final JdbcTypeDescriptor jdbcType = typeConfiguration.getJdbcTypeDescriptorRegistry().getDescriptor( Types.VARBINARY ); @@ -254,12 +254,12 @@ public class TypeDefinition implements Serializable { } @Override - public JavaTypeDescriptor getDomainJavaDescriptor() { - return (JavaTypeDescriptor) resolved.getMappedJavaTypeDescriptor(); + public JavaType getDomainJavaDescriptor() { + return (JavaType) resolved.getMappedJavaTypeDescriptor(); } @Override - public JavaTypeDescriptor getRelationalJavaDescriptor() { + public JavaType getRelationalJavaDescriptor() { return resolved.getMappedJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/TypeDefinitionRegistry.java b/hibernate-core/src/main/java/org/hibernate/boot/model/TypeDefinitionRegistry.java index e07fc3a1b3..f3da7ffebe 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/TypeDefinitionRegistry.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/TypeDefinitionRegistry.java @@ -8,7 +8,7 @@ package org.hibernate.boot.model; import java.util.Map; -import org.hibernate.type.descriptor.java.BasicJavaTypeDescriptor; +import org.hibernate.type.descriptor.java.BasicJavaType; /** * @author Chris Cranford @@ -23,7 +23,7 @@ public interface TypeDefinitionRegistry { } TypeDefinition resolve(String typeName); - TypeDefinition resolveAutoApplied(BasicJavaTypeDescriptor jtd); + TypeDefinition resolveAutoApplied(BasicJavaType jtd); TypeDefinitionRegistry register(TypeDefinition typeDefinition); TypeDefinitionRegistry register(TypeDefinition typeDefinition, DuplicationStrategy duplicationStrategy); diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/TypeDefinitionRegistryStandardImpl.java b/hibernate-core/src/main/java/org/hibernate/boot/model/TypeDefinitionRegistryStandardImpl.java index c090d594db..815ffe6bc6 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/TypeDefinitionRegistryStandardImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/TypeDefinitionRegistryStandardImpl.java @@ -11,7 +11,7 @@ import java.util.Locale; import java.util.Map; import org.hibernate.internal.util.StringHelper; -import org.hibernate.type.descriptor.java.BasicJavaTypeDescriptor; +import org.hibernate.type.descriptor.java.BasicJavaType; import org.jboss.logging.Logger; @@ -47,7 +47,7 @@ public class TypeDefinitionRegistryStandardImpl implements TypeDefinitionRegistr } @Override - public TypeDefinition resolveAutoApplied(BasicJavaTypeDescriptor jtd) { + public TypeDefinition resolveAutoApplied(BasicJavaType jtd) { // For now, check the definition map for a entry keyed by the JTD name. // Ultimately should maybe have TypeDefinition or the registry keep explicit track of // auto-applied defs diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/convert/internal/AbstractConverterDescriptor.java b/hibernate-core/src/main/java/org/hibernate/boot/model/convert/internal/AbstractConverterDescriptor.java index 1df2f073cb..02430e320a 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/convert/internal/AbstractConverterDescriptor.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/convert/internal/AbstractConverterDescriptor.java @@ -18,7 +18,7 @@ import org.hibernate.boot.model.convert.spi.JpaAttributeConverterCreationContext import org.hibernate.metamodel.model.convert.internal.JpaAttributeConverterImpl; import org.hibernate.metamodel.model.convert.spi.JpaAttributeConverter; import org.hibernate.resource.beans.spi.ManagedBean; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import com.fasterxml.classmate.ResolvedType; @@ -104,7 +104,7 @@ public abstract class AbstractConverterDescriptor implements ConverterDescriptor @Override @SuppressWarnings({ "unchecked", "rawtypes" }) public JpaAttributeConverter createJpaAttributeConverter(JpaAttributeConverterCreationContext context) { - final JavaTypeDescriptor converterJtd = context + final JavaType converterJtd = context .getJavaTypeDescriptorRegistry() .getDescriptor( getAttributeConverterClass() ); diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/ConvertedBasicTypeResolution.java b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/ConvertedBasicTypeResolution.java index 35467fd6bf..6cf1768d73 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/ConvertedBasicTypeResolution.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/ConvertedBasicTypeResolution.java @@ -11,7 +11,7 @@ import org.hibernate.metamodel.mapping.JdbcMapping; import org.hibernate.metamodel.model.convert.spi.BasicValueConverter; import org.hibernate.type.BasicType; import org.hibernate.type.ConvertedBasicType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.MutabilityPlan; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators; @@ -48,12 +48,12 @@ public class ConvertedBasicTypeResolution implements BasicValue.Resolution } @Override - public JavaTypeDescriptor getDomainJavaDescriptor() { + public JavaType getDomainJavaDescriptor() { return basicType.getValueConverter().getDomainJavaDescriptor(); } @Override - public JavaTypeDescriptor getRelationalJavaDescriptor() { + public JavaType getRelationalJavaDescriptor() { return basicType.getValueConverter().getRelationalJavaDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/EnumeratedValueResolution.java b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/EnumeratedValueResolution.java index 8b5a5ea43a..5a45d40b83 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/EnumeratedValueResolution.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/EnumeratedValueResolution.java @@ -12,7 +12,7 @@ import org.hibernate.metamodel.model.convert.spi.EnumValueConverter; import org.hibernate.type.BasicType; import org.hibernate.type.CustomType; import org.hibernate.type.descriptor.java.ImmutableMutabilityPlan; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.MutabilityPlan; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; @@ -21,15 +21,15 @@ import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; */ public class EnumeratedValueResolution> implements BasicValue.Resolution { private final CustomType enumTypeMapping; - private final JavaTypeDescriptor domainJtd; - private final JavaTypeDescriptor jdbcJtd; + private final JavaType domainJtd; + private final JavaType jdbcJtd; private final JdbcTypeDescriptor jdbcTypeDescriptor; private final EnumValueConverter valueConverter; public EnumeratedValueResolution( CustomType enumTypeMapping, - JavaTypeDescriptor domainJtd, - JavaTypeDescriptor jdbcJtd, + JavaType domainJtd, + JavaType jdbcJtd, JdbcTypeDescriptor jdbcTypeDescriptor, EnumValueConverter valueConverter) { this.enumTypeMapping = enumTypeMapping; @@ -50,12 +50,12 @@ public class EnumeratedValueResolution> implements BasicValue. } @Override - public JavaTypeDescriptor getDomainJavaDescriptor() { + public JavaType getDomainJavaDescriptor() { return domainJtd; } @Override - public JavaTypeDescriptor getRelationalJavaDescriptor() { + public JavaType getRelationalJavaDescriptor() { return jdbcJtd; } diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/InferredBasicValueResolution.java b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/InferredBasicValueResolution.java index 3ec0a104f9..096fe5633f 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/InferredBasicValueResolution.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/InferredBasicValueResolution.java @@ -10,7 +10,7 @@ import org.hibernate.mapping.BasicValue; import org.hibernate.metamodel.mapping.JdbcMapping; import org.hibernate.metamodel.model.convert.spi.BasicValueConverter; import org.hibernate.type.BasicType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.MutabilityPlan; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; @@ -18,8 +18,8 @@ import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; * @author Steve Ebersole */ public class InferredBasicValueResolution implements BasicValue.Resolution { - private JavaTypeDescriptor domainJtd; - private JavaTypeDescriptor relationalJtd; + private JavaType domainJtd; + private JavaType relationalJtd; private JdbcTypeDescriptor jdbcTypeDescriptor; private MutabilityPlan mutabilityPlan; @@ -31,8 +31,8 @@ public class InferredBasicValueResolution implements BasicValue.Resolution public InferredBasicValueResolution( JdbcMapping jdbcMapping, - JavaTypeDescriptor domainJtd, - JavaTypeDescriptor relationalJtd, + JavaType domainJtd, + JavaType relationalJtd, JdbcTypeDescriptor jdbcTypeDescriptor, BasicValueConverter valueConverter, BasicType legacyType, @@ -57,12 +57,12 @@ public class InferredBasicValueResolution implements BasicValue.Resolution } @Override - public JavaTypeDescriptor getDomainJavaDescriptor() { + public JavaType getDomainJavaDescriptor() { return domainJtd; } @Override - public JavaTypeDescriptor getRelationalJavaDescriptor() { + public JavaType getRelationalJavaDescriptor() { return relationalJtd; } diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/InferredBasicValueResolver.java b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/InferredBasicValueResolver.java index f17a538b44..7753f34316 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/InferredBasicValueResolver.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/InferredBasicValueResolver.java @@ -25,10 +25,10 @@ import org.hibernate.type.AdjustableBasicType; import org.hibernate.type.BasicType; import org.hibernate.type.CustomType; import org.hibernate.type.SerializableType; -import org.hibernate.type.descriptor.java.BasicJavaTypeDescriptor; +import org.hibernate.type.descriptor.java.BasicJavaType; import org.hibernate.type.descriptor.java.EnumJavaTypeDescriptor; import org.hibernate.type.descriptor.java.ImmutableMutabilityPlan; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.SerializableJavaTypeDescriptor; import org.hibernate.type.descriptor.java.TemporalJavaTypeDescriptor; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; @@ -47,10 +47,10 @@ public class InferredBasicValueResolver { */ @SuppressWarnings({"unchecked", "rawtypes"}) public static BasicValue.Resolution from( - Function explicitJavaTypeAccess, + Function explicitJavaTypeAccess, Function explicitSqlTypeAccess, Type resolvedJavaType, - Supplier reflectedJtdResolver, + Supplier reflectedJtdResolver, JdbcTypeDescriptorIndicators stdIndicators, Table table, Selectable selectable, @@ -58,10 +58,10 @@ public class InferredBasicValueResolver { String propertyName, TypeConfiguration typeConfiguration) { - final BasicJavaTypeDescriptor explicitJavaType = explicitJavaTypeAccess != null ? explicitJavaTypeAccess.apply( typeConfiguration ) : null; + final BasicJavaType explicitJavaType = explicitJavaTypeAccess != null ? explicitJavaTypeAccess.apply( typeConfiguration ) : null; final JdbcTypeDescriptor explicitJdbcType = explicitSqlTypeAccess != null ? explicitSqlTypeAccess.apply( typeConfiguration ) : null; - final BasicJavaTypeDescriptor reflectedJtd = (BasicJavaTypeDescriptor) reflectedJtdResolver.get(); + final BasicJavaType reflectedJtd = (BasicJavaType) reflectedJtdResolver.get(); // NOTE : the distinction that is made below wrt `explicitJavaType` and `reflectedJtd` is // needed temporarily to trigger "legacy resolution" versus "ORM6 resolution. Yes, it @@ -204,7 +204,7 @@ public class InferredBasicValueResolver { } } } - final BasicJavaTypeDescriptor recommendedJtd = explicitJdbcType.getJdbcRecommendedJavaTypeMapping( + final BasicJavaType recommendedJtd = explicitJdbcType.getJdbcRecommendedJavaTypeMapping( length, scale, typeConfiguration @@ -254,7 +254,7 @@ public class InferredBasicValueResolver { public static BasicType resolveSqlTypeIndicators( JdbcTypeDescriptorIndicators stdIndicators, BasicType resolved, - JavaTypeDescriptor domainJtd) { + JavaType domainJtd) { if ( resolved instanceof AdjustableBasicType ) { final AdjustableBasicType indicatorCapable = (AdjustableBasicType) resolved; final BasicType indicatedType = indicatorCapable.resolveIndicatedType( stdIndicators, domainJtd ); @@ -268,7 +268,7 @@ public class InferredBasicValueResolver { @SuppressWarnings("rawtypes") public static InferredBasicValueResolution fromEnum( EnumJavaTypeDescriptor enumJavaDescriptor, - BasicJavaTypeDescriptor explicitJavaType, + BasicJavaType explicitJavaType, JdbcTypeDescriptor explicitJdbcType, JdbcTypeDescriptorIndicators stdIndicators, TypeConfiguration typeConfiguration) { @@ -278,7 +278,7 @@ public class InferredBasicValueResolver { switch ( enumStyle ) { case STRING: { - final JavaTypeDescriptor relationalJtd; + final JavaType relationalJtd; if ( explicitJavaType != null ) { if ( ! String.class.isAssignableFrom( explicitJavaType.getJavaTypeClass() ) ) { throw new MappingException( @@ -327,7 +327,7 @@ public class InferredBasicValueResolver { ); } case ORDINAL: { - final JavaTypeDescriptor relationalJtd; + final JavaType relationalJtd; if ( explicitJavaType != null ) { if ( ! Integer.class.isAssignableFrom( explicitJavaType.getJavaTypeClass() ) ) { throw new MappingException( @@ -383,7 +383,7 @@ public class InferredBasicValueResolver { @SuppressWarnings({"rawtypes", "unchecked"}) public static InferredBasicValueResolution fromTemporal( TemporalJavaTypeDescriptor reflectedJtd, - BasicJavaTypeDescriptor explicitJavaType, + BasicJavaType explicitJavaType, JdbcTypeDescriptor explicitJdbcType, Type resolvedJavaType, JdbcTypeDescriptorIndicators stdIndicators, diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/NamedBasicTypeResolution.java b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/NamedBasicTypeResolution.java index ef8447dba0..ca9423d53d 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/NamedBasicTypeResolution.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/NamedBasicTypeResolution.java @@ -13,7 +13,7 @@ import org.hibernate.mapping.BasicValue; import org.hibernate.metamodel.mapping.JdbcMapping; import org.hibernate.metamodel.model.convert.spi.BasicValueConverter; import org.hibernate.type.BasicType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.MutabilityPlan; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; import org.hibernate.type.spi.TypeConfiguration; @@ -22,7 +22,7 @@ import org.hibernate.type.spi.TypeConfiguration; * @author Steve Ebersole */ public class NamedBasicTypeResolution implements BasicValue.Resolution { - private final JavaTypeDescriptor domainJtd; + private final JavaType domainJtd; private final BasicType basicType; @@ -30,7 +30,7 @@ public class NamedBasicTypeResolution implements BasicValue.Resolution { private final MutabilityPlan mutabilityPlan; public NamedBasicTypeResolution( - JavaTypeDescriptor domainJtd, + JavaType domainJtd, BasicType basicType, BasicValueConverter valueConverter, Function explicitMutabilityPlanAccess, @@ -63,12 +63,12 @@ public class NamedBasicTypeResolution implements BasicValue.Resolution { } @Override - public JavaTypeDescriptor getDomainJavaDescriptor() { + public JavaType getDomainJavaDescriptor() { return domainJtd; } @Override - public JavaTypeDescriptor getRelationalJavaDescriptor() { + public JavaType getRelationalJavaDescriptor() { return valueConverter == null ? basicType.getJavaTypeDescriptor() : valueConverter.getRelationalJavaDescriptor(); diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/NamedConverterResolution.java b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/NamedConverterResolution.java index 560df92c9d..ef1daafb8f 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/NamedConverterResolution.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/NamedConverterResolution.java @@ -21,9 +21,9 @@ import org.hibernate.metamodel.model.convert.spi.JpaAttributeConverter; import org.hibernate.type.BasicType; import org.hibernate.type.descriptor.converter.AttributeConverterMutabilityPlanImpl; import org.hibernate.type.descriptor.converter.AttributeConverterTypeAdapter; -import org.hibernate.type.descriptor.java.BasicJavaTypeDescriptor; +import org.hibernate.type.descriptor.java.BasicJavaType; import org.hibernate.type.descriptor.java.ImmutableMutabilityPlan; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.MutabilityPlan; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators; @@ -37,7 +37,7 @@ public class NamedConverterResolution implements BasicValue.Resolution { public static NamedConverterResolution from( ConverterDescriptor converterDescriptor, - Function explicitJtdAccess, + Function explicitJtdAccess, Function explicitStdAccess, Function explicitMutabilityPlanAccess, JdbcTypeDescriptorIndicators sqlTypeIndicators, @@ -55,7 +55,7 @@ public class NamedConverterResolution implements BasicValue.Resolution { public static NamedConverterResolution from( String name, - Function explicitJtdAccess, + Function explicitJtdAccess, Function explicitStdAccess, Function explicitMutabilityPlanAccess, JdbcTypeDescriptorIndicators sqlTypeIndicators, @@ -84,18 +84,18 @@ public class NamedConverterResolution implements BasicValue.Resolution { } private static NamedConverterResolution fromInternal( - Function explicitJtdAccess, + Function explicitJtdAccess, Function explicitStdAccess, Function explicitMutabilityPlanAccess, JpaAttributeConverter converter, JdbcTypeDescriptorIndicators sqlTypeIndicators, MetadataBuildingContext context) { final TypeConfiguration typeConfiguration = context.getBootstrapContext().getTypeConfiguration(); - final JavaTypeDescriptor explicitJtd = explicitJtdAccess != null + final JavaType explicitJtd = explicitJtdAccess != null ? explicitJtdAccess.apply( typeConfiguration ) : null; - final JavaTypeDescriptor domainJtd = explicitJtd != null + final JavaType domainJtd = explicitJtd != null ? explicitJtd : converter.getDomainJavaDescriptor(); @@ -103,7 +103,7 @@ public class NamedConverterResolution implements BasicValue.Resolution { ? explicitStdAccess.apply( typeConfiguration ) : null; - final JavaTypeDescriptor relationalJtd = converter.getRelationalJavaDescriptor(); + final JavaType relationalJtd = converter.getRelationalJavaDescriptor(); final JdbcTypeDescriptor jdbcType = explicitJdbcType != null ? explicitJdbcType @@ -136,8 +136,8 @@ public class NamedConverterResolution implements BasicValue.Resolution { } - private final JavaTypeDescriptor domainJtd; - private final JavaTypeDescriptor relationalJtd; + private final JavaType domainJtd; + private final JavaType relationalJtd; private final JdbcTypeDescriptor jdbcTypeDescriptor; private final JpaAttributeConverter valueConverter; @@ -149,8 +149,8 @@ public class NamedConverterResolution implements BasicValue.Resolution { @SuppressWarnings("unchecked") public NamedConverterResolution( - JavaTypeDescriptor domainJtd, - JavaTypeDescriptor relationalJtd, + JavaType domainJtd, + JavaType relationalJtd, JdbcTypeDescriptor jdbcTypeDescriptor, JpaAttributeConverter valueConverter, MutabilityPlan mutabilityPlan, @@ -230,13 +230,13 @@ public class NamedConverterResolution implements BasicValue.Resolution { } @Override - public JavaTypeDescriptor getDomainJavaDescriptor() { + public JavaType getDomainJavaDescriptor() { //noinspection unchecked return domainJtd; } @Override - public JavaTypeDescriptor getRelationalJavaDescriptor() { + public JavaType getRelationalJavaDescriptor() { return relationalJtd; } diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/UserTypeResolution.java b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/UserTypeResolution.java index f196f79bce..190a149ded 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/UserTypeResolution.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/UserTypeResolution.java @@ -13,7 +13,7 @@ import org.hibernate.metamodel.mapping.JdbcMapping; import org.hibernate.metamodel.model.convert.spi.BasicValueConverter; import org.hibernate.type.BasicType; import org.hibernate.type.CustomType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.MutabilityPlan; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; @@ -42,12 +42,12 @@ public class UserTypeResolution implements BasicValue.Resolution { } @Override - public JavaTypeDescriptor getDomainJavaDescriptor() { + public JavaType getDomainJavaDescriptor() { return userTypeAdapter.getJavaTypeDescriptor(); } @Override - public JavaTypeDescriptor getRelationalJavaDescriptor() { + public JavaType getRelationalJavaDescriptor() { return userTypeAdapter.getJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/ValueConverterTypeAdapter.java b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/ValueConverterTypeAdapter.java index ac0ffd543f..334e00b8e0 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/ValueConverterTypeAdapter.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/ValueConverterTypeAdapter.java @@ -15,7 +15,7 @@ import org.hibernate.metamodel.model.convert.spi.BasicValueConverter; import org.hibernate.type.AbstractSingleColumnStandardBasicType; import org.hibernate.type.descriptor.ValueBinder; import org.hibernate.type.descriptor.WrapperOptions; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.MutabilityPlan; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators; @@ -36,7 +36,7 @@ public class ValueConverterTypeAdapter extends AbstractSingleColumnStandardBa JdbcTypeDescriptorIndicators indicators) { super( converter.getRelationalJavaDescriptor().getRecommendedJdbcType( indicators ), - (JavaTypeDescriptor) converter.getRelationalJavaDescriptor() + (JavaType) converter.getRelationalJavaDescriptor() ); this.description = description; @@ -76,7 +76,7 @@ public class ValueConverterTypeAdapter extends AbstractSingleColumnStandardBa @Override public boolean isEqual(Object one, Object another) { //noinspection unchecked - return ( (JavaTypeDescriptor) converter.getDomainJavaDescriptor() ).areEqual( one, another ); + return ( (JavaType) converter.getDomainJavaDescriptor() ).areEqual( one, another ); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/VersionResolution.java b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/VersionResolution.java index 79c449dd22..3286a92b73 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/VersionResolution.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/VersionResolution.java @@ -16,9 +16,9 @@ import org.hibernate.mapping.BasicValue; import org.hibernate.metamodel.mapping.JdbcMapping; import org.hibernate.metamodel.model.convert.spi.BasicValueConverter; import org.hibernate.type.BasicType; -import org.hibernate.type.descriptor.java.BasicJavaTypeDescriptor; +import org.hibernate.type.descriptor.java.BasicJavaType; import org.hibernate.type.descriptor.java.ImmutableMutabilityPlan; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.MutabilityPlan; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators; @@ -36,7 +36,7 @@ public class VersionResolution implements BasicValue.Resolution { @SuppressWarnings({"rawtypes", "unchecked"}) public static VersionResolution from( Function implicitJavaTypeAccess, - Function explicitJtdAccess, + Function explicitJtdAccess, Function explicitStdAccess, TimeZoneStorageType timeZoneStorageType, TypeConfiguration typeConfiguration, @@ -45,8 +45,8 @@ public class VersionResolution implements BasicValue.Resolution { // todo (6.0) : add support for Dialect-specific interpretation? final java.lang.reflect.Type implicitJavaType = implicitJavaTypeAccess.apply( typeConfiguration ); - final JavaTypeDescriptor registered = typeConfiguration.getJavaTypeDescriptorRegistry().resolveDescriptor( implicitJavaType ); - final BasicJavaTypeDescriptor jtd = (BasicJavaTypeDescriptor) registered; + final JavaType registered = typeConfiguration.getJavaTypeDescriptorRegistry().resolveDescriptor( implicitJavaType ); + final BasicJavaType jtd = (BasicJavaType) registered; final JdbcTypeDescriptor recommendedJdbcType = jtd.getRecommendedJdbcType( new JdbcTypeDescriptorIndicators() { @@ -86,14 +86,14 @@ public class VersionResolution implements BasicValue.Resolution { return new VersionResolution<>( jtd, recommendedJdbcType, basicType, legacyType ); } - private final JavaTypeDescriptor jtd; + private final JavaType jtd; private final JdbcTypeDescriptor jdbcTypeDescriptor; private final JdbcMapping jdbcMapping; private final BasicType legacyType; public VersionResolution( - JavaTypeDescriptor javaTypeDescriptor, + JavaType javaTypeDescriptor, JdbcTypeDescriptor jdbcTypeDescriptor, JdbcMapping jdbcMapping, BasicType legacyType) { @@ -116,12 +116,12 @@ public class VersionResolution implements BasicValue.Resolution { @Override @SuppressWarnings("unchecked") - public JavaTypeDescriptor getDomainJavaDescriptor() { + public JavaType getDomainJavaDescriptor() { return jtd; } @Override - public JavaTypeDescriptor getRelationalJavaDescriptor() { + public JavaType getRelationalJavaDescriptor() { return jtd; } diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/process/spi/MetadataBuildingProcess.java b/hibernate-core/src/main/java/org/hibernate/boot/model/process/spi/MetadataBuildingProcess.java index 04f0428435..42dd170f05 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/process/spi/MetadataBuildingProcess.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/process/spi/MetadataBuildingProcess.java @@ -45,7 +45,7 @@ import org.hibernate.engine.jdbc.spi.JdbcServices; import org.hibernate.type.BasicType; import org.hibernate.type.BasicTypeRegistry; import org.hibernate.type.CustomType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.spi.JavaTypeDescriptorRegistry; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeDescriptorRegistry; @@ -364,7 +364,7 @@ public class MetadataBuildingProcess { public void contributeType(BasicType type) { getBasicTypeRegistry().register( type ); - final JavaTypeDescriptor jtd; + final JavaType jtd; if ( type instanceof CustomType ) { final CustomType customType = (CustomType) type; jtd = customType.getJavaTypeDescriptor(); @@ -376,7 +376,7 @@ public class MetadataBuildingProcess { conditionallyRegisterJtd( jtd ); } - private void conditionallyRegisterJtd(JavaTypeDescriptor jtd) { + private void conditionallyRegisterJtd(JavaType jtd) { final JavaTypeDescriptorRegistry jtdRegistry = getTypeConfiguration().getJavaTypeDescriptorRegistry(); jtdRegistry.resolveDescriptor( jtd.getJavaTypeClass(), () -> jtd ); } @@ -393,7 +393,7 @@ public class MetadataBuildingProcess { } @Override - public void contributeJavaTypeDescriptor(JavaTypeDescriptor descriptor) { + public void contributeJavaTypeDescriptor(JavaType descriptor) { bootstrapContext.getTypeConfiguration().getJavaTypeDescriptorRegistry().addDescriptor( descriptor ); } diff --git a/hibernate-core/src/main/java/org/hibernate/boot/query/SqlResultSetMappingDescriptor.java b/hibernate-core/src/main/java/org/hibernate/boot/query/SqlResultSetMappingDescriptor.java index e04720a77e..e870d77b2a 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/query/SqlResultSetMappingDescriptor.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/query/SqlResultSetMappingDescriptor.java @@ -44,7 +44,7 @@ import org.hibernate.query.named.NamedResultSetMappingMemento; import org.hibernate.query.named.ResultMemento; import org.hibernate.query.named.ResultMementoInstantiation.ArgumentMemento; import org.hibernate.sql.results.graph.entity.EntityValuedFetchable; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole @@ -219,7 +219,7 @@ public class SqlResultSetMappingDescriptor implements NamedResultSetMappingDescr ); final SessionFactoryImplementor sessionFactory = resolutionContext.getSessionFactory(); - final JavaTypeDescriptor targetJtd = sessionFactory.getTypeConfiguration() + final JavaType targetJtd = sessionFactory.getTypeConfiguration() .getJavaTypeDescriptorRegistry() .getDescriptor( targetJavaType ); diff --git a/hibernate-core/src/main/java/org/hibernate/boot/spi/InFlightMetadataCollector.java b/hibernate-core/src/main/java/org/hibernate/boot/spi/InFlightMetadataCollector.java index fbd6d90aec..ec50e56c77 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/spi/InFlightMetadataCollector.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/spi/InFlightMetadataCollector.java @@ -49,7 +49,7 @@ import org.hibernate.mapping.Join; import org.hibernate.mapping.MappedSuperclass; import org.hibernate.mapping.PersistentClass; import org.hibernate.mapping.Table; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; import jakarta.persistence.AttributeConverter; @@ -316,7 +316,7 @@ public interface InFlightMetadataCollector extends Mapping, MetadataImplementor void registerValueMappingResolver(Function resolver); - void addJavaTypeRegistration(Class javaType, JavaTypeDescriptor jtd); + void addJavaTypeRegistration(Class javaType, JavaType jtd); void addJdbcTypeRegistration(int typeCode, JdbcTypeDescriptor jdbcTypeDescriptor); interface DelayedPropertyReferenceHandler extends Serializable { diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java b/hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java index 46c27a55ec..fae1ff53dd 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java @@ -119,7 +119,7 @@ import org.hibernate.mapping.Subclass; import org.hibernate.mapping.ToOne; import org.hibernate.mapping.UnionSubclass; import org.hibernate.resource.beans.spi.ManagedBeanRegistry; -import org.hibernate.type.descriptor.java.BasicJavaTypeDescriptor; +import org.hibernate.type.descriptor.java.BasicJavaType; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; import jakarta.persistence.AttributeOverride; @@ -900,8 +900,8 @@ public final class AnnotationBinder { MetadataBuildingContext context, ManagedBeanRegistry managedBeanRegistry, JavaTypeRegistration annotation) { - final Class> jtdClass = annotation.descriptorClass(); - final BasicJavaTypeDescriptor jtd = managedBeanRegistry.getBean( jtdClass ).getBeanInstance(); + final Class> jtdClass = annotation.descriptorClass(); + final BasicJavaType jtd = managedBeanRegistry.getBean( jtdClass ).getBeanInstance(); context.getMetadataCollector().addJavaTypeRegistration( annotation.javaType(), jtd ); } diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/BinderHelper.java b/hibernate-core/src/main/java/org/hibernate/cfg/BinderHelper.java index 440c00f318..757be3e866 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/BinderHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/BinderHelper.java @@ -55,7 +55,7 @@ import org.hibernate.mapping.SyntheticProperty; import org.hibernate.mapping.Table; import org.hibernate.mapping.ToOne; import org.hibernate.mapping.Value; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.jboss.logging.Logger; @@ -985,7 +985,7 @@ public class BinderHelper { discriminatorValueBinder.fillSimpleValue(); discriminatorColumns[0].linkWithValue( discriminatorDescriptor ); - final JavaTypeDescriptor discriminatorJavaType = discriminatorDescriptor + final JavaType discriminatorJavaType = discriminatorDescriptor .resolve() .getRelationalJavaDescriptor(); diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/annotations/BasicValueBinder.java b/hibernate-core/src/main/java/org/hibernate/cfg/annotations/BasicValueBinder.java index da3c40079d..7ee88aee2a 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/annotations/BasicValueBinder.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/annotations/BasicValueBinder.java @@ -33,7 +33,6 @@ import org.hibernate.annotations.CollectionIdJdbcTypeCode; import org.hibernate.annotations.CollectionIdMutability; import org.hibernate.annotations.CustomType; import org.hibernate.annotations.Immutable; -import org.hibernate.annotations.JavaType; import org.hibernate.annotations.JdbcType; import org.hibernate.annotations.JdbcTypeCode; import org.hibernate.annotations.ListIndexJavaType; @@ -76,9 +75,9 @@ import org.hibernate.resource.beans.spi.ManagedBean; import org.hibernate.resource.beans.spi.ManagedBeanRegistry; import org.hibernate.type.BasicType; import org.hibernate.type.SerializableToBlobType; -import org.hibernate.type.descriptor.java.BasicJavaTypeDescriptor; +import org.hibernate.type.descriptor.java.BasicJavaType; import org.hibernate.type.descriptor.java.ImmutableMutabilityPlan; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.MutabilityPlan; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators; @@ -147,7 +146,7 @@ public class BasicValueBinder implements JdbcTypeDescriptorIndicators { private Map explicitLocalTypeParams; private Function explicitJdbcTypeAccess; - private Function explicitJavaTypeAccess; + private Function explicitJavaTypeAccess; private Function explicitMutabilityAccess; private Function implicitJavaTypeAccess; @@ -416,9 +415,9 @@ public class BasicValueBinder implements JdbcTypeDescriptorIndicators { explicitJavaTypeAccess = (typeConfiguration) -> { final CollectionIdJavaType javaTypeAnn = findAnnotation( modelXProperty, CollectionIdJavaType.class ); if ( javaTypeAnn != null ) { - final Class> javaType = normalizeJavaType( javaTypeAnn.value() ); + final Class> javaType = normalizeJavaType( javaTypeAnn.value() ); if ( javaType != null ) { - final ManagedBean> bean = beanRegistry.getBean( javaType ); + final ManagedBean> bean = beanRegistry.getBean( javaType ); return bean.getBeanInstance(); } } @@ -546,16 +545,16 @@ public class BasicValueBinder implements JdbcTypeDescriptorIndicators { explicitJavaTypeAccess = typeConfiguration -> { final MapKeyJavaType javaTypeAnn = findAnnotation( mapAttribute, MapKeyJavaType.class ); if ( javaTypeAnn != null ) { - final Class> jdbcTypeImpl = normalizeJavaType( javaTypeAnn.value() ); + final Class> jdbcTypeImpl = normalizeJavaType( javaTypeAnn.value() ); if ( jdbcTypeImpl != null ) { - final ManagedBean jdbcTypeBean = managedBeanRegistry.getBean( jdbcTypeImpl ); + final ManagedBean jdbcTypeBean = managedBeanRegistry.getBean( jdbcTypeImpl ); return jdbcTypeBean.getBeanInstance(); } } final MapKeyClass mapKeyClassAnn = mapAttribute.getAnnotation( MapKeyClass.class ); if ( mapKeyClassAnn != null ) { - return (BasicJavaTypeDescriptor) typeConfiguration.getJavaTypeDescriptorRegistry().getDescriptor( mapKeyClassAnn.value() ); + return (BasicJavaType) typeConfiguration.getJavaTypeDescriptorRegistry().getDescriptor( mapKeyClassAnn.value() ); } return null; @@ -617,9 +616,9 @@ public class BasicValueBinder implements JdbcTypeDescriptorIndicators { explicitJavaTypeAccess = (typeConfiguration) -> { final ListIndexJavaType javaTypeAnn = findAnnotation( listAttribute, ListIndexJavaType.class ); if ( javaTypeAnn != null ) { - final Class> javaType = normalizeJavaType( javaTypeAnn.value() ); + final Class> javaType = normalizeJavaType( javaTypeAnn.value() ); if ( javaType != null ) { - final ManagedBean> bean = beanRegistry.getBean( javaType ); + final ManagedBean> bean = beanRegistry.getBean( javaType ); return bean.getBeanInstance(); } } @@ -805,14 +804,14 @@ public class BasicValueBinder implements JdbcTypeDescriptorIndicators { if ( elementCollectionAnn != null && elementCollectionAnn.targetClass() != null && elementCollectionAnn.targetClass() != void.class ) { - final Function original = explicitJavaTypeAccess; + final Function original = explicitJavaTypeAccess; explicitJavaTypeAccess = (typeConfiguration) -> { - final BasicJavaTypeDescriptor originalResult = original.apply( typeConfiguration ); + final BasicJavaType originalResult = original.apply( typeConfiguration ); if ( originalResult != null ) { return originalResult; } - return (BasicJavaTypeDescriptor) typeConfiguration + return (BasicJavaType) typeConfiguration .getJavaTypeDescriptorRegistry() .getDescriptor( elementCollectionAnn.targetClass() ); }; @@ -905,7 +904,7 @@ public class BasicValueBinder implements JdbcTypeDescriptorIndicators { } final Class hintedJavaType = (Class) implicitJavaTypeAccess.apply( typeConfiguration ); - final JavaTypeDescriptor hintedDescriptor = typeConfiguration + final JavaType hintedDescriptor = typeConfiguration .getJavaTypeDescriptorRegistry() .getDescriptor( hintedJavaType ); return hintedDescriptor.getRecommendedJdbcType( typeConfiguration.getCurrentBaseSqlTypeIndicators() ); @@ -922,10 +921,10 @@ public class BasicValueBinder implements JdbcTypeDescriptorIndicators { explicitJavaTypeAccess = (typeConfiguration) -> { final AnyKeyJavaType javaTypeAnn = findAnnotation( modelXProperty, AnyKeyJavaType.class ); if ( javaTypeAnn != null ) { - final Class> javaType = normalizeJavaType( javaTypeAnn.value() ); + final Class> javaType = normalizeJavaType( javaTypeAnn.value() ); if ( javaType != null ) { - final ManagedBean> jtdBean = managedBeanRegistry.getBean( javaType ); + final ManagedBean> jtdBean = managedBeanRegistry.getBean( javaType ); return jtdBean.getBeanInstance(); } } @@ -933,7 +932,7 @@ public class BasicValueBinder implements JdbcTypeDescriptorIndicators { final AnyKeyJavaClass javaClassAnn = findAnnotation( modelXProperty, AnyKeyJavaClass.class ); if ( javaClassAnn != null ) { //noinspection rawtypes - return (BasicJavaTypeDescriptor) typeConfiguration + return (BasicJavaType) typeConfiguration .getJavaTypeDescriptorRegistry() .getDescriptor( javaClassAnn.value() ); } @@ -1056,19 +1055,19 @@ public class BasicValueBinder implements JdbcTypeDescriptorIndicators { .getService( ManagedBeanRegistry.class ); explicitJavaTypeAccess = typeConfiguration -> { - final JavaType javaTypeAnn = findAnnotation( attributeXProperty, JavaType.class ); + final org.hibernate.annotations.JavaType javaTypeAnn = findAnnotation( attributeXProperty, org.hibernate.annotations.JavaType.class ); if ( javaTypeAnn != null ) { - final Class> javaType = normalizeJavaType( javaTypeAnn.value() ); + final Class> javaType = normalizeJavaType( javaTypeAnn.value() ); if ( javaType != null ) { - final ManagedBean> jtdBean = managedBeanRegistry.getBean( javaType ); + final ManagedBean> jtdBean = managedBeanRegistry.getBean( javaType ); return jtdBean.getBeanInstance(); } } final Target targetAnn = findAnnotation( attributeXProperty, Target.class ); if ( targetAnn != null ) { - return (BasicJavaTypeDescriptor) typeConfiguration + return (BasicJavaType) typeConfiguration .getJavaTypeDescriptorRegistry() .getDescriptor( targetAnn.value() ); } @@ -1106,7 +1105,7 @@ public class BasicValueBinder implements JdbcTypeDescriptorIndicators { return jdbcType; } - private static Class> normalizeJavaType(Class> javaType) { + private static Class> normalizeJavaType(Class> javaType) { if ( javaType == null ) { return null; } diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/AbstractHANADialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/AbstractHANADialect.java index 6a76af293a..5461da9b5d 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/AbstractHANADialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/AbstractHANADialect.java @@ -58,7 +58,7 @@ import org.hibernate.type.descriptor.ValueExtractor; import org.hibernate.type.descriptor.WrapperOptions; import org.hibernate.type.descriptor.java.DataHelper; import org.hibernate.type.descriptor.java.DoubleJavaTypeDescriptor; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.jdbc.*; import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeDescriptorRegistry; import org.hibernate.type.internal.BasicTypeImpl; @@ -311,7 +311,7 @@ public abstract class AbstractHANADialect extends Dialect { } @Override - public ValueBinder getBinder(JavaTypeDescriptor javaTypeDescriptor) { + public ValueBinder getBinder(JavaType javaTypeDescriptor) { return new BasicBinder( javaTypeDescriptor, this ) { @Override @@ -349,7 +349,7 @@ public abstract class AbstractHANADialect extends Dialect { } @Override - public ValueExtractor getExtractor(JavaTypeDescriptor javaTypeDescriptor) { + public ValueExtractor getExtractor(JavaType javaTypeDescriptor) { return new BasicExtractor( javaTypeDescriptor, this ) { @Override @@ -402,7 +402,7 @@ public abstract class AbstractHANADialect extends Dialect { } @Override - public BasicBinder getClobBinder(final JavaTypeDescriptor javaTypeDescriptor) { + public BasicBinder getClobBinder(final JavaType javaTypeDescriptor) { return new BasicBinder( javaTypeDescriptor, this ) { @Override @@ -443,7 +443,7 @@ public abstract class AbstractHANADialect extends Dialect { } @Override - public ValueExtractor getExtractor(JavaTypeDescriptor javaTypeDescriptor) { + public ValueExtractor getExtractor(JavaType javaTypeDescriptor) { return new BasicExtractor( javaTypeDescriptor, this ) { @Override @@ -501,7 +501,7 @@ public abstract class AbstractHANADialect extends Dialect { } @Override - public BasicBinder getNClobBinder(final JavaTypeDescriptor javaTypeDescriptor) { + public BasicBinder getNClobBinder(final JavaType javaTypeDescriptor) { return new BasicBinder( javaTypeDescriptor, this ) { @Override @@ -542,7 +542,7 @@ public abstract class AbstractHANADialect extends Dialect { } @Override - public ValueExtractor getExtractor(JavaTypeDescriptor javaTypeDescriptor) { + public ValueExtractor getExtractor(JavaType javaTypeDescriptor) { return new BasicExtractor( javaTypeDescriptor, this ) { @Override @@ -601,7 +601,7 @@ public abstract class AbstractHANADialect extends Dialect { } @Override - public ValueExtractor getExtractor(final JavaTypeDescriptor javaTypeDescriptor) { + public ValueExtractor getExtractor(final JavaType javaTypeDescriptor) { return new BasicExtractor( javaTypeDescriptor, this ) { @Override @@ -627,7 +627,7 @@ public abstract class AbstractHANADialect extends Dialect { } @Override - public BasicBinder getBinder(final JavaTypeDescriptor javaTypeDescriptor) { + public BasicBinder getBinder(final JavaType javaTypeDescriptor) { return new BasicBinder( javaTypeDescriptor, this ) { @Override diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java index 3089b19ac2..42ac998ca3 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java @@ -77,7 +77,7 @@ import org.hibernate.type.BasicType; import org.hibernate.type.BasicTypeRegistry; import org.hibernate.type.StandardBasicTypes; import org.hibernate.type.Type; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.PrimitiveByteArrayJavaTypeDescriptor; import org.hibernate.type.descriptor.jdbc.ClobJdbcTypeDescriptor; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; @@ -3421,13 +3421,13 @@ public abstract class Dialect implements ConversionContext { public interface SizeStrategy { /** * Resolve the {@link Size} to use for columns of the given - * {@link JdbcTypeDescriptor SQL type} and {@link JavaTypeDescriptor Java type}. + * {@link JdbcTypeDescriptor SQL type} and {@link JavaType Java type}. * * @return a non-null {@link Size} */ Size resolveSize( JdbcTypeDescriptor jdbcType, - JavaTypeDescriptor javaType, + JavaType javaType, Integer precision, Integer scale, Long length); @@ -3437,7 +3437,7 @@ public abstract class Dialect implements ConversionContext { @Override public Size resolveSize( JdbcTypeDescriptor jdbcType, - JavaTypeDescriptor javaType, + JavaType javaType, Integer precision, Integer scale, Long length) { diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/MySQLDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/MySQLDialect.java index 74d341f96c..e5dc46714a 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/MySQLDialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/MySQLDialect.java @@ -56,7 +56,7 @@ import org.hibernate.sql.ast.tree.Statement; import org.hibernate.sql.exec.spi.JdbcOperation; import org.hibernate.type.NullType; import org.hibernate.type.StandardBasicTypes; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; import org.hibernate.type.descriptor.jdbc.NullJdbcTypeDescriptor; import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeDescriptorRegistry; @@ -192,7 +192,7 @@ public class MySQLDialect extends Dialect { @Override public Size resolveSize( JdbcTypeDescriptor jdbcType, - JavaTypeDescriptor javaType, + JavaType javaType, Integer precision, Integer scale, Long length) { diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/SQLServerDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/SQLServerDialect.java index 466dff9bce..11b15b9eb5 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/SQLServerDialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/SQLServerDialect.java @@ -50,12 +50,10 @@ import org.hibernate.type.BasicType; import org.hibernate.type.BasicTypeRegistry; import org.hibernate.type.StandardBasicTypes; import org.hibernate.type.descriptor.java.PrimitiveByteArrayJavaTypeDescriptor; -import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; import org.hibernate.type.descriptor.jdbc.SmallIntJdbcTypeDescriptor; import java.sql.DatabaseMetaData; import java.sql.SQLException; -import java.sql.Timestamp; import java.sql.Types; import java.time.temporal.ChronoField; import java.time.temporal.TemporalAccessor; diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/SybaseASEDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/SybaseASEDialect.java index 4e8ff210ca..9baebc8a0d 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/SybaseASEDialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/SybaseASEDialect.java @@ -35,7 +35,7 @@ import org.hibernate.sql.ast.SqlAstTranslatorFactory; import org.hibernate.sql.ast.spi.StandardSqlAstTranslatorFactory; import org.hibernate.sql.ast.tree.Statement; import org.hibernate.sql.exec.spi.JdbcOperation; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; import org.hibernate.type.descriptor.jdbc.TimestampJdbcTypeDescriptor; import org.hibernate.type.descriptor.jdbc.TinyIntJdbcTypeDescriptor; @@ -109,7 +109,7 @@ public class SybaseASEDialect extends SybaseDialect { @Override public Size resolveSize( JdbcTypeDescriptor jdbcType, - JavaTypeDescriptor javaType, + JavaType javaType, Integer precision, Integer scale, Long length) { diff --git a/hibernate-core/src/main/java/org/hibernate/engine/internal/UnsavedValueFactory.java b/hibernate-core/src/main/java/org/hibernate/engine/internal/UnsavedValueFactory.java index 418b8bb0c4..4892764b8b 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/internal/UnsavedValueFactory.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/internal/UnsavedValueFactory.java @@ -15,9 +15,9 @@ import org.hibernate.engine.spi.VersionValue; import org.hibernate.property.access.spi.Getter; import org.hibernate.type.BasicType; import org.hibernate.type.Type; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; -import org.hibernate.type.descriptor.java.VersionJavaTypeDescriptor; -import org.hibernate.type.descriptor.java.spi.PrimitiveJavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; +import org.hibernate.type.descriptor.java.VersionJavaType; +import org.hibernate.type.descriptor.java.spi.PrimitiveJavaType; /** * Helper for dealing with unsaved value handling @@ -68,9 +68,9 @@ public class UnsavedValueFactory { final Object defaultValue = identifierGetter.get( instantiate( constructor ) ); return new IdentifierValue( defaultValue ); } - final JavaTypeDescriptor jtd; - if ( identifierGetter != null && ( identifierType instanceof BasicType ) && ( jtd = ( (BasicType) identifierType ).getJavaTypeDescriptor() ) instanceof PrimitiveJavaTypeDescriptor ) { - final Object defaultValue = ( (PrimitiveJavaTypeDescriptor) jtd ).getDefaultValue(); + final JavaType jtd; + if ( identifierGetter != null && ( identifierType instanceof BasicType ) && ( jtd = ( (BasicType) identifierType ).getJavaTypeDescriptor() ) instanceof PrimitiveJavaType ) { + final Object defaultValue = ( (PrimitiveJavaType) jtd ).getDefaultValue(); return new IdentifierValue( defaultValue ); } else { @@ -118,7 +118,7 @@ public class UnsavedValueFactory { public static VersionValue getUnsavedVersionValue( String versionUnsavedValue, Getter versionGetter, - VersionJavaTypeDescriptor versionType, + VersionJavaType versionType, Constructor constructor) { if ( versionUnsavedValue == null ) { diff --git a/hibernate-core/src/main/java/org/hibernate/engine/internal/Versioning.java b/hibernate-core/src/main/java/org/hibernate/engine/internal/Versioning.java index 380adf3b2a..6e53df02be 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/internal/Versioning.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/internal/Versioning.java @@ -9,7 +9,7 @@ package org.hibernate.engine.internal; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.internal.CoreMessageLogger; import org.hibernate.persister.entity.EntityPersister; -import org.hibernate.type.descriptor.java.VersionJavaTypeDescriptor; +import org.hibernate.type.descriptor.java.VersionJavaType; import org.jboss.logging.Logger; @@ -31,21 +31,21 @@ public final class Versioning { } /** - * Create an initial optimistic locking value according the {@link VersionJavaTypeDescriptor} + * Create an initial optimistic locking value according the {@link VersionJavaType} * contract for the version property. * * @param versionType The version type. * @param session The originating session * @return The initial optimistic locking value */ - private static Object seed(VersionJavaTypeDescriptor versionType, SharedSessionContractImplementor session) { + private static Object seed(VersionJavaType versionType, SharedSessionContractImplementor session) { final Object seed = versionType.seed( session ); LOG.tracef( "Seeding: %s", seed ); return seed; } /** - * Create an initial optimistic locking value according the {@link VersionJavaTypeDescriptor} + * Create an initial optimistic locking value according the {@link VersionJavaType} * contract for the version property if required and inject it into * the snapshot state. * @@ -59,7 +59,7 @@ public final class Versioning { public static boolean seedVersion( Object[] fields, int versionProperty, - VersionJavaTypeDescriptor versionType, + VersionJavaType versionType, SharedSessionContractImplementor session) { final Object initialVersion = fields[versionProperty]; if ( @@ -80,14 +80,14 @@ public final class Versioning { /** * Generate the next increment in the optimistic locking value according - * the {@link VersionJavaTypeDescriptor} contract for the version property. + * the {@link VersionJavaType} contract for the version property. * * @param version The current version * @param versionType The version type * @param session The originating session * @return The incremented optimistic locking value. */ - public static Object increment(Object version, VersionJavaTypeDescriptor versionType, SharedSessionContractImplementor session) { + public static Object increment(Object version, VersionJavaType versionType, SharedSessionContractImplementor session) { final Object next = versionType.next( version, session ); if ( LOG.isTraceEnabled() ) { LOG.tracef( diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/SharedSessionContractImplementor.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/SharedSessionContractImplementor.java index f67f3109a5..83913c402c 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/SharedSessionContractImplementor.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/SharedSessionContractImplementor.java @@ -31,7 +31,7 @@ import org.hibernate.resource.jdbc.spi.JdbcSessionOwner; import org.hibernate.resource.transaction.spi.TransactionCoordinator; import org.hibernate.resource.transaction.spi.TransactionCoordinatorBuilder.Options; import org.hibernate.type.descriptor.WrapperOptions; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.spi.TypeConfiguration; /** @@ -64,7 +64,7 @@ import org.hibernate.type.spi.TypeConfiguration; * @author Steve Ebersole */ public interface SharedSessionContractImplementor - extends SharedSessionContract, JdbcSessionOwner, Options, LobCreationContext, WrapperOptions, QueryProducerImplementor, JavaTypeDescriptor.CoercionContext { + extends SharedSessionContract, JdbcSessionOwner, Options, LobCreationContext, WrapperOptions, QueryProducerImplementor, JavaType.CoercionContext { // todo : this is the shared contract between Session and StatelessSession, but it defines methods that StatelessSession does not implement // (it just throws UnsupportedOperationException). To me it seems like it is better to properly isolate those methods diff --git a/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultLoadEventListener.java b/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultLoadEventListener.java index bd016877bd..ef716dc018 100644 --- a/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultLoadEventListener.java +++ b/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultLoadEventListener.java @@ -36,7 +36,7 @@ import org.hibernate.proxy.HibernateProxy; import org.hibernate.proxy.LazyInitializer; import org.hibernate.stat.spi.StatisticsImplementor; import org.hibernate.tuple.entity.EntityMetamodel; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Defines the default load event listeners used by hibernate for loading entities @@ -133,7 +133,7 @@ public class DefaultLoadEventListener implements LoadEventListener { if ( singleIdAttribute.getMappedType() instanceof EntityMappingType ) { final EntityMappingType dependentIdTargetMapping = (EntityMappingType) singleIdAttribute.getMappedType(); final EntityIdentifierMapping dependentIdTargetIdMapping = dependentIdTargetMapping.getIdentifierMapping(); - final JavaTypeDescriptor dependentParentIdJtd = dependentIdTargetIdMapping.getMappedType().getMappedJavaTypeDescriptor(); + final JavaType dependentParentIdJtd = dependentIdTargetIdMapping.getMappedType().getMappedJavaTypeDescriptor(); if ( dependentParentIdJtd.getJavaTypeClass().isInstance( event.getEntityId() ) ) { // yep that's what we have... loadByDerivedIdentitySimplePkValue( diff --git a/hibernate-core/src/main/java/org/hibernate/internal/util/ReflectHelper.java b/hibernate-core/src/main/java/org/hibernate/internal/util/ReflectHelper.java index e73e6c83ea..af190cb19b 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/util/ReflectHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/util/ReflectHelper.java @@ -29,7 +29,7 @@ import org.hibernate.property.access.internal.PropertyAccessStrategyMixedImpl; import org.hibernate.property.access.spi.Getter; import org.hibernate.type.BasicType; import org.hibernate.type.Type; -import org.hibernate.type.descriptor.java.spi.PrimitiveJavaTypeDescriptor; +import org.hibernate.type.descriptor.java.spi.PrimitiveJavaType; /** * Utility class for various reflection operations. @@ -340,8 +340,8 @@ public final class ReflectHelper { boolean found = true; for ( int j = 0; j < params.length; j++ ) { final boolean ok = types[j] == null || params[j].isAssignableFrom( types[j].getReturnedClass() ) || ( - types[j] instanceof BasicType && ( (BasicType) types[j] ).getJavaTypeDescriptor() instanceof PrimitiveJavaTypeDescriptor - && params[j] == ( (PrimitiveJavaTypeDescriptor) ( ( (BasicType) types[j] ).getJavaTypeDescriptor() ) ).getPrimitiveClass() + types[j] instanceof BasicType && ( (BasicType) types[j] ).getJavaTypeDescriptor() instanceof PrimitiveJavaType + && params[j] == ( (PrimitiveJavaType) ( ( (BasicType) types[j] ).getJavaTypeDescriptor() ) ).getPrimitiveClass() ); if ( !ok ) { found = false; diff --git a/hibernate-core/src/main/java/org/hibernate/loader/access/IdentifierLoadAccessImpl.java b/hibernate-core/src/main/java/org/hibernate/loader/access/IdentifierLoadAccessImpl.java index 574b219a24..a776f892c5 100644 --- a/hibernate-core/src/main/java/org/hibernate/loader/access/IdentifierLoadAccessImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/loader/access/IdentifierLoadAccessImpl.java @@ -28,13 +28,13 @@ import org.hibernate.jpa.spi.JpaCompliance; import org.hibernate.persister.entity.EntityPersister; import org.hibernate.proxy.HibernateProxy; import org.hibernate.proxy.LazyInitializer; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.spi.TypeConfiguration; /** * @author Steve Ebersole */ -public class IdentifierLoadAccessImpl implements IdentifierLoadAccess, JavaTypeDescriptor.CoercionContext { +public class IdentifierLoadAccessImpl implements IdentifierLoadAccess, JavaType.CoercionContext { private final LoadAccessContext context; private final EntityPersister entityPersister; diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/Array.java b/hibernate-core/src/main/java/org/hibernate/mapping/Array.java index 8f1742f295..635bc74529 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/Array.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/Array.java @@ -15,8 +15,7 @@ import org.hibernate.collection.spi.CollectionSemantics; import org.hibernate.type.ArrayType; import org.hibernate.type.BasicType; import org.hibernate.type.CollectionType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; -import org.hibernate.type.descriptor.java.spi.PrimitiveJavaTypeDescriptor; +import org.hibernate.type.descriptor.java.spi.PrimitiveJavaType; /** * An array mapping has a primary key consisting of the key columns + index column. @@ -34,7 +33,7 @@ public class Array extends List { if ( elementClassName == null ) { final org.hibernate.type.Type elementType = getElement().getType(); if ( isPrimitiveArray() ) { - return ( (PrimitiveJavaTypeDescriptor) ( (BasicType) elementType ).getJavaTypeDescriptor() ).getPrimitiveClass(); + return ( (PrimitiveJavaType) ( (BasicType) elementType ).getJavaTypeDescriptor() ).getPrimitiveClass(); } return elementType.getReturnedClass(); } diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/BasicValue.java b/hibernate-core/src/main/java/org/hibernate/mapping/BasicValue.java index 1e6ee2eab6..5341e025d4 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/BasicValue.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/BasicValue.java @@ -46,8 +46,8 @@ import org.hibernate.type.BasicType; import org.hibernate.type.ConvertedBasicType; import org.hibernate.type.CustomType; import org.hibernate.type.Type; -import org.hibernate.type.descriptor.java.BasicJavaTypeDescriptor; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.BasicJavaType; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.MutabilityPlan; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators; @@ -77,7 +77,7 @@ public class BasicValue extends SimpleValue implements JdbcTypeDescriptorIndicat private String explicitTypeName; private Map explicitLocalTypeParams; - private Function explicitJavaTypeAccess; + private Function explicitJavaTypeAccess; private Function explicitJdbcTypeAccess; private Function explicitMutabilityPlanAccess; private Function implicitJavaTypeAccess; @@ -148,7 +148,7 @@ public class BasicValue extends SimpleValue implements JdbcTypeDescriptorIndicat } @SuppressWarnings({"rawtypes"}) - public void setExplicitJavaTypeAccess(Function explicitJavaTypeAccess) { + public void setExplicitJavaTypeAccess(Function explicitJavaTypeAccess) { this.explicitJavaTypeAccess = explicitJavaTypeAccess; } @@ -361,12 +361,12 @@ public class BasicValue extends SimpleValue implements JdbcTypeDescriptorIndicat ); } - JavaTypeDescriptor jtd = null; + JavaType jtd = null; // determine JTD if we can if ( explicitJavaTypeAccess != null ) { - final BasicJavaTypeDescriptor explicitJtd = explicitJavaTypeAccess.apply( typeConfiguration ); + final BasicJavaType explicitJtd = explicitJavaTypeAccess.apply( typeConfiguration ); if ( explicitJtd != null ) { jtd = explicitJtd; } @@ -382,7 +382,7 @@ public class BasicValue extends SimpleValue implements JdbcTypeDescriptorIndicat } if ( jtd == null ) { - final JavaTypeDescriptor reflectedJtd = determineReflectedJavaTypeDescriptor(); + final JavaType reflectedJtd = determineReflectedJavaTypeDescriptor(); if ( reflectedJtd != null ) { jtd = reflectedJtd; } @@ -402,7 +402,7 @@ public class BasicValue extends SimpleValue implements JdbcTypeDescriptorIndicat } final TypeDefinitionRegistry typeDefinitionRegistry = getBuildingContext().getTypeDefinitionRegistry(); - final TypeDefinition autoAppliedTypeDef = typeDefinitionRegistry.resolveAutoApplied( (BasicJavaTypeDescriptor) jtd ); + final TypeDefinition autoAppliedTypeDef = typeDefinitionRegistry.resolveAutoApplied( (BasicJavaType) jtd ); if ( autoAppliedTypeDef != null && ( !jtd.getJavaTypeClass().isEnum() || enumerationStyle == null ) ) { log.debug( "BasicValue resolution matched auto-applied type-definition" ); return autoAppliedTypeDef.resolve( @@ -428,7 +428,7 @@ public class BasicValue extends SimpleValue implements JdbcTypeDescriptorIndicat } - private JavaTypeDescriptor determineReflectedJavaTypeDescriptor() { + private JavaType determineReflectedJavaTypeDescriptor() { final java.lang.reflect.Type impliedJavaType; if ( resolvedJavaType != null ) { @@ -466,7 +466,7 @@ public class BasicValue extends SimpleValue implements JdbcTypeDescriptorIndicat String name, EnumType enumerationStyle, Function implicitJavaTypeAccess, - Function explicitJtdAccess, + Function explicitJtdAccess, Function explicitStdAccess, Function explicitMutabilityPlanAccess, ConverterDescriptor converterDescriptor, @@ -514,7 +514,7 @@ public class BasicValue extends SimpleValue implements JdbcTypeDescriptorIndicat final BasicType basicTypeByName = typeConfiguration.getBasicTypeRegistry().getRegisteredType( name ); if ( basicTypeByName != null ) { final BasicValueConverter valueConverter; - final JavaTypeDescriptor domainJtd; + final JavaType domainJtd; if ( converterDescriptor != null ) { valueConverter = converterDescriptor.createJpaAttributeConverter( converterCreationContext ); domainJtd = valueConverter.getDomainJavaDescriptor(); @@ -762,13 +762,13 @@ public class BasicValue extends SimpleValue implements JdbcTypeDescriptorIndicat /** * The JavaTypeDescriptor for the value as part of the domain model */ - JavaTypeDescriptor getDomainJavaDescriptor(); + JavaType getDomainJavaDescriptor(); /** * The JavaTypeDescriptor for the relational value as part of * the relational model (its JDBC representation) */ - JavaTypeDescriptor getRelationalJavaDescriptor(); + JavaType getRelationalJavaDescriptor(); /** * The JavaTypeDescriptor for the relational value as part of diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/SimpleValue.java b/hibernate-core/src/main/java/org/hibernate/mapping/SimpleValue.java index b3a212a503..7be5d2b698 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/SimpleValue.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/SimpleValue.java @@ -51,7 +51,7 @@ import org.hibernate.type.Type; import org.hibernate.type.descriptor.JdbcTypeNameMapper; import org.hibernate.type.descriptor.converter.AttributeConverterJdbcTypeDescriptorAdapter; import org.hibernate.type.descriptor.converter.AttributeConverterTypeAdapter; -import org.hibernate.type.descriptor.java.BasicJavaTypeDescriptor; +import org.hibernate.type.descriptor.java.BasicJavaType; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators; import org.hibernate.type.descriptor.jdbc.LobTypeMappings; @@ -658,7 +658,7 @@ public abstract class SimpleValue implements KeyValue { } ); - final BasicJavaTypeDescriptor domainJtd = (BasicJavaTypeDescriptor) jpaAttributeConverter.getDomainJavaTypeDescriptor(); + final BasicJavaType domainJtd = (BasicJavaType) jpaAttributeConverter.getDomainJavaTypeDescriptor(); // build the SqlTypeDescriptor adapter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/AbstractCompositeIdentifierMapping.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/AbstractCompositeIdentifierMapping.java index 9f1c4a6ecd..a2402d1f34 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/AbstractCompositeIdentifierMapping.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/AbstractCompositeIdentifierMapping.java @@ -50,7 +50,7 @@ import org.hibernate.sql.results.graph.FetchParent; import org.hibernate.sql.results.graph.embeddable.EmbeddableValuedFetchable; import org.hibernate.sql.results.graph.embeddable.internal.EmbeddableFetchImpl; import org.hibernate.sql.results.graph.embeddable.internal.EmbeddableResultImpl; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Base implementation for composite identifier mappings @@ -105,7 +105,7 @@ public abstract class AbstractCompositeIdentifierMapping } @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { + public JavaType getJavaTypeDescriptor() { return getEmbeddableTypeDescriptor().getMappedJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/AbstractEmbeddableRepresentationStrategy.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/AbstractEmbeddableRepresentationStrategy.java index ad710e5487..673b6bba86 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/AbstractEmbeddableRepresentationStrategy.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/AbstractEmbeddableRepresentationStrategy.java @@ -10,19 +10,18 @@ import java.util.Iterator; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import org.hibernate.internal.util.collections.CollectionHelper; import org.hibernate.mapping.Component; import org.hibernate.mapping.Property; import org.hibernate.metamodel.spi.EmbeddableRepresentationStrategy; import org.hibernate.metamodel.spi.RuntimeModelCreationContext; import org.hibernate.property.access.spi.PropertyAccess; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole */ public abstract class AbstractEmbeddableRepresentationStrategy implements EmbeddableRepresentationStrategy { - private final JavaTypeDescriptor embeddableJavaTypeDescriptor; + private final JavaType embeddableJavaTypeDescriptor; private final int propertySpan; private final PropertyAccess[] propertyAccesses; @@ -32,7 +31,7 @@ public abstract class AbstractEmbeddableRepresentationStrategy implements Embedd public AbstractEmbeddableRepresentationStrategy( Component bootDescriptor, - JavaTypeDescriptor embeddableJavaTypeDescriptor, + JavaType embeddableJavaTypeDescriptor, RuntimeModelCreationContext creationContext) { this.propertySpan = bootDescriptor.getPropertySpan(); this.embeddableJavaTypeDescriptor = embeddableJavaTypeDescriptor; @@ -60,12 +59,12 @@ public abstract class AbstractEmbeddableRepresentationStrategy implements Embedd protected abstract PropertyAccess buildPropertyAccess(Property bootAttributeDescriptor); - public JavaTypeDescriptor getEmbeddableJavaTypeDescriptor() { + public JavaType getEmbeddableJavaTypeDescriptor() { return embeddableJavaTypeDescriptor; } @Override - public JavaTypeDescriptor getMappedJavaTypeDescriptor() { + public JavaType getMappedJavaTypeDescriptor() { return getEmbeddableJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/AbstractEntityInstantiatorPojo.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/AbstractEntityInstantiatorPojo.java index a176f73f2c..d61697099b 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/AbstractEntityInstantiatorPojo.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/AbstractEntityInstantiatorPojo.java @@ -14,7 +14,7 @@ import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.mapping.PersistentClass; import org.hibernate.metamodel.spi.EntityInstantiator; import org.hibernate.tuple.entity.EntityMetamodel; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Base support for instantiating entity values as POJO representation @@ -29,7 +29,7 @@ public abstract class AbstractEntityInstantiatorPojo extends AbstractPojoInstant public AbstractEntityInstantiatorPojo( EntityMetamodel entityMetamodel, PersistentClass persistentClass, - JavaTypeDescriptor javaTypeDescriptor) { + JavaType javaTypeDescriptor) { super( javaTypeDescriptor.getJavaTypeClass() ); this.entityMetamodel = entityMetamodel; diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/AttributeFactory.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/AttributeFactory.java index 369286e673..ae12b00069 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/AttributeFactory.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/AttributeFactory.java @@ -48,10 +48,9 @@ import org.hibernate.property.access.internal.PropertyAccessMapImpl; import org.hibernate.property.access.spi.Getter; import org.hibernate.tuple.entity.EntityMetamodel; import org.hibernate.type.AnyType; -import org.hibernate.type.CompositeType; import org.hibernate.type.EmbeddedComponentType; import org.hibernate.type.EntityType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.spi.JavaTypeDescriptorRegistry; /** @@ -223,7 +222,7 @@ public class AttributeFactory { assert type instanceof AnyType; final AnyType anyType = (AnyType) type; - final JavaTypeDescriptor baseJtd = context.getTypeConfiguration() + final JavaType baseJtd = context.getTypeConfiguration() .getJavaTypeDescriptorRegistry() .resolveDescriptor( anyType.getReturnedClass() ); return new AnyMappingDomainTypeImpl<>( anyType, baseJtd ); @@ -239,7 +238,7 @@ public class AttributeFactory { .resolveStrategy( component, context.getRuntimeModelCreationContext() ); if ( component.isDynamic() ) { - final JavaTypeDescriptor javaTypeDescriptor = context.getJavaTypeDescriptorRegistry().getDescriptor( Map.class ); + final JavaType javaTypeDescriptor = context.getJavaTypeDescriptorRegistry().getDescriptor( Map.class ); embeddableType = new EmbeddableTypeImpl<>( javaTypeDescriptor, @@ -260,7 +259,7 @@ public class AttributeFactory { final JavaTypeDescriptorRegistry registry = context.getTypeConfiguration() .getJavaTypeDescriptorRegistry(); - final JavaTypeDescriptor javaTypeDescriptor = registry.resolveManagedTypeDescriptor( embeddableClass ); + final JavaType javaTypeDescriptor = registry.resolveManagedTypeDescriptor( embeddableClass ); embeddableType = new EmbeddableTypeImpl<>( javaTypeDescriptor, diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EmbeddableInstantiatorPojoOptimized.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EmbeddableInstantiatorPojoOptimized.java index b7444a9cf5..22e99d1800 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EmbeddableInstantiatorPojoOptimized.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EmbeddableInstantiatorPojoOptimized.java @@ -10,7 +10,7 @@ import java.util.function.Supplier; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.metamodel.spi.EmbeddableInstantiator; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import static org.hibernate.bytecode.spi.ReflectionOptimizer.InstantiationOptimizer; @@ -24,7 +24,7 @@ public class EmbeddableInstantiatorPojoOptimized extends AbstractPojoInstantiato private final InstantiationOptimizer instantiationOptimizer; public EmbeddableInstantiatorPojoOptimized( - JavaTypeDescriptor javaTypeDescriptor, + JavaType javaTypeDescriptor, InstantiationOptimizer instantiationOptimizer) { super( javaTypeDescriptor.getJavaTypeClass() ); this.instantiationOptimizer = instantiationOptimizer; diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EmbeddableInstantiatorPojoStandard.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EmbeddableInstantiatorPojoStandard.java index cc7d4faa3c..7cfa7f58fc 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EmbeddableInstantiatorPojoStandard.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EmbeddableInstantiatorPojoStandard.java @@ -17,7 +17,7 @@ import org.hibernate.internal.CoreMessageLogger; import org.hibernate.internal.util.ReflectHelper; import org.hibernate.mapping.Component; import org.hibernate.metamodel.spi.EmbeddableInstantiator; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Support for instantiating embeddables as POJO representation @@ -31,7 +31,7 @@ public class EmbeddableInstantiatorPojoStandard extends AbstractPojoInstantiator public EmbeddableInstantiatorPojoStandard( @SuppressWarnings("unused") Component bootDescriptor, - JavaTypeDescriptor javaTypeDescriptor) { + JavaType javaTypeDescriptor) { super( javaTypeDescriptor.getJavaTypeClass() ); constructor = resolveConstructor( javaTypeDescriptor.getJavaTypeClass() ); diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EmbeddableRepresentationStrategyMap.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EmbeddableRepresentationStrategyMap.java index 85663fd88d..cd4e27c5c1 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EmbeddableRepresentationStrategyMap.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EmbeddableRepresentationStrategyMap.java @@ -17,13 +17,13 @@ import org.hibernate.metamodel.spi.EmbeddableRepresentationStrategy; import org.hibernate.metamodel.spi.RuntimeModelCreationContext; import org.hibernate.property.access.internal.PropertyAccessStrategyMapImpl; import org.hibernate.property.access.spi.PropertyAccess; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole */ public class EmbeddableRepresentationStrategyMap implements EmbeddableRepresentationStrategy { - private final JavaTypeDescriptor mapJtd; + private final JavaType mapJtd; private final EmbeddableInstantiator instantiator; public EmbeddableRepresentationStrategyMap( @@ -44,7 +44,7 @@ public class EmbeddableRepresentationStrategyMap implements EmbeddableRepresenta } @Override - public JavaTypeDescriptor getMappedJavaTypeDescriptor() { + public JavaType getMappedJavaTypeDescriptor() { return mapJtd; } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EntityInstantiatorPojoOptimized.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EntityInstantiatorPojoOptimized.java index a7551970ba..a259093d0f 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EntityInstantiatorPojoOptimized.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EntityInstantiatorPojoOptimized.java @@ -10,7 +10,7 @@ import org.hibernate.bytecode.spi.ReflectionOptimizer.InstantiationOptimizer; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.mapping.PersistentClass; import org.hibernate.tuple.entity.EntityMetamodel; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Support for instantiating entity values as POJO representation using @@ -24,7 +24,7 @@ public class EntityInstantiatorPojoOptimized extends AbstractEntityInstantiatorP public EntityInstantiatorPojoOptimized( EntityMetamodel entityMetamodel, PersistentClass persistentClass, - JavaTypeDescriptor javaTypeDescriptor, + JavaType javaTypeDescriptor, InstantiationOptimizer instantiationOptimizer) { super( entityMetamodel, persistentClass, javaTypeDescriptor ); this.instantiationOptimizer = instantiationOptimizer; diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EntityInstantiatorPojoStandard.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EntityInstantiatorPojoStandard.java index 7f649de2f3..2b3af113b9 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EntityInstantiatorPojoStandard.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EntityInstantiatorPojoStandard.java @@ -20,7 +20,7 @@ import org.hibernate.internal.CoreMessageLogger; import org.hibernate.internal.util.ReflectHelper; import org.hibernate.mapping.PersistentClass; import org.hibernate.tuple.entity.EntityMetamodel; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Support for instantiating entity values as POJO representation @@ -37,7 +37,7 @@ public class EntityInstantiatorPojoStandard extends AbstractEntityInstantiatorPo public EntityInstantiatorPojoStandard( EntityMetamodel entityMetamodel, PersistentClass persistentClass, - JavaTypeDescriptor javaTypeDescriptor) { + JavaType javaTypeDescriptor) { super( entityMetamodel, persistentClass, javaTypeDescriptor ); this.entityMetamodel = entityMetamodel; diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EntityRepresentationStrategyMap.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EntityRepresentationStrategyMap.java index 290f586639..4e7d8f06a3 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EntityRepresentationStrategyMap.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EntityRepresentationStrategyMap.java @@ -26,7 +26,7 @@ import org.hibernate.property.access.internal.PropertyAccessStrategyMapImpl; import org.hibernate.property.access.spi.PropertyAccess; import org.hibernate.proxy.ProxyFactory; import org.hibernate.proxy.map.MapProxyFactory; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole @@ -34,7 +34,7 @@ import org.hibernate.type.descriptor.java.JavaTypeDescriptor; public class EntityRepresentationStrategyMap implements EntityRepresentationStrategy { private static final CoreMessageLogger LOG = CoreLogging.messageLogger( EntityRepresentationStrategyMap.class ); - private final JavaTypeDescriptor mapJtd; + private final JavaType mapJtd; private final ProxyFactory proxyFactory; private final EntityInstantiatorDynamicMap instantiator; @@ -120,12 +120,12 @@ public class EntityRepresentationStrategyMap implements EntityRepresentationStra } @Override - public JavaTypeDescriptor getMappedJavaTypeDescriptor() { + public JavaType getMappedJavaTypeDescriptor() { return mapJtd; } @Override - public JavaTypeDescriptor getProxyJavaTypeDescriptor() { + public JavaType getProxyJavaTypeDescriptor() { return null; } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EntityRepresentationStrategyPojoStandard.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EntityRepresentationStrategyPojoStandard.java index e9fbaa3836..52f202a14a 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EntityRepresentationStrategyPojoStandard.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/EntityRepresentationStrategyPojoStandard.java @@ -53,7 +53,7 @@ import org.hibernate.proxy.ProxyFactory; import org.hibernate.proxy.pojo.ProxyFactoryHelper; import org.hibernate.tuple.entity.EntityMetamodel; import org.hibernate.type.CompositeType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.spi.JavaTypeDescriptorRegistry; /** @@ -62,8 +62,8 @@ import org.hibernate.type.descriptor.java.spi.JavaTypeDescriptorRegistry; public class EntityRepresentationStrategyPojoStandard implements EntityRepresentationStrategy { private static final CoreMessageLogger LOG = CoreLogging.messageLogger( EntityRepresentationStrategyPojoStandard.class ); - private final JavaTypeDescriptor mappedJtd; - private final JavaTypeDescriptor proxyJtd; + private final JavaType mappedJtd; + private final JavaType proxyJtd; private final boolean isBytecodeEnhanced; private final boolean lifecycleImplementor; @@ -422,12 +422,12 @@ public class EntityRepresentationStrategyPojoStandard implements EntityRepresent } @Override - public JavaTypeDescriptor getMappedJavaTypeDescriptor() { + public JavaType getMappedJavaTypeDescriptor() { return mappedJtd; } @Override - public JavaTypeDescriptor getProxyJavaTypeDescriptor() { + public JavaType getProxyJavaTypeDescriptor() { return proxyJtd; } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/MetadataContext.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/MetadataContext.java index ebd9c46347..56bf8f1c7a 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/MetadataContext.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/MetadataContext.java @@ -8,7 +8,6 @@ package org.hibernate.metamodel.internal; import java.lang.reflect.Field; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; @@ -26,7 +25,6 @@ import org.hibernate.Internal; import org.hibernate.MappingException; import org.hibernate.internal.EntityManagerMessageLogger; import org.hibernate.internal.HEMLogging; -import org.hibernate.internal.log.DeprecationLogger; import org.hibernate.internal.util.ReflectHelper; import org.hibernate.internal.util.collections.CollectionHelper; import org.hibernate.mapping.Component; @@ -52,7 +50,7 @@ import org.hibernate.metamodel.model.domain.internal.MappedSuperclassTypeImpl; import org.hibernate.metamodel.model.domain.internal.MappingMetamodelImpl; import org.hibernate.metamodel.spi.EmbeddableRepresentationStrategy; import org.hibernate.metamodel.spi.RuntimeModelCreationContext; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.spi.JavaTypeDescriptorRegistry; import org.hibernate.type.spi.TypeConfiguration; @@ -428,7 +426,7 @@ public class MetadataContext { final JavaTypeDescriptorRegistry registry = getTypeConfiguration() .getJavaTypeDescriptorRegistry(); final Class componentClass = identifier.getComponentClass(); - final JavaTypeDescriptor javaTypeDescriptor = registry.resolveManagedTypeDescriptor( componentClass ); + final JavaType javaTypeDescriptor = registry.resolveManagedTypeDescriptor( componentClass ); final EmbeddableRepresentationStrategy representationStrategy = getTypeConfiguration() .getMetadataBuildingContext() diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/PojoInstantiatorImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/PojoInstantiatorImpl.java index 12784f6f9b..17ee6a6bd4 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/PojoInstantiatorImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/PojoInstantiatorImpl.java @@ -8,13 +8,11 @@ package org.hibernate.metamodel.internal; import java.lang.reflect.Constructor; -import org.hibernate.InstantiationException; import org.hibernate.PropertyNotFoundException; -import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.internal.CoreLogging; import org.hibernate.internal.CoreMessageLogger; import org.hibernate.internal.util.ReflectHelper; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole @@ -25,7 +23,7 @@ public class PojoInstantiatorImpl extends AbstractPojoInstantiator { private final Constructor constructor; @SuppressWarnings("WeakerAccess") - public PojoInstantiatorImpl(JavaTypeDescriptor javaTypeDescriptor) { + public PojoInstantiatorImpl(JavaType javaTypeDescriptor) { super( javaTypeDescriptor.getJavaTypeClass() ); this.constructor = isAbstract() 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 3cf1c7f79b..d4c0cb4e72 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 @@ -62,7 +62,7 @@ import org.hibernate.type.CompositeType; import org.hibernate.type.EntityType; import org.hibernate.type.Type; import org.hibernate.type.descriptor.java.ImmutableMutabilityPlan; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.MutabilityPlan; import org.hibernate.type.spi.TypeConfiguration; @@ -134,7 +134,7 @@ public class EmbeddableMappingType implements ManagedMappingType, SelectableMapp return mappingType; } - private final JavaTypeDescriptor embeddableJtd; + private final JavaType embeddableJtd; private final EmbeddableRepresentationStrategy representationStrategy; private final SessionFactoryImplementor sessionFactory; @@ -526,7 +526,7 @@ public class EmbeddableMappingType implements ManagedMappingType, SelectableMapp } @Override - public JavaTypeDescriptor getMappedJavaTypeDescriptor() { + public JavaType getMappedJavaTypeDescriptor() { return embeddableJtd; } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/EntityMappingType.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/EntityMappingType.java index 2670c4e2c8..42e5be3714 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/EntityMappingType.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/EntityMappingType.java @@ -31,7 +31,7 @@ import org.hibernate.sql.ast.tree.from.TableReferenceJoin; import org.hibernate.sql.ast.tree.predicate.Predicate; import org.hibernate.sql.results.graph.DomainResultAssembler; import org.hibernate.sql.results.jdbc.spi.RowProcessingState; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import static org.hibernate.bytecode.enhance.spi.LazyPropertyInitializer.UNFETCHED_PROPERTY; @@ -77,7 +77,7 @@ public interface EntityMappingType extends ManagedMappingType, EntityValuedModel } @Override - default JavaTypeDescriptor getJavaTypeDescriptor() { + default JavaType getJavaTypeDescriptor() { return getMappedJavaTypeDescriptor(); } @@ -354,7 +354,7 @@ public interface EntityMappingType extends ManagedMappingType, EntityValuedModel } @Override - default JavaTypeDescriptor getMappedJavaTypeDescriptor() { + default JavaType getMappedJavaTypeDescriptor() { return getEntityPersister().getMappedJavaTypeDescriptor(); } 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 6e0b532fba..4a38f69750 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 @@ -13,7 +13,7 @@ import org.hibernate.mapping.IndexedConsumer; import org.hibernate.query.CastType; import org.hibernate.type.descriptor.ValueBinder; import org.hibernate.type.descriptor.ValueExtractor; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; /** @@ -26,7 +26,7 @@ public interface JdbcMapping extends MappingType, JdbcMappingContainer { * The descriptor for the Java type represented by this * expressable type */ - JavaTypeDescriptor getJavaTypeDescriptor(); + JavaType getJavaTypeDescriptor(); /** * The descriptor for the SQL type represented by this @@ -51,7 +51,7 @@ public interface JdbcMapping extends MappingType, JdbcMappingContainer { ValueBinder getJdbcValueBinder(); @Override - default JavaTypeDescriptor getMappedJavaTypeDescriptor() { + default JavaType getMappedJavaTypeDescriptor() { return getJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ManagedMappingType.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ManagedMappingType.java index 59586f17d6..26ad302df4 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ManagedMappingType.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ManagedMappingType.java @@ -6,13 +6,12 @@ */ package org.hibernate.metamodel.mapping; -import java.util.Collection; import java.util.List; import java.util.function.Consumer; import org.hibernate.mapping.IndexedConsumer; import org.hibernate.sql.results.graph.FetchableContainer; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Commonality in regards to the mapping type system for all managed domain @@ -22,7 +21,7 @@ import org.hibernate.type.descriptor.java.JavaTypeDescriptor; */ public interface ManagedMappingType extends MappingType, FetchableContainer { @Override - default JavaTypeDescriptor getJavaTypeDescriptor() { + default JavaType getJavaTypeDescriptor() { return getMappedJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/MappingType.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/MappingType.java index 6b376a0fe8..718f602eec 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/MappingType.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/MappingType.java @@ -6,7 +6,7 @@ */ package org.hibernate.metamodel.mapping; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Parts of the ModelPart hierarchy that are type descriptors, as opposed to attributes e.g. @@ -14,5 +14,5 @@ import org.hibernate.type.descriptor.java.JavaTypeDescriptor; * @author Steve Ebersole */ public interface MappingType { - JavaTypeDescriptor getMappedJavaTypeDescriptor(); + JavaType getMappedJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ModelPart.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ModelPart.java index 7ea0d04d02..28b8b1a158 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ModelPart.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ModelPart.java @@ -18,7 +18,7 @@ import org.hibernate.sql.ast.spi.SqlSelection; import org.hibernate.sql.ast.tree.from.TableGroup; import org.hibernate.sql.results.graph.DomainResult; import org.hibernate.sql.results.graph.DomainResultCreationState; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Describes a mapping related to any part of the app's domain model - e.g. @@ -32,7 +32,7 @@ import org.hibernate.type.descriptor.java.JavaTypeDescriptor; public interface ModelPart extends MappingModelExpressable { MappingType getPartMappingType(); - JavaTypeDescriptor getJavaTypeDescriptor(); + JavaType getJavaTypeDescriptor(); String getPartName(); diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ValueMapping.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ValueMapping.java index 522e39ad9d..07d3e9da03 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ValueMapping.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ValueMapping.java @@ -8,7 +8,7 @@ package org.hibernate.metamodel.mapping; import java.util.Locale; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.JavaTypedExpressable; /** @@ -28,7 +28,7 @@ public interface ValueMapping extends MappingModelExpressable, JavaTypedExpressa MappingType getMappedType(); @Override - default JavaTypeDescriptor getExpressableJavaTypeDescriptor() { + default JavaType getExpressableJavaTypeDescriptor() { return getMappedType().getMappedJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractAttributeMapping.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractAttributeMapping.java index 1736c5842e..1ef328f0e0 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractAttributeMapping.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractAttributeMapping.java @@ -10,7 +10,7 @@ import org.hibernate.metamodel.mapping.AttributeMapping; import org.hibernate.metamodel.mapping.ForeignKeyDescriptor; import org.hibernate.metamodel.mapping.ManagedMappingType; import org.hibernate.metamodel.mapping.MappingType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole @@ -42,7 +42,7 @@ public abstract class AbstractAttributeMapping implements AttributeMapping { } @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { + public JavaType getJavaTypeDescriptor() { return getMappedType().getMappedJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractDiscriminatorMapping.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractDiscriminatorMapping.java index 6f582fb061..0b4bb684fa 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractDiscriminatorMapping.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractDiscriminatorMapping.java @@ -35,7 +35,7 @@ import org.hibernate.sql.results.graph.FetchParent; import org.hibernate.sql.results.graph.basic.BasicFetch; import org.hibernate.sql.results.graph.basic.BasicResult; import org.hibernate.type.BasicType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.spi.JavaTypeDescriptorRegistry; import org.hibernate.type.spi.TypeConfiguration; @@ -120,7 +120,7 @@ public abstract class AbstractDiscriminatorMapping implements EntityDiscriminato } @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { + public JavaType getJavaTypeDescriptor() { return getJdbcMapping().getJavaTypeDescriptor(); } @@ -283,15 +283,15 @@ public abstract class AbstractDiscriminatorMapping implements EntityDiscriminato */ private final Function toRelationalConverter; - private final JavaTypeDescriptor domainJtd; - private final JavaTypeDescriptor relationalJtd; + private final JavaType domainJtd; + private final JavaType relationalJtd; public DomainResultConverter( Function subtypeResolver, Function entityNameHandler, Function toRelationalConverter, - JavaTypeDescriptor domainJtd, - JavaTypeDescriptor relationalJtd) { + JavaType domainJtd, + JavaType relationalJtd) { this.subtypeResolver = subtypeResolver; this.entityNameHandler = entityNameHandler; this.toRelationalConverter = toRelationalConverter; @@ -307,7 +307,7 @@ public abstract class AbstractDiscriminatorMapping implements EntityDiscriminato final TypeConfiguration typeConfiguration = sessionFactory.getDomainModel().getTypeConfiguration(); final JavaTypeDescriptorRegistry jtdRegistry = typeConfiguration.getJavaTypeDescriptorRegistry(); - final JavaTypeDescriptor domainJtd; + final JavaType domainJtd; final Function entityNameHandler; final Function toRelationalConverter; @@ -384,12 +384,12 @@ public abstract class AbstractDiscriminatorMapping implements EntityDiscriminato } @Override - public JavaTypeDescriptor getDomainJavaDescriptor() { + public JavaType getDomainJavaDescriptor() { return domainJtd; } @Override - public JavaTypeDescriptor getRelationalJavaDescriptor() { + public JavaType getRelationalJavaDescriptor() { return relationalJtd; } } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AnyDiscriminatorPart.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AnyDiscriminatorPart.java index a47684dd6d..01a6b89a88 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AnyDiscriminatorPart.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AnyDiscriminatorPart.java @@ -37,7 +37,7 @@ import org.hibernate.sql.results.graph.FetchOptions; import org.hibernate.sql.results.graph.FetchParent; import org.hibernate.sql.results.graph.basic.BasicFetch; import org.hibernate.type.MetaType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import static org.hibernate.sql.ast.spi.SqlExpressionResolver.createColumnReferenceKey; @@ -112,7 +112,7 @@ public class AnyDiscriminatorPart implements BasicValuedModelPart, FetchOptions, } @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { + public JavaType getJavaTypeDescriptor() { return jdbcMapping().getMappedJavaTypeDescriptor(); } 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 9c5ded47d9..d507d86d8a 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 @@ -35,7 +35,7 @@ import org.hibernate.sql.results.graph.Fetch; import org.hibernate.sql.results.graph.FetchOptions; import org.hibernate.sql.results.graph.FetchParent; import org.hibernate.sql.results.graph.basic.BasicFetch; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Acts as a ModelPart for the key portion of an any-valued mapping @@ -97,7 +97,7 @@ public class AnyKeyPart implements BasicValuedModelPart, FetchOptions { } @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { + public JavaType getJavaTypeDescriptor() { return jdbcMapping.getMappedJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/BasicAttributeMapping.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/BasicAttributeMapping.java index 8e31b86481..f58b766809 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/BasicAttributeMapping.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/BasicAttributeMapping.java @@ -40,7 +40,7 @@ import org.hibernate.sql.results.graph.FetchParent; import org.hibernate.sql.results.graph.basic.BasicFetch; import org.hibernate.sql.results.graph.basic.BasicResult; import org.hibernate.tuple.ValueGeneration; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole @@ -60,7 +60,7 @@ public class BasicAttributeMapping private final JdbcMapping jdbcMapping; private final BasicValueConverter valueConverter; - private final JavaTypeDescriptor domainTypeDescriptor; + private final JavaType domainTypeDescriptor; @SuppressWarnings("WeakerAccess") public BasicAttributeMapping( @@ -162,7 +162,7 @@ public class BasicAttributeMapping } @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { + public JavaType getJavaTypeDescriptor() { return domainTypeDescriptor; } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/BasicEntityIdentifierMappingImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/BasicEntityIdentifierMappingImpl.java index 19553b638f..0b175dba95 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/BasicEntityIdentifierMappingImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/BasicEntityIdentifierMappingImpl.java @@ -41,7 +41,7 @@ import org.hibernate.sql.results.graph.FetchParent; import org.hibernate.sql.results.graph.basic.BasicFetch; import org.hibernate.sql.results.graph.basic.BasicResult; import org.hibernate.type.BasicType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Andrea Boriero @@ -160,7 +160,7 @@ public class BasicEntityIdentifierMappingImpl implements BasicEntityIdentifierMa } @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { + public JavaType getJavaTypeDescriptor() { return getMappedType().getMappedJavaTypeDescriptor(); } 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 b0b2835e62..99fd1d238d 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 @@ -40,7 +40,7 @@ import org.hibernate.sql.results.graph.FetchOptions; import org.hibernate.sql.results.graph.FetchParent; import org.hibernate.sql.results.graph.basic.BasicFetch; import org.hibernate.sql.results.graph.basic.BasicResult; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Models a basic collection element/value or index/key @@ -109,7 +109,7 @@ public class BasicValuedCollectionPart } @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { + public JavaType getJavaTypeDescriptor() { return selectableMapping.getJdbcMapping().getJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/CollectionIdentifierDescriptorImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/CollectionIdentifierDescriptorImpl.java index b05a60198a..cfde7d5971 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/CollectionIdentifierDescriptorImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/CollectionIdentifierDescriptorImpl.java @@ -33,7 +33,7 @@ import org.hibernate.sql.results.graph.FetchParent; import org.hibernate.sql.results.graph.basic.BasicFetch; import org.hibernate.sql.results.graph.basic.BasicResult; import org.hibernate.type.BasicType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole @@ -103,7 +103,7 @@ public class CollectionIdentifierDescriptorImpl implements CollectionIdentifierD } @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { + public JavaType getJavaTypeDescriptor() { return getMappedType().getMappedJavaTypeDescriptor(); } @@ -220,7 +220,7 @@ public class CollectionIdentifierDescriptorImpl implements CollectionIdentifierD return new BasicResult<>( sqlSelection.getValuesArrayPosition(), null, - (JavaTypeDescriptor) type.getJavaTypeDescriptor(), + (JavaType) type.getJavaTypeDescriptor(), collectionPath ); } 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 6f7bf176ec..ad87964685 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 @@ -49,7 +49,7 @@ import org.hibernate.sql.results.graph.Fetchable; import org.hibernate.sql.results.graph.FetchableContainer; import org.hibernate.sql.results.jdbc.spi.JdbcValuesSourceProcessingOptions; import org.hibernate.sql.results.jdbc.spi.RowProcessingState; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Multi-attribute NaturalIdMapping implementation @@ -59,7 +59,7 @@ public class CompoundNaturalIdMapping extends AbstractNaturalIdMapping implement // todo (6.0) : create a composite MappingType for this descriptor's Object[]? private final List attributes; - private final JavaTypeDescriptor jtd; + private final JavaType jtd; private List jdbcMappings; @@ -257,12 +257,12 @@ public class CompoundNaturalIdMapping extends AbstractNaturalIdMapping implement } @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { + public JavaType getJavaTypeDescriptor() { throw new NotYetImplementedFor6Exception( getClass() ); } @Override - public JavaTypeDescriptor getMappedJavaTypeDescriptor() { + public JavaType getMappedJavaTypeDescriptor() { return getJavaTypeDescriptor(); } @@ -276,7 +276,7 @@ public class CompoundNaturalIdMapping extends AbstractNaturalIdMapping implement final SessionFactoryImplementor sessionFactory = creationState.getSqlAstCreationState().getCreationContext().getSessionFactory(); - final JavaTypeDescriptor jtd = sessionFactory + final JavaType jtd = sessionFactory .getTypeConfiguration() .getJavaTypeDescriptorRegistry() .getDescriptor( Object[].class ); @@ -451,7 +451,7 @@ public class CompoundNaturalIdMapping extends AbstractNaturalIdMapping implement public static class DomainResultImpl implements DomainResult, FetchParent { private final NavigablePath navigablePath; private final CompoundNaturalIdMapping naturalIdMapping; - private final JavaTypeDescriptor arrayJtd; + private final JavaType arrayJtd; private final List fetches; @@ -460,7 +460,7 @@ public class CompoundNaturalIdMapping extends AbstractNaturalIdMapping implement public DomainResultImpl( NavigablePath navigablePath, CompoundNaturalIdMapping naturalIdMapping, - JavaTypeDescriptor arrayJtd, + JavaType arrayJtd, String resultVariable, DomainResultCreationState creationState) { this.navigablePath = navigablePath; @@ -491,7 +491,7 @@ public class CompoundNaturalIdMapping extends AbstractNaturalIdMapping implement } @Override - public JavaTypeDescriptor getResultJavaTypeDescriptor() { + public JavaType getResultJavaTypeDescriptor() { return arrayJtd; } @@ -537,7 +537,7 @@ public class CompoundNaturalIdMapping extends AbstractNaturalIdMapping implement private static class AssemblerImpl implements DomainResultAssembler { private final NavigablePath navigablePath; private final CompoundNaturalIdMapping naturalIdMapping; - private final JavaTypeDescriptor jtd; + private final JavaType jtd; private final List> subAssemblers; @@ -545,7 +545,7 @@ public class CompoundNaturalIdMapping extends AbstractNaturalIdMapping implement List fetches, NavigablePath navigablePath, CompoundNaturalIdMapping naturalIdMapping, - JavaTypeDescriptor jtd, + JavaType jtd, AssemblerCreationState creationState) { this.navigablePath = navigablePath; this.naturalIdMapping = naturalIdMapping; @@ -575,7 +575,7 @@ public class CompoundNaturalIdMapping extends AbstractNaturalIdMapping implement } @Override - public JavaTypeDescriptor getAssembledJavaTypeDescriptor() { + public JavaType getAssembledJavaTypeDescriptor() { return jtd; } } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/DiscriminatedAssociationAttributeMapping.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/DiscriminatedAssociationAttributeMapping.java index a9bc2541c0..5d5c61cc6a 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/DiscriminatedAssociationAttributeMapping.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/DiscriminatedAssociationAttributeMapping.java @@ -40,7 +40,7 @@ import org.hibernate.sql.results.graph.Fetch; import org.hibernate.sql.results.graph.FetchParent; import org.hibernate.sql.results.graph.Fetchable; import org.hibernate.type.AnyType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.MutabilityPlan; /** @@ -58,7 +58,7 @@ public class DiscriminatedAssociationAttributeMapping public DiscriminatedAssociationAttributeMapping( NavigableRole attributeRole, - JavaTypeDescriptor baseAssociationJtd, + JavaType baseAssociationJtd, ManagedMappingType declaringType, int stateArrayPosition, StateArrayContributorMetadataAccess attributeMetadataAccess, diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/DiscriminatedAssociationMapping.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/DiscriminatedAssociationMapping.java index 51eba05011..1713956096 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/DiscriminatedAssociationMapping.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/DiscriminatedAssociationMapping.java @@ -47,7 +47,7 @@ import org.hibernate.sql.results.jdbc.spi.RowProcessingState; import org.hibernate.type.AnyType; import org.hibernate.type.BasicType; import org.hibernate.type.MetaType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Represents the "type" of an any-valued mapping @@ -58,7 +58,7 @@ public class DiscriminatedAssociationMapping implements MappingType, FetchOption public static DiscriminatedAssociationMapping from( NavigableRole containerRole, - JavaTypeDescriptor baseAssociationJtd, + JavaType baseAssociationJtd, DiscriminatedAssociationModelPart declaringModelPart, AnyType anyType, Any bootValueMapping, @@ -119,7 +119,7 @@ public class DiscriminatedAssociationMapping implements MappingType, FetchOption private final AnyDiscriminatorPart discriminatorPart; private final BasicValuedModelPart keyPart; - private final JavaTypeDescriptor baseAssociationJtd; + private final JavaType baseAssociationJtd; private final FetchTiming fetchTiming; @@ -139,7 +139,7 @@ public class DiscriminatedAssociationMapping implements MappingType, FetchOption DiscriminatedAssociationModelPart modelPart, AnyDiscriminatorPart discriminatorPart, BasicValuedModelPart keyPart, - JavaTypeDescriptor baseAssociationJtd, + JavaType baseAssociationJtd, FetchTiming fetchTiming, Map discriminatorValueMappings, SessionFactoryImplementor sessionFactory) { @@ -289,12 +289,12 @@ public class DiscriminatedAssociationMapping implements MappingType, FetchOption return this; } - public JavaTypeDescriptor getJavaTypeDescriptor() { + public JavaType getJavaTypeDescriptor() { return baseAssociationJtd; } @Override - public JavaTypeDescriptor getMappedJavaTypeDescriptor() { + public JavaType getMappedJavaTypeDescriptor() { return baseAssociationJtd; } @@ -342,7 +342,7 @@ public class DiscriminatedAssociationMapping implements MappingType, FetchOption private final NavigablePath navigablePath; private final DiscriminatedAssociationModelPart graphedPart; - private final JavaTypeDescriptor baseAssociationJtd; + private final JavaType baseAssociationJtd; private Fetch discriminatorValueFetch; private Fetch keyValueFetch; @@ -350,7 +350,7 @@ public class DiscriminatedAssociationMapping implements MappingType, FetchOption public AnyValuedResultGraphNode( NavigablePath navigablePath, DiscriminatedAssociationModelPart graphedPart, - JavaTypeDescriptor baseAssociationJtd) { + JavaType baseAssociationJtd) { this.navigablePath = navigablePath; this.graphedPart = graphedPart; this.baseAssociationJtd = baseAssociationJtd; @@ -372,7 +372,7 @@ public class DiscriminatedAssociationMapping implements MappingType, FetchOption return keyValueFetch; } - public JavaTypeDescriptor getBaseAssociationJtd() { + public JavaType getBaseAssociationJtd() { return baseAssociationJtd; } @@ -382,7 +382,7 @@ public class DiscriminatedAssociationMapping implements MappingType, FetchOption } @Override - public JavaTypeDescriptor getResultJavaTypeDescriptor() { + public JavaType getResultJavaTypeDescriptor() { return baseAssociationJtd; } @@ -428,7 +428,7 @@ public class DiscriminatedAssociationMapping implements MappingType, FetchOption public AnyValuedResult( NavigablePath navigablePath, - JavaTypeDescriptor baseAssociationJtd, + JavaType baseAssociationJtd, DiscriminatedAssociationModelPart fetchedPart, String resultVariable) { super( navigablePath, fetchedPart, baseAssociationJtd ); @@ -458,7 +458,7 @@ public class DiscriminatedAssociationMapping implements MappingType, FetchOption public AnyValuedFetch( NavigablePath navigablePath, - JavaTypeDescriptor baseAssociationJtd, + JavaType baseAssociationJtd, DiscriminatedAssociationModelPart fetchedPart, FetchTiming fetchTiming, FetchParent fetchParent, @@ -563,9 +563,9 @@ public class DiscriminatedAssociationMapping implements MappingType, FetchOption } @Override - public JavaTypeDescriptor getAssembledJavaTypeDescriptor() { + public JavaType getAssembledJavaTypeDescriptor() { //noinspection unchecked - return (JavaTypeDescriptor) fetchedPart.getJavaTypeDescriptor(); + return (JavaType) fetchedPart.getJavaTypeDescriptor(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/DiscriminatedCollectionPart.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/DiscriminatedCollectionPart.java index 0b26c7f525..fc655ba2d1 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/DiscriminatedCollectionPart.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/DiscriminatedCollectionPart.java @@ -29,7 +29,7 @@ import org.hibernate.sql.results.graph.Fetch; import org.hibernate.sql.results.graph.FetchOptions; import org.hibernate.sql.results.graph.FetchParent; import org.hibernate.type.AnyType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole @@ -44,7 +44,7 @@ public class DiscriminatedCollectionPart implements DiscriminatedAssociationMode public DiscriminatedCollectionPart( Nature nature, CollectionPersister collectionDescriptor, - JavaTypeDescriptor baseAssociationJtd, + JavaType baseAssociationJtd, Any bootValueMapping, AnyType anyType, MappingModelCreationProcess creationProcess) { @@ -140,7 +140,7 @@ public class DiscriminatedCollectionPart implements DiscriminatedAssociationMode } @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { + public JavaType getJavaTypeDescriptor() { return discriminatorMapping.getJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EmbeddedCollectionPart.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EmbeddedCollectionPart.java index 4d5b371f31..85d046a850 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EmbeddedCollectionPart.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EmbeddedCollectionPart.java @@ -48,7 +48,7 @@ import org.hibernate.sql.results.graph.FetchParent; import org.hibernate.sql.results.graph.embeddable.EmbeddableValuedFetchable; import org.hibernate.sql.results.graph.embeddable.internal.EmbeddableFetchImpl; import org.hibernate.sql.results.graph.embeddable.internal.EmbeddableResultImpl; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole @@ -251,7 +251,7 @@ public class EmbeddedCollectionPart implements CollectionPart, EmbeddableValuedF } @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { + public JavaType getJavaTypeDescriptor() { return getEmbeddableTypeDescriptor().getJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EmbeddedForeignKeyDescriptor.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EmbeddedForeignKeyDescriptor.java index 3d33af5b64..62c0005a20 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EmbeddedForeignKeyDescriptor.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EmbeddedForeignKeyDescriptor.java @@ -44,7 +44,7 @@ import org.hibernate.sql.ast.tree.predicate.Predicate; import org.hibernate.sql.results.graph.DomainResult; import org.hibernate.sql.results.graph.DomainResultCreationState; import org.hibernate.sql.results.graph.embeddable.internal.EmbeddableForeignKeyResultImpl; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Andrea Boriero @@ -479,7 +479,7 @@ public class EmbeddedForeignKeyDescriptor implements ForeignKeyDescriptor { } @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { + public JavaType getJavaTypeDescriptor() { return targetSide.getModelPart().getJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EntityCollectionPart.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EntityCollectionPart.java index 0c47a121d8..333a63794e 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EntityCollectionPart.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EntityCollectionPart.java @@ -34,14 +34,13 @@ import org.hibernate.sql.ast.tree.from.TableGroup; import org.hibernate.sql.ast.tree.from.TableGroupJoin; import org.hibernate.sql.results.graph.DomainResult; import org.hibernate.sql.results.graph.DomainResultCreationState; -import org.hibernate.sql.results.graph.Fetch; import org.hibernate.sql.results.graph.FetchOptions; import org.hibernate.sql.results.graph.FetchParent; import org.hibernate.sql.results.graph.collection.internal.EntityCollectionPartTableGroup; import org.hibernate.sql.results.graph.entity.EntityFetch; import org.hibernate.sql.results.graph.entity.EntityValuedFetchable; import org.hibernate.sql.results.graph.entity.internal.EntityFetchJoinedImpl; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole @@ -115,7 +114,7 @@ public class EntityCollectionPart } @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { + public JavaType getJavaTypeDescriptor() { return getEntityMappingType().getJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EntityRowIdMappingImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EntityRowIdMappingImpl.java index 3dd66ad015..75584bb19f 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EntityRowIdMappingImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EntityRowIdMappingImpl.java @@ -27,7 +27,7 @@ import org.hibernate.sql.results.graph.DomainResult; import org.hibernate.sql.results.graph.DomainResultCreationState; import org.hibernate.sql.results.graph.basic.BasicResult; import org.hibernate.type.BasicType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Nathan Xu @@ -57,7 +57,7 @@ public class EntityRowIdMappingImpl implements EntityRowIdMapping, SelectableMap } @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { + public JavaType getJavaTypeDescriptor() { return rowIdType.getJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EntityVersionMappingImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EntityVersionMappingImpl.java index 278b844741..c89aad02a2 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EntityVersionMappingImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EntityVersionMappingImpl.java @@ -31,7 +31,7 @@ import org.hibernate.sql.results.graph.FetchParent; import org.hibernate.sql.results.graph.basic.BasicFetch; import org.hibernate.sql.results.graph.basic.BasicResult; import org.hibernate.type.BasicType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole @@ -106,7 +106,7 @@ public class EntityVersionMappingImpl implements EntityVersionMapping, FetchOpti } @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { + public JavaType getJavaTypeDescriptor() { return versionBasicType.getJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MappingModelCreationHelper.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MappingModelCreationHelper.java index 25357b9e75..d44664e82f 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MappingModelCreationHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MappingModelCreationHelper.java @@ -95,7 +95,7 @@ import org.hibernate.type.EntityType; import org.hibernate.type.ForeignKeyDirection; import org.hibernate.type.Type; import org.hibernate.type.descriptor.java.ImmutableMutabilityPlan; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.MutabilityPlan; import org.hibernate.type.descriptor.java.spi.JavaTypeDescriptorRegistry; import org.hibernate.type.spi.TypeConfiguration; @@ -1422,7 +1422,7 @@ public class MappingModelCreationHelper { final SessionFactoryImplementor sessionFactory = creationProcess.getCreationContext().getSessionFactory(); final TypeConfiguration typeConfiguration = sessionFactory.getTypeConfiguration(); final JavaTypeDescriptorRegistry jtdRegistry = typeConfiguration.getJavaTypeDescriptorRegistry(); - final JavaTypeDescriptor baseJtd = jtdRegistry.getDescriptor(Object.class); + final JavaType baseJtd = jtdRegistry.getDescriptor(Object.class); return new DiscriminatedCollectionPart( CollectionPart.Nature.ELEMENT, @@ -1478,12 +1478,12 @@ public class MappingModelCreationHelper { @SuppressWarnings("rawtypes") private static class CollectionMappingTypeImpl implements CollectionMappingType { - private final JavaTypeDescriptor collectionJtd; + private final JavaType collectionJtd; private final CollectionSemantics semantics; @SuppressWarnings("WeakerAccess") public CollectionMappingTypeImpl( - JavaTypeDescriptor collectionJtd, + JavaType collectionJtd, CollectionSemantics semantics) { this.collectionJtd = collectionJtd; this.semantics = semantics; @@ -1495,7 +1495,7 @@ public class MappingModelCreationHelper { } @Override - public JavaTypeDescriptor getMappedJavaTypeDescriptor() { + public JavaType getMappedJavaTypeDescriptor() { return collectionJtd; } } 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 e671203531..689dab6701 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 @@ -47,7 +47,7 @@ import org.hibernate.sql.results.graph.Fetch; import org.hibernate.sql.results.graph.FetchOptions; import org.hibernate.sql.results.graph.FetchParent; import org.hibernate.sql.results.graph.basic.BasicResult; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole @@ -356,7 +356,7 @@ public class SimpleForeignKeyDescriptor implements ForeignKeyDescriptor, BasicVa } @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { + public JavaType getJavaTypeDescriptor() { return targetSide.getModelPart().getJdbcMapping().getJavaTypeDescriptor(); } 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 53844d8c76..5bb94f2898 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 @@ -32,13 +32,13 @@ import org.hibernate.sql.ast.spi.SqlSelection; import org.hibernate.sql.ast.tree.from.TableGroup; import org.hibernate.sql.results.graph.DomainResult; import org.hibernate.sql.results.graph.DomainResultCreationState; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.spi.TypeConfiguration; /** * Single-attribute NaturalIdMapping implementation */ -public class SimpleNaturalIdMapping extends AbstractNaturalIdMapping implements JavaTypeDescriptor.CoercionContext { +public class SimpleNaturalIdMapping extends AbstractNaturalIdMapping implements JavaType.CoercionContext { private final SingularAttributeMapping attribute; private final TypeConfiguration typeConfiguration; @@ -134,7 +134,7 @@ public class SimpleNaturalIdMapping extends AbstractNaturalIdMapping implements @Override public int calculateHashCode(Object value, SharedSessionContractImplementor session) { //noinspection unchecked - return value == null ? 0 : ( (JavaTypeDescriptor) getJavaTypeDescriptor() ).extractHashCode( value ); + return value == null ? 0 : ( (JavaType) getJavaTypeDescriptor() ).extractHashCode( value ); } @Override @@ -181,7 +181,7 @@ public class SimpleNaturalIdMapping extends AbstractNaturalIdMapping implements } @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { + public JavaType getJavaTypeDescriptor() { return attribute.getJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/Converters.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/Converters.java index e7e9b65d00..0993ad3b4f 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/Converters.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/Converters.java @@ -14,7 +14,7 @@ import org.hibernate.metamodel.model.convert.internal.JpaAttributeConverterImpl; import org.hibernate.metamodel.model.convert.spi.BasicValueConverter; import org.hibernate.resource.beans.spi.ManagedBean; import org.hibernate.resource.beans.spi.ManagedBeanRegistry; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.spi.JavaTypeDescriptorRegistry; import org.hibernate.type.spi.TypeConfiguration; @@ -25,8 +25,8 @@ import org.hibernate.type.spi.TypeConfiguration; */ public class Converters { public static BasicValueConverter jpaAttributeConverter( - JavaTypeDescriptor relationalJtd, - JavaTypeDescriptor domainJtd, + JavaType relationalJtd, + JavaType domainJtd, Class> converterClass, SessionFactory factory) { final SessionFactoryImplementor sfi = (SessionFactoryImplementor) factory; @@ -36,7 +36,7 @@ public class Converters { final TypeConfiguration typeConfiguration = sfi.getTypeConfiguration(); final JavaTypeDescriptorRegistry jtdRegistry = typeConfiguration.getJavaTypeDescriptorRegistry(); - final JavaTypeDescriptor> converterJtd = jtdRegistry.getDescriptor( converterClass ); + final JavaType> converterJtd = jtdRegistry.getDescriptor( converterClass ); return new JpaAttributeConverterImpl<>( converterBean, converterJtd, domainJtd, relationalJtd ); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/internal/JpaAttributeConverterImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/internal/JpaAttributeConverterImpl.java index ef58daf6db..279d036e18 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/internal/JpaAttributeConverterImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/internal/JpaAttributeConverterImpl.java @@ -8,13 +8,11 @@ package org.hibernate.metamodel.model.convert.internal; import jakarta.persistence.AttributeConverter; -import org.hibernate.annotations.Immutable; import org.hibernate.boot.model.convert.spi.JpaAttributeConverterCreationContext; import org.hibernate.metamodel.model.convert.spi.JpaAttributeConverter; import org.hibernate.resource.beans.spi.ManagedBean; import org.hibernate.type.descriptor.converter.AttributeConverterMutabilityPlanImpl; -import org.hibernate.type.descriptor.java.ImmutableMutabilityPlan; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.MutabilityPlan; import org.hibernate.type.descriptor.java.spi.JavaTypeDescriptorRegistry; import org.hibernate.type.descriptor.java.spi.RegistryHelper; @@ -26,15 +24,15 @@ import org.hibernate.type.descriptor.java.spi.RegistryHelper; */ public class JpaAttributeConverterImpl implements JpaAttributeConverter { private final ManagedBean> attributeConverterBean; - private final JavaTypeDescriptor> converterJtd; - private final JavaTypeDescriptor domainJtd; - private final JavaTypeDescriptor jdbcJtd; + private final JavaType> converterJtd; + private final JavaType domainJtd; + private final JavaType jdbcJtd; public JpaAttributeConverterImpl( ManagedBean> attributeConverterBean, - JavaTypeDescriptor> converterJtd, - JavaTypeDescriptor domainJtd, - JavaTypeDescriptor jdbcJtd) { + JavaType> converterJtd, + JavaType domainJtd, + JavaType jdbcJtd) { this.attributeConverterBean = attributeConverterBean; this.converterJtd = converterJtd; this.domainJtd = domainJtd; @@ -43,7 +41,7 @@ public class JpaAttributeConverterImpl implements JpaAttributeConverter> attributeConverterBean, - JavaTypeDescriptor> converterJtd, + JavaType> converterJtd, Class domainJavaType, Class jdbcJavaType, JpaAttributeConverterCreationContext context) { @@ -54,7 +52,7 @@ public class JpaAttributeConverterImpl implements JpaAttributeConverter) jtdRegistry.resolveDescriptor( + domainJtd = (JavaType) jtdRegistry.resolveDescriptor( domainJavaType, () -> RegistryHelper.INSTANCE.createTypeDescriptor( domainJavaType, @@ -92,27 +90,27 @@ public class JpaAttributeConverterImpl implements JpaAttributeConverter> getConverterJavaTypeDescriptor() { + public JavaType> getConverterJavaTypeDescriptor() { return converterJtd; } @Override - public JavaTypeDescriptor getDomainJavaDescriptor() { + public JavaType getDomainJavaDescriptor() { return getDomainJavaTypeDescriptor(); } @Override - public JavaTypeDescriptor getRelationalJavaDescriptor() { + public JavaType getRelationalJavaDescriptor() { return getRelationalJavaTypeDescriptor(); } @Override - public JavaTypeDescriptor getDomainJavaTypeDescriptor() { + public JavaType getDomainJavaTypeDescriptor() { return domainJtd; } @Override - public JavaTypeDescriptor getRelationalJavaTypeDescriptor() { + public JavaType getRelationalJavaTypeDescriptor() { return jdbcJtd; } } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/internal/NamedEnumValueConverter.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/internal/NamedEnumValueConverter.java index 4091e727b6..0b37e62ad3 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/internal/NamedEnumValueConverter.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/internal/NamedEnumValueConverter.java @@ -18,7 +18,7 @@ import org.hibernate.metamodel.model.convert.spi.EnumValueConverter; import org.hibernate.type.descriptor.ValueBinder; import org.hibernate.type.descriptor.ValueExtractor; import org.hibernate.type.descriptor.java.EnumJavaTypeDescriptor; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; /** @@ -30,7 +30,7 @@ import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; public class NamedEnumValueConverter> implements EnumValueConverter, Serializable { private final EnumJavaTypeDescriptor domainTypeDescriptor; private final JdbcTypeDescriptor jdbcTypeDescriptor; - private final JavaTypeDescriptor relationalTypeDescriptor; + private final JavaType relationalTypeDescriptor; private transient ValueExtractor valueExtractor; private transient ValueBinder valueBinder; @@ -38,7 +38,7 @@ public class NamedEnumValueConverter> implements EnumValueConv public NamedEnumValueConverter( EnumJavaTypeDescriptor domainTypeDescriptor, JdbcTypeDescriptor jdbcTypeDescriptor, - JavaTypeDescriptor relationalTypeDescriptor) { + JavaType relationalTypeDescriptor) { this.domainTypeDescriptor = domainTypeDescriptor; this.jdbcTypeDescriptor = jdbcTypeDescriptor; this.relationalTypeDescriptor = relationalTypeDescriptor; @@ -53,7 +53,7 @@ public class NamedEnumValueConverter> implements EnumValueConv } @Override - public JavaTypeDescriptor getRelationalJavaDescriptor() { + public JavaType getRelationalJavaDescriptor() { return relationalTypeDescriptor; } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/internal/OrdinalEnumValueConverter.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/internal/OrdinalEnumValueConverter.java index 5e2778ca24..bfdeb2bf79 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/internal/OrdinalEnumValueConverter.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/internal/OrdinalEnumValueConverter.java @@ -18,7 +18,7 @@ import org.hibernate.metamodel.model.convert.spi.EnumValueConverter; import org.hibernate.type.descriptor.ValueBinder; import org.hibernate.type.descriptor.ValueExtractor; import org.hibernate.type.descriptor.java.EnumJavaTypeDescriptor; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; /** @@ -31,7 +31,7 @@ public class OrdinalEnumValueConverter> implements EnumValueCo private final EnumJavaTypeDescriptor enumJavaDescriptor; private final JdbcTypeDescriptor jdbcTypeDescriptor; - private final JavaTypeDescriptor relationalJavaDescriptor; + private final JavaType relationalJavaDescriptor; private transient ValueExtractor valueExtractor; private transient ValueBinder valueBinder; @@ -39,7 +39,7 @@ public class OrdinalEnumValueConverter> implements EnumValueCo public OrdinalEnumValueConverter( EnumJavaTypeDescriptor enumJavaDescriptor, JdbcTypeDescriptor jdbcTypeDescriptor, - JavaTypeDescriptor relationalJavaDescriptor) { + JavaType relationalJavaDescriptor) { this.enumJavaDescriptor = enumJavaDescriptor; this.jdbcTypeDescriptor = jdbcTypeDescriptor; this.relationalJavaDescriptor = relationalJavaDescriptor; @@ -72,7 +72,7 @@ public class OrdinalEnumValueConverter> implements EnumValueCo } @Override - public JavaTypeDescriptor getRelationalJavaDescriptor() { + public JavaType getRelationalJavaDescriptor() { return relationalJavaDescriptor; } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/spi/BasicValueConverter.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/spi/BasicValueConverter.java index 86f1251f2a..d8b8a1dc1d 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/spi/BasicValueConverter.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/spi/BasicValueConverter.java @@ -7,7 +7,7 @@ package org.hibernate.metamodel.model.convert.spi; import org.hibernate.Incubating; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Support for basic-value conversions. @@ -40,10 +40,10 @@ public interface BasicValueConverter { /** * Descriptor for the Java type for the domain portion of this converter */ - JavaTypeDescriptor getDomainJavaDescriptor(); + JavaType getDomainJavaDescriptor(); /** * Descriptor for the Java type for the relational portion of this converter */ - JavaTypeDescriptor getRelationalJavaDescriptor(); + JavaType getRelationalJavaDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/spi/JpaAttributeConverter.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/spi/JpaAttributeConverter.java index b59c268fc2..92dfade4e4 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/spi/JpaAttributeConverter.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/spi/JpaAttributeConverter.java @@ -9,7 +9,7 @@ package org.hibernate.metamodel.model.convert.spi; import jakarta.persistence.AttributeConverter; import org.hibernate.resource.beans.spi.ManagedBean; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * BasicValueConverter extension for AttributeConverter-specific support @@ -17,10 +17,10 @@ import org.hibernate.type.descriptor.java.JavaTypeDescriptor; * @author Steve Ebersole */ public interface JpaAttributeConverter extends BasicValueConverter { - JavaTypeDescriptor> getConverterJavaTypeDescriptor(); + JavaType> getConverterJavaTypeDescriptor(); ManagedBean> getConverterBean(); - JavaTypeDescriptor getDomainJavaTypeDescriptor(); - JavaTypeDescriptor getRelationalJavaTypeDescriptor(); + JavaType getDomainJavaTypeDescriptor(); + JavaType getRelationalJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/spi/SimpleBasicValueConverter.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/spi/SimpleBasicValueConverter.java index 3497daa004..ea124fe4b1 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/spi/SimpleBasicValueConverter.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/spi/SimpleBasicValueConverter.java @@ -8,21 +8,21 @@ package org.hibernate.metamodel.model.convert.spi; import java.util.function.Function; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole */ public class SimpleBasicValueConverter implements BasicValueConverter { - private final JavaTypeDescriptor domainJtd; - private final JavaTypeDescriptor relationalJtd; + private final JavaType domainJtd; + private final JavaType relationalJtd; private final Function toDomainHandler; private final Function toRelationalHandler; public SimpleBasicValueConverter( - JavaTypeDescriptor domainJtd, - JavaTypeDescriptor relationalJtd, + JavaType domainJtd, + JavaType relationalJtd, Function toDomainHandler, Function toRelationalHandler) { this.domainJtd = domainJtd; @@ -42,12 +42,12 @@ public class SimpleBasicValueConverter implements BasicValueConverter } @Override - public JavaTypeDescriptor getDomainJavaDescriptor() { + public JavaType getDomainJavaDescriptor() { return domainJtd; } @Override - public JavaTypeDescriptor getRelationalJavaDescriptor() { + public JavaType getRelationalJavaDescriptor() { return relationalJtd; } } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/AbstractDomainType.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/AbstractDomainType.java index 055726bcd5..02587e74c8 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/AbstractDomainType.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/AbstractDomainType.java @@ -6,17 +6,17 @@ */ package org.hibernate.metamodel.model.domain; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole */ public abstract class AbstractDomainType implements SimpleDomainType { private final JpaMetamodel domainMetamodel; - private final JavaTypeDescriptor javaTypeDescriptor; + private final JavaType javaTypeDescriptor; @SuppressWarnings("WeakerAccess") - public AbstractDomainType(JavaTypeDescriptor javaTypeDescriptor, JpaMetamodel domainMetamodel) { + public AbstractDomainType(JavaType javaTypeDescriptor, JpaMetamodel domainMetamodel) { this.javaTypeDescriptor = javaTypeDescriptor; this.domainMetamodel = domainMetamodel; } @@ -26,7 +26,7 @@ public abstract class AbstractDomainType implements SimpleDomainType { } @Override - public JavaTypeDescriptor getExpressableJavaTypeDescriptor() { + public JavaType getExpressableJavaTypeDescriptor() { return javaTypeDescriptor; } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/AbstractIdentifiableType.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/AbstractIdentifiableType.java index d025db6b81..89d0a6f8a2 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/AbstractIdentifiableType.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/AbstractIdentifiableType.java @@ -16,12 +16,11 @@ import jakarta.persistence.metamodel.IdentifiableType; import jakarta.persistence.metamodel.SingularAttribute; import org.hibernate.metamodel.mapping.EntityIdentifierMapping; -import org.hibernate.metamodel.model.domain.internal.AttributeContainer; import org.hibernate.metamodel.model.domain.internal.BasicSqmPathSource; import org.hibernate.metamodel.model.domain.internal.EmbeddedSqmPathSource; import org.hibernate.metamodel.model.domain.internal.NonAggregatedCompositeSqmPathSource; import org.hibernate.query.sqm.SqmPathSource; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.jboss.logging.Logger; @@ -55,7 +54,7 @@ public abstract class AbstractIdentifiableType public AbstractIdentifiableType( String typeName, - JavaTypeDescriptor javaTypeDescriptor, + JavaType javaTypeDescriptor, IdentifiableDomainType superType, boolean hasIdClass, boolean hasIdentifierProperty, diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/AbstractManagedType.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/AbstractManagedType.java index b71cb10e15..6255f787a5 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/AbstractManagedType.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/AbstractManagedType.java @@ -33,7 +33,7 @@ import org.hibernate.internal.util.collections.CollectionHelper; import org.hibernate.metamodel.RepresentationMode; import org.hibernate.metamodel.model.domain.internal.AttributeContainer; import org.hibernate.metamodel.model.domain.internal.DomainModelHelper; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Commonality for Hibernate's implementations of the JPA {@link ManagedType} @@ -55,7 +55,7 @@ public abstract class AbstractManagedType protected AbstractManagedType( String hibernateTypeName, - JavaTypeDescriptor javaTypeDescriptor, + JavaType javaTypeDescriptor, ManagedDomainType superType, JpaMetamodel domainMetamodel) { super( javaTypeDescriptor, domainMetamodel ); diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/AllowableParameterType.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/AllowableParameterType.java index 5a73b3bb08..a61cd50d19 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/AllowableParameterType.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/AllowableParameterType.java @@ -8,7 +8,7 @@ package org.hibernate.metamodel.model.domain; import org.hibernate.Incubating; import org.hibernate.query.Query; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Specialization of DomainType for types that can be used as {@link Query} parameter bind values. @@ -17,5 +17,5 @@ import org.hibernate.type.descriptor.java.JavaTypeDescriptor; */ @Incubating public interface AllowableParameterType extends SimpleDomainType { - JavaTypeDescriptor getExpressableJavaTypeDescriptor(); + JavaType getExpressableJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/DomainType.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/DomainType.java index 3f88f34e42..f227693bc3 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/DomainType.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/DomainType.java @@ -7,14 +7,14 @@ package org.hibernate.metamodel.model.domain; import org.hibernate.query.sqm.SqmExpressable; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Describes any type that occurs in the application's domain model. * * The base for Hibernate's extension of the JPA type system. * - * Encapsulates a {@link JavaTypeDescriptor} describing the more rudimentary + * Encapsulates a {@link JavaType} describing the more rudimentary * aspects of the Java type. The DomainType is a higher-level construct * incorporating information such as bean properties, constructors, etc * @@ -44,5 +44,5 @@ public interface DomainType extends SqmExpressable { * * @see #getTypeName */ - JavaTypeDescriptor getExpressableJavaTypeDescriptor(); + JavaType getExpressableJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/PersistentAttribute.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/PersistentAttribute.java index a3c73d4991..73d1c806d9 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/PersistentAttribute.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/PersistentAttribute.java @@ -9,7 +9,7 @@ package org.hibernate.metamodel.model.domain; import jakarta.persistence.metamodel.Attribute; import org.hibernate.metamodel.AttributeClassification; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Hibernate extension to the JPA {@link Attribute} contract @@ -20,7 +20,7 @@ public interface PersistentAttribute extends Attribute { @Override ManagedDomainType getDeclaringType(); - JavaTypeDescriptor getAttributeJavaTypeDescriptor(); + JavaType getAttributeJavaTypeDescriptor(); /** * The classification of the attribute (is it a basic type, entity, etc) diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/TupleType.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/TupleType.java index 7d7cf593b0..b47377b515 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/TupleType.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/TupleType.java @@ -9,7 +9,6 @@ package org.hibernate.metamodel.model.domain; import java.util.List; import org.hibernate.query.sqm.SqmExpressable; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; /** * Describes any structural type without a direct java type representation. diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AbstractAttribute.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AbstractAttribute.java index cbc762e2bb..d8cc5ffcce 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AbstractAttribute.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AbstractAttribute.java @@ -6,23 +6,18 @@ */ package org.hibernate.metamodel.model.domain.internal; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; import java.io.ObjectStreamException; import java.io.Serializable; import java.lang.reflect.Member; -import java.lang.reflect.Method; + import jakarta.persistence.metamodel.Attribute; -import org.hibernate.engine.spi.SessionFactoryImplementor; -import org.hibernate.internal.util.ReflectHelper; import org.hibernate.metamodel.AttributeClassification; import org.hibernate.metamodel.internal.MetadataContext; import org.hibernate.metamodel.model.domain.ManagedDomainType; import org.hibernate.metamodel.model.domain.PersistentAttribute; import org.hibernate.metamodel.model.domain.SimpleDomainType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Models the commonality of the JPA {@link Attribute} hierarchy. @@ -35,7 +30,7 @@ import org.hibernate.type.descriptor.java.JavaTypeDescriptor; public abstract class AbstractAttribute implements PersistentAttribute, Serializable { private final ManagedDomainType declaringType; private final String name; - private final JavaTypeDescriptor attributeJtd; + private final JavaType attributeJtd; private final AttributeClassification attributeClassification; @@ -46,7 +41,7 @@ public abstract class AbstractAttribute implements PersistentAttribute declaringType, String name, - JavaTypeDescriptor attributeJtd, + JavaType attributeJtd, AttributeClassification attributeClassification, SimpleDomainType valueType, Member member, @@ -74,7 +69,7 @@ public abstract class AbstractAttribute implements PersistentAttribute getAttributeJavaTypeDescriptor() { + public JavaType getAttributeJavaTypeDescriptor() { return attributeJtd; } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AbstractPluralAttribute.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AbstractPluralAttribute.java index 947421b6c0..ef4c84fed5 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AbstractPluralAttribute.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AbstractPluralAttribute.java @@ -19,7 +19,7 @@ import org.hibernate.query.sqm.SqmPathSource; import org.hibernate.query.sqm.internal.SqmMappingModelHelper; import org.hibernate.query.sqm.tree.domain.SqmPath; import org.hibernate.query.sqm.tree.domain.SqmPluralValuedSimplePath; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @param The (D)eclaring type @@ -88,7 +88,7 @@ public abstract class AbstractPluralAttribute } @Override - public JavaTypeDescriptor getExpressableJavaTypeDescriptor() { + public JavaType getExpressableJavaTypeDescriptor() { return getElementType().getExpressableJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AbstractSqmPathSource.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AbstractSqmPathSource.java index 996a69c9d3..e52d626726 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AbstractSqmPathSource.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AbstractSqmPathSource.java @@ -8,7 +8,7 @@ package org.hibernate.metamodel.model.domain.internal; import org.hibernate.metamodel.model.domain.DomainType; import org.hibernate.query.sqm.SqmPathSource; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole @@ -43,7 +43,7 @@ public abstract class AbstractSqmPathSource implements SqmPathSource { } @Override - public JavaTypeDescriptor getExpressableJavaTypeDescriptor() { + public JavaType getExpressableJavaTypeDescriptor() { return domainType.getExpressableJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AnyMappingDomainTypeImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AnyMappingDomainTypeImpl.java index 2a88bfa5b8..db70c7601e 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AnyMappingDomainTypeImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AnyMappingDomainTypeImpl.java @@ -10,16 +10,16 @@ import org.hibernate.metamodel.model.domain.AnyMappingDomainType; import org.hibernate.metamodel.model.domain.SimpleDomainType; import org.hibernate.type.AnyType; import org.hibernate.type.BasicType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole */ public class AnyMappingDomainTypeImpl implements AnyMappingDomainType { private final AnyType anyType; - private final JavaTypeDescriptor baseJtd; + private final JavaType baseJtd; - public AnyMappingDomainTypeImpl(AnyType anyType, JavaTypeDescriptor baseJtd) { + public AnyMappingDomainTypeImpl(AnyType anyType, JavaType baseJtd) { this.anyType = anyType; this.baseJtd = baseJtd; } @@ -35,7 +35,7 @@ public class AnyMappingDomainTypeImpl implements AnyMappingDomainType { } @Override - public JavaTypeDescriptor getExpressableJavaTypeDescriptor() { + public JavaType getExpressableJavaTypeDescriptor() { return baseJtd; } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/ArrayTupleType.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/ArrayTupleType.java index 57233baa42..122a71792b 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/ArrayTupleType.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/ArrayTupleType.java @@ -14,7 +14,7 @@ import org.hibernate.metamodel.model.domain.AllowableFunctionReturnType; import org.hibernate.metamodel.model.domain.AllowableParameterType; import org.hibernate.metamodel.model.domain.TupleType; import org.hibernate.query.sqm.SqmExpressable; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.ObjectArrayJavaTypeDescriptor; /** @@ -31,8 +31,8 @@ public class ArrayTupleType implements TupleType, AllowableParameterTy this.javaTypeDescriptor = new ObjectArrayJavaTypeDescriptor( getTypeDescriptors( components ) ); } - private static JavaTypeDescriptor[] getTypeDescriptors(SqmExpressable[] components) { - final JavaTypeDescriptor[] typeDescriptors = new JavaTypeDescriptor[components.length]; + private static JavaType[] getTypeDescriptors(SqmExpressable[] components) { + final JavaType[] typeDescriptors = new JavaType[components.length]; for ( int i = 0; i < components.length; i++ ) { typeDescriptors[i] = components[i].getExpressableJavaTypeDescriptor(); } @@ -65,7 +65,7 @@ public class ArrayTupleType implements TupleType, AllowableParameterTy } @Override - public JavaTypeDescriptor getExpressableJavaTypeDescriptor() { + public JavaType getExpressableJavaTypeDescriptor() { return javaTypeDescriptor; } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/BasicTypeImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/BasicTypeImpl.java index ce198c3e45..e0a0c5e030 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/BasicTypeImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/BasicTypeImpl.java @@ -13,16 +13,16 @@ import java.sql.SQLException; import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.metamodel.model.domain.BasicDomainType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; /** * @author Emmanuel Bernard */ public class BasicTypeImpl implements BasicDomainType, Serializable { - private final JavaTypeDescriptor javaTypeDescriptor; + private final JavaType javaTypeDescriptor; - public BasicTypeImpl(JavaTypeDescriptor javaTypeDescriptor) { + public BasicTypeImpl(JavaType javaTypeDescriptor) { this.javaTypeDescriptor = javaTypeDescriptor; } @@ -31,7 +31,7 @@ public class BasicTypeImpl implements BasicDomainType, Serializable { } @Override - public JavaTypeDescriptor getExpressableJavaTypeDescriptor() { + public JavaType getExpressableJavaTypeDescriptor() { return javaTypeDescriptor; } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/EmbeddableTypeImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/EmbeddableTypeImpl.java index e231ae4e6c..4096991dc9 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/EmbeddableTypeImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/EmbeddableTypeImpl.java @@ -17,7 +17,7 @@ import org.hibernate.metamodel.model.domain.EmbeddableDomainType; import org.hibernate.metamodel.model.domain.JpaMetamodel; import org.hibernate.metamodel.spi.EmbeddableRepresentationStrategy; import org.hibernate.metamodel.spi.ManagedTypeRepresentationStrategy; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Standard Hibernate implementation of JPA's {@link jakarta.persistence.metamodel.EmbeddableType} @@ -34,7 +34,7 @@ public class EmbeddableTypeImpl private final EmbeddableRepresentationStrategy representationStrategy; public EmbeddableTypeImpl( - JavaTypeDescriptor javaTypeDescriptor, + JavaType javaTypeDescriptor, EmbeddableRepresentationStrategy representationStrategy, boolean isDynamic, JpaMetamodel domainMetamodel) { @@ -49,7 +49,7 @@ public class EmbeddableTypeImpl //noinspection unchecked super( name, - (JavaTypeDescriptor) domainMetamodel.getTypeConfiguration() + (JavaType) domainMetamodel.getTypeConfiguration() .getJavaTypeDescriptorRegistry() .getDescriptor( Map.class ), null, diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/EntityTypeImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/EntityTypeImpl.java index 270a95787f..9602a068a8 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/EntityTypeImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/EntityTypeImpl.java @@ -27,7 +27,7 @@ import org.hibernate.persister.entity.Queryable; import org.hibernate.query.sqm.SqmPathSource; import org.hibernate.query.sqm.tree.domain.SqmPath; import org.hibernate.type.StandardBasicTypes; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Defines the Hibernate implementation of the JPA {@link EntityType} contract. @@ -42,7 +42,7 @@ public class EntityTypeImpl private final SqmPathSource discriminatorPathSource; public EntityTypeImpl( - JavaTypeDescriptor javaTypeDescriptor, + JavaType javaTypeDescriptor, IdentifiableDomainType superType, PersistentClass persistentClass, JpaMetamodel jpaMetamodel) { diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/JpaMetamodelImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/JpaMetamodelImpl.java index 345535d3d4..603339f901 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/JpaMetamodelImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/JpaMetamodelImpl.java @@ -26,7 +26,6 @@ import jakarta.persistence.metamodel.EmbeddableType; import jakarta.persistence.metamodel.EntityType; import jakarta.persistence.metamodel.ManagedType; -import org.hibernate.SessionFactory; import org.hibernate.boot.registry.classloading.spi.ClassLoaderService; import org.hibernate.boot.registry.classloading.spi.ClassLoadingException; import org.hibernate.boot.spi.MetadataImplementor; @@ -55,7 +54,7 @@ import org.hibernate.metamodel.model.domain.MappedSuperclassDomainType; import org.hibernate.metamodel.spi.RuntimeModelCreationContext; import org.hibernate.persister.entity.Queryable; import org.hibernate.query.sqm.tree.domain.SqmPolymorphicRootDescriptor; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.spi.DynamicModelJtd; import org.hibernate.type.spi.TypeConfiguration; @@ -585,7 +584,7 @@ public class JpaMetamodelImpl implements JpaMetamodel, Serializable { } final Class javaType = persistentClass.getMappedClass(); - final JavaTypeDescriptor javaTypeDescriptor; + final JavaType javaTypeDescriptor; if ( javaType == null || Map.class.isAssignableFrom( javaType ) ) { // dynamic map javaTypeDescriptor = new DynamicModelJtd(); @@ -646,7 +645,7 @@ public class JpaMetamodelImpl implements JpaMetamodel, Serializable { ? null : locateOrBuildEntityType( superPersistentClass, context, typeConfiguration ); } - final JavaTypeDescriptor javaTypeDescriptor = context.getTypeConfiguration() + final JavaType javaTypeDescriptor = context.getTypeConfiguration() .getJavaTypeDescriptorRegistry() .resolveManagedTypeDescriptor( mappedSuperclass.getMappedClass() ); final MappedSuperclassTypeImpl mappedSuperclassType = new MappedSuperclassTypeImpl( diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/MappedSuperclassTypeImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/MappedSuperclassTypeImpl.java index 6beab55785..3ca91498a1 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/MappedSuperclassTypeImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/MappedSuperclassTypeImpl.java @@ -13,7 +13,7 @@ import org.hibernate.metamodel.model.domain.AbstractIdentifiableType; import org.hibernate.metamodel.model.domain.IdentifiableDomainType; import org.hibernate.metamodel.model.domain.JpaMetamodel; import org.hibernate.metamodel.model.domain.MappedSuperclassDomainType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Emmanuel Bernard @@ -21,7 +21,7 @@ import org.hibernate.type.descriptor.java.JavaTypeDescriptor; */ public class MappedSuperclassTypeImpl extends AbstractIdentifiableType implements MappedSuperclassDomainType { public MappedSuperclassTypeImpl( - JavaTypeDescriptor javaTypeDescriptor, + JavaType javaTypeDescriptor, MappedSuperclass mappedSuperclass, IdentifiableDomainType superType, JpaMetamodel jpaMetamodel) { diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/PluralAttributeBuilder.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/PluralAttributeBuilder.java index 9aa58fc216..86e315e60a 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/PluralAttributeBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/PluralAttributeBuilder.java @@ -21,7 +21,7 @@ import org.hibernate.metamodel.internal.PluralAttributeMetadata; import org.hibernate.metamodel.model.domain.ManagedDomainType; import org.hibernate.metamodel.model.domain.PersistentAttribute; import org.hibernate.metamodel.model.domain.SimpleDomainType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import static org.hibernate.metamodel.internal.AttributeFactory.determineSimpleType; @@ -29,7 +29,7 @@ import static org.hibernate.metamodel.internal.AttributeFactory.determineSimpleT * A "parameter object" for creating a plural attribute */ public class PluralAttributeBuilder { - private final JavaTypeDescriptor collectionJtd; + private final JavaType collectionJtd; private final AttributeClassification attributeClassification; private final CollectionClassification collectionClassification; @@ -43,7 +43,7 @@ public class PluralAttributeBuilder { private final Member member; public PluralAttributeBuilder( - JavaTypeDescriptor collectionJtd, + JavaType collectionJtd, AttributeClassification attributeClassification, CollectionClassification collectionClassification, SimpleDomainType elementType, @@ -65,7 +65,7 @@ public class PluralAttributeBuilder { PluralAttributeMetadata attributeMetadata, MetadataContext metadataContext) { - final JavaTypeDescriptor attributeJtd = metadataContext.getTypeConfiguration() + final JavaType attributeJtd = metadataContext.getTypeConfiguration() .getJavaTypeDescriptorRegistry() .getDescriptor( attributeMetadata.getJavaType() ); @@ -158,7 +158,7 @@ public class PluralAttributeBuilder { return listIndexOrMapKeyType; } - public JavaTypeDescriptor getCollectionJavaTypeDescriptor() { + public JavaType getCollectionJavaTypeDescriptor() { return collectionJtd; } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/SingularAttributeImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/SingularAttributeImpl.java index e56df6a82e..278796e523 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/SingularAttributeImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/SingularAttributeImpl.java @@ -26,7 +26,7 @@ import org.hibernate.query.sqm.tree.domain.SqmPath; import org.hibernate.query.sqm.tree.domain.SqmSingularJoin; import org.hibernate.query.sqm.tree.from.SqmAttributeJoin; import org.hibernate.query.sqm.tree.from.SqmFrom; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Emmanuel Bernard @@ -80,7 +80,7 @@ public class SingularAttributeImpl return getName(); } - public JavaTypeDescriptor getExpressableJavaTypeDescriptor() { + public JavaType getExpressableJavaTypeDescriptor() { return sqmPathSource.getExpressableJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/spi/EntityRepresentationStrategy.java b/hibernate-core/src/main/java/org/hibernate/metamodel/spi/EntityRepresentationStrategy.java index 17d3d803db..1e7524221c 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/spi/EntityRepresentationStrategy.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/spi/EntityRepresentationStrategy.java @@ -10,7 +10,7 @@ import java.util.function.Consumer; import org.hibernate.EntityNameResolver; import org.hibernate.proxy.ProxyFactory; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Specialization of ManagedTypeRepresentationStrategy for an entity type @@ -37,12 +37,12 @@ public interface EntityRepresentationStrategy extends ManagedTypeRepresentationS return false; } - JavaTypeDescriptor getProxyJavaTypeDescriptor(); + JavaType getProxyJavaTypeDescriptor(); /** * The Java type descriptor for the type returned when the entity is loaded */ - default JavaTypeDescriptor getLoadJavaTypeDescriptor() { + default JavaType getLoadJavaTypeDescriptor() { return getMappedJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/spi/ManagedTypeRepresentationStrategy.java b/hibernate-core/src/main/java/org/hibernate/metamodel/spi/ManagedTypeRepresentationStrategy.java index 05bb0f60a4..e6abbe5a35 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/spi/ManagedTypeRepresentationStrategy.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/spi/ManagedTypeRepresentationStrategy.java @@ -11,7 +11,7 @@ import org.hibernate.bytecode.spi.ReflectionOptimizer; import org.hibernate.mapping.Property; import org.hibernate.metamodel.RepresentationMode; import org.hibernate.property.access.spi.PropertyAccess; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Defines a singular extension point for capabilities pertaining to @@ -36,7 +36,7 @@ public interface ManagedTypeRepresentationStrategy { * The Java type descriptor for the concrete type. For dynamic-map models * this will return the JTD for java.util.Map */ - JavaTypeDescriptor getMappedJavaTypeDescriptor(); + JavaType getMappedJavaTypeDescriptor(); /** * Create the property accessor object for the specified attribute diff --git a/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java b/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java index 6040c29e37..46ced1dd27 100644 --- a/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java +++ b/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java @@ -153,7 +153,6 @@ import org.hibernate.metamodel.mapping.AttributeMapping; import org.hibernate.metamodel.mapping.AttributeMetadata; import org.hibernate.metamodel.mapping.AttributeMetadataAccess; import org.hibernate.metamodel.mapping.BasicValuedModelPart; -import org.hibernate.metamodel.mapping.CollectionPart; import org.hibernate.metamodel.mapping.EntityDiscriminatorMapping; import org.hibernate.metamodel.mapping.EntityIdentifierMapping; import org.hibernate.metamodel.mapping.EntityMappingType; @@ -258,7 +257,7 @@ import org.hibernate.type.CompositeType; import org.hibernate.type.EntityType; import org.hibernate.type.Type; import org.hibernate.type.TypeHelper; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.MutabilityPlan; import org.hibernate.type.spi.TypeConfiguration; @@ -4885,7 +4884,7 @@ public abstract class AbstractEntityPersister } public Class getConcreteProxyClass() { - final JavaTypeDescriptor proxyJavaTypeDescriptor = getRepresentationStrategy().getProxyJavaTypeDescriptor(); + final JavaType proxyJavaTypeDescriptor = getRepresentationStrategy().getProxyJavaTypeDescriptor(); return proxyJavaTypeDescriptor != null ? proxyJavaTypeDescriptor.getJavaTypeClass() : javaTypeDescriptor.getJavaTypeClass(); } @@ -5439,7 +5438,7 @@ public abstract class AbstractEntityPersister // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // org.hibernate.metamodel.mapping.EntityMappingType - private final JavaTypeDescriptor javaTypeDescriptor; + private final JavaType javaTypeDescriptor; private final EntityRepresentationStrategy representationStrategy; private EntityMappingType superMappingType; @@ -6017,7 +6016,7 @@ public abstract class AbstractEntityPersister ); } else if ( attrType instanceof AnyType ) { - final JavaTypeDescriptor baseAssociationJtd = sessionFactory + final JavaType baseAssociationJtd = sessionFactory .getTypeConfiguration() .getJavaTypeDescriptorRegistry() .getDescriptor( Object.class ); @@ -6128,7 +6127,7 @@ public abstract class AbstractEntityPersister } @Override - public JavaTypeDescriptor getMappedJavaTypeDescriptor() { + public JavaType getMappedJavaTypeDescriptor() { return javaTypeDescriptor; } diff --git a/hibernate-core/src/main/java/org/hibernate/persister/entity/DiscriminatorType.java b/hibernate-core/src/main/java/org/hibernate/persister/entity/DiscriminatorType.java index 9a87f631dd..45ed16e564 100644 --- a/hibernate-core/src/main/java/org/hibernate/persister/entity/DiscriminatorType.java +++ b/hibernate-core/src/main/java/org/hibernate/persister/entity/DiscriminatorType.java @@ -28,7 +28,7 @@ import org.hibernate.type.descriptor.ValueBinder; import org.hibernate.type.descriptor.ValueExtractor; import org.hibernate.type.descriptor.WrapperOptions; import org.hibernate.type.descriptor.java.ClassJavaTypeDescriptor; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.StringJavaTypeDescriptor; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; @@ -231,19 +231,19 @@ public class DiscriminatorType extends AbstractType implements BasicType, } @Override - public JavaTypeDescriptor getExpressableJavaTypeDescriptor() { - return (JavaTypeDescriptor) ( EntityMode.POJO == persister.getEntityMode() ? + public JavaType getExpressableJavaTypeDescriptor() { + return (JavaType) ( EntityMode.POJO == persister.getEntityMode() ? ClassJavaTypeDescriptor.INSTANCE : StringJavaTypeDescriptor.INSTANCE ); } @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { + public JavaType getJavaTypeDescriptor() { return getExpressableJavaTypeDescriptor(); } @Override - public JavaTypeDescriptor getMappedJavaTypeDescriptor() { + public JavaType getMappedJavaTypeDescriptor() { return getExpressableJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/persister/entity/EntityPersister.java b/hibernate-core/src/main/java/org/hibernate/persister/entity/EntityPersister.java index dcec5233dd..a33508bcda 100644 --- a/hibernate-core/src/main/java/org/hibernate/persister/entity/EntityPersister.java +++ b/hibernate-core/src/main/java/org/hibernate/persister/entity/EntityPersister.java @@ -50,7 +50,7 @@ import org.hibernate.tuple.entity.EntityMetamodel; import org.hibernate.tuple.entity.EntityTuplizer; import org.hibernate.type.BasicType; import org.hibernate.type.Type; -import org.hibernate.type.descriptor.java.VersionJavaTypeDescriptor; +import org.hibernate.type.descriptor.java.VersionJavaType; /** * Contract describing mapping information and persistence logic for a particular strategy of entity mapping. A given @@ -367,12 +367,12 @@ public interface EntityPersister */ BasicType getVersionType(); - default VersionJavaTypeDescriptor getVersionJavaTypeDescriptor() { + default VersionJavaType getVersionJavaTypeDescriptor() { final BasicType versionType = getVersionType(); //noinspection unchecked return versionType == null ? null - : (VersionJavaTypeDescriptor) versionType.getJavaTypeDescriptor(); + : (VersionJavaType) versionType.getJavaTypeDescriptor(); } /** diff --git a/hibernate-core/src/main/java/org/hibernate/persister/entity/JoinedSubclassEntityPersister.java b/hibernate-core/src/main/java/org/hibernate/persister/entity/JoinedSubclassEntityPersister.java index d06b83acc8..bb7e8d4657 100644 --- a/hibernate-core/src/main/java/org/hibernate/persister/entity/JoinedSubclassEntityPersister.java +++ b/hibernate-core/src/main/java/org/hibernate/persister/entity/JoinedSubclassEntityPersister.java @@ -68,7 +68,7 @@ import org.hibernate.type.BasicType; import org.hibernate.type.CompositeType; import org.hibernate.type.StandardBasicTypes; import org.hibernate.type.Type; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.jboss.logging.Logger; @@ -194,7 +194,7 @@ public class JoinedSubclassEntityPersister extends AbstractEntityPersister { else { try { discriminatorValue = discriminatorType.getJavaTypeDescriptor().fromString( persistentClass.getDiscriminatorValue() ); - discriminatorSQLString = discriminatorType.getJdbcTypeDescriptor().getJdbcLiteralFormatter( (JavaTypeDescriptor) discriminatorType.getJavaTypeDescriptor() ) + discriminatorSQLString = discriminatorType.getJdbcTypeDescriptor().getJdbcLiteralFormatter( (JavaType) discriminatorType.getJavaTypeDescriptor() ) .toJdbcLiteral( discriminatorValue, factory.getJdbcServices().getDialect(), diff --git a/hibernate-core/src/main/java/org/hibernate/persister/entity/SingleTableEntityPersister.java b/hibernate-core/src/main/java/org/hibernate/persister/entity/SingleTableEntityPersister.java index af04d3f9f0..4afc60d1fd 100644 --- a/hibernate-core/src/main/java/org/hibernate/persister/entity/SingleTableEntityPersister.java +++ b/hibernate-core/src/main/java/org/hibernate/persister/entity/SingleTableEntityPersister.java @@ -62,7 +62,7 @@ import org.hibernate.sql.ast.tree.predicate.Predicate; import org.hibernate.type.AssociationType; import org.hibernate.type.BasicType; import org.hibernate.type.Type; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * The default implementation of the EntityPersister interface. @@ -340,7 +340,7 @@ public class SingleTableEntityPersister extends AbstractEntityPersister { discriminatorInsertable = persistentClass.isDiscriminatorInsertable() && !discrimValue.hasFormula(); try { discriminatorValue = discriminatorType.getJavaTypeDescriptor().fromString( persistentClass.getDiscriminatorValue() ); - discriminatorSQLValue = discriminatorType.getJdbcTypeDescriptor().getJdbcLiteralFormatter( (JavaTypeDescriptor) discriminatorType.getJavaTypeDescriptor() ) + discriminatorSQLValue = discriminatorType.getJdbcTypeDescriptor().getJdbcLiteralFormatter( (JavaType) discriminatorType.getJavaTypeDescriptor() ) .toJdbcLiteral( discriminatorValue, factory.getJdbcServices().getDialect(), diff --git a/hibernate-core/src/main/java/org/hibernate/procedure/internal/FunctionReturnImpl.java b/hibernate-core/src/main/java/org/hibernate/procedure/internal/FunctionReturnImpl.java index 65d0ee0b12..759bed1a75 100644 --- a/hibernate-core/src/main/java/org/hibernate/procedure/internal/FunctionReturnImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/procedure/internal/FunctionReturnImpl.java @@ -21,7 +21,7 @@ import org.hibernate.sql.exec.internal.JdbcCallFunctionReturnImpl; import org.hibernate.sql.exec.internal.JdbcCallParameterExtractorImpl; import org.hibernate.sql.exec.internal.JdbcCallRefCursorExtractorImpl; import org.hibernate.sql.exec.spi.JdbcCallFunctionReturn; -import org.hibernate.type.descriptor.java.BasicJavaTypeDescriptor; +import org.hibernate.type.descriptor.java.BasicJavaType; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; import org.hibernate.type.spi.TypeConfiguration; @@ -62,7 +62,7 @@ public class FunctionReturnImpl implements FunctionReturnImplementor { final TypeConfiguration typeConfiguration = persistenceContext.getFactory().getMetamodel().getTypeConfiguration(); final JdbcTypeDescriptor sqlTypeDescriptor = typeConfiguration.getJdbcTypeDescriptorRegistry() .getDescriptor( getJdbcTypeCode() ); - final BasicJavaTypeDescriptor javaTypeMapping = sqlTypeDescriptor + final BasicJavaType javaTypeMapping = sqlTypeDescriptor .getJdbcRecommendedJavaTypeMapping( null, null, typeConfiguration ); ormType = typeConfiguration.standardBasicTypeForJavaType( javaTypeMapping.getJavaType().getClass() ); parameterExtractor = new JdbcCallParameterExtractorImpl( procedureCall.getProcedureName(), null, 0, ormType ); diff --git a/hibernate-core/src/main/java/org/hibernate/procedure/internal/ScalarDomainResultBuilder.java b/hibernate-core/src/main/java/org/hibernate/procedure/internal/ScalarDomainResultBuilder.java index d4d8291721..833541f210 100644 --- a/hibernate-core/src/main/java/org/hibernate/procedure/internal/ScalarDomainResultBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/procedure/internal/ScalarDomainResultBuilder.java @@ -14,15 +14,15 @@ import org.hibernate.sql.results.graph.DomainResult; import org.hibernate.sql.results.graph.DomainResultCreationState; import org.hibernate.sql.results.graph.basic.BasicResult; import org.hibernate.sql.results.jdbc.spi.JdbcValuesMetadata; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole */ public class ScalarDomainResultBuilder implements ResultBuilder { - private final JavaTypeDescriptor typeDescriptor; + private final JavaType typeDescriptor; - public ScalarDomainResultBuilder(JavaTypeDescriptor typeDescriptor) { + public ScalarDomainResultBuilder(JavaType typeDescriptor) { this.typeDescriptor = typeDescriptor; } diff --git a/hibernate-core/src/main/java/org/hibernate/procedure/internal/Util.java b/hibernate-core/src/main/java/org/hibernate/procedure/internal/Util.java index d5a0ae5ac4..486af52a09 100644 --- a/hibernate-core/src/main/java/org/hibernate/procedure/internal/Util.java +++ b/hibernate-core/src/main/java/org/hibernate/procedure/internal/Util.java @@ -15,7 +15,7 @@ import org.hibernate.query.internal.ResultSetMappingResolutionContext; import org.hibernate.query.named.NamedObjectRepository; import org.hibernate.query.named.NamedResultSetMappingMemento; import org.hibernate.query.results.ResultSetMapping; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.spi.JavaTypeDescriptorRegistry; import org.jboss.logging.Logger; @@ -85,7 +85,7 @@ public class Util { } } else { - final JavaTypeDescriptor basicType = javaTypeDescriptorRegistry.getDescriptor( + final JavaType basicType = javaTypeDescriptorRegistry.getDescriptor( resultSetMappingClass ); if ( basicType != null ) { resultSetMapping.addResultBuilder( new ScalarDomainResultBuilder<>( basicType ) ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/criteria/JpaTupleElement.java b/hibernate-core/src/main/java/org/hibernate/query/criteria/JpaTupleElement.java index 47d7167a3c..5324d4164c 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/criteria/JpaTupleElement.java +++ b/hibernate-core/src/main/java/org/hibernate/query/criteria/JpaTupleElement.java @@ -8,7 +8,7 @@ package org.hibernate.query.criteria; import jakarta.persistence.TupleElement; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * API extension to the JPA {@link TupleElement} contract @@ -16,7 +16,7 @@ import org.hibernate.type.descriptor.java.JavaTypeDescriptor; * @author Steve Ebersole */ public interface JpaTupleElement extends TupleElement, JpaCriteriaNode { - JavaTypeDescriptor getJavaTypeDescriptor(); + JavaType getJavaTypeDescriptor(); @Override default Class getJavaType() { diff --git a/hibernate-core/src/main/java/org/hibernate/query/hql/internal/BasicDotIdentifierConsumer.java b/hibernate-core/src/main/java/org/hibernate/query/hql/internal/BasicDotIdentifierConsumer.java index 0cf6c0e772..28f319e7d6 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/hql/internal/BasicDotIdentifierConsumer.java +++ b/hibernate-core/src/main/java/org/hibernate/query/hql/internal/BasicDotIdentifierConsumer.java @@ -16,7 +16,6 @@ import org.hibernate.query.hql.spi.SemanticPathPart; import org.hibernate.query.hql.spi.SqmCreationState; import org.hibernate.query.hql.spi.SqmPathRegistry; import org.hibernate.query.sqm.ParsingException; -import org.hibernate.query.sqm.SqmPathSource; import org.hibernate.query.sqm.function.SqmFunctionDescriptor; import org.hibernate.query.sqm.spi.SqmCreationContext; import org.hibernate.query.sqm.tree.domain.SqmPath; @@ -26,7 +25,7 @@ import org.hibernate.query.sqm.tree.expression.SqmFieldLiteral; import org.hibernate.query.sqm.tree.expression.SqmLiteralEntityType; import org.hibernate.query.sqm.tree.from.SqmFrom; import org.hibernate.type.descriptor.java.EnumJavaTypeDescriptor; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.spi.JavaTypeDescriptorRegistry; /** @@ -233,7 +232,7 @@ public class BasicDotIdentifierConsumer implements DotIdentifierConsumer { try { final Field referencedField = namedClass.getDeclaredField( terminal ); if ( referencedField != null ) { - final JavaTypeDescriptor fieldJtd = javaTypeDescriptorRegistry + final JavaType fieldJtd = javaTypeDescriptorRegistry .getDescriptor( referencedField.getType() ); //noinspection unchecked return new SqmFieldLiteral( referencedField, fieldJtd, creationContext.getNodeBuilder() ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/hql/internal/FullyQualifiedReflectivePathTerminal.java b/hibernate-core/src/main/java/org/hibernate/query/hql/internal/FullyQualifiedReflectivePathTerminal.java index 7c813ed866..23a4874df1 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/hql/internal/FullyQualifiedReflectivePathTerminal.java +++ b/hibernate-core/src/main/java/org/hibernate/query/hql/internal/FullyQualifiedReflectivePathTerminal.java @@ -29,7 +29,7 @@ import org.hibernate.query.sqm.tree.expression.SqmFieldLiteral; import org.hibernate.query.sqm.tree.expression.SqmLiteralEntityType; import org.hibernate.query.sqm.tree.predicate.SqmPredicate; import org.hibernate.type.descriptor.java.EnumJavaTypeDescriptor; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole @@ -135,7 +135,7 @@ public class FullyQualifiedReflectivePathTerminal } @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { + public JavaType getJavaTypeDescriptor() { return expressableType.getExpressableJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/hql/internal/QuerySplitter.java b/hibernate-core/src/main/java/org/hibernate/query/hql/internal/QuerySplitter.java index 5881fbc426..386c5a3641 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/hql/internal/QuerySplitter.java +++ b/hibernate-core/src/main/java/org/hibernate/query/hql/internal/QuerySplitter.java @@ -73,7 +73,7 @@ import org.hibernate.query.sqm.tree.select.SqmSubQuery; import org.hibernate.query.sqm.tree.update.SqmAssignment; import org.hibernate.query.sqm.tree.update.SqmSetClause; import org.hibernate.query.sqm.tree.update.SqmUpdateStatement; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Handles splitting queries containing unmapped polymorphic references. @@ -467,14 +467,14 @@ public class QuerySplitter { switch ( instantiationTarget.getNature() ) { case MAP: { copy = SqmDynamicInstantiation.forMapInstantiation( - (JavaTypeDescriptor>) instantiationTarget.getTargetTypeDescriptor(), + (JavaType>) instantiationTarget.getTargetTypeDescriptor(), getCreationContext().getNodeBuilder() ); break; } case LIST: { copy = SqmDynamicInstantiation.forListInstantiation( - (JavaTypeDescriptor>) instantiationTarget.getTargetTypeDescriptor(), + (JavaType>) instantiationTarget.getTargetTypeDescriptor(), getCreationContext().getNodeBuilder() ); break; diff --git a/hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java b/hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java index 9863723920..39b76731ec 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java @@ -41,7 +41,6 @@ import org.hibernate.grammars.hql.HqlLexer; import org.hibernate.grammars.hql.HqlParser; import org.hibernate.grammars.hql.HqlParserBaseVisitor; import org.hibernate.internal.util.CharSequenceHelper; -import org.hibernate.internal.util.StringHelper; import org.hibernate.internal.util.collections.Stack; import org.hibernate.internal.util.collections.StandardStack; import org.hibernate.metamodel.CollectionClassification; @@ -183,8 +182,7 @@ import org.hibernate.query.sqm.tree.select.SqmSubQuery; import org.hibernate.query.sqm.tree.update.SqmUpdateStatement; import org.hibernate.sql.ast.SqlAstNodeRenderingMode; import org.hibernate.type.BasicType; -import org.hibernate.type.StandardBasicTypes; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.PrimitiveByteArrayJavaTypeDescriptor; import org.jboss.logging.Logger; @@ -280,8 +278,8 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem private final Stack processingStateStack = new StandardStack<>(); private final BasicDomainType integerDomainType; - private final JavaTypeDescriptor> listJavaTypeDescriptor; - private final JavaTypeDescriptor> mapJavaTypeDescriptor; + private final JavaType> listJavaTypeDescriptor; + private final JavaType> mapJavaTypeDescriptor; private ParameterCollector parameterCollector; @@ -1007,7 +1005,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem if ( instantiationTarget instanceof HqlParser.DotIdentifierSequenceContext ) { final String className = instantiationTarget.getText(); try { - final JavaTypeDescriptor jtd = resolveInstantiationTargetJtd( className ); + final JavaType jtd = resolveInstantiationTargetJtd( className ); dynamicInstantiation = SqmDynamicInstantiation.forClassInstantiation( jtd, creationContext.getNodeBuilder() @@ -1044,7 +1042,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem return dynamicInstantiation; } - private JavaTypeDescriptor resolveInstantiationTargetJtd(String className) { + private JavaType resolveInstantiationTargetJtd(String className) { final Class targetJavaType = classForName( creationContext.getJpaMetamodel().qualifyImportableName( className ) ); return creationContext.getJpaMetamodel() .getTypeConfiguration() diff --git a/hibernate-core/src/main/java/org/hibernate/query/internal/QueryParameterBindingImpl.java b/hibernate-core/src/main/java/org/hibernate/query/internal/QueryParameterBindingImpl.java index f0086e736b..ea6b98c90c 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/internal/QueryParameterBindingImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/query/internal/QueryParameterBindingImpl.java @@ -19,7 +19,7 @@ import org.hibernate.query.spi.QueryParameterBinding; import org.hibernate.query.spi.QueryParameterBindingTypeResolver; import org.hibernate.query.spi.QueryParameterBindingValidator; import org.hibernate.type.descriptor.java.CoercionException; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.spi.TypeConfiguration; /** @@ -27,7 +27,7 @@ import org.hibernate.type.spi.TypeConfiguration; * * @author Steve Ebersole */ -public class QueryParameterBindingImpl implements QueryParameterBinding, JavaTypeDescriptor.CoercionContext { +public class QueryParameterBindingImpl implements QueryParameterBinding, JavaType.CoercionContext { private final QueryParameter queryParameter; private final QueryParameterBindingTypeResolver typeResolver; private final boolean isBindingValidationRequired; diff --git a/hibernate-core/src/main/java/org/hibernate/query/internal/QueryParameterBindingsImpl.java b/hibernate-core/src/main/java/org/hibernate/query/internal/QueryParameterBindingsImpl.java index c487d30cf1..822fc039ca 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/internal/QueryParameterBindingsImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/query/internal/QueryParameterBindingsImpl.java @@ -13,7 +13,6 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.function.BiConsumer; -import java.util.function.BiFunction; import org.hibernate.Incubating; import org.hibernate.QueryException; @@ -22,14 +21,12 @@ import org.hibernate.cache.spi.QueryKey; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.metamodel.mapping.MappingModelExpressable; -import org.hibernate.metamodel.model.domain.AllowableParameterType; import org.hibernate.query.QueryParameter; import org.hibernate.query.spi.ParameterMetadataImplementor; import org.hibernate.query.spi.QueryParameterBinding; import org.hibernate.query.spi.QueryParameterBindings; import org.hibernate.query.spi.QueryParameterImplementor; -import org.hibernate.query.sqm.tree.expression.SqmParameter; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.JavaTypedExpressable; import org.hibernate.type.spi.TypeConfiguration; @@ -244,7 +241,7 @@ public class QueryParameterBindingsImpl implements QueryParameterBindings { if ( binding.getBindType() instanceof JavaTypedExpressable ) { final JavaTypedExpressable javaTypedExpressable = (JavaTypedExpressable) binding.getBindType(); - final JavaTypeDescriptor jtd = javaTypedExpressable.getExpressableJavaTypeDescriptor(); + final JavaType jtd = javaTypedExpressable.getExpressableJavaTypeDescriptor(); if ( jtd.getJavaTypeClass() != null ) { // avoid dynamic models return typeConfiguration.getBasicTypeForJavaType( jtd.getJavaTypeClass() ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/internal/ResultMementoBasicStandard.java b/hibernate-core/src/main/java/org/hibernate/query/internal/ResultMementoBasicStandard.java index 4fe037f7e2..31b3e15e8e 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/internal/ResultMementoBasicStandard.java +++ b/hibernate-core/src/main/java/org/hibernate/query/internal/ResultMementoBasicStandard.java @@ -17,7 +17,7 @@ import org.hibernate.resource.beans.spi.ManagedBean; import org.hibernate.resource.beans.spi.ManagedBeanRegistry; import org.hibernate.type.BasicType; import org.hibernate.type.CustomType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.spi.JavaTypeDescriptorRegistry; import org.hibernate.type.spi.TypeConfiguration; import org.hibernate.usertype.UserType; @@ -54,7 +54,7 @@ public class ResultMementoBasicStandard implements ResultMementoBasic { public final String explicitColumnName; private final BasicType explicitType; - private final JavaTypeDescriptor explicitJavaTypeDescriptor; + private final JavaType explicitJavaTypeDescriptor; /** * Creation of ScalarResultMappingMemento for JPA descriptor @@ -82,7 +82,7 @@ public class ResultMementoBasicStandard implements ResultMementoBasic { } else { final JavaTypeDescriptorRegistry jtdRegistry = typeConfiguration.getJavaTypeDescriptorRegistry(); - final JavaTypeDescriptor registeredJtd = jtdRegistry.getDescriptor( definition.type() ); + final JavaType registeredJtd = jtdRegistry.getDescriptor( definition.type() ); final ManagedBeanRegistry beanRegistry = sessionFactory.getServiceRegistry().getService( ManagedBeanRegistry.class ); if ( BasicType.class.isAssignableFrom( registeredJtd.getJavaTypeClass() ) ) { final ManagedBean> typeBean = (ManagedBean) beanRegistry.getBean( registeredJtd.getJavaTypeClass() ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/internal/ResultMementoInstantiationStandard.java b/hibernate-core/src/main/java/org/hibernate/query/internal/ResultMementoInstantiationStandard.java index abd58f44b5..c2419ac2c6 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/internal/ResultMementoInstantiationStandard.java +++ b/hibernate-core/src/main/java/org/hibernate/query/internal/ResultMementoInstantiationStandard.java @@ -13,18 +13,18 @@ import org.hibernate.internal.util.collections.CollectionHelper; import org.hibernate.query.named.ResultMementoInstantiation; import org.hibernate.query.results.ResultBuilder; import org.hibernate.query.results.complete.CompleteResultBuilderInstantiation; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole */ public class ResultMementoInstantiationStandard implements ResultMementoInstantiation { - private final JavaTypeDescriptor instantiatedJtd; + private final JavaType instantiatedJtd; private final List argumentMementos; public ResultMementoInstantiationStandard( - JavaTypeDescriptor instantiatedJtd, + JavaType instantiatedJtd, List argumentMementos) { this.instantiatedJtd = instantiatedJtd; this.argumentMementos = argumentMementos; diff --git a/hibernate-core/src/main/java/org/hibernate/query/named/ResultMementoBasic.java b/hibernate-core/src/main/java/org/hibernate/query/named/ResultMementoBasic.java index c47ddb9852..3637bdf605 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/named/ResultMementoBasic.java +++ b/hibernate-core/src/main/java/org/hibernate/query/named/ResultMementoBasic.java @@ -10,8 +10,6 @@ import java.util.function.Consumer; import org.hibernate.query.internal.ResultSetMappingResolutionContext; import org.hibernate.query.results.ResultBuilderBasicValued; -import org.hibernate.type.BasicType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; /** * @author Steve Ebersole diff --git a/hibernate-core/src/main/java/org/hibernate/query/results/Builders.java b/hibernate-core/src/main/java/org/hibernate/query/results/Builders.java index 0561b30aee..f44f2e3873 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/results/Builders.java +++ b/hibernate-core/src/main/java/org/hibernate/query/results/Builders.java @@ -47,7 +47,7 @@ import org.hibernate.sql.results.graph.Fetchable; import org.hibernate.sql.results.graph.collection.internal.EntityCollectionPartTableGroup; import org.hibernate.sql.results.graph.embeddable.EmbeddableValuedFetchable; import org.hibernate.type.BasicType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole @@ -81,7 +81,7 @@ public class Builders { String resultAlias, Class javaType, SessionFactoryImplementor factory) { - final JavaTypeDescriptor javaTypeDescriptor = factory.getTypeConfiguration() + final JavaType javaTypeDescriptor = factory.getTypeConfiguration() .getJavaTypeDescriptorRegistry() .getDescriptor( javaType ); @@ -133,7 +133,7 @@ public class Builders { } public static DynamicResultBuilderInstantiation instantiation(Class targetJavaType, SessionFactoryImplementor factory) { - final JavaTypeDescriptor targetJtd = factory.getTypeConfiguration() + final JavaType targetJtd = factory.getTypeConfiguration() .getJavaTypeDescriptorRegistry() .getDescriptor( targetJavaType ); return new DynamicResultBuilderInstantiation<>( targetJtd ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/results/DomainResultCreationStateImpl.java b/hibernate-core/src/main/java/org/hibernate/query/results/DomainResultCreationStateImpl.java index 8846da30ff..58567dd6aa 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/results/DomainResultCreationStateImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/query/results/DomainResultCreationStateImpl.java @@ -48,7 +48,7 @@ import org.hibernate.sql.results.graph.FetchParent; import org.hibernate.sql.results.graph.Fetchable; import org.hibernate.sql.results.graph.FetchableContainer; import org.hibernate.sql.results.jdbc.spi.JdbcValuesMetadata; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.spi.TypeConfiguration; import static org.hibernate.query.results.ResultsHelper.attributeName; @@ -286,7 +286,7 @@ public class DomainResultCreationStateImpl @Override public SqlSelection resolveSqlSelection( Expression expression, - JavaTypeDescriptor javaTypeDescriptor, + JavaType javaTypeDescriptor, TypeConfiguration typeConfiguration) { if ( expression == null ) { throw new IllegalArgumentException( "Expression cannot be null" ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/results/SqlSelectionImpl.java b/hibernate-core/src/main/java/org/hibernate/query/results/SqlSelectionImpl.java index 9e238ff6ce..b3126caffb 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/results/SqlSelectionImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/query/results/SqlSelectionImpl.java @@ -14,7 +14,7 @@ import org.hibernate.sql.ast.spi.SqlExpressionAccess; import org.hibernate.sql.ast.spi.SqlSelection; import org.hibernate.sql.ast.tree.expression.Expression; import org.hibernate.type.descriptor.ValueExtractor; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.spi.TypeConfiguration; /** @@ -50,7 +50,7 @@ public class SqlSelectionImpl implements SqlSelection, Expression, SqlExpression public SqlSelection createSqlSelection( int jdbcPosition, int valuesArrayPosition, - JavaTypeDescriptor javaTypeDescriptor, + JavaType javaTypeDescriptor, TypeConfiguration typeConfiguration) { return this; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/results/complete/CompleteResultBuilderBasicValuedStandard.java b/hibernate-core/src/main/java/org/hibernate/query/results/complete/CompleteResultBuilderBasicValuedStandard.java index 3d2080cf03..c7d83cb2e0 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/results/complete/CompleteResultBuilderBasicValuedStandard.java +++ b/hibernate-core/src/main/java/org/hibernate/query/results/complete/CompleteResultBuilderBasicValuedStandard.java @@ -18,7 +18,7 @@ import org.hibernate.sql.ast.spi.SqlSelection; import org.hibernate.sql.results.graph.DomainResultCreationState; import org.hibernate.sql.results.graph.basic.BasicResult; import org.hibernate.sql.results.jdbc.spi.JdbcValuesMetadata; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import static org.hibernate.query.results.ResultsHelper.impl; @@ -35,12 +35,12 @@ public class CompleteResultBuilderBasicValuedStandard implements CompleteResultB private final String explicitColumnName; private final BasicValuedMapping explicitType; - private final JavaTypeDescriptor explicitJavaTypeDescriptor; + private final JavaType explicitJavaTypeDescriptor; public CompleteResultBuilderBasicValuedStandard( String explicitColumnName, BasicValuedMapping explicitType, - JavaTypeDescriptor explicitJavaTypeDescriptor) { + JavaType explicitJavaTypeDescriptor) { assert explicitType == null || explicitType.getJdbcMapping() .getJavaTypeDescriptor() .getJavaTypeClass() diff --git a/hibernate-core/src/main/java/org/hibernate/query/results/complete/CompleteResultBuilderInstantiation.java b/hibernate-core/src/main/java/org/hibernate/query/results/complete/CompleteResultBuilderInstantiation.java index 5deb54aa46..d05504d994 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/results/complete/CompleteResultBuilderInstantiation.java +++ b/hibernate-core/src/main/java/org/hibernate/query/results/complete/CompleteResultBuilderInstantiation.java @@ -19,7 +19,7 @@ import org.hibernate.sql.results.graph.DomainResultCreationState; import org.hibernate.sql.results.graph.instantiation.internal.ArgumentDomainResult; import org.hibernate.sql.results.graph.instantiation.internal.DynamicInstantiationResultImpl; import org.hibernate.sql.results.jdbc.spi.JdbcValuesMetadata; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * ResultBuilder for dynamic instantiation results ({@link jakarta.persistence.ConstructorResult} @@ -29,11 +29,11 @@ import org.hibernate.type.descriptor.java.JavaTypeDescriptor; public class CompleteResultBuilderInstantiation implements CompleteResultBuilder, ResultBuilderInstantiationValued { - private final JavaTypeDescriptor javaTypeDescriptor; + private final JavaType javaTypeDescriptor; private final List argumentResultBuilders; public CompleteResultBuilderInstantiation( - JavaTypeDescriptor javaTypeDescriptor, + JavaType javaTypeDescriptor, List argumentResultBuilders) { this.javaTypeDescriptor = javaTypeDescriptor; this.argumentResultBuilders = argumentResultBuilders; diff --git a/hibernate-core/src/main/java/org/hibernate/query/results/dynamic/DynamicResultBuilderBasicConverted.java b/hibernate-core/src/main/java/org/hibernate/query/results/dynamic/DynamicResultBuilderBasicConverted.java index 6d1ac84f44..07f1bdab16 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/results/dynamic/DynamicResultBuilderBasicConverted.java +++ b/hibernate-core/src/main/java/org/hibernate/query/results/dynamic/DynamicResultBuilderBasicConverted.java @@ -24,7 +24,7 @@ import org.hibernate.sql.results.graph.DomainResultCreationState; import org.hibernate.sql.results.graph.basic.BasicResult; import org.hibernate.sql.results.jdbc.spi.JdbcValuesMetadata; import org.hibernate.type.BasicType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.spi.JavaTypeDescriptorRegistry; import org.hibernate.type.spi.TypeConfiguration; @@ -36,8 +36,8 @@ import org.hibernate.type.spi.TypeConfiguration; public class DynamicResultBuilderBasicConverted implements DynamicResultBuilderBasic { private final String columnAlias; - private final JavaTypeDescriptor domainJtd; - private final JavaTypeDescriptor jdbcJtd; + private final JavaType domainJtd; + private final JavaType jdbcJtd; private final BasicValueConverter basicValueConverter; @@ -55,7 +55,7 @@ public class DynamicResultBuilderBasicConverted implements DynamicResultBui this.jdbcJtd = jtdRegistry.getDescriptor( jdbcJavaType ); - final JavaTypeDescriptor converterJtd = jtdRegistry.getDescriptor( converter.getClass() ); + final JavaType converterJtd = jtdRegistry.getDescriptor( converter.getClass() ); final ManagedBean> bean = new ProvidedInstanceManagedBeanImpl<>( converter ); this.basicValueConverter = new JpaAttributeConverterImpl( @@ -81,7 +81,7 @@ public class DynamicResultBuilderBasicConverted implements DynamicResultBui this.jdbcJtd = jtdRegistry.getDescriptor( jdbcJavaType ); - final JavaTypeDescriptor> converterJtd = jtdRegistry.getDescriptor( converterJavaType ); + final JavaType> converterJtd = jtdRegistry.getDescriptor( converterJavaType ); final ManagedBean> bean = beans.getBean( converterJavaType ); this.basicValueConverter = new JpaAttributeConverterImpl( diff --git a/hibernate-core/src/main/java/org/hibernate/query/results/dynamic/DynamicResultBuilderBasicStandard.java b/hibernate-core/src/main/java/org/hibernate/query/results/dynamic/DynamicResultBuilderBasicStandard.java index 4de6c5ee81..de114ec73a 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/results/dynamic/DynamicResultBuilderBasicStandard.java +++ b/hibernate-core/src/main/java/org/hibernate/query/results/dynamic/DynamicResultBuilderBasicStandard.java @@ -19,7 +19,7 @@ import org.hibernate.sql.results.graph.DomainResultCreationState; import org.hibernate.sql.results.graph.basic.BasicResult; import org.hibernate.sql.results.jdbc.spi.JdbcValuesMetadata; import org.hibernate.type.BasicType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Standard DynamicResultBuilder for basic values. @@ -34,7 +34,7 @@ public class DynamicResultBuilderBasicStandard implements DynamicResultBuilderBa private final String resultAlias; private final BasicType explicitType; - private final JavaTypeDescriptor explicitJavaTypeDescriptor; + private final JavaType explicitJavaTypeDescriptor; public DynamicResultBuilderBasicStandard(String columnName, String resultAlias) { assert columnName != null; @@ -56,7 +56,7 @@ public class DynamicResultBuilderBasicStandard implements DynamicResultBuilderBa this.explicitJavaTypeDescriptor = null; } - public DynamicResultBuilderBasicStandard(String columnName, String resultAlias, JavaTypeDescriptor explicitJavaTypeDescriptor) { + public DynamicResultBuilderBasicStandard(String columnName, String resultAlias, JavaType explicitJavaTypeDescriptor) { assert columnName != null; this.columnName = columnName; this.columnPosition = 0; @@ -142,7 +142,7 @@ public class DynamicResultBuilderBasicStandard implements DynamicResultBuilderBa } ); - final JavaTypeDescriptor javaTypeDescriptor; + final JavaType javaTypeDescriptor; if ( explicitJavaTypeDescriptor != null ) { javaTypeDescriptor = explicitJavaTypeDescriptor; diff --git a/hibernate-core/src/main/java/org/hibernate/query/results/dynamic/DynamicResultBuilderInstantiation.java b/hibernate-core/src/main/java/org/hibernate/query/results/dynamic/DynamicResultBuilderInstantiation.java index 4f2f3ed26f..93ad041403 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/results/dynamic/DynamicResultBuilderInstantiation.java +++ b/hibernate-core/src/main/java/org/hibernate/query/results/dynamic/DynamicResultBuilderInstantiation.java @@ -19,7 +19,7 @@ import org.hibernate.sql.results.graph.DomainResultCreationState; import org.hibernate.sql.results.graph.instantiation.internal.ArgumentDomainResult; import org.hibernate.sql.results.graph.instantiation.internal.DynamicInstantiationResultImpl; import org.hibernate.sql.results.jdbc.spi.JdbcValuesMetadata; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole @@ -37,10 +37,10 @@ public class DynamicResultBuilderInstantiation } } - private final JavaTypeDescriptor javaTypeDescriptor; + private final JavaType javaTypeDescriptor; private final List argumentResultBuilders = new ArrayList<>(); - public DynamicResultBuilderInstantiation(JavaTypeDescriptor javaTypeDescriptor) { + public DynamicResultBuilderInstantiation(JavaType javaTypeDescriptor) { this.javaTypeDescriptor = javaTypeDescriptor; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/spi/AbstractQuery.java b/hibernate-core/src/main/java/org/hibernate/query/spi/AbstractQuery.java index 81c71e5787..89f3feaa42 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/spi/AbstractQuery.java +++ b/hibernate-core/src/main/java/org/hibernate/query/spi/AbstractQuery.java @@ -65,7 +65,7 @@ import org.hibernate.query.internal.ScrollableResultsIterator; import org.hibernate.query.named.NamedQueryMemento; import org.hibernate.type.BasicType; import org.hibernate.type.BasicTypeReference; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import static org.hibernate.LockMode.UPGRADE; import static org.hibernate.LockOptions.NONE; @@ -1143,7 +1143,7 @@ public abstract class AbstractQuery implements QueryImplementor { @Override @SuppressWarnings( {"unchecked", "rawtypes"} ) public QueryImplementor setParameterList(String name, Collection values, Class javaType) { - final JavaTypeDescriptor javaDescriptor = getSession().getFactory() + final JavaType javaDescriptor = getSession().getFactory() .getTypeConfiguration() .getJavaTypeDescriptorRegistry() .getDescriptor( javaType ); @@ -1178,7 +1178,7 @@ public abstract class AbstractQuery implements QueryImplementor { @Override @SuppressWarnings( {"unchecked", "rawtypes"} ) public QueryImplementor setParameterList(int position, Collection values, Class javaType) { - final JavaTypeDescriptor javaDescriptor = getSession().getFactory() + final JavaType javaDescriptor = getSession().getFactory() .getTypeConfiguration() .getJavaTypeDescriptorRegistry() .getDescriptor( javaType ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/spi/QueryParameterBindingValidator.java b/hibernate-core/src/main/java/org/hibernate/query/spi/QueryParameterBindingValidator.java index 60361505b6..8b8a284553 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/spi/QueryParameterBindingValidator.java +++ b/hibernate-core/src/main/java/org/hibernate/query/spi/QueryParameterBindingValidator.java @@ -11,11 +11,9 @@ import java.util.Collection; import java.util.Date; import jakarta.persistence.TemporalType; -import org.hibernate.metamodel.mapping.ConvertibleModelPart; -import org.hibernate.metamodel.model.convert.spi.BasicValueConverter; import org.hibernate.metamodel.model.domain.AllowableParameterType; import org.hibernate.type.descriptor.converter.AttributeConverterTypeAdapter; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Andrea Boriero @@ -39,7 +37,7 @@ public class QueryParameterBindingValidator { if ( paramType instanceof AttributeConverterTypeAdapter ) { final AttributeConverterTypeAdapter converterTypeAdapter = (AttributeConverterTypeAdapter) paramType; - final JavaTypeDescriptor domainJtd = converterTypeAdapter.getDomainJtd(); + final JavaType domainJtd = converterTypeAdapter.getDomainJtd(); if ( domainJtd.getJavaTypeClass().isInstance( bind ) ) { return; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/SqmExpressable.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/SqmExpressable.java index 94f53878f1..51a7f079c4 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/SqmExpressable.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/SqmExpressable.java @@ -7,7 +7,7 @@ package org.hibernate.query.sqm; import org.hibernate.query.sqm.tree.expression.SqmExpression; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Anything in the application domain model that can be used in an @@ -21,5 +21,5 @@ public interface SqmExpressable { /** * The Java type descriptor for this expressable */ - JavaTypeDescriptor getExpressableJavaTypeDescriptor(); + JavaType getExpressableJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingFunctionSqlAstExpression.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingFunctionSqlAstExpression.java index d75a2fad0b..faad040b37 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingFunctionSqlAstExpression.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingFunctionSqlAstExpression.java @@ -31,7 +31,7 @@ import org.hibernate.sql.results.graph.DomainResultCreationState; import org.hibernate.sql.results.graph.basic.BasicResult; import org.hibernate.sql.results.internal.SqlSelectionImpl; import org.hibernate.type.descriptor.ValueExtractor; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.spi.TypeConfiguration; /** @@ -85,7 +85,7 @@ public class SelfRenderingFunctionSqlAstExpression public SqlSelection createSqlSelection( int jdbcPosition, int valuesArrayPosition, - JavaTypeDescriptor javaTypeDescriptor, + JavaType javaTypeDescriptor, TypeConfiguration typeConfiguration) { return new SqlSelectionImpl( jdbcPosition, diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmCriteriaNodeBuilder.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmCriteriaNodeBuilder.java index b529fab556..ccd13db403 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmCriteriaNodeBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmCriteriaNodeBuilder.java @@ -66,7 +66,6 @@ import org.hibernate.query.criteria.JpaExpression; import org.hibernate.query.criteria.JpaParameterExpression; import org.hibernate.query.criteria.JpaSelection; import org.hibernate.query.criteria.ValueHandlingMode; -import org.hibernate.query.internal.QueryHelper; import org.hibernate.query.spi.QueryEngine; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SqmExpressable; @@ -128,8 +127,7 @@ import org.hibernate.query.sqm.tree.update.SqmUpdateStatement; import org.hibernate.service.ServiceRegistry; import org.hibernate.type.BasicType; import org.hibernate.type.StandardBasicTypes; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; -import org.hibernate.type.descriptor.java.spi.JdbcTypeRecommendationException; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.spi.TypeConfiguration; import static java.util.Arrays.asList; @@ -939,7 +937,7 @@ public class SqmCriteriaNodeBuilder implements NodeBuilder, SqmCreationContext, } class MultiValueParameterType implements AllowableParameterType { - private final JavaTypeDescriptor javaTypeDescriptor; + private final JavaType javaTypeDescriptor; public MultiValueParameterType(Class type) { this.javaTypeDescriptor = domainModelAccess.get() @@ -949,7 +947,7 @@ public class SqmCriteriaNodeBuilder implements NodeBuilder, SqmCreationContext, } @Override - public JavaTypeDescriptor getExpressableJavaTypeDescriptor() { + public JavaType getExpressableJavaTypeDescriptor() { return javaTypeDescriptor; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java index 04f0018670..295a40d7a1 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java @@ -8,7 +8,6 @@ package org.hibernate.query.sqm.sql; import java.util.AbstractMap; import java.util.ArrayList; -import java.util.Calendar; import java.util.Collection; import java.util.Collections; import java.util.HashMap; @@ -314,7 +313,7 @@ import org.hibernate.sql.results.internal.SqlSelectionImpl; import org.hibernate.sql.results.internal.StandardEntityGraphTraversalStateImpl; import org.hibernate.type.BasicType; import org.hibernate.type.JavaObjectType; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators; import org.hibernate.type.spi.TypeConfiguration; import org.hibernate.usertype.UserVersionType; @@ -1116,7 +1115,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base public DynamicInstantiation visitDynamicInstantiation(SqmDynamicInstantiation sqmDynamicInstantiation) { final SqmDynamicInstantiationTarget instantiationTarget = sqmDynamicInstantiation.getInstantiationTarget(); final DynamicInstantiationNature instantiationNature = instantiationTarget.getNature(); - final JavaTypeDescriptor targetTypeDescriptor = interpretInstantiationTarget( instantiationTarget ); + final JavaType targetTypeDescriptor = interpretInstantiationTarget( instantiationTarget ); final DynamicInstantiation dynamicInstantiation = new DynamicInstantiation<>( instantiationNature, @@ -1135,7 +1134,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base } @SuppressWarnings("unchecked") - private JavaTypeDescriptor interpretInstantiationTarget(SqmDynamicInstantiationTarget instantiationTarget) { + private JavaType interpretInstantiationTarget(SqmDynamicInstantiationTarget instantiationTarget) { final Class targetJavaType; if ( instantiationTarget.getNature() == DynamicInstantiationNature.LIST ) { @@ -2759,7 +2758,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base .getEntityDescriptor( (Class) literalValue ); } else { - final JavaTypeDescriptor javaTypeDescriptor = discriminatorMapping.getJdbcMapping().getJavaTypeDescriptor(); + final JavaType javaTypeDescriptor = discriminatorMapping.getJdbcMapping().getJavaTypeDescriptor(); final Object discriminatorValue; if ( javaTypeDescriptor.getJavaTypeClass().isInstance( literalValue ) ) { discriminatorValue = literalValue; @@ -3436,7 +3435,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base public DomainResult> createDomainResult( String resultVariable, DomainResultCreationState creationState) { - final JavaTypeDescriptor> mapEntryDescriptor = getTypeConfiguration() + final JavaType> mapEntryDescriptor = getTypeConfiguration() .getJavaTypeDescriptorRegistry() .resolveDescriptor( Map.Entry.class ); return new SqmMapEntryResult<>( indexResult, valueResult, resultVariable, mapEntryDescriptor ); @@ -5557,7 +5556,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base @Override public SqlSelection resolveSqlSelection( Expression expression, - JavaTypeDescriptor javaTypeDescriptor, + JavaType javaTypeDescriptor, TypeConfiguration typeConfiguration) { return delegate.resolveSqlSelection( expression, javaTypeDescriptor, typeConfiguration ); } @@ -5613,7 +5612,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base @Override public SqlSelection resolveSqlSelection( Expression expression, - JavaTypeDescriptor javaTypeDescriptor, + JavaType javaTypeDescriptor, TypeConfiguration typeConfiguration) { SqlSelection selection = delegate.resolveSqlSelection( expression, javaTypeDescriptor, typeConfiguration ); List sqlSelectionList = sqlSelectionsForSqmSelection[index]; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/DiscriminatorPathInterpretation.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/DiscriminatorPathInterpretation.java index 9ffb9d88a3..658b8c2cda 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/DiscriminatorPathInterpretation.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/DiscriminatorPathInterpretation.java @@ -18,7 +18,7 @@ import org.hibernate.sql.ast.tree.expression.Expression; import org.hibernate.sql.ast.tree.from.TableGroup; import org.hibernate.sql.results.graph.DomainResult; import org.hibernate.sql.results.graph.DomainResultCreationState; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.spi.TypeConfiguration; /** @@ -53,7 +53,7 @@ public class DiscriminatorPathInterpretation extends AbstractSqmPathInterpretati public SqlSelection createSqlSelection( int jdbcPosition, int valuesArrayPosition, - JavaTypeDescriptor javaTypeDescriptor, + JavaType javaTypeDescriptor, TypeConfiguration typeConfiguration) { return new SqlSelectionImpl( valuesArrayPosition, getDiscriminatorMapping() ); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqlAstProcessingStateImpl.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqlAstProcessingStateImpl.java index cc3ab1faec..2258f25951 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqlAstProcessingStateImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqlAstProcessingStateImpl.java @@ -22,7 +22,7 @@ import org.hibernate.sql.ast.spi.SqlExpressionResolver; import org.hibernate.sql.ast.spi.SqlSelection; import org.hibernate.sql.ast.tree.expression.Expression; import org.hibernate.sql.ast.tree.expression.SqlSelectionExpression; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.spi.TypeConfiguration; /** @@ -140,7 +140,7 @@ public class SqlAstProcessingStateImpl @Override public SqlSelection resolveSqlSelection( Expression expression, - JavaTypeDescriptor javaTypeDescriptor, + JavaType javaTypeDescriptor, TypeConfiguration typeConfiguration) { throw new ConversionException( "Unexpected call to resolve SqlSelection outside of QuerySpec processing" ); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqlAstQueryPartProcessingStateImpl.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqlAstQueryPartProcessingStateImpl.java index 2d7e8a8f3c..1c83d4f546 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqlAstQueryPartProcessingStateImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqlAstQueryPartProcessingStateImpl.java @@ -20,7 +20,7 @@ import org.hibernate.sql.ast.spi.SqlSelection; import org.hibernate.sql.ast.tree.expression.Expression; import org.hibernate.sql.ast.tree.select.QueryPart; import org.hibernate.sql.ast.tree.select.QuerySpec; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.spi.TypeConfiguration; /** @@ -68,7 +68,7 @@ public class SqlAstQueryPartProcessingStateImpl @Override public SqlSelection resolveSqlSelection( Expression expression, - JavaTypeDescriptor javaTypeDescriptor, + JavaType javaTypeDescriptor, TypeConfiguration typeConfiguration) { final SqlSelection existing; if ( sqlSelectionMap == null ) { diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqmMapEntryResult.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqmMapEntryResult.java index 2ca9bba892..74147f3cb4 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqmMapEntryResult.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqmMapEntryResult.java @@ -13,7 +13,7 @@ import org.hibernate.sql.results.graph.DomainResult; import org.hibernate.sql.results.graph.DomainResultAssembler; import org.hibernate.sql.results.jdbc.spi.JdbcValuesSourceProcessingOptions; import org.hibernate.sql.results.jdbc.spi.RowProcessingState; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole @@ -22,14 +22,14 @@ public class SqmMapEntryResult> implements Domai private final DomainResult keyResult; private final DomainResult valueResult; - private final JavaTypeDescriptor javaTypeDescriptor; + private final JavaType javaTypeDescriptor; private final String alias; public SqmMapEntryResult( DomainResult keyResult, DomainResult valueResult, String alias, - JavaTypeDescriptor javaTypeDescriptor) { + JavaType javaTypeDescriptor) { this.alias = alias; this.keyResult = keyResult; this.valueResult = valueResult; @@ -56,14 +56,14 @@ public class SqmMapEntryResult> implements Domai } @Override - public JavaTypeDescriptor getAssembledJavaTypeDescriptor() { + public JavaType getAssembledJavaTypeDescriptor() { return javaTypeDescriptor; } }; } @Override - public JavaTypeDescriptor getResultJavaTypeDescriptor() { + public JavaType getResultJavaTypeDescriptor() { return javaTypeDescriptor; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/SqmExpressableAccessor.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/SqmExpressableAccessor.java index 3cd382ecfe..d6b2264566 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/SqmExpressableAccessor.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/SqmExpressableAccessor.java @@ -7,7 +7,7 @@ package org.hibernate.query.sqm.tree; import org.hibernate.query.sqm.SqmExpressable; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Accessor for {@link SqmExpressable}. @@ -18,7 +18,7 @@ public interface SqmExpressableAccessor { /** * The Java type descriptor for this node. */ - default JavaTypeDescriptor getNodeJavaTypeDescriptor() { + default JavaType getNodeJavaTypeDescriptor() { final SqmExpressable nodeType = getExpressable(); return nodeType != null ? nodeType.getExpressableJavaTypeDescriptor() : null; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/SqmTypedNode.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/SqmTypedNode.java index e3a598e2a6..f7ce4f40f2 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/SqmTypedNode.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/SqmTypedNode.java @@ -7,7 +7,7 @@ package org.hibernate.query.sqm.tree; import org.hibernate.query.sqm.SqmExpressable; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Optional contract for SqmNode implementations which are @@ -19,7 +19,7 @@ public interface SqmTypedNode extends SqmNode, SqmExpressableAccessor { /** * The Java type descriptor for this node. */ - default JavaTypeDescriptor getNodeJavaTypeDescriptor() { + default JavaType getNodeJavaTypeDescriptor() { final SqmExpressable nodeType = getNodeType(); return nodeType != null ? nodeType.getExpressableJavaTypeDescriptor() : null; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/AbstractSqmAttributeJoin.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/AbstractSqmAttributeJoin.java index 75f5b7a232..4ae9c15f7e 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/AbstractSqmAttributeJoin.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/AbstractSqmAttributeJoin.java @@ -22,7 +22,7 @@ import org.hibernate.query.sqm.tree.SqmJoinType; import org.hibernate.query.sqm.tree.from.SqmAttributeJoin; import org.hibernate.query.sqm.tree.from.SqmFrom; import org.hibernate.query.sqm.tree.predicate.SqmPredicate; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import org.jboss.logging.Logger; @@ -67,7 +67,7 @@ public abstract class AbstractSqmAttributeJoin } @Override - public JavaTypeDescriptor getNodeJavaTypeDescriptor() { + public JavaType getNodeJavaTypeDescriptor() { return getJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmBagJoin.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmBagJoin.java index 7a0b7cf489..43760181e4 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmBagJoin.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmBagJoin.java @@ -21,7 +21,6 @@ import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.tree.SqmJoinType; import org.hibernate.query.sqm.tree.from.SqmAttributeJoin; import org.hibernate.query.sqm.tree.from.SqmFrom; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; /** * @author Steve Ebersole diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmBasicValuedSimplePath.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmBasicValuedSimplePath.java index 414b808115..f917dc8c92 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmBasicValuedSimplePath.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmBasicValuedSimplePath.java @@ -16,8 +16,8 @@ import org.hibernate.query.hql.spi.SqmCreationState; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.query.sqm.SqmPathSource; -import org.hibernate.type.descriptor.java.BasicJavaTypeDescriptor; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.BasicJavaType; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole @@ -68,8 +68,8 @@ public class SqmBasicValuedSimplePath } @Override - public BasicJavaTypeDescriptor getJavaTypeDescriptor() { - return (BasicJavaTypeDescriptor) super.getJavaTypeDescriptor(); + public BasicJavaType getJavaTypeDescriptor() { + return (BasicJavaType) super.getJavaTypeDescriptor(); } @Override @@ -83,7 +83,7 @@ public class SqmBasicValuedSimplePath } @Override - public JavaTypeDescriptor getExpressableJavaTypeDescriptor() { + public JavaType getExpressableJavaTypeDescriptor() { return getJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmEmbeddedValuedSimplePath.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmEmbeddedValuedSimplePath.java index b1f65e9ebe..51e9fa63e0 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmEmbeddedValuedSimplePath.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmEmbeddedValuedSimplePath.java @@ -17,7 +17,7 @@ import org.hibernate.query.sqm.SqmPathSource; import org.hibernate.query.sqm.UnknownPathException; import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.query.hql.spi.SqmCreationState; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole @@ -75,7 +75,7 @@ public class SqmEmbeddedValuedSimplePath extends AbstractSqmSimplePath imp } @Override - public JavaTypeDescriptor getExpressableJavaTypeDescriptor() { + public JavaType getExpressableJavaTypeDescriptor() { return getJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmMapEntryReference.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmMapEntryReference.java index 0ed6060e35..46f992e270 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmMapEntryReference.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmMapEntryReference.java @@ -19,7 +19,7 @@ import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.query.sqm.SqmExpressable; import org.hibernate.query.sqm.tree.select.SqmSelectableNode; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** @@ -35,7 +35,7 @@ public class SqmMapEntryReference private final SqmPath mapPath; private final NodeBuilder nodeBuilder; - private final JavaTypeDescriptor> mapEntryTypeDescriptor; + private final JavaType> mapEntryTypeDescriptor; private String explicitAlias; @@ -46,7 +46,7 @@ public class SqmMapEntryReference this.nodeBuilder = nodeBuilder; //noinspection unchecked - this.mapEntryTypeDescriptor = (JavaTypeDescriptor) nodeBuilder.getDomainModel() + this.mapEntryTypeDescriptor = (JavaType) nodeBuilder.getDomainModel() .getTypeConfiguration() .getJavaTypeDescriptorRegistry() .getDescriptor( Map.Entry.class ); @@ -68,17 +68,17 @@ public class SqmMapEntryReference } @Override - public JavaTypeDescriptor> getJavaTypeDescriptor() { + public JavaType> getJavaTypeDescriptor() { return mapEntryTypeDescriptor; } @Override - public JavaTypeDescriptor> getNodeJavaTypeDescriptor() { + public JavaType> getNodeJavaTypeDescriptor() { return mapEntryTypeDescriptor; } @Override - public JavaTypeDescriptor> getExpressableJavaTypeDescriptor() { + public JavaType> getExpressableJavaTypeDescriptor() { return mapEntryTypeDescriptor; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmPath.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmPath.java index eca093bdf0..29a726fcaf 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmPath.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmPath.java @@ -19,7 +19,6 @@ import org.hibernate.metamodel.model.domain.EntityDomainType; import org.hibernate.query.NavigablePath; import org.hibernate.query.PathException; import org.hibernate.query.SemanticException; -import org.hibernate.query.criteria.JpaExpression; import org.hibernate.query.criteria.JpaPath; import org.hibernate.query.hql.spi.SemanticPathPart; import org.hibernate.query.hql.spi.SqmCreationState; @@ -28,7 +27,7 @@ import org.hibernate.query.sqm.SqmExpressable; import org.hibernate.query.sqm.SqmPathSource; import org.hibernate.query.sqm.tree.expression.SqmExpression; import org.hibernate.query.sqm.tree.from.SqmRoot; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Models a reference to a part of the application's domain model as part of an SQM tree. @@ -110,7 +109,7 @@ public interface SqmPath extends SqmExpression, SemanticPathPart, JpaPath< } @Override - default JavaTypeDescriptor getJavaTypeDescriptor() { + default JavaType getJavaTypeDescriptor() { return getNodeType().getExpressableJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmPolymorphicRootDescriptor.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmPolymorphicRootDescriptor.java index 373f55bdee..57d8fd8619 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmPolymorphicRootDescriptor.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmPolymorphicRootDescriptor.java @@ -34,7 +34,7 @@ import org.hibernate.metamodel.model.domain.PluralPersistentAttribute; import org.hibernate.metamodel.model.domain.SimpleDomainType; import org.hibernate.metamodel.model.domain.SingularPersistentAttribute; import org.hibernate.query.sqm.SqmPathSource; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Acts as the EntityValuedNavigable for a "polymorphic query" grouping @@ -45,10 +45,10 @@ public class SqmPolymorphicRootDescriptor implements EntityDomainType { private final Set> implementors; private final Map commonAttributes; - private final JavaTypeDescriptor polymorphicJavaDescriptor; + private final JavaType polymorphicJavaDescriptor; public SqmPolymorphicRootDescriptor( - JavaTypeDescriptor polymorphicJavaDescriptor, + JavaType polymorphicJavaDescriptor, Set> implementors) { this.polymorphicJavaDescriptor = polymorphicJavaDescriptor; @@ -145,7 +145,7 @@ public class SqmPolymorphicRootDescriptor implements EntityDomainType { } @Override - public JavaTypeDescriptor getExpressableJavaTypeDescriptor() { + public JavaType getExpressableJavaTypeDescriptor() { return polymorphicJavaDescriptor; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/AbstractSqmExpression.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/AbstractSqmExpression.java index 506b3f4834..f42d060a74 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/AbstractSqmExpression.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/AbstractSqmExpression.java @@ -19,8 +19,7 @@ import org.hibernate.query.sqm.SqmTreeCreationLogger; import org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection; import org.hibernate.query.sqm.tree.predicate.SqmInPredicate; import org.hibernate.query.sqm.tree.predicate.SqmPredicate; -import org.hibernate.type.StandardBasicTypes; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; import static org.hibernate.query.internal.QueryHelper.highestPrecedenceType; @@ -147,7 +146,7 @@ public abstract class AbstractSqmExpression extends AbstractJpaSelection i } @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { + public JavaType getJavaTypeDescriptor() { return getNodeType().getExpressableJavaTypeDescriptor(); } } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/Compatibility.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/Compatibility.java index 4daf864bf9..e52137188d 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/Compatibility.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/Compatibility.java @@ -9,7 +9,7 @@ package org.hibernate.query.sqm.tree.expression; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole @@ -151,8 +151,8 @@ public class Compatibility { } public static boolean areAssignmentCompatible( - JavaTypeDescriptor to, - JavaTypeDescriptor from) { + JavaType to, + JavaType from) { // todo (6.0) - base this in the descriptor. // `JavaTypeDescriptor#assignableFrom` ? diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/LiteralHelper.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/LiteralHelper.java index 05d574afdd..a7f28be6fa 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/LiteralHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/LiteralHelper.java @@ -15,7 +15,6 @@ import java.time.LocalTime; import org.hibernate.query.spi.QueryEngine; import org.hibernate.query.hql.spi.SqmCreationState; -import org.hibernate.type.StandardBasicTypes; import org.hibernate.type.descriptor.java.JdbcDateJavaTypeDescriptor; import org.hibernate.type.descriptor.java.JdbcTimeJavaTypeDescriptor; import org.hibernate.type.descriptor.java.JdbcTimestampJavaTypeDescriptor; diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmFieldLiteral.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmFieldLiteral.java index d1ba16ee39..f82ba3bfa6 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmFieldLiteral.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmFieldLiteral.java @@ -25,14 +25,14 @@ import org.hibernate.query.sqm.SqmExpressable; import org.hibernate.query.sqm.tree.domain.SqmPath; import org.hibernate.query.sqm.tree.predicate.SqmPredicate; import org.hibernate.query.sqm.tree.select.SqmSelectableNode; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * @author Steve Ebersole */ public class SqmFieldLiteral implements SqmExpression, SqmExpressable, SqmSelectableNode, SemanticPathPart { private final T value; - private final JavaTypeDescriptor fieldJavaTypeDescriptor; + private final JavaType fieldJavaTypeDescriptor; private final String fieldName; private final NodeBuilder nodeBuilder; @@ -40,7 +40,7 @@ public class SqmFieldLiteral implements SqmExpression, SqmExpressable, public SqmFieldLiteral( Field field, - JavaTypeDescriptor fieldJavaTypeDescriptor, + JavaType fieldJavaTypeDescriptor, NodeBuilder nodeBuilder){ this( extractValue( field ), @@ -62,7 +62,7 @@ public class SqmFieldLiteral implements SqmExpression, SqmExpressable, public SqmFieldLiteral( T value, - JavaTypeDescriptor fieldJavaTypeDescriptor, + JavaType fieldJavaTypeDescriptor, String fieldName, NodeBuilder nodeBuilder) { this.value = value; @@ -77,7 +77,7 @@ public class SqmFieldLiteral implements SqmExpression, SqmExpressable, return value; } - public JavaTypeDescriptor getFieldJavaTypeDescriptor() { + public JavaType getFieldJavaTypeDescriptor() { return fieldJavaTypeDescriptor; } @@ -101,7 +101,7 @@ public class SqmFieldLiteral implements SqmExpression, SqmExpressable, } @Override - public JavaTypeDescriptor getExpressableJavaTypeDescriptor() { + public JavaType getExpressableJavaTypeDescriptor() { if ( expressable == this ) { return fieldJavaTypeDescriptor; } @@ -110,7 +110,7 @@ public class SqmFieldLiteral implements SqmExpression, SqmExpressable, } @Override - public JavaTypeDescriptor getJavaTypeDescriptor() { + public JavaType getJavaTypeDescriptor() { return getExpressableJavaTypeDescriptor(); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmLiteral.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmLiteral.java index 7a1ef99ae0..d6944a75fb 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmLiteral.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/SqmLiteral.java @@ -11,7 +11,7 @@ import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.query.sqm.SqmExpressable; import org.hibernate.query.sqm.sql.internal.DomainResultProducer; -import org.hibernate.type.descriptor.java.JavaTypeDescriptor; +import org.hibernate.type.descriptor.java.JavaType; /** * Represents a literal value in the sqm, e.g.