re-enable tests

re-organize some tests
fixed bad merge
This commit is contained in:
Steve Ebersole 2021-03-29 12:23:37 -05:00
parent c9b598389f
commit fcd7a6f356
6 changed files with 20 additions and 20 deletions

View File

@ -32,7 +32,7 @@ import org.hibernate.type.descriptor.java.ImmutableMutabilityPlan;
import org.hibernate.type.descriptor.java.JavaTypeDescriptor;
import org.hibernate.type.descriptor.java.MutabilityPlan;
import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
import org.hibernate.type.descriptor.sql.SqlTypeDescriptorIndicators;
import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators;
import org.hibernate.type.spi.TypeConfiguration;
import org.hibernate.type.spi.TypeConfigurationAware;
import org.hibernate.usertype.ParameterizedType;
@ -103,7 +103,7 @@ public class TypeDefinition implements Serializable {
Map localConfigParameters,
MutabilityPlan explicitMutabilityPlan,
MetadataBuildingContext context,
SqlTypeDescriptorIndicators indicators) {
JdbcTypeDescriptorIndicators indicators) {
if ( CollectionHelper.isEmpty( localConfigParameters ) ) {
// we can use the re-usable resolution...
if ( reusableResolution == null ) {
@ -121,7 +121,7 @@ public class TypeDefinition implements Serializable {
private BasicValue.Resolution<?> createResolution(
String name,
Map<?,?> usageSiteProperties,
SqlTypeDescriptorIndicators indicators,
JdbcTypeDescriptorIndicators indicators,
MetadataBuildingContext context) {
return createResolution(
name,
@ -138,7 +138,7 @@ public class TypeDefinition implements Serializable {
Class<?> typeImplementorClass,
Properties parameters,
Map<?,?> usageSiteProperties,
SqlTypeDescriptorIndicators indicators,
JdbcTypeDescriptorIndicators indicators,
MetadataBuildingContext context) {
final TypeConfiguration typeConfiguration = context.getBootstrapContext().getTypeConfiguration();
@ -238,7 +238,7 @@ public class TypeDefinition implements Serializable {
final JavaTypeDescriptor<Serializable> jtd = typeConfiguration
.getJavaTypeDescriptorRegistry()
.resolveDescriptor( typeImplementorClass );
final SqlTypeDescriptor jdbcType = typeConfiguration.getSqlTypeDescriptorRegistry().getDescriptor( Types.VARBINARY );
final JdbcTypeDescriptor jdbcType = typeConfiguration.getJdbcTypeDescriptorRegistry().getDescriptor( Types.VARBINARY );
final BasicType<Serializable> resolved = typeConfiguration.getBasicTypeRegistry().resolve( jtd, jdbcType );
final SerializableType legacyType = new SerializableType( typeImplementorClass );

View File

@ -13,8 +13,8 @@ import org.hibernate.type.BasicType;
import org.hibernate.type.ConvertedBasicType;
import org.hibernate.type.descriptor.java.JavaTypeDescriptor;
import org.hibernate.type.descriptor.java.MutabilityPlan;
import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
import org.hibernate.type.descriptor.sql.SqlTypeDescriptorIndicators;
import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators;
/**
* @author Steve Ebersole
@ -25,7 +25,7 @@ public class ConvertedBasicTypeResolution<J> implements BasicValue.Resolution<J>
public ConvertedBasicTypeResolution(
ConvertedBasicType basicType,
SqlTypeDescriptorIndicators stdIndicators) {
JdbcTypeDescriptorIndicators stdIndicators) {
this.basicType = basicType;
final BasicValueConverter valueConverter = basicType.getValueConverter();
@ -58,8 +58,8 @@ public class ConvertedBasicTypeResolution<J> implements BasicValue.Resolution<J>
}
@Override
public SqlTypeDescriptor getRelationalSqlTypeDescriptor() {
return adapted.getSqlTypeDescriptor();
public JdbcTypeDescriptor getJdbcTypeDescriptor() {
return adapted.getJdbcTypeDescriptor();
}
@Override

View File

@ -17,7 +17,7 @@ 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.MutabilityPlan;
import org.hibernate.type.descriptor.sql.SqlTypeDescriptorIndicators;
import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators;
/**
* @author Steve Ebersole
@ -33,16 +33,16 @@ public class ValueConverterTypeAdapter<J> extends AbstractSingleColumnStandardBa
public ValueConverterTypeAdapter(
String description,
BasicValueConverter<J, ?> converter,
SqlTypeDescriptorIndicators indicators) {
JdbcTypeDescriptorIndicators indicators) {
super(
converter.getRelationalJavaDescriptor().getJdbcRecommendedSqlType( indicators ),
converter.getRelationalJavaDescriptor().getRecommendedJdbcType( indicators ),
(JavaTypeDescriptor) converter.getRelationalJavaDescriptor()
);
this.description = description;
this.converter = converter;
this.valueBinder = getSqlTypeDescriptor().getBinder( converter.getRelationalJavaDescriptor() );
this.valueBinder = getJdbcTypeDescriptor().getBinder( converter.getRelationalJavaDescriptor() );
}
@Override

View File

@ -157,10 +157,10 @@ public class BooleanTypeDescriptor extends AbstractClassTypeDescriptor<Boolean>
}
@Override
public String getCheckCondition(String columnName, SqlTypeDescriptor sqlTypeDescriptor, Dialect dialect) {
public String getCheckCondition(String columnName, JdbcTypeDescriptor sqlTypeDescriptor, Dialect dialect) {
return dialect.getBooleanCheckCondition(
columnName,
sqlTypeDescriptor.getSqlType(),
sqlTypeDescriptor.getJdbcTypeCode(),
characterValueFalse,
characterValueTrue
);

View File

@ -214,7 +214,7 @@ public class EnumJavaTypeDescriptor<T extends Enum<T>> extends AbstractClassType
}
@Override
public String getCheckCondition(String columnName, SqlTypeDescriptor sqlTypeDescriptor, Dialect dialect) {
return dialect.getEnumCheckCondition( columnName, sqlTypeDescriptor.getSqlType(), getJavaTypeClass() );
public String getCheckCondition(String columnName, JdbcTypeDescriptor jdbcType, Dialect dialect) {
return dialect.getEnumCheckCondition( columnName, jdbcType.getJdbcTypeCode(), getJavaTypeClass() );
}
}

View File

@ -12,8 +12,8 @@ import org.hibernate.metamodel.model.convert.internal.OrdinalEnumValueConverter;
import org.hibernate.type.EnumType;
import org.hibernate.type.descriptor.java.EnumJavaTypeDescriptor;
import org.hibernate.type.descriptor.java.StringTypeDescriptor;
import org.hibernate.type.descriptor.sql.IntegerTypeDescriptor;
import org.hibernate.type.descriptor.sql.VarcharTypeDescriptor;
import org.hibernate.type.descriptor.jdbc.IntegerTypeDescriptor;
import org.hibernate.type.descriptor.jdbc.VarcharTypeDescriptor;
import org.hibernate.type.spi.TypeConfiguration;
import org.hibernate.testing.orm.junit.BaseUnitTest;