HHH-14870 - Rename {Xyz}TypeDescriptor as {Xyz}Type

* `JavaTypeDescriptor` -> `JavaType`
* `JdbcTypeDescriptor` -> `JdbcType`
This commit is contained in:
Steve Ebersole 2021-10-11 11:17:07 -05:00
parent 7b61966882
commit 3a0065eea4
405 changed files with 1338 additions and 1529 deletions

View File

@ -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.

View File

@ -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-jpa-convert-mutability>>.
[[basic-bitset-java-type]]
===== Using a custom `JavaTypeDescriptor`
As covered in <<basic-mapping-explicit>>, we will define a `JavaTypeDescriptor`
As covered in <<basic-mapping-explicit>>, 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]]

View File

@ -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;

View File

@ -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 <X> ValueBinder<X> getBinder(JavaTypeDescriptor<X> javaTypeDescriptor) {
public <X> ValueBinder<X> getBinder(JavaType<X> javaTypeDescriptor) {
return VarbinaryJdbcTypeDescriptor.INSTANCE.getBinder( javaTypeDescriptor );
}
@Override
public <X> ValueExtractor<X> getExtractor(JavaTypeDescriptor<X> javaTypeDescriptor) {
public <X> ValueExtractor<X> getExtractor(JavaType<X> javaTypeDescriptor) {
return VarbinaryJdbcTypeDescriptor.INSTANCE.getExtractor( javaTypeDescriptor );
}
}

View File

@ -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;

View File

@ -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

View File

@ -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<? extends BasicJavaTypeDescriptor<?>> value();
Class<? extends BasicJavaType<?>> value();
}

View File

@ -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<? extends BasicJavaTypeDescriptor<?>> value();
Class<? extends BasicJavaType<?>> value();
}

View File

@ -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<? extends BasicJavaTypeDescriptor<?>> value();
Class<? extends BasicJavaType<?>> value();
}

View File

@ -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<? extends BasicJavaTypeDescriptor<?>> descriptorClass();
Class<? extends BasicJavaType<?>> descriptorClass();
}

View File

@ -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<? extends BasicJavaTypeDescriptor<?>> value();
Class<? extends BasicJavaType<?>> value();
}

View File

@ -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<? extends BasicJavaTypeDescriptor<?>> value();
Class<? extends BasicJavaType<?>> value();
}

View File

@ -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 );
}

View File

@ -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 );
}

View File

@ -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

View File

@ -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<Object> getDomainJavaDescriptor() {
public JavaType<Object> 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<Serializable> jtd = typeConfiguration
final JavaType<Serializable> 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<Object> getDomainJavaDescriptor() {
return (JavaTypeDescriptor) resolved.getMappedJavaTypeDescriptor();
public JavaType<Object> getDomainJavaDescriptor() {
return (JavaType) resolved.getMappedJavaTypeDescriptor();
}
@Override
public JavaTypeDescriptor<?> getRelationalJavaDescriptor() {
public JavaType<?> getRelationalJavaDescriptor() {
return resolved.getMappedJavaTypeDescriptor();
}

View File

@ -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);

View File

@ -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

View File

@ -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<Object> converterJtd = context
final JavaType<Object> converterJtd = context
.getJavaTypeDescriptorRegistry()
.getDescriptor( getAttributeConverterClass() );

View File

@ -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<J> implements BasicValue.Resolution<J>
}
@Override
public JavaTypeDescriptor<J> getDomainJavaDescriptor() {
public JavaType<J> getDomainJavaDescriptor() {
return basicType.getValueConverter().getDomainJavaDescriptor();
}
@Override
public JavaTypeDescriptor<?> getRelationalJavaDescriptor() {
public JavaType<?> getRelationalJavaDescriptor() {
return basicType.getValueConverter().getRelationalJavaDescriptor();
}

View File

@ -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<E extends Enum<E>> implements BasicValue.Resolution<E> {
private final CustomType enumTypeMapping;
private final JavaTypeDescriptor<E> domainJtd;
private final JavaTypeDescriptor<?> jdbcJtd;
private final JavaType<E> domainJtd;
private final JavaType<?> jdbcJtd;
private final JdbcTypeDescriptor jdbcTypeDescriptor;
private final EnumValueConverter<E,?> valueConverter;
public EnumeratedValueResolution(
CustomType enumTypeMapping,
JavaTypeDescriptor<E> domainJtd,
JavaTypeDescriptor<?> jdbcJtd,
JavaType<E> domainJtd,
JavaType<?> jdbcJtd,
JdbcTypeDescriptor jdbcTypeDescriptor,
EnumValueConverter<E, ?> valueConverter) {
this.enumTypeMapping = enumTypeMapping;
@ -50,12 +50,12 @@ public class EnumeratedValueResolution<E extends Enum<E>> implements BasicValue.
}
@Override
public JavaTypeDescriptor<E> getDomainJavaDescriptor() {
public JavaType<E> getDomainJavaDescriptor() {
return domainJtd;
}
@Override
public JavaTypeDescriptor<?> getRelationalJavaDescriptor() {
public JavaType<?> getRelationalJavaDescriptor() {
return jdbcJtd;
}

View File

@ -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<J> implements BasicValue.Resolution<J> {
private JavaTypeDescriptor<J> domainJtd;
private JavaTypeDescriptor<J> relationalJtd;
private JavaType<J> domainJtd;
private JavaType<J> relationalJtd;
private JdbcTypeDescriptor jdbcTypeDescriptor;
private MutabilityPlan mutabilityPlan;
@ -31,8 +31,8 @@ public class InferredBasicValueResolution<J> implements BasicValue.Resolution<J>
public InferredBasicValueResolution(
JdbcMapping jdbcMapping,
JavaTypeDescriptor<J> domainJtd,
JavaTypeDescriptor<J> relationalJtd,
JavaType<J> domainJtd,
JavaType<J> relationalJtd,
JdbcTypeDescriptor jdbcTypeDescriptor,
BasicValueConverter valueConverter,
BasicType<J> legacyType,
@ -57,12 +57,12 @@ public class InferredBasicValueResolution<J> implements BasicValue.Resolution<J>
}
@Override
public JavaTypeDescriptor<J> getDomainJavaDescriptor() {
public JavaType<J> getDomainJavaDescriptor() {
return domainJtd;
}
@Override
public JavaTypeDescriptor<?> getRelationalJavaDescriptor() {
public JavaType<?> getRelationalJavaDescriptor() {
return relationalJtd;
}

View File

@ -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<TypeConfiguration, BasicJavaTypeDescriptor> explicitJavaTypeAccess,
Function<TypeConfiguration, BasicJavaType> explicitJavaTypeAccess,
Function<TypeConfiguration, JdbcTypeDescriptor> explicitSqlTypeAccess,
Type resolvedJavaType,
Supplier<JavaTypeDescriptor> reflectedJtdResolver,
Supplier<JavaType> 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<Integer> relationalJtd;
final JavaType<Integer> 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,

View File

@ -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<J> implements BasicValue.Resolution<J> {
private final JavaTypeDescriptor<J> domainJtd;
private final JavaType<J> domainJtd;
private final BasicType basicType;
@ -30,7 +30,7 @@ public class NamedBasicTypeResolution<J> implements BasicValue.Resolution<J> {
private final MutabilityPlan<J> mutabilityPlan;
public NamedBasicTypeResolution(
JavaTypeDescriptor<J> domainJtd,
JavaType<J> domainJtd,
BasicType basicType,
BasicValueConverter valueConverter,
Function<TypeConfiguration, MutabilityPlan> explicitMutabilityPlanAccess,
@ -63,12 +63,12 @@ public class NamedBasicTypeResolution<J> implements BasicValue.Resolution<J> {
}
@Override
public JavaTypeDescriptor<J> getDomainJavaDescriptor() {
public JavaType<J> getDomainJavaDescriptor() {
return domainJtd;
}
@Override
public JavaTypeDescriptor<?> getRelationalJavaDescriptor() {
public JavaType<?> getRelationalJavaDescriptor() {
return valueConverter == null
? basicType.getJavaTypeDescriptor()
: valueConverter.getRelationalJavaDescriptor();

View File

@ -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<J> implements BasicValue.Resolution<J> {
public static NamedConverterResolution from(
ConverterDescriptor converterDescriptor,
Function<TypeConfiguration, BasicJavaTypeDescriptor> explicitJtdAccess,
Function<TypeConfiguration, BasicJavaType> explicitJtdAccess,
Function<TypeConfiguration, JdbcTypeDescriptor> explicitStdAccess,
Function<TypeConfiguration, MutabilityPlan> explicitMutabilityPlanAccess,
JdbcTypeDescriptorIndicators sqlTypeIndicators,
@ -55,7 +55,7 @@ public class NamedConverterResolution<J> implements BasicValue.Resolution<J> {
public static NamedConverterResolution from(
String name,
Function<TypeConfiguration, BasicJavaTypeDescriptor> explicitJtdAccess,
Function<TypeConfiguration, BasicJavaType> explicitJtdAccess,
Function<TypeConfiguration, JdbcTypeDescriptor> explicitStdAccess,
Function<TypeConfiguration, MutabilityPlan> explicitMutabilityPlanAccess,
JdbcTypeDescriptorIndicators sqlTypeIndicators,
@ -84,18 +84,18 @@ public class NamedConverterResolution<J> implements BasicValue.Resolution<J> {
}
private static NamedConverterResolution fromInternal(
Function<TypeConfiguration, BasicJavaTypeDescriptor> explicitJtdAccess,
Function<TypeConfiguration, BasicJavaType> explicitJtdAccess,
Function<TypeConfiguration, JdbcTypeDescriptor> explicitStdAccess,
Function<TypeConfiguration, MutabilityPlan> 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<J> implements BasicValue.Resolution<J> {
? 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<J> implements BasicValue.Resolution<J> {
}
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<J> implements BasicValue.Resolution<J> {
@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<J> implements BasicValue.Resolution<J> {
}
@Override
public JavaTypeDescriptor<J> getDomainJavaDescriptor() {
public JavaType<J> getDomainJavaDescriptor() {
//noinspection unchecked
return domainJtd;
}
@Override
public JavaTypeDescriptor<?> getRelationalJavaDescriptor() {
public JavaType<?> getRelationalJavaDescriptor() {
return relationalJtd;
}

View File

@ -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();
}

View File

@ -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<J> 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<J> extends AbstractSingleColumnStandardBa
@Override
public boolean isEqual(Object one, Object another) {
//noinspection unchecked
return ( (JavaTypeDescriptor<Object>) converter.getDomainJavaDescriptor() ).areEqual( one, another );
return ( (JavaType<Object>) converter.getDomainJavaDescriptor() ).areEqual( one, another );
}
@Override

View File

@ -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<E> implements BasicValue.Resolution<E> {
@SuppressWarnings({"rawtypes", "unchecked"})
public static <E> VersionResolution<E> from(
Function<TypeConfiguration, java.lang.reflect.Type> implicitJavaTypeAccess,
Function<TypeConfiguration, BasicJavaTypeDescriptor> explicitJtdAccess,
Function<TypeConfiguration, BasicJavaType> explicitJtdAccess,
Function<TypeConfiguration, JdbcTypeDescriptor> explicitStdAccess,
TimeZoneStorageType timeZoneStorageType,
TypeConfiguration typeConfiguration,
@ -45,8 +45,8 @@ public class VersionResolution<E> implements BasicValue.Resolution<E> {
// 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<E> implements BasicValue.Resolution<E> {
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<E> implements BasicValue.Resolution<E> {
@Override
@SuppressWarnings("unchecked")
public JavaTypeDescriptor<E> getDomainJavaDescriptor() {
public JavaType<E> getDomainJavaDescriptor() {
return jtd;
}
@Override
public JavaTypeDescriptor<?> getRelationalJavaDescriptor() {
public JavaType<?> getRelationalJavaDescriptor() {
return jtd;
}

View File

@ -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 );
}

View File

@ -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 );

View File

@ -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<MetadataBuildingContext,Boolean> resolver);
void addJavaTypeRegistration(Class<?> javaType, JavaTypeDescriptor<?> jtd);
void addJavaTypeRegistration(Class<?> javaType, JavaType<?> jtd);
void addJdbcTypeRegistration(int typeCode, JdbcTypeDescriptor jdbcTypeDescriptor);
interface DelayedPropertyReferenceHandler extends Serializable {

View File

@ -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<? extends BasicJavaTypeDescriptor<?>> jtdClass = annotation.descriptorClass();
final BasicJavaTypeDescriptor<?> jtd = managedBeanRegistry.getBean( jtdClass ).getBeanInstance();
final Class<? extends BasicJavaType<?>> jtdClass = annotation.descriptorClass();
final BasicJavaType<?> jtd = managedBeanRegistry.getBean( jtdClass ).getBeanInstance();
context.getMetadataCollector().addJavaTypeRegistration( annotation.javaType(), jtd );
}

View File

@ -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();

View File

@ -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<T> implements JdbcTypeDescriptorIndicators {
private Map explicitLocalTypeParams;
private Function<TypeConfiguration, JdbcTypeDescriptor> explicitJdbcTypeAccess;
private Function<TypeConfiguration, BasicJavaTypeDescriptor> explicitJavaTypeAccess;
private Function<TypeConfiguration, BasicJavaType> explicitJavaTypeAccess;
private Function<TypeConfiguration, MutabilityPlan> explicitMutabilityAccess;
private Function<TypeConfiguration, java.lang.reflect.Type> implicitJavaTypeAccess;
@ -416,9 +415,9 @@ public class BasicValueBinder<T> implements JdbcTypeDescriptorIndicators {
explicitJavaTypeAccess = (typeConfiguration) -> {
final CollectionIdJavaType javaTypeAnn = findAnnotation( modelXProperty, CollectionIdJavaType.class );
if ( javaTypeAnn != null ) {
final Class<? extends BasicJavaTypeDescriptor<?>> javaType = normalizeJavaType( javaTypeAnn.value() );
final Class<? extends BasicJavaType<?>> javaType = normalizeJavaType( javaTypeAnn.value() );
if ( javaType != null ) {
final ManagedBean<? extends BasicJavaTypeDescriptor<?>> bean = beanRegistry.getBean( javaType );
final ManagedBean<? extends BasicJavaType<?>> bean = beanRegistry.getBean( javaType );
return bean.getBeanInstance();
}
}
@ -546,16 +545,16 @@ public class BasicValueBinder<T> implements JdbcTypeDescriptorIndicators {
explicitJavaTypeAccess = typeConfiguration -> {
final MapKeyJavaType javaTypeAnn = findAnnotation( mapAttribute, MapKeyJavaType.class );
if ( javaTypeAnn != null ) {
final Class<? extends BasicJavaTypeDescriptor<?>> jdbcTypeImpl = normalizeJavaType( javaTypeAnn.value() );
final Class<? extends BasicJavaType<?>> jdbcTypeImpl = normalizeJavaType( javaTypeAnn.value() );
if ( jdbcTypeImpl != null ) {
final ManagedBean<? extends BasicJavaTypeDescriptor> jdbcTypeBean = managedBeanRegistry.getBean( jdbcTypeImpl );
final ManagedBean<? extends BasicJavaType> 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<T> implements JdbcTypeDescriptorIndicators {
explicitJavaTypeAccess = (typeConfiguration) -> {
final ListIndexJavaType javaTypeAnn = findAnnotation( listAttribute, ListIndexJavaType.class );
if ( javaTypeAnn != null ) {
final Class<? extends BasicJavaTypeDescriptor<?>> javaType = normalizeJavaType( javaTypeAnn.value() );
final Class<? extends BasicJavaType<?>> javaType = normalizeJavaType( javaTypeAnn.value() );
if ( javaType != null ) {
final ManagedBean<? extends BasicJavaTypeDescriptor<?>> bean = beanRegistry.getBean( javaType );
final ManagedBean<? extends BasicJavaType<?>> bean = beanRegistry.getBean( javaType );
return bean.getBeanInstance();
}
}
@ -805,14 +804,14 @@ public class BasicValueBinder<T> implements JdbcTypeDescriptorIndicators {
if ( elementCollectionAnn != null
&& elementCollectionAnn.targetClass() != null
&& elementCollectionAnn.targetClass() != void.class ) {
final Function<TypeConfiguration, BasicJavaTypeDescriptor> original = explicitJavaTypeAccess;
final Function<TypeConfiguration, BasicJavaType> 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<T> implements JdbcTypeDescriptorIndicators {
}
final Class<?> hintedJavaType = (Class<?>) implicitJavaTypeAccess.apply( typeConfiguration );
final JavaTypeDescriptor<Object> hintedDescriptor = typeConfiguration
final JavaType<Object> hintedDescriptor = typeConfiguration
.getJavaTypeDescriptorRegistry()
.getDescriptor( hintedJavaType );
return hintedDescriptor.getRecommendedJdbcType( typeConfiguration.getCurrentBaseSqlTypeIndicators() );
@ -922,10 +921,10 @@ public class BasicValueBinder<T> implements JdbcTypeDescriptorIndicators {
explicitJavaTypeAccess = (typeConfiguration) -> {
final AnyKeyJavaType javaTypeAnn = findAnnotation( modelXProperty, AnyKeyJavaType.class );
if ( javaTypeAnn != null ) {
final Class<? extends BasicJavaTypeDescriptor<?>> javaType = normalizeJavaType( javaTypeAnn.value() );
final Class<? extends BasicJavaType<?>> javaType = normalizeJavaType( javaTypeAnn.value() );
if ( javaType != null ) {
final ManagedBean<? extends BasicJavaTypeDescriptor<?>> jtdBean = managedBeanRegistry.getBean( javaType );
final ManagedBean<? extends BasicJavaType<?>> jtdBean = managedBeanRegistry.getBean( javaType );
return jtdBean.getBeanInstance();
}
}
@ -933,7 +932,7 @@ public class BasicValueBinder<T> 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<T> 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<? extends BasicJavaTypeDescriptor<?>> javaType = normalizeJavaType( javaTypeAnn.value() );
final Class<? extends BasicJavaType<?>> javaType = normalizeJavaType( javaTypeAnn.value() );
if ( javaType != null ) {
final ManagedBean<? extends BasicJavaTypeDescriptor<?>> jtdBean = managedBeanRegistry.getBean( javaType );
final ManagedBean<? extends BasicJavaType<?>> 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<T> implements JdbcTypeDescriptorIndicators {
return jdbcType;
}
private static Class<? extends BasicJavaTypeDescriptor<?>> normalizeJavaType(Class<? extends BasicJavaTypeDescriptor<?>> javaType) {
private static Class<? extends BasicJavaType<?>> normalizeJavaType(Class<? extends BasicJavaType<?>> javaType) {
if ( javaType == null ) {
return null;
}

View File

@ -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 <X> ValueBinder<X> getBinder(JavaTypeDescriptor<X> javaTypeDescriptor) {
public <X> ValueBinder<X> getBinder(JavaType<X> javaTypeDescriptor) {
return new BasicBinder<X>( javaTypeDescriptor, this ) {
@Override
@ -349,7 +349,7 @@ public abstract class AbstractHANADialect extends Dialect {
}
@Override
public <X> ValueExtractor<X> getExtractor(JavaTypeDescriptor<X> javaTypeDescriptor) {
public <X> ValueExtractor<X> getExtractor(JavaType<X> javaTypeDescriptor) {
return new BasicExtractor<X>( javaTypeDescriptor, this ) {
@Override
@ -402,7 +402,7 @@ public abstract class AbstractHANADialect extends Dialect {
}
@Override
public <X> BasicBinder<X> getClobBinder(final JavaTypeDescriptor<X> javaTypeDescriptor) {
public <X> BasicBinder<X> getClobBinder(final JavaType<X> javaTypeDescriptor) {
return new BasicBinder<X>( javaTypeDescriptor, this ) {
@Override
@ -443,7 +443,7 @@ public abstract class AbstractHANADialect extends Dialect {
}
@Override
public <X> ValueExtractor<X> getExtractor(JavaTypeDescriptor<X> javaTypeDescriptor) {
public <X> ValueExtractor<X> getExtractor(JavaType<X> javaTypeDescriptor) {
return new BasicExtractor<X>( javaTypeDescriptor, this ) {
@Override
@ -501,7 +501,7 @@ public abstract class AbstractHANADialect extends Dialect {
}
@Override
public <X> BasicBinder<X> getNClobBinder(final JavaTypeDescriptor<X> javaTypeDescriptor) {
public <X> BasicBinder<X> getNClobBinder(final JavaType<X> javaTypeDescriptor) {
return new BasicBinder<X>( javaTypeDescriptor, this ) {
@Override
@ -542,7 +542,7 @@ public abstract class AbstractHANADialect extends Dialect {
}
@Override
public <X> ValueExtractor<X> getExtractor(JavaTypeDescriptor<X> javaTypeDescriptor) {
public <X> ValueExtractor<X> getExtractor(JavaType<X> javaTypeDescriptor) {
return new BasicExtractor<X>( javaTypeDescriptor, this ) {
@Override
@ -601,7 +601,7 @@ public abstract class AbstractHANADialect extends Dialect {
}
@Override
public <X> ValueExtractor<X> getExtractor(final JavaTypeDescriptor<X> javaTypeDescriptor) {
public <X> ValueExtractor<X> getExtractor(final JavaType<X> javaTypeDescriptor) {
return new BasicExtractor<X>( javaTypeDescriptor, this ) {
@Override
@ -627,7 +627,7 @@ public abstract class AbstractHANADialect extends Dialect {
}
@Override
public <X> BasicBinder<X> getBinder(final JavaTypeDescriptor<X> javaTypeDescriptor) {
public <X> BasicBinder<X> getBinder(final JavaType<X> javaTypeDescriptor) {
return new BasicBinder<X>( javaTypeDescriptor, this ) {
@Override

View File

@ -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) {

View File

@ -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) {

View File

@ -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;

View File

@ -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) {

View File

@ -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 <X> VersionValue getUnsavedVersionValue(
String versionUnsavedValue,
Getter versionGetter,
VersionJavaTypeDescriptor<X> versionType,
VersionJavaType<X> versionType,
Constructor constructor) {
if ( versionUnsavedValue == null ) {

View File

@ -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<Object> versionType, SharedSessionContractImplementor session) {
private static Object seed(VersionJavaType<Object> 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 <b>if required</b> and inject it into
* the snapshot state.
*
@ -59,7 +59,7 @@ public final class Versioning {
public static boolean seedVersion(
Object[] fields,
int versionProperty,
VersionJavaTypeDescriptor<Object> versionType,
VersionJavaType<Object> 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<Object> versionType, SharedSessionContractImplementor session) {
public static Object increment(Object version, VersionJavaType<Object> versionType, SharedSessionContractImplementor session) {
final Object next = versionType.next( version, session );
if ( LOG.isTraceEnabled() ) {
LOG.tracef(

View File

@ -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

View File

@ -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(

View File

@ -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;

View File

@ -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<T> implements IdentifierLoadAccess<T>, JavaTypeDescriptor.CoercionContext {
public class IdentifierLoadAccessImpl<T> implements IdentifierLoadAccess<T>, JavaType.CoercionContext {
private final LoadAccessContext context;
private final EntityPersister entityPersister;

View File

@ -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();
}

View File

@ -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<TypeConfiguration, BasicJavaTypeDescriptor> explicitJavaTypeAccess;
private Function<TypeConfiguration, BasicJavaType> explicitJavaTypeAccess;
private Function<TypeConfiguration, JdbcTypeDescriptor> explicitJdbcTypeAccess;
private Function<TypeConfiguration, MutabilityPlan> explicitMutabilityPlanAccess;
private Function<TypeConfiguration, java.lang.reflect.Type> implicitJavaTypeAccess;
@ -148,7 +148,7 @@ public class BasicValue extends SimpleValue implements JdbcTypeDescriptorIndicat
}
@SuppressWarnings({"rawtypes"})
public void setExplicitJavaTypeAccess(Function<TypeConfiguration, BasicJavaTypeDescriptor> explicitJavaTypeAccess) {
public void setExplicitJavaTypeAccess(Function<TypeConfiguration, BasicJavaType> 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<TypeConfiguration, java.lang.reflect.Type> implicitJavaTypeAccess,
Function<TypeConfiguration, BasicJavaTypeDescriptor> explicitJtdAccess,
Function<TypeConfiguration, BasicJavaType> explicitJtdAccess,
Function<TypeConfiguration, JdbcTypeDescriptor> explicitStdAccess,
Function<TypeConfiguration, MutabilityPlan> 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<J> getDomainJavaDescriptor();
JavaType<J> 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

View File

@ -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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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;

View File

@ -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<Object> baseJtd = context.getTypeConfiguration()
final JavaType<Object> 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<Y> javaTypeDescriptor = registry.resolveManagedTypeDescriptor( embeddableClass );
final JavaType<Y> javaTypeDescriptor = registry.resolveManagedTypeDescriptor( embeddableClass );
embeddableType = new EmbeddableTypeImpl<>(
javaTypeDescriptor,

View File

@ -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;

View File

@ -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() );

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -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<Map> mapJtd;
private final JavaType<Map> 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;
}

View File

@ -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;
}

View File

@ -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()

View File

@ -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<J> extends AbstractPojoInstantiator {
private final Constructor constructor;
@SuppressWarnings("WeakerAccess")
public PojoInstantiatorImpl(JavaTypeDescriptor javaTypeDescriptor) {
public PojoInstantiatorImpl(JavaType javaTypeDescriptor) {
super( javaTypeDescriptor.getJavaTypeClass() );
this.constructor = isAbstract()

View File

@ -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;
}

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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();

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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<Object, R> toRelationalConverter;
private final JavaTypeDescriptor<Object> domainJtd;
private final JavaTypeDescriptor<R> relationalJtd;
private final JavaType<Object> domainJtd;
private final JavaType<R> relationalJtd;
public DomainResultConverter(
Function<R,String> subtypeResolver,
Function<String,Object> entityNameHandler,
Function<Object,R> toRelationalConverter,
JavaTypeDescriptor<Object> domainJtd,
JavaTypeDescriptor<R> relationalJtd) {
JavaType<Object> domainJtd,
JavaType<R> 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<Object> domainJtd;
final JavaType<Object> domainJtd;
final Function<String,Object> entityNameHandler;
final Function<Object,Object> toRelationalConverter;
@ -384,12 +384,12 @@ public abstract class AbstractDiscriminatorMapping implements EntityDiscriminato
}
@Override
public JavaTypeDescriptor<Object> getDomainJavaDescriptor() {
public JavaType<Object> getDomainJavaDescriptor() {
return domainJtd;
}
@Override
public JavaTypeDescriptor<R> getRelationalJavaDescriptor() {
public JavaType<R> getRelationalJavaDescriptor() {
return relationalJtd;
}
}

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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<Object, ?> 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;
}

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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<Object>) type.getJavaTypeDescriptor(),
(JavaType<Object>) type.getJavaTypeDescriptor(),
collectionPath
);
}

View File

@ -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<SingularAttributeMapping> attributes;
private final JavaTypeDescriptor<?> jtd;
private final JavaType<?> jtd;
private List<JdbcMapping> 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<Object[]> jtd = sessionFactory
final JavaType<Object[]> jtd = sessionFactory
.getTypeConfiguration()
.getJavaTypeDescriptorRegistry()
.getDescriptor( Object[].class );
@ -451,7 +451,7 @@ public class CompoundNaturalIdMapping extends AbstractNaturalIdMapping implement
public static class DomainResultImpl implements DomainResult<Object[]>, FetchParent {
private final NavigablePath navigablePath;
private final CompoundNaturalIdMapping naturalIdMapping;
private final JavaTypeDescriptor<Object[]> arrayJtd;
private final JavaType<Object[]> arrayJtd;
private final List<Fetch> fetches;
@ -460,7 +460,7 @@ public class CompoundNaturalIdMapping extends AbstractNaturalIdMapping implement
public DomainResultImpl(
NavigablePath navigablePath,
CompoundNaturalIdMapping naturalIdMapping,
JavaTypeDescriptor<Object[]> arrayJtd,
JavaType<Object[]> arrayJtd,
String resultVariable,
DomainResultCreationState creationState) {
this.navigablePath = navigablePath;
@ -491,7 +491,7 @@ public class CompoundNaturalIdMapping extends AbstractNaturalIdMapping implement
}
@Override
public JavaTypeDescriptor<Object[]> getResultJavaTypeDescriptor() {
public JavaType<Object[]> getResultJavaTypeDescriptor() {
return arrayJtd;
}
@ -537,7 +537,7 @@ public class CompoundNaturalIdMapping extends AbstractNaturalIdMapping implement
private static class AssemblerImpl implements DomainResultAssembler<Object[]> {
private final NavigablePath navigablePath;
private final CompoundNaturalIdMapping naturalIdMapping;
private final JavaTypeDescriptor<Object[]> jtd;
private final JavaType<Object[]> jtd;
private final List<DomainResultAssembler<?>> subAssemblers;
@ -545,7 +545,7 @@ public class CompoundNaturalIdMapping extends AbstractNaturalIdMapping implement
List<Fetch> fetches,
NavigablePath navigablePath,
CompoundNaturalIdMapping naturalIdMapping,
JavaTypeDescriptor<Object[]> jtd,
JavaType<Object[]> jtd,
AssemblerCreationState creationState) {
this.navigablePath = navigablePath;
this.naturalIdMapping = naturalIdMapping;
@ -575,7 +575,7 @@ public class CompoundNaturalIdMapping extends AbstractNaturalIdMapping implement
}
@Override
public JavaTypeDescriptor<Object[]> getAssembledJavaTypeDescriptor() {
public JavaType<Object[]> getAssembledJavaTypeDescriptor() {
return jtd;
}
}

View File

@ -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,

View File

@ -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<Object,String> 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<T> getAssembledJavaTypeDescriptor() {
public JavaType<T> getAssembledJavaTypeDescriptor() {
//noinspection unchecked
return (JavaTypeDescriptor<T>) fetchedPart.getJavaTypeDescriptor();
return (JavaType<T>) fetchedPart.getJavaTypeDescriptor();
}
@Override

View File

@ -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<Object> baseAssociationJtd,
JavaType<Object> 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();
}

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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<Object> baseJtd = jtdRegistry.getDescriptor(Object.class);
final JavaType<Object> 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;
}
}

View File

@ -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();
}

View File

@ -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<Object>) getJavaTypeDescriptor() ).extractHashCode( value );
return value == null ? 0 : ( (JavaType<Object>) getJavaTypeDescriptor() ).extractHashCode( value );
}
@Override
@ -181,7 +181,7 @@ public class SimpleNaturalIdMapping extends AbstractNaturalIdMapping implements
}
@Override
public JavaTypeDescriptor<?> getJavaTypeDescriptor() {
public JavaType<?> getJavaTypeDescriptor() {
return attribute.getJavaTypeDescriptor();
}

View File

@ -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 <O,R> BasicValueConverter<O,R> jpaAttributeConverter(
JavaTypeDescriptor<R> relationalJtd,
JavaTypeDescriptor<O> domainJtd,
JavaType<R> relationalJtd,
JavaType<O> domainJtd,
Class<? extends AttributeConverter<O,R>> 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<? extends AttributeConverter<O, R>> converterJtd = jtdRegistry.getDescriptor( converterClass );
final JavaType<? extends AttributeConverter<O, R>> converterJtd = jtdRegistry.getDescriptor( converterClass );
return new JpaAttributeConverterImpl<>( converterBean, converterJtd, domainJtd, relationalJtd );
}

View File

@ -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<O,R> implements JpaAttributeConverter<O,R> {
private final ManagedBean<? extends AttributeConverter<O,R>> attributeConverterBean;
private final JavaTypeDescriptor<? extends AttributeConverter<O, R>> converterJtd;
private final JavaTypeDescriptor<O> domainJtd;
private final JavaTypeDescriptor<R> jdbcJtd;
private final JavaType<? extends AttributeConverter<O, R>> converterJtd;
private final JavaType<O> domainJtd;
private final JavaType<R> jdbcJtd;
public JpaAttributeConverterImpl(
ManagedBean<? extends AttributeConverter<O, R>> attributeConverterBean,
JavaTypeDescriptor<? extends AttributeConverter<O,R>> converterJtd,
JavaTypeDescriptor<O> domainJtd,
JavaTypeDescriptor<R> jdbcJtd) {
JavaType<? extends AttributeConverter<O,R>> converterJtd,
JavaType<O> domainJtd,
JavaType<R> jdbcJtd) {
this.attributeConverterBean = attributeConverterBean;
this.converterJtd = converterJtd;
this.domainJtd = domainJtd;
@ -43,7 +41,7 @@ public class JpaAttributeConverterImpl<O,R> implements JpaAttributeConverter<O,R
public JpaAttributeConverterImpl(
ManagedBean<? extends AttributeConverter<O,R>> attributeConverterBean,
JavaTypeDescriptor<? extends AttributeConverter<O,R>> converterJtd,
JavaType<? extends AttributeConverter<O,R>> converterJtd,
Class<O> domainJavaType,
Class<R> jdbcJavaType,
JpaAttributeConverterCreationContext context) {
@ -54,7 +52,7 @@ public class JpaAttributeConverterImpl<O,R> implements JpaAttributeConverter<O,R
jdbcJtd = jtdRegistry.getDescriptor( jdbcJavaType );
//noinspection unchecked
domainJtd = (JavaTypeDescriptor<O>) jtdRegistry.resolveDescriptor(
domainJtd = (JavaType<O>) jtdRegistry.resolveDescriptor(
domainJavaType,
() -> RegistryHelper.INSTANCE.createTypeDescriptor(
domainJavaType,
@ -92,27 +90,27 @@ public class JpaAttributeConverterImpl<O,R> implements JpaAttributeConverter<O,R
}
@Override
public JavaTypeDescriptor<? extends AttributeConverter<O, R>> getConverterJavaTypeDescriptor() {
public JavaType<? extends AttributeConverter<O, R>> getConverterJavaTypeDescriptor() {
return converterJtd;
}
@Override
public JavaTypeDescriptor<O> getDomainJavaDescriptor() {
public JavaType<O> getDomainJavaDescriptor() {
return getDomainJavaTypeDescriptor();
}
@Override
public JavaTypeDescriptor<R> getRelationalJavaDescriptor() {
public JavaType<R> getRelationalJavaDescriptor() {
return getRelationalJavaTypeDescriptor();
}
@Override
public JavaTypeDescriptor<O> getDomainJavaTypeDescriptor() {
public JavaType<O> getDomainJavaTypeDescriptor() {
return domainJtd;
}
@Override
public JavaTypeDescriptor<R> getRelationalJavaTypeDescriptor() {
public JavaType<R> getRelationalJavaTypeDescriptor() {
return jdbcJtd;
}
}

View File

@ -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<E extends Enum<E>> implements EnumValueConverter<E,String>, Serializable {
private final EnumJavaTypeDescriptor<E> domainTypeDescriptor;
private final JdbcTypeDescriptor jdbcTypeDescriptor;
private final JavaTypeDescriptor<String> relationalTypeDescriptor;
private final JavaType<String> relationalTypeDescriptor;
private transient ValueExtractor<String> valueExtractor;
private transient ValueBinder<String> valueBinder;
@ -38,7 +38,7 @@ public class NamedEnumValueConverter<E extends Enum<E>> implements EnumValueConv
public NamedEnumValueConverter(
EnumJavaTypeDescriptor<E> domainTypeDescriptor,
JdbcTypeDescriptor jdbcTypeDescriptor,
JavaTypeDescriptor<String> relationalTypeDescriptor) {
JavaType<String> relationalTypeDescriptor) {
this.domainTypeDescriptor = domainTypeDescriptor;
this.jdbcTypeDescriptor = jdbcTypeDescriptor;
this.relationalTypeDescriptor = relationalTypeDescriptor;
@ -53,7 +53,7 @@ public class NamedEnumValueConverter<E extends Enum<E>> implements EnumValueConv
}
@Override
public JavaTypeDescriptor<String> getRelationalJavaDescriptor() {
public JavaType<String> getRelationalJavaDescriptor() {
return relationalTypeDescriptor;
}

View File

@ -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<E extends Enum<E>> implements EnumValueCo
private final EnumJavaTypeDescriptor<E> enumJavaDescriptor;
private final JdbcTypeDescriptor jdbcTypeDescriptor;
private final JavaTypeDescriptor<Integer> relationalJavaDescriptor;
private final JavaType<Integer> relationalJavaDescriptor;
private transient ValueExtractor<Integer> valueExtractor;
private transient ValueBinder<Integer> valueBinder;
@ -39,7 +39,7 @@ public class OrdinalEnumValueConverter<E extends Enum<E>> implements EnumValueCo
public OrdinalEnumValueConverter(
EnumJavaTypeDescriptor<E> enumJavaDescriptor,
JdbcTypeDescriptor jdbcTypeDescriptor,
JavaTypeDescriptor<Integer> relationalJavaDescriptor) {
JavaType<Integer> relationalJavaDescriptor) {
this.enumJavaDescriptor = enumJavaDescriptor;
this.jdbcTypeDescriptor = jdbcTypeDescriptor;
this.relationalJavaDescriptor = relationalJavaDescriptor;
@ -72,7 +72,7 @@ public class OrdinalEnumValueConverter<E extends Enum<E>> implements EnumValueCo
}
@Override
public JavaTypeDescriptor<Integer> getRelationalJavaDescriptor() {
public JavaType<Integer> getRelationalJavaDescriptor() {
return relationalJavaDescriptor;
}

View File

@ -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<D,R> {
/**
* Descriptor for the Java type for the domain portion of this converter
*/
JavaTypeDescriptor<D> getDomainJavaDescriptor();
JavaType<D> getDomainJavaDescriptor();
/**
* Descriptor for the Java type for the relational portion of this converter
*/
JavaTypeDescriptor<R> getRelationalJavaDescriptor();
JavaType<R> getRelationalJavaDescriptor();
}

View File

@ -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<O,R> extends BasicValueConverter<O,R> {
JavaTypeDescriptor<? extends AttributeConverter<O,R>> getConverterJavaTypeDescriptor();
JavaType<? extends AttributeConverter<O,R>> getConverterJavaTypeDescriptor();
ManagedBean<? extends AttributeConverter<O,R>> getConverterBean();
JavaTypeDescriptor<O> getDomainJavaTypeDescriptor();
JavaTypeDescriptor<R> getRelationalJavaTypeDescriptor();
JavaType<O> getDomainJavaTypeDescriptor();
JavaType<R> getRelationalJavaTypeDescriptor();
}

View File

@ -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<D,R> implements BasicValueConverter<D,R> {
private final JavaTypeDescriptor<D> domainJtd;
private final JavaTypeDescriptor<R> relationalJtd;
private final JavaType<D> domainJtd;
private final JavaType<R> relationalJtd;
private final Function<R,D> toDomainHandler;
private final Function<D,R> toRelationalHandler;
public SimpleBasicValueConverter(
JavaTypeDescriptor<D> domainJtd,
JavaTypeDescriptor<R> relationalJtd,
JavaType<D> domainJtd,
JavaType<R> relationalJtd,
Function<R,D> toDomainHandler,
Function<D,R> toRelationalHandler) {
this.domainJtd = domainJtd;
@ -42,12 +42,12 @@ public class SimpleBasicValueConverter<D,R> implements BasicValueConverter<D,R>
}
@Override
public JavaTypeDescriptor<D> getDomainJavaDescriptor() {
public JavaType<D> getDomainJavaDescriptor() {
return domainJtd;
}
@Override
public JavaTypeDescriptor<R> getRelationalJavaDescriptor() {
public JavaType<R> getRelationalJavaDescriptor() {
return relationalJtd;
}
}

View File

@ -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<J> implements SimpleDomainType<J> {
private final JpaMetamodel domainMetamodel;
private final JavaTypeDescriptor<J> javaTypeDescriptor;
private final JavaType<J> javaTypeDescriptor;
@SuppressWarnings("WeakerAccess")
public AbstractDomainType(JavaTypeDescriptor<J> javaTypeDescriptor, JpaMetamodel domainMetamodel) {
public AbstractDomainType(JavaType<J> javaTypeDescriptor, JpaMetamodel domainMetamodel) {
this.javaTypeDescriptor = javaTypeDescriptor;
this.domainMetamodel = domainMetamodel;
}
@ -26,7 +26,7 @@ public abstract class AbstractDomainType<J> implements SimpleDomainType<J> {
}
@Override
public JavaTypeDescriptor<J> getExpressableJavaTypeDescriptor() {
public JavaType<J> getExpressableJavaTypeDescriptor() {
return javaTypeDescriptor;
}

View File

@ -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<J>
public AbstractIdentifiableType(
String typeName,
JavaTypeDescriptor<J> javaTypeDescriptor,
JavaType<J> javaTypeDescriptor,
IdentifiableDomainType<? super J> superType,
boolean hasIdClass,
boolean hasIdentifierProperty,

View File

@ -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<J>
protected AbstractManagedType(
String hibernateTypeName,
JavaTypeDescriptor<J> javaTypeDescriptor,
JavaType<J> javaTypeDescriptor,
ManagedDomainType<? super J> superType,
JpaMetamodel domainMetamodel) {
super( javaTypeDescriptor, domainMetamodel );

View File

@ -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<J> extends SimpleDomainType<J> {
JavaTypeDescriptor<J> getExpressableJavaTypeDescriptor();
JavaType<J> getExpressableJavaTypeDescriptor();
}

View File

@ -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<J> extends SqmExpressable<J> {
*
* @see #getTypeName
*/
JavaTypeDescriptor<J> getExpressableJavaTypeDescriptor();
JavaType<J> getExpressableJavaTypeDescriptor();
}

Some files were not shown because too many files have changed in this diff Show More