diff --git a/design/6.0-changes.adoc b/design/6.0-changes.adoc
index 12a26b3c83..34464bf797 100644
--- a/design/6.0-changes.adoc
+++ b/design/6.0-changes.adoc
@@ -7,9 +7,9 @@ Changes in 6.0 worth documenting in various places
Document in release-notes:
-* `@SqlTypeCode`
-* `@SqlType`
-* `@SqlTypeRegistration`
+* `@JdbcTypeCode`
+* `@JdbcType`
+* `@JdbcTypeRegistration`
* `@JavaType`
* `@JavaTypeRegistration`
* `NativeQuery#addScalar(Class)`
diff --git a/documentation/src/main/asciidoc/topical/logging/Logging.adoc b/documentation/src/main/asciidoc/topical/logging/Logging.adoc
index f85e399fce..d87911d17a 100644
--- a/documentation/src/main/asciidoc/topical/logging/Logging.adoc
+++ b/documentation/src/main/asciidoc/topical/logging/Logging.adoc
@@ -68,7 +68,7 @@ troubleshooting device. Some log categories of particular interest include:
|org.hibernate.SQL
|Log all SQL statements as they are executed with through JDBC
-|org.hibernate.type.descriptor.sql
+|org.hibernate.type.descriptor.jdbc
|Log all values as they are bound to JDBC parameters and extracted from JDBC results
|org.hibernate.tool.hbm2ddl
diff --git a/documentation/src/main/asciidoc/userguide/appendices/BestPractices.adoc b/documentation/src/main/asciidoc/userguide/appendices/BestPractices.adoc
index e1160a01f5..9b7801524c 100644
--- a/documentation/src/main/asciidoc/userguide/appendices/BestPractices.adoc
+++ b/documentation/src/main/asciidoc/userguide/appendices/BestPractices.adoc
@@ -36,7 +36,7 @@ log4j.logger.org.hibernate.SQL=debug
### log JDBC bind parameters ###
log4j.logger.org.hibernate.type=trace
-log4j.logger.org.hibernate.type.descriptor.sql=trace
+log4j.logger.org.hibernate.type.descriptor.jdbc=trace
----
However, there are some other alternatives like using datasource-proxy or p6spy.
diff --git a/documentation/src/main/asciidoc/userguide/chapters/domain/basic_types.adoc b/documentation/src/main/asciidoc/userguide/chapters/domain/basic_types.adoc
index e867553c26..2648e7a2f7 100644
--- a/documentation/src/main/asciidoc/userguide/chapters/domain/basic_types.adoc
+++ b/documentation/src/main/asciidoc/userguide/chapters/domain/basic_types.adoc
@@ -276,8 +276,8 @@ include::{sourcedir}/basic/BitSetType.java[tags=basic-custom-type-BitSetType-exa
----
====
-The `AbstractSingleColumnStandardBasicType` requires an `sqlTypeDescriptor` and a `javaTypeDescriptor`.
-The `sqlTypeDescriptor` is `VarcharTypeDescriptor.INSTANCE` because the database column is a VARCHAR.
+The `AbstractSingleColumnStandardBasicType` requires an `jdbcTypeDescriptor` and a `javaTypeDescriptor`.
+The `jdbcTypeDescriptor` is `VarcharTypeDescriptor.INSTANCE` because the database column is a VARCHAR.
On the Java side, we need to use a `BitSetTypeDescriptor` instance which can be implemented like this:
[[basic-custom-type-BitSetTypeDescriptor-example]]
diff --git a/documentation/src/main/asciidoc/userguide/chapters/domain/jdbc_mappings.adoc b/documentation/src/main/asciidoc/userguide/chapters/domain/jdbc_mappings.adoc
index 4cbdf85c50..1ebcd2f86e 100644
--- a/documentation/src/main/asciidoc/userguide/chapters/domain/jdbc_mappings.adoc
+++ b/documentation/src/main/asciidoc/userguide/chapters/domain/jdbc_mappings.adoc
@@ -2,12 +2,12 @@
=== JDBC Mappings
Historically Hibernate's BasicType / UserType system is based on a static binding between a Java type
-(`JavaTypeDescriptor`) and a SQL/JDBC type (`SqlTypeDescriptor`). 6.0 introduces the ability to influence
-the `JavaTypeDescriptor` and `SqlTypeDescriptor` independently. Under this new approach, the resolution of a
+(`JavaTypeDescriptor`) and a SQL/JDBC type (`JdbcTypeDescriptor`). 6.0 introduces the ability to influence
+the `JavaTypeDescriptor` and `JdbcTypeDescriptor` independently. Under this new approach, the resolution of a
basic value mapping comes down to:
* `JavaTypeDescriptor` to use
-* `SqlTypeDescriptor` to use
+* `JdbcTypeDescriptor` to use
* `BasicValueConverter` to use (if one)
* `MutabilityPlan` to use
@@ -29,13 +29,13 @@ An `AttributeConverter` can also influence the `JavaTypeDescriptor` used in cert
==== SqlTypeDescriptor
-`@SqlType` can be used to explicitly specify the `SqlTypeDescriptor` to use for a particular mapping.
+`JdbcType` can be used to explicitly specify the `JdbcTypeDescriptor` to use for a particular mapping.
-`@SqlTypeCode` can be used to indicate the `SqlTypeDescriptorRegistry` entry to use. `@SqlTypeRegistration` can
-be used to register a `SqlTypeDescriptor` with the `SqlTypeDescriptorRegistry`.
+`JdbcTypeCode` can be used to indicate the `JdbcTypeDescriptorRegistry` entry to use. `JdbcTypeRegistration` can
+be used to register a `JdbcTypeDescriptor` with the `JdbcTypeDescriptorRegistry`.
-`@MapKeySqlType` and `@MapKeySqlTypeCode` work the same as `@SqlType` and `@SqlTypeCode`, respectively, except
-describing the `SqlTypeDescriptor` to use for the map's key. In which case, `@SqlType` and `@SqlTypeCode` refer
+`MapKeyJdbcType` and `MapKeyJdbcTypeCode` work the same as `JdbcType` and `JdbcTypeCode`, respectively, except
+describing the `JdbcTypeDescriptor` to use for the map's key. In which case, `JdbcType` and `JdbcTypeCode` refer
to the map's values.
For character and binary data, the JPA `@Lob` annotation can be used to indicate that a JDBC BLOB, CLOB, NCLOB should
@@ -44,12 +44,12 @@ be used.
For character data, `@Nationalized` can be used to indicate that the JDBC nationalized variant should be used.
E.g. `Types.CLOB` -> `Types.CLOB`, `Types.VARCHAR` -> `Types.NVARCHAR`, etc
-`@Enumerated` influences the `SqlTypeDescriptor` to use by the `EnumType` specified. `EnumType#ORDINAL` implies
+`@Enumerated` influences the `JdbcTypeDescriptor` to use by the `EnumType` specified. `EnumType#ORDINAL` implies
that `Types.TINYINT` should be used. `EnumType#STRING` implies that `Types.VARCHAR` should be used.
-`@Temporal` can also influence the `SqlTypeDescriptor` used.
+`@Temporal` can also influence the `JdbcTypeDescriptor` used.
-An `AttributeConverter` can also influence the `SqlTypeDescriptor` to use by the Java type it reports for its
+An `AttributeConverter` can also influence the `JdbcTypeDescriptor` to use by the Java type it reports for its
"relational type"
diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/type/CommaDelimitedStringsType.java b/documentation/src/test/java/org/hibernate/userguide/collections/type/CommaDelimitedStringsType.java
index 58fc9064e8..e6039ce61a 100644
--- a/documentation/src/test/java/org/hibernate/userguide/collections/type/CommaDelimitedStringsType.java
+++ b/documentation/src/test/java/org/hibernate/userguide/collections/type/CommaDelimitedStringsType.java
@@ -9,7 +9,7 @@ package org.hibernate.userguide.collections.type;
import java.util.List;
import org.hibernate.type.AbstractSingleColumnStandardBasicType;
-import org.hibernate.type.descriptor.sql.VarcharTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.VarcharTypeDescriptor;
/**
* @author Vlad Mihalcea
diff --git a/documentation/src/test/java/org/hibernate/userguide/collections/type/TimestampEpochType.java b/documentation/src/test/java/org/hibernate/userguide/collections/type/TimestampEpochType.java
index d12585e17a..cbcccdd667 100644
--- a/documentation/src/test/java/org/hibernate/userguide/collections/type/TimestampEpochType.java
+++ b/documentation/src/test/java/org/hibernate/userguide/collections/type/TimestampEpochType.java
@@ -11,14 +11,12 @@ import java.util.Comparator;
import java.util.Date;
import org.hibernate.HibernateException;
-import org.hibernate.dialect.Dialect;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.type.AbstractSingleColumnStandardBasicType;
import org.hibernate.type.LiteralType;
-import org.hibernate.type.StringType;
import org.hibernate.type.VersionType;
import org.hibernate.type.descriptor.java.JdbcTimestampTypeDescriptor;
-import org.hibernate.type.descriptor.sql.BigIntTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.BigIntTypeDescriptor;
/**
* @author Vlad Mihalcea
diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/BitSetType.java b/documentation/src/test/java/org/hibernate/userguide/mapping/basic/BitSetType.java
index 54065eaa82..66e328568b 100644
--- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/BitSetType.java
+++ b/documentation/src/test/java/org/hibernate/userguide/mapping/basic/BitSetType.java
@@ -5,7 +5,7 @@ import java.util.BitSet;
import org.hibernate.dialect.Dialect;
import org.hibernate.type.AbstractSingleColumnStandardBasicType;
import org.hibernate.type.DiscriminatorType;
-import org.hibernate.type.descriptor.sql.VarcharTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.VarcharTypeDescriptor;
/**
* @author Vlad Mihalcea
diff --git a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/GenderType.java b/documentation/src/test/java/org/hibernate/userguide/mapping/basic/GenderType.java
index 2e764f5245..0f08fae202 100644
--- a/documentation/src/test/java/org/hibernate/userguide/mapping/basic/GenderType.java
+++ b/documentation/src/test/java/org/hibernate/userguide/mapping/basic/GenderType.java
@@ -1,7 +1,7 @@
package org.hibernate.userguide.mapping.basic;
import org.hibernate.type.AbstractSingleColumnStandardBasicType;
-import org.hibernate.type.descriptor.sql.CharTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.CharTypeDescriptor;
/**
* @author Vlad Mihalcea
diff --git a/documentation/src/test/resources/log4j.properties b/documentation/src/test/resources/log4j.properties
index 49358a1a2d..12f6f8b9e6 100644
--- a/documentation/src/test/resources/log4j.properties
+++ b/documentation/src/test/resources/log4j.properties
@@ -26,7 +26,7 @@ log4j.logger.org.hibernate.SQL=debug
### log JDBC bind parameters ###
log4j.logger.org.hibernate.type=trace
-log4j.logger.org.hibernate.type.descriptor.sql=trace
+log4j.logger.org.hibernate.type.descriptor.jdbc=trace
log4j.logger.org.hibernate.id.enhanced.TableGenerator=trace
log4j.logger.org.hibernate.id.IdentifierGeneratorHelper=trace
log4j.logger.org.hibernate.persister.entity.AbstractEntityPersister=trace
diff --git a/hibernate-agroal/src/test/resources/log4j.properties b/hibernate-agroal/src/test/resources/log4j.properties
index eb96581a28..5e77474efb 100644
--- a/hibernate-agroal/src/test/resources/log4j.properties
+++ b/hibernate-agroal/src/test/resources/log4j.properties
@@ -34,8 +34,8 @@ log4j.logger.org.hibernate.testing.cache=debug
# SQL Logging - HHH-6833
log4j.logger.org.hibernate.SQL=debug
-log4j.logger.org.hibernate.type.descriptor.sql.BasicBinder=trace
-log4j.logger.org.hibernate.type.descriptor.sql.BasicExtractor=trace
+log4j.logger.org.hibernate.type.descriptor.jdbc.BasicBinder=trace
+log4j.logger.org.hibernate.type.descriptor.jdbc.BasicExtractor=trace
log4j.logger.org.hibernate.hql.internal.ast=debug
diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/SqlType.java b/hibernate-core/src/main/java/org/hibernate/annotations/JdbcType.java
similarity index 56%
rename from hibernate-core/src/main/java/org/hibernate/annotations/SqlType.java
rename to hibernate-core/src/main/java/org/hibernate/annotations/JdbcType.java
index 32f7691713..7c70366ccc 100644
--- a/hibernate-core/src/main/java/org/hibernate/annotations/SqlType.java
+++ b/hibernate-core/src/main/java/org/hibernate/annotations/JdbcType.java
@@ -10,8 +10,8 @@ import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import org.hibernate.resource.beans.spi.ManagedBean;
-import org.hibernate.resource.beans.spi.ManagedBeanRegistry;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeDescriptorRegistry;
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.FIELD;
@@ -19,26 +19,25 @@ import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
- * Allows specifying the specific {@link org.hibernate.type.descriptor.sql.SqlTypeDescriptor}
- * to use for a particular column mapping. Can reference a {@link ManagedBean} - see
- * {@link ManagedBeanRegistry}
+ * Allows specifying the specific {@link JdbcTypeDescriptor}
+ * to use for a particular column mapping. Resolved as a {@link ManagedBean}
*
* ````
* @Entity
* class User {
* ...
- * @SqlType ( MyCustomSqlIntegerDescriptor.class )
+ * @JdbcType ( MyCustomSqlIntegerDescriptor.class )
* int getAge() { ... }
*
- * @SqlType ( MyCustomSqlVarcharDescriptor.class )
+ * @JdbcType ( MyCustomSqlVarcharDescriptor.class )
* String getName() { ... }
* }
* ````
*
- * @apiNote Should not be used in combination with {@link SqlTypeCode}
+ * @apiNote Should not be used in combination with {@link JdbcTypeCode}
*
- * @see org.hibernate.type.descriptor.sql.SqlTypeDescriptor
- * @see org.hibernate.type.descriptor.sql.spi.SqlTypeDescriptorRegistry
+ * @see JdbcTypeDescriptor
+ * @see JdbcTypeDescriptorRegistry
*
* @author Steve Ebersole
*
@@ -47,6 +46,6 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
@java.lang.annotation.Target({METHOD, FIELD, ANNOTATION_TYPE})
@Inherited
@Retention(RUNTIME)
-public @interface SqlType {
- Class extends SqlTypeDescriptor> value();
+public @interface JdbcType {
+ Class extends JdbcTypeDescriptor> value();
}
diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/SqlTypeCode.java b/hibernate-core/src/main/java/org/hibernate/annotations/JdbcTypeCode.java
similarity index 71%
rename from hibernate-core/src/main/java/org/hibernate/annotations/SqlTypeCode.java
rename to hibernate-core/src/main/java/org/hibernate/annotations/JdbcTypeCode.java
index 3f3549ec0e..eb6fab8376 100644
--- a/hibernate-core/src/main/java/org/hibernate/annotations/SqlTypeCode.java
+++ b/hibernate-core/src/main/java/org/hibernate/annotations/JdbcTypeCode.java
@@ -9,6 +9,9 @@ package org.hibernate.annotations;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeDescriptorRegistry;
+
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
@@ -17,10 +20,10 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* @asciidoc
*
- * Allows specifying the {@link org.hibernate.type.descriptor.sql.SqlTypeDescriptor} to
- * use based on the type-code. This might be a* standard {@linkplain java.sql.Types JDBC Types}
+ * Allows specifying the {@link JdbcTypeDescriptor} to
+ * use based on the type-code. This might be a standard {@linkplain java.sql.Types JDBC Type}
* code or a custom code. Either way, there must be an entry in the
- * {@link org.hibernate.type.descriptor.sql.spi.SqlTypeDescriptorRegistry} registered under this code
+ * {@link JdbcTypeDescriptorRegistry} registered under this code
*
* ````
* @Entity
@@ -28,29 +31,29 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* ...
* // By default Hibernate maps Java's Integer to JDBC's INTEGER
* // but here we want to use JDBC's TINYINT instead.
- * @SqlTypeCode ( Types.TINYINT )
+ * @JdbcTypeCode ( Types.TINYINT )
* int getAge() { ... }
*
* // By default Hibernate maps Java's String to JDBC's VARCHAR
* // but here we want to use JDBC's NVARCHAR instead.
- * @SqlTypeCode ( Types.NVARCHAR )
+ * @JdbcTypeCode ( Types.NVARCHAR )
* String getName() { ... }
* }
* ````
- * *
+ *
* Other forms of influencing the JDBC type used include:
* {@link javax.persistence.Enumerated} / {@link javax.persistence.EnumType}
* {@link javax.persistence.TemporalType}
* {@link javax.persistence.Lob}
* {@link Nationalized}
- * {@link SqlType}
+ * {@link JdbcType}
*
*
* These forms should not be mixed on the same mapping. The result is not defined
*
- * @apiNote Should not be used in combination with {@link SqlType}
+ * @apiNote Should not be used in combination with the other forms of influencing the JDBC type used
*
- * @see SqlTypeRegistration
+ * @see JdbcTypeRegistration
*
* @author Steve Ebersole
*
@@ -59,10 +62,10 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
@java.lang.annotation.Target({METHOD, FIELD, ANNOTATION_TYPE})
@Inherited
@Retention(RUNTIME)
-public @interface SqlTypeCode {
+public @interface JdbcTypeCode {
/**
* The standard {@linkplain java.sql.Types JDBC Types} code or a custom code.
- * This ultimately decides which {@link org.hibernate.type.descriptor.sql.SqlTypeDescriptor}
+ * This ultimately decides which {@link JdbcTypeDescriptor}
* is used to "understand" the described SQL data type
*/
int value();
diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/SqlTypeRegistration.java b/hibernate-core/src/main/java/org/hibernate/annotations/JdbcTypeRegistration.java
similarity index 73%
rename from hibernate-core/src/main/java/org/hibernate/annotations/SqlTypeRegistration.java
rename to hibernate-core/src/main/java/org/hibernate/annotations/JdbcTypeRegistration.java
index 94f9a86565..1d967256c7 100644
--- a/hibernate-core/src/main/java/org/hibernate/annotations/SqlTypeRegistration.java
+++ b/hibernate-core/src/main/java/org/hibernate/annotations/JdbcTypeRegistration.java
@@ -10,7 +10,8 @@ import java.lang.annotation.Inherited;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeDescriptorRegistry;
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.PACKAGE;
@@ -19,7 +20,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Describes a SqlTypeDescriptor to be added to the
- * {@link org.hibernate.type.descriptor.sql.spi.SqlTypeDescriptorRegistry}
+ * {@link JdbcTypeDescriptorRegistry}
*
* @author Steve Ebersole
*
@@ -28,18 +29,18 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
@java.lang.annotation.Target({PACKAGE, TYPE, ANNOTATION_TYPE})
@Inherited
@Retention(RUNTIME)
-@Repeatable( SqlTypeRegistrations.class )
-public @interface SqlTypeRegistration {
+@Repeatable( JdbcTypeRegistrations.class )
+public @interface JdbcTypeRegistration {
/**
* The descriptor to register
*/
- Class extends SqlTypeDescriptor> value();
+ Class extends JdbcTypeDescriptor> value();
/**
* The type-code under which to register this descriptor. Can either add a new descriptor
* or override an existing one.
*
- * By default we will use {@link SqlTypeDescriptor#getJdbcTypeCode}
+ * By default we will use {@link JdbcTypeDescriptor#getJdbcTypeCode}
*/
int registrationCode() default Integer.MIN_VALUE;
}
diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/SqlTypeRegistrations.java b/hibernate-core/src/main/java/org/hibernate/annotations/JdbcTypeRegistrations.java
similarity index 86%
rename from hibernate-core/src/main/java/org/hibernate/annotations/SqlTypeRegistrations.java
rename to hibernate-core/src/main/java/org/hibernate/annotations/JdbcTypeRegistrations.java
index 1a7f0c107e..5b90a629cf 100644
--- a/hibernate-core/src/main/java/org/hibernate/annotations/SqlTypeRegistrations.java
+++ b/hibernate-core/src/main/java/org/hibernate/annotations/JdbcTypeRegistrations.java
@@ -15,7 +15,7 @@ import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
- * Grouping of {@link SqlTypeRegistration}
+ * Grouping of {@link JdbcTypeRegistration}
*
* @author Steve Ebersole
*
@@ -24,6 +24,6 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
@java.lang.annotation.Target({PACKAGE, TYPE, ANNOTATION_TYPE})
@Inherited
@Retention(RUNTIME)
-public @interface SqlTypeRegistrations {
- SqlTypeRegistration[] value();
+public @interface JdbcTypeRegistrations {
+ JdbcTypeRegistration[] value();
}
diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/MapKeySqlType.java b/hibernate-core/src/main/java/org/hibernate/annotations/MapKeyJdbcType.java
similarity index 84%
rename from hibernate-core/src/main/java/org/hibernate/annotations/MapKeySqlType.java
rename to hibernate-core/src/main/java/org/hibernate/annotations/MapKeyJdbcType.java
index b7394a3c7c..a2d8baa275 100644
--- a/hibernate-core/src/main/java/org/hibernate/annotations/MapKeySqlType.java
+++ b/hibernate-core/src/main/java/org/hibernate/annotations/MapKeyJdbcType.java
@@ -15,7 +15,7 @@ import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
- * Same function as {@link SqlType}, but used to define the SQL type descriptor to
+ * Same function as {@link JdbcType}, but used to define the SQL type descriptor to
* use for the map-key
*
* @author Steve Ebersole
@@ -25,6 +25,6 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
@java.lang.annotation.Target({METHOD, FIELD, ANNOTATION_TYPE})
@Inherited
@Retention(RUNTIME)
-public @interface MapKeySqlType {
- SqlType value();
+public @interface MapKeyJdbcType {
+ JdbcType value();
}
diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/MapKeySqlTypeCode.java b/hibernate-core/src/main/java/org/hibernate/annotations/MapKeyJdbcTypeCode.java
similarity index 83%
rename from hibernate-core/src/main/java/org/hibernate/annotations/MapKeySqlTypeCode.java
rename to hibernate-core/src/main/java/org/hibernate/annotations/MapKeyJdbcTypeCode.java
index 29b42a85e2..3de393ed39 100644
--- a/hibernate-core/src/main/java/org/hibernate/annotations/MapKeySqlTypeCode.java
+++ b/hibernate-core/src/main/java/org/hibernate/annotations/MapKeyJdbcTypeCode.java
@@ -15,7 +15,7 @@ import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
- * Same function as {@link SqlTypeCode}, but used to define the SQL type descriptor to
+ * Same function as {@link JdbcTypeCode}, but used to define the SQL type descriptor to
* use for the map-key
*
* @author Steve Ebersole
@@ -25,6 +25,6 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
@java.lang.annotation.Target({METHOD, FIELD, ANNOTATION_TYPE})
@Inherited
@Retention(RUNTIME)
-public @interface MapKeySqlTypeCode {
- SqlTypeCode value();
+public @interface MapKeyJdbcTypeCode {
+ JdbcTypeCode value();
}
diff --git a/hibernate-core/src/main/java/org/hibernate/boot/internal/InFlightMetadataCollectorImpl.java b/hibernate-core/src/main/java/org/hibernate/boot/internal/InFlightMetadataCollectorImpl.java
index cdd0cb57ff..09a81b3a67 100644
--- a/hibernate-core/src/main/java/org/hibernate/boot/internal/InFlightMetadataCollectorImpl.java
+++ b/hibernate-core/src/main/java/org/hibernate/boot/internal/InFlightMetadataCollectorImpl.java
@@ -107,7 +107,7 @@ 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.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
import org.hibernate.type.spi.TypeConfiguration;
/**
@@ -397,8 +397,8 @@ public class InFlightMetadataCollectorImpl implements InFlightMetadataCollector
}
@Override
- public void addSqlTypeRegistration(int typeCode, SqlTypeDescriptor std) {
- getTypeConfiguration().getSqlTypeDescriptorRegistry().addDescriptor( typeCode, std );
+ public void addJdbcTypeRegistration(int typeCode, JdbcTypeDescriptor jdbcTypeDescriptor) {
+ getTypeConfiguration().getJdbcTypeDescriptorRegistry().addDescriptor( typeCode, jdbcTypeDescriptor );
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/hibernate-core/src/main/java/org/hibernate/boot/internal/MetadataBuilderImpl.java b/hibernate-core/src/main/java/org/hibernate/boot/internal/MetadataBuilderImpl.java
index f1e55f7f99..92045e888d 100644
--- a/hibernate-core/src/main/java/org/hibernate/boot/internal/MetadataBuilderImpl.java
+++ b/hibernate-core/src/main/java/org/hibernate/boot/internal/MetadataBuilderImpl.java
@@ -68,7 +68,7 @@ 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.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
import org.hibernate.type.spi.TypeConfiguration;
import org.hibernate.usertype.UserType;
@@ -283,8 +283,8 @@ public class MetadataBuilderImpl implements MetadataBuilderImplementor, TypeCont
}
@Override
- public void contributeSqlTypeDescriptor(SqlTypeDescriptor descriptor) {
- this.bootstrapContext.getTypeConfiguration().getSqlTypeDescriptorRegistry().addDescriptor( descriptor );
+ public void contributeJdbcTypeDescriptor(JdbcTypeDescriptor descriptor) {
+ this.bootstrapContext.getTypeConfiguration().getJdbcTypeDescriptorRegistry().addDescriptor( descriptor );
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/TypeContributions.java b/hibernate-core/src/main/java/org/hibernate/boot/model/TypeContributions.java
index ca8b6a0eb1..d98c4fd437 100644
--- a/hibernate-core/src/main/java/org/hibernate/boot/model/TypeContributions.java
+++ b/hibernate-core/src/main/java/org/hibernate/boot/model/TypeContributions.java
@@ -9,7 +9,7 @@ package org.hibernate.boot.model;
import org.hibernate.type.BasicType;
import org.hibernate.type.StandardBasicTypeTemplate;
import org.hibernate.type.descriptor.java.spi.JavaTypeDescriptorRegistry;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+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;
@@ -32,17 +32,17 @@ public interface TypeContributions {
* Add the JavaTypeDescriptor to the {@link TypeConfiguration}'s
* {@link JavaTypeDescriptorRegistry}
*/
- void contributeSqlTypeDescriptor(SqlTypeDescriptor descriptor);
+ void contributeJdbcTypeDescriptor(JdbcTypeDescriptor descriptor);
void contributeType(BasicType type);
/**
* @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 SqlTypeDescriptor} and a concept of a "value
+ * of {@link JavaTypeDescriptor}, {@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
- * {@link SqlTypeDescriptor} implementations (or write your own for custom types)
+ * {@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,7 +54,7 @@ public interface TypeContributions {
* {@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 SqlTypeDescriptor}
+ * existing {@link JavaTypeDescriptor} and {@link JdbcTypeDescriptor}
* implementations (or write your own for custom impls) and use
* {@link StandardBasicTypeTemplate} to combine those with registration keys
* and call {@link #contributeType(BasicType)} instead
diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/TypeDefinition.java b/hibernate-core/src/main/java/org/hibernate/boot/model/TypeDefinition.java
index 6e10950c53..8401c34324 100644
--- a/hibernate-core/src/main/java/org/hibernate/boot/model/TypeDefinition.java
+++ b/hibernate-core/src/main/java/org/hibernate/boot/model/TypeDefinition.java
@@ -31,7 +31,7 @@ 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.MutabilityPlan;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
import org.hibernate.type.descriptor.sql.SqlTypeDescriptorIndicators;
import org.hibernate.type.spi.TypeConfiguration;
import org.hibernate.type.spi.TypeConfigurationAware;
@@ -102,7 +102,7 @@ public class TypeDefinition implements Serializable {
public BasicValue.Resolution> resolve(
Map localConfigParameters,
MutabilityPlan explicitMutabilityPlan,
- MetadataBuildingContext context,
+ MetadataBuildingContext context,
SqlTypeDescriptorIndicators indicators) {
if ( CollectionHelper.isEmpty( localConfigParameters ) ) {
// we can use the re-usable resolution...
@@ -212,8 +212,8 @@ public class TypeDefinition implements Serializable {
}
@Override
- public SqlTypeDescriptor getRelationalSqlTypeDescriptor() {
- return resolvedBasicType.getSqlTypeDescriptor();
+ public JdbcTypeDescriptor getJdbcTypeDescriptor() {
+ return resolvedBasicType.getJdbcTypeDescriptor();
}
@Override
@@ -264,8 +264,8 @@ public class TypeDefinition implements Serializable {
}
@Override
- public SqlTypeDescriptor getRelationalSqlTypeDescriptor() {
- return resolved.getSqlTypeDescriptor();
+ public JdbcTypeDescriptor getJdbcTypeDescriptor() {
+ return resolved.getJdbcTypeDescriptor();
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/EnumeratedValueResolution.java b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/EnumeratedValueResolution.java
index 73720e8137..8b5a5ea43a 100644
--- a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/EnumeratedValueResolution.java
+++ b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/EnumeratedValueResolution.java
@@ -14,7 +14,7 @@ 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.MutabilityPlan;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
/**
* @author Steve Ebersole
@@ -23,19 +23,19 @@ public class EnumeratedValueResolution> implements BasicValue.
private final CustomType enumTypeMapping;
private final JavaTypeDescriptor domainJtd;
private final JavaTypeDescriptor> jdbcJtd;
- private final SqlTypeDescriptor std;
+ private final JdbcTypeDescriptor jdbcTypeDescriptor;
private final EnumValueConverter valueConverter;
public EnumeratedValueResolution(
CustomType enumTypeMapping,
JavaTypeDescriptor domainJtd,
JavaTypeDescriptor> jdbcJtd,
- SqlTypeDescriptor std,
+ JdbcTypeDescriptor jdbcTypeDescriptor,
EnumValueConverter valueConverter) {
this.enumTypeMapping = enumTypeMapping;
this.domainJtd = domainJtd;
this.jdbcJtd = jdbcJtd;
- this.std = std;
+ this.jdbcTypeDescriptor = jdbcTypeDescriptor;
this.valueConverter = valueConverter;
}
@@ -60,8 +60,8 @@ public class EnumeratedValueResolution> implements BasicValue.
}
@Override
- public SqlTypeDescriptor getRelationalSqlTypeDescriptor() {
- return std;
+ public JdbcTypeDescriptor getJdbcTypeDescriptor() {
+ return jdbcTypeDescriptor;
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/InferredBasicValueResolution.java b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/InferredBasicValueResolution.java
index 7e93b7b050..3ec0a104f9 100644
--- a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/InferredBasicValueResolution.java
+++ b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/InferredBasicValueResolution.java
@@ -12,7 +12,7 @@ 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.MutabilityPlan;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
/**
* @author Steve Ebersole
@@ -20,7 +20,7 @@ import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
public class InferredBasicValueResolution implements BasicValue.Resolution {
private JavaTypeDescriptor domainJtd;
private JavaTypeDescriptor relationalJtd;
- private SqlTypeDescriptor relationalStd;
+ private JdbcTypeDescriptor jdbcTypeDescriptor;
private MutabilityPlan mutabilityPlan;
@@ -33,7 +33,7 @@ public class InferredBasicValueResolution implements BasicValue.Resolution
JdbcMapping jdbcMapping,
JavaTypeDescriptor domainJtd,
JavaTypeDescriptor relationalJtd,
- SqlTypeDescriptor relationalStd,
+ JdbcTypeDescriptor jdbcTypeDescriptor,
BasicValueConverter valueConverter,
BasicType legacyType,
MutabilityPlan mutabilityPlan) {
@@ -41,7 +41,7 @@ public class InferredBasicValueResolution implements BasicValue.Resolution
this.legacyType = legacyType;
this.domainJtd = domainJtd;
this.relationalJtd = relationalJtd;
- this.relationalStd = relationalStd;
+ this.jdbcTypeDescriptor = jdbcTypeDescriptor;
this.valueConverter = valueConverter;
this.mutabilityPlan = mutabilityPlan == null ? domainJtd.getMutabilityPlan() : mutabilityPlan;
}
@@ -67,8 +67,8 @@ public class InferredBasicValueResolution implements BasicValue.Resolution
}
@Override
- public SqlTypeDescriptor getRelationalSqlTypeDescriptor() {
- return relationalStd;
+ public JdbcTypeDescriptor getJdbcTypeDescriptor() {
+ return jdbcTypeDescriptor;
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/InferredBasicValueResolver.java b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/InferredBasicValueResolver.java
index 571d29a5ea..52c9645a22 100644
--- a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/InferredBasicValueResolver.java
+++ b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/InferredBasicValueResolver.java
@@ -27,9 +27,9 @@ 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.TemporalJavaTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptorIndicators;
-import org.hibernate.type.descriptor.sql.TinyIntTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators;
+import org.hibernate.type.descriptor.jdbc.TinyIntTypeDescriptor;
import org.hibernate.type.spi.TypeConfiguration;
/**
@@ -42,9 +42,9 @@ public class InferredBasicValueResolver {
@SuppressWarnings({"unchecked", "rawtypes"})
public static BasicValue.Resolution from(
Function explicitJavaTypeAccess,
- Function explicitSqlTypeAccess,
+ Function explicitSqlTypeAccess,
Supplier reflectedJtdResolver,
- SqlTypeDescriptorIndicators stdIndicators,
+ JdbcTypeDescriptorIndicators stdIndicators,
Table table,
Selectable selectable,
String ownerName,
@@ -52,7 +52,7 @@ public class InferredBasicValueResolver {
TypeConfiguration typeConfiguration) {
final BasicJavaDescriptor explicitJavaType = explicitJavaTypeAccess != null ? explicitJavaTypeAccess.apply( typeConfiguration ) : null;
- final SqlTypeDescriptor explicitSqlType = explicitSqlTypeAccess != null ? explicitSqlTypeAccess.apply( typeConfiguration ) : null;
+ final JdbcTypeDescriptor explicitJdbcType = explicitSqlTypeAccess != null ? explicitSqlTypeAccess.apply( typeConfiguration ) : null;
final BasicJavaDescriptor reflectedJtd = (BasicJavaDescriptor) reflectedJtdResolver.get();
@@ -66,20 +66,20 @@ public class InferredBasicValueResolver {
if ( explicitJavaType != null ) {
// we have an explicit @JavaType
- if ( explicitSqlType != null ) {
+ if ( explicitJdbcType != null ) {
// we also have an explicit @SqlType(Code)
jdbcMapping = typeConfiguration.getBasicTypeRegistry().resolve(
explicitJavaType,
- explicitSqlType
+ explicitJdbcType
);
}
else {
// infer the STD
- final SqlTypeDescriptor inferredStd = explicitJavaType.getJdbcRecommendedSqlType( stdIndicators );
+ final JdbcTypeDescriptor inferredJdbcType = explicitJavaType.getRecommendedJdbcType( stdIndicators );
jdbcMapping = typeConfiguration.getBasicTypeRegistry().resolve(
explicitJavaType,
- inferredStd
+ inferredJdbcType
);
}
@@ -88,12 +88,12 @@ public class InferredBasicValueResolver {
else if ( reflectedJtd != null ) {
// we were able to determine the "reflected java-type"
- if ( explicitSqlType != null ) {
+ if ( explicitJdbcType != null ) {
// we also have an explicit @SqlType(Code)
jdbcMapping = typeConfiguration.getBasicTypeRegistry().resolve(
reflectedJtd,
- explicitSqlType
+ explicitJdbcType
);
legacyType = jdbcMapping;
@@ -109,13 +109,13 @@ public class InferredBasicValueResolver {
}
}
else {
- if ( explicitSqlType != null ) {
+ if ( explicitJdbcType != null ) {
// we have an explicit STD, but no JTD - infer JTD
// - NOTE : yes its an odd case, but its easy to implement here, so...
- final BasicJavaDescriptor recommendedJtd = explicitSqlType.getJdbcRecommendedJavaTypeMapping( typeConfiguration );
+ final BasicJavaDescriptor recommendedJtd = explicitJdbcType.getJdbcRecommendedJavaTypeMapping( typeConfiguration );
final BasicType> resolved = typeConfiguration.getBasicTypeRegistry().resolve(
recommendedJtd,
- explicitSqlType
+ explicitJdbcType
);
jdbcMapping = resolveSqlTypeIndicators( stdIndicators, resolved );
@@ -148,7 +148,7 @@ public class InferredBasicValueResolver {
jdbcMapping,
jdbcMapping.getJavaTypeDescriptor(),
jdbcMapping.getJavaTypeDescriptor(),
- jdbcMapping.getSqlTypeDescriptor(),
+ jdbcMapping.getJdbcTypeDescriptor(),
null,
legacyType,
null
@@ -157,7 +157,7 @@ public class InferredBasicValueResolver {
@SuppressWarnings("rawtypes")
public static BasicType> resolveSqlTypeIndicators(
- SqlTypeDescriptorIndicators stdIndicators,
+ JdbcTypeDescriptorIndicators stdIndicators,
BasicType> resolved) {
if ( resolved instanceof SqlTypeDescriptorIndicatorCapable ) {
final SqlTypeDescriptorIndicatorCapable indicatorCapable = (SqlTypeDescriptorIndicatorCapable) resolved;
@@ -173,8 +173,8 @@ public class InferredBasicValueResolver {
public static InferredBasicValueResolution fromEnum(
EnumJavaTypeDescriptor enumJavaDescriptor,
BasicJavaDescriptor explicitJavaType,
- SqlTypeDescriptor explicitSqlType,
- SqlTypeDescriptorIndicators stdIndicators,
+ JdbcTypeDescriptor explicitJdbcType,
+ JdbcTypeDescriptorIndicators stdIndicators,
TypeConfiguration typeConfiguration) {
final EnumType enumStyle = stdIndicators.getEnumeratedType() != null
? stdIndicators.getEnumeratedType()
@@ -199,12 +199,12 @@ public class InferredBasicValueResolver {
relationalJtd = typeConfiguration.getJavaTypeDescriptorRegistry().getDescriptor( relationalJavaType );
}
- final SqlTypeDescriptor std = explicitSqlType != null ? explicitSqlType : relationalJtd.getJdbcRecommendedSqlType( stdIndicators );
+ final JdbcTypeDescriptor jdbcTypeDescriptor = explicitJdbcType != null ? explicitJdbcType : relationalJtd.getRecommendedJdbcType( stdIndicators );
//noinspection unchecked
final NamedEnumValueConverter valueConverter = new NamedEnumValueConverter(
enumJavaDescriptor,
- std,
+ jdbcTypeDescriptor,
relationalJtd
);
@@ -217,14 +217,14 @@ public class InferredBasicValueResolver {
final CustomType legacyEnumTypeWrapper = new CustomType( legacyEnumType, typeConfiguration );
- final JdbcMapping jdbcMapping = typeConfiguration.getBasicTypeRegistry().resolve( relationalJtd, std );
+ final JdbcMapping jdbcMapping = typeConfiguration.getBasicTypeRegistry().resolve( relationalJtd, jdbcTypeDescriptor );
//noinspection unchecked
return new InferredBasicValueResolution(
jdbcMapping,
enumJavaDescriptor,
relationalJtd,
- std,
+ jdbcTypeDescriptor,
valueConverter,
legacyEnumTypeWrapper,
ImmutableMutabilityPlan.INSTANCE
@@ -247,12 +247,12 @@ public class InferredBasicValueResolver {
relationalJtd = typeConfiguration.getJavaTypeDescriptorRegistry().getDescriptor( Integer.class );
}
- final SqlTypeDescriptor std = explicitSqlType != null ? explicitSqlType : TinyIntTypeDescriptor.INSTANCE;
+ final JdbcTypeDescriptor jdbcTypeDescriptor = explicitJdbcType != null ? explicitJdbcType : TinyIntTypeDescriptor.INSTANCE;
//noinspection unchecked
final OrdinalEnumValueConverter valueConverter = new OrdinalEnumValueConverter(
enumJavaDescriptor,
- std,
+ jdbcTypeDescriptor,
relationalJtd
);
@@ -265,14 +265,14 @@ public class InferredBasicValueResolver {
final CustomType legacyEnumTypeWrapper = new CustomType( legacyEnumType, typeConfiguration );
- final JdbcMapping jdbcMapping = typeConfiguration.getBasicTypeRegistry().resolve( relationalJtd, std );
+ final JdbcMapping jdbcMapping = typeConfiguration.getBasicTypeRegistry().resolve( relationalJtd, jdbcTypeDescriptor );
//noinspection unchecked
return new InferredBasicValueResolution(
jdbcMapping,
enumJavaDescriptor,
relationalJtd,
- std,
+ jdbcTypeDescriptor,
valueConverter,
legacyEnumTypeWrapper,
ImmutableMutabilityPlan.INSTANCE
@@ -288,8 +288,8 @@ public class InferredBasicValueResolver {
public static InferredBasicValueResolution fromTemporal(
TemporalJavaTypeDescriptor reflectedJtd,
Function explicitJavaTypeAccess,
- Function explicitSqlTypeAccess,
- SqlTypeDescriptorIndicators stdIndicators,
+ Function explicitSqlTypeAccess,
+ JdbcTypeDescriptorIndicators stdIndicators,
TypeConfiguration typeConfiguration) {
final TemporalType requestedTemporalPrecision = stdIndicators.getTemporalPrecision();
@@ -301,12 +301,12 @@ public class InferredBasicValueResolver {
explicitJavaType = null;
}
- final SqlTypeDescriptor explicitSqlType;
+ final JdbcTypeDescriptor explicitJdbcType;
if ( explicitSqlTypeAccess != null ) {
- explicitSqlType = explicitSqlTypeAccess.apply( typeConfiguration );
+ explicitJdbcType = explicitSqlTypeAccess.apply( typeConfiguration );
}
else {
- explicitSqlType = null;
+ explicitJdbcType = null;
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -330,15 +330,15 @@ public class InferredBasicValueResolver {
);
}
- final SqlTypeDescriptor std = explicitSqlType != null ? explicitSqlType : explicitTemporalJtd.getJdbcRecommendedSqlType( stdIndicators );
+ final JdbcTypeDescriptor jdbcTypeDescriptor = explicitJdbcType != null ? explicitJdbcType : explicitTemporalJtd.getRecommendedJdbcType( stdIndicators );
- final BasicType jdbcMapping = typeConfiguration.getBasicTypeRegistry().resolve( explicitTemporalJtd, std );
+ final BasicType jdbcMapping = typeConfiguration.getBasicTypeRegistry().resolve( explicitTemporalJtd, jdbcTypeDescriptor );
return new InferredBasicValueResolution(
jdbcMapping,
explicitTemporalJtd,
explicitTemporalJtd,
- std,
+ jdbcTypeDescriptor,
null,
jdbcMapping,
explicitJavaType.getMutabilityPlan()
@@ -351,7 +351,7 @@ public class InferredBasicValueResolver {
// - still a special case because we want to perform the new resolution
// due to the new annotations being used
- if ( explicitSqlType != null ) {
+ if ( explicitJdbcType != null ) {
final TemporalJavaTypeDescriptor jtd;
if ( requestedTemporalPrecision != null ) {
@@ -364,13 +364,13 @@ public class InferredBasicValueResolver {
jtd = reflectedJtd;
}
- final BasicType jdbcMapping = typeConfiguration.getBasicTypeRegistry().resolve( jtd, explicitSqlType );
+ final BasicType jdbcMapping = typeConfiguration.getBasicTypeRegistry().resolve( jtd, explicitJdbcType );
return new InferredBasicValueResolution(
jdbcMapping,
jtd,
jtd,
- explicitSqlType,
+ explicitJdbcType,
null,
jdbcMapping,
jtd.getMutabilityPlan()
@@ -401,7 +401,7 @@ public class InferredBasicValueResolver {
basicType,
basicType.getJavaTypeDescriptor(),
basicType.getJavaTypeDescriptor(),
- basicType.getSqlTypeDescriptor(),
+ basicType.getJdbcTypeDescriptor(),
null,
basicType,
reflectedJtd.getMutabilityPlan()
diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/NamedBasicTypeResolution.java b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/NamedBasicTypeResolution.java
index 543d6ae045..ef8447dba0 100644
--- a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/NamedBasicTypeResolution.java
+++ b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/NamedBasicTypeResolution.java
@@ -13,10 +13,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.Type;
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.jdbc.JdbcTypeDescriptor;
import org.hibernate.type.spi.TypeConfiguration;
/**
@@ -76,8 +75,8 @@ public class NamedBasicTypeResolution implements BasicValue.Resolution {
}
@Override
- public SqlTypeDescriptor getRelationalSqlTypeDescriptor() {
- return basicType.getSqlTypeDescriptor();
+ public JdbcTypeDescriptor getJdbcTypeDescriptor() {
+ return basicType.getJdbcTypeDescriptor();
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/NamedConverterResolution.java b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/NamedConverterResolution.java
index 54f1b1e84d..f7ce186370 100644
--- a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/NamedConverterResolution.java
+++ b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/NamedConverterResolution.java
@@ -6,8 +6,6 @@
*/
package org.hibernate.boot.model.process.internal;
-import java.util.Collections;
-import java.util.List;
import java.util.function.Function;
import javax.persistence.AttributeConverter;
@@ -17,25 +15,18 @@ import org.hibernate.boot.model.convert.spi.JpaAttributeConverterCreationContext
import org.hibernate.boot.registry.StandardServiceRegistry;
import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
import org.hibernate.boot.spi.MetadataBuildingContext;
-import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.mapping.BasicValue;
-import org.hibernate.mapping.IndexedConsumer;
import org.hibernate.metamodel.mapping.JdbcMapping;
-import org.hibernate.metamodel.mapping.MappingModelExpressable;
-import org.hibernate.metamodel.mapping.SqlExpressable;
import org.hibernate.metamodel.model.convert.spi.JpaAttributeConverter;
-import org.hibernate.sql.ast.Clause;
import org.hibernate.type.BasicType;
-import org.hibernate.type.descriptor.ValueBinder;
-import org.hibernate.type.descriptor.ValueExtractor;
import org.hibernate.type.descriptor.converter.AttributeConverterMutabilityPlanImpl;
import org.hibernate.type.descriptor.converter.AttributeConverterTypeAdapter;
import org.hibernate.type.descriptor.java.BasicJavaDescriptor;
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.sql.SqlTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptorIndicators;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators;
import org.hibernate.type.spi.TypeConfiguration;
/**
@@ -47,9 +38,9 @@ public class NamedConverterResolution implements BasicValue.Resolution {
public static NamedConverterResolution from(
ConverterDescriptor converterDescriptor,
Function explicitJtdAccess,
- Function explicitStdAccess,
+ Function explicitStdAccess,
Function explicitMutabilityPlanAccess,
- SqlTypeDescriptorIndicators sqlTypeIndicators,
+ JdbcTypeDescriptorIndicators sqlTypeIndicators,
JpaAttributeConverterCreationContext converterCreationContext,
MetadataBuildingContext context) {
return fromInternal(
@@ -65,9 +56,9 @@ public class NamedConverterResolution implements BasicValue.Resolution {
public static NamedConverterResolution from(
String name,
Function explicitJtdAccess,
- Function explicitStdAccess,
+ Function explicitStdAccess,
Function explicitMutabilityPlanAccess,
- SqlTypeDescriptorIndicators sqlTypeIndicators,
+ JdbcTypeDescriptorIndicators sqlTypeIndicators,
JpaAttributeConverterCreationContext converterCreationContext,
MetadataBuildingContext context) {
assert name.startsWith( ConverterDescriptor.TYPE_NAME_PREFIX );
@@ -94,9 +85,9 @@ public class NamedConverterResolution implements BasicValue.Resolution {
private static NamedConverterResolution fromInternal(
Function explicitJtdAccess,
- Function explicitStdAccess,
+ Function explicitStdAccess,
Function explicitMutabilityPlanAccess,
- JpaAttributeConverter converter, SqlTypeDescriptorIndicators sqlTypeIndicators,
+ JpaAttributeConverter converter, JdbcTypeDescriptorIndicators sqlTypeIndicators,
MetadataBuildingContext context) {
final TypeConfiguration typeConfiguration = context.getBootstrapContext().getTypeConfiguration();
@@ -108,15 +99,15 @@ public class NamedConverterResolution implements BasicValue.Resolution {
? explicitJtd
: converter.getDomainJavaDescriptor();
- final SqlTypeDescriptor explicitStd = explicitStdAccess != null
+ final JdbcTypeDescriptor explicitJdbcType = explicitStdAccess != null
? explicitStdAccess.apply( typeConfiguration )
: null;
final JavaTypeDescriptor relationalJtd = converter.getRelationalJavaDescriptor();
- final SqlTypeDescriptor relationalStd = explicitStd != null
- ? explicitStd
- : relationalJtd.getJdbcRecommendedSqlType( sqlTypeIndicators );
+ final JdbcTypeDescriptor jdbcType = explicitJdbcType != null
+ ? explicitJdbcType
+ : relationalJtd.getRecommendedJdbcType( sqlTypeIndicators );
final MutabilityPlan explicitMutabilityPlan = explicitMutabilityPlanAccess != null
? explicitMutabilityPlanAccess.apply( typeConfiguration )
@@ -137,7 +128,7 @@ public class NamedConverterResolution implements BasicValue.Resolution {
return new NamedConverterResolution(
domainJtd,
relationalJtd,
- relationalStd,
+ jdbcType,
converter,
mutabilityPlan,
context.getBootstrapContext().getTypeConfiguration()
@@ -147,7 +138,7 @@ public class NamedConverterResolution implements BasicValue.Resolution {
private final JavaTypeDescriptor domainJtd;
private final JavaTypeDescriptor relationalJtd;
- private final SqlTypeDescriptor relationalStd;
+ private final JdbcTypeDescriptor jdbcTypeDescriptor;
private final JpaAttributeConverter valueConverter;
private final MutabilityPlan mutabilityPlan;
@@ -160,7 +151,7 @@ public class NamedConverterResolution implements BasicValue.Resolution {
public NamedConverterResolution(
JavaTypeDescriptor domainJtd,
JavaTypeDescriptor relationalJtd,
- SqlTypeDescriptor relationalStd,
+ JdbcTypeDescriptor jdbcTypeDescriptor,
JpaAttributeConverter valueConverter,
MutabilityPlan mutabilityPlan,
TypeConfiguration typeConfiguration) {
@@ -170,8 +161,8 @@ public class NamedConverterResolution implements BasicValue.Resolution {
assert relationalJtd != null;
this.relationalJtd = relationalJtd;
- assert relationalStd != null;
- this.relationalStd = relationalStd;
+ assert jdbcTypeDescriptor != null;
+ this.jdbcTypeDescriptor = jdbcTypeDescriptor;
assert valueConverter != null;
this.valueConverter = valueConverter;
@@ -181,7 +172,7 @@ public class NamedConverterResolution implements BasicValue.Resolution {
this.jdbcMapping = typeConfiguration.getBasicTypeRegistry().resolve(
relationalJtd,
- relationalStd
+ jdbcTypeDescriptor
);
// this.jdbcMapping = new JdbcMapping() {
// private final ValueExtractor extractor = relationalStd.getExtractor( relationalJtd );
@@ -225,7 +216,7 @@ public class NamedConverterResolution implements BasicValue.Resolution {
relationalJtd.getJavaType().getTypeName()
),
valueConverter,
- relationalStd,
+ jdbcTypeDescriptor,
relationalJtd,
domainJtd,
mutabilityPlan
@@ -250,8 +241,8 @@ public class NamedConverterResolution implements BasicValue.Resolution {
}
@Override
- public SqlTypeDescriptor getRelationalSqlTypeDescriptor() {
- return relationalStd;
+ public JdbcTypeDescriptor getJdbcTypeDescriptor() {
+ return jdbcTypeDescriptor;
}
@Override
@@ -275,140 +266,4 @@ public class NamedConverterResolution implements BasicValue.Resolution {
return "NamedConverterResolution(" + valueConverter.getConverterBean().getBeanClass().getName() + ')';
}
- /**
- * Allows treating the attribute conversion as a jdbc-level reference.
- * This covers the conversion plus managing the JDBC-value
- */
- private static class ConverterJdbcMappingImpl implements JdbcMapping, MappingModelExpressable, SqlExpressable {
- private final JavaTypeDescriptor domainJtd;
- private final JavaTypeDescriptor jdbcJtd;
- private final SqlTypeDescriptor std;
- private final JpaAttributeConverter valueConverter;
- private final MutabilityPlan mutabilityPlan;
-
- private final ValueExtractor extractor;
- private final ValueBinder binder;
- private final BasicType lowLevelJdbcMapping;
-
- public ConverterJdbcMappingImpl(
- JavaTypeDescriptor domainJtd,
- JavaTypeDescriptor jdbcJtd,
- SqlTypeDescriptor std,
- JpaAttributeConverter valueConverter,
- MutabilityPlan mutabilityPlan,
- TypeConfiguration typeConfiguration) {
- this.domainJtd = domainJtd;
- this.jdbcJtd = jdbcJtd;
- this.std = std;
- this.valueConverter = valueConverter;
- this.mutabilityPlan = mutabilityPlan;
-
- this.extractor = std.getExtractor( jdbcJtd );
- this.binder = std.getBinder( jdbcJtd );
-
- this.lowLevelJdbcMapping = typeConfiguration.getBasicTypeRegistry().resolve( jdbcJtd, std );
- }
-
- @Override
- public JavaTypeDescriptor getJavaTypeDescriptor() {
- return domainJtd;
- }
-
- @Override
- public SqlTypeDescriptor getSqlTypeDescriptor() {
- return std;
- }
-
- @Override
- public ValueExtractor getJdbcValueExtractor() {
- return extractor;
- }
-
- @Override
- public ValueBinder getJdbcValueBinder() {
- return binder;
- }
-
- @Override
- public int getJdbcTypeCount() {
- return 1;
- }
-
- @Override
- public List getJdbcMappings() {
- return Collections.singletonList( this );
- }
-
- @Override
- public int forEachJdbcType(IndexedConsumer action) {
- action.accept( 0, this );
- return 1;
- }
-
- @Override
- public int forEachJdbcType(int offset, IndexedConsumer action) {
- action.accept( offset, this );
- return 1;
- }
-
- @Override
- public Object disassemble(Object value, SharedSessionContractImplementor session) {
- return mutabilityPlan.disassemble( value );
- }
-
- @Override
- public int forEachJdbcValue(
- Object value,
- Clause clause,
- int offset,
- JdbcValuesConsumer valuesConsumer,
- SharedSessionContractImplementor session) {
- final AttributeConverter converter = (AttributeConverter) valueConverter.getConverterBean().getBeanInstance();
- final Object converted = converter.convertToDatabaseColumn( value );
- valuesConsumer.consume( offset, converted, this );
- return 1;
- }
-
- @Override
- public int forEachDisassembledJdbcValue(
- Object value,
- Clause clause,
- JdbcValuesConsumer valuesConsumer,
- SharedSessionContractImplementor session) {
- final AttributeConverter converter = (AttributeConverter) valueConverter.getConverterBean().getBeanInstance();
- final Object converted = converter.convertToDatabaseColumn( value );
- valuesConsumer.consume( 0, converted, this );
- return 1;
- }
-
- @Override
- public int forEachDisassembledJdbcValue(
- Object value,
- Clause clause,
- int offset,
- JdbcValuesConsumer valuesConsumer,
- SharedSessionContractImplementor session) {
- final AttributeConverter converter = (AttributeConverter) valueConverter.getConverterBean().getBeanInstance();
- final Object converted = converter.convertToDatabaseColumn( value );
- valuesConsumer.consume( offset, converted, this );
- return 1;
- }
-
- @Override
- public int forEachJdbcValue(
- Object value,
- Clause clause,
- JdbcValuesConsumer valuesConsumer,
- SharedSessionContractImplementor session) {
- final AttributeConverter converter = (AttributeConverter) valueConverter.getConverterBean().getBeanInstance();
- final Object converted = converter.convertToDatabaseColumn( value );
- valuesConsumer.consume( 0, converted, this );
- return 1;
- }
-
- @Override
- public JdbcMapping getJdbcMapping() {
- return lowLevelJdbcMapping;
- }
- }
}
diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/UserTypeResolution.java b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/UserTypeResolution.java
index fcbfabc0cc..7dd515eb96 100644
--- a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/UserTypeResolution.java
+++ b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/UserTypeResolution.java
@@ -11,10 +11,9 @@ 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.Type;
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.jdbc.JdbcTypeDescriptor;
/**
* @author Steve Ebersole
@@ -43,8 +42,8 @@ public class UserTypeResolution implements BasicValue.Resolution {
}
@Override
- public SqlTypeDescriptor getRelationalSqlTypeDescriptor() {
- return userTypeAdapter.getSqlTypeDescriptor();
+ public JdbcTypeDescriptor getJdbcTypeDescriptor() {
+ return userTypeAdapter.getJdbcTypeDescriptor();
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/VersionResolution.java b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/VersionResolution.java
index 32afd5b7bc..4403bbc18f 100644
--- a/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/VersionResolution.java
+++ b/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/VersionResolution.java
@@ -20,8 +20,8 @@ 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.java.PrimitiveByteArrayTypeDescriptor;
-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;
import org.hibernate.type.spi.TypeConfiguration;
/**
@@ -37,7 +37,7 @@ public class VersionResolution implements BasicValue.Resolution {
public static VersionResolution from(
Function implicitJavaTypeAccess,
Function explicitJtdAccess,
- Function explicitStdAccess,
+ Function explicitStdAccess,
TypeConfiguration typeConfiguration,
@SuppressWarnings("unused") MetadataBuildingContext context) {
@@ -49,7 +49,7 @@ public class VersionResolution implements BasicValue.Resolution {
if ( registered instanceof PrimitiveByteArrayTypeDescriptor ) {
return new VersionResolution<>(
RowVersionType.INSTANCE.getJavaTypeDescriptor(),
- RowVersionType.INSTANCE.getSqlTypeDescriptor(),
+ RowVersionType.INSTANCE.getJdbcTypeDescriptor(),
RowVersionType.INSTANCE,
RowVersionType.INSTANCE
);
@@ -57,8 +57,8 @@ public class VersionResolution implements BasicValue.Resolution {
final BasicJavaDescriptor jtd = (BasicJavaDescriptor) registered;
- final SqlTypeDescriptor std = jtd.getJdbcRecommendedSqlType(
- new SqlTypeDescriptorIndicators() {
+ final JdbcTypeDescriptor recommendedJdbcType = jtd.getRecommendedJdbcType(
+ new JdbcTypeDescriptorIndicators() {
@Override
public TypeConfiguration getTypeConfiguration() {
return typeConfiguration;
@@ -72,27 +72,27 @@ public class VersionResolution implements BasicValue.Resolution {
}
);
- final BasicType> basicType = typeConfiguration.getBasicTypeRegistry().resolve( jtd, std );
+ final BasicType> basicType = typeConfiguration.getBasicTypeRegistry().resolve( jtd, recommendedJdbcType );
final BasicType legacyType = typeConfiguration.getBasicTypeRegistry().getRegisteredType( jtd.getJavaType() );
- assert legacyType.getSqlTypeDescriptor().equals( std );
+ assert legacyType.getJdbcTypeDescriptor().equals( recommendedJdbcType );
- return new VersionResolution<>( jtd, std, basicType, legacyType );
+ return new VersionResolution<>( jtd, recommendedJdbcType, basicType, legacyType );
}
private final JavaTypeDescriptor jtd;
- private final SqlTypeDescriptor std;
+ private final JdbcTypeDescriptor jdbcTypeDescriptor;
private final JdbcMapping jdbcMapping;
private final BasicType legacyType;
public VersionResolution(
JavaTypeDescriptor javaTypeDescriptor,
- SqlTypeDescriptor sqlTypeDescriptor,
+ JdbcTypeDescriptor jdbcTypeDescriptor,
JdbcMapping jdbcMapping,
BasicType legacyType) {
this.jtd = javaTypeDescriptor;
- this.std = sqlTypeDescriptor;
+ this.jdbcTypeDescriptor = jdbcTypeDescriptor;
this.jdbcMapping = jdbcMapping;
this.legacyType = legacyType;
}
@@ -120,8 +120,8 @@ public class VersionResolution implements BasicValue.Resolution {
}
@Override
- public SqlTypeDescriptor getRelationalSqlTypeDescriptor() {
- return std;
+ public JdbcTypeDescriptor getJdbcTypeDescriptor() {
+ return jdbcTypeDescriptor;
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/process/spi/MetadataBuildingProcess.java b/hibernate-core/src/main/java/org/hibernate/boot/model/process/spi/MetadataBuildingProcess.java
index add0b3051d..a63a191652 100644
--- a/hibernate-core/src/main/java/org/hibernate/boot/model/process/spi/MetadataBuildingProcess.java
+++ b/hibernate-core/src/main/java/org/hibernate/boot/model/process/spi/MetadataBuildingProcess.java
@@ -29,7 +29,6 @@ import org.hibernate.boot.model.source.spi.MetadataSourceProcessor;
import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
import org.hibernate.boot.spi.AdditionalJaxbMappingProducer;
import org.hibernate.boot.spi.BootstrapContext;
-import org.hibernate.boot.spi.MetadataBuildingContext;
import org.hibernate.boot.spi.MetadataBuildingOptions;
import org.hibernate.boot.spi.MetadataContributor;
import org.hibernate.boot.spi.MetadataImplementor;
@@ -42,7 +41,7 @@ import org.hibernate.engine.jdbc.spi.JdbcServices;
import org.hibernate.type.BasicType;
import org.hibernate.type.BasicTypeRegistry;
import org.hibernate.type.descriptor.java.JavaTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
import org.hibernate.type.spi.TypeConfiguration;
import org.hibernate.usertype.UserType;
@@ -374,8 +373,8 @@ public class MetadataBuildingProcess {
}
@Override
- public void contributeSqlTypeDescriptor(SqlTypeDescriptor descriptor) {
- bootstrapContext.getTypeConfiguration().getSqlTypeDescriptorRegistry().addDescriptor( descriptor );
+ public void contributeJdbcTypeDescriptor(JdbcTypeDescriptor descriptor) {
+ bootstrapContext.getTypeConfiguration().getJdbcTypeDescriptorRegistry().addDescriptor( descriptor );
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/ModelBinder.java b/hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/ModelBinder.java
index 8f7c36a594..3eaf42e004 100644
--- a/hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/ModelBinder.java
+++ b/hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/ModelBinder.java
@@ -1983,7 +1983,7 @@ public class ModelBinder {
.getBasicTypeRegistry()
.getRegisteredType( value.getTypeName() );
if ( basicType instanceof AbstractSingleColumnStandardBasicType ) {
- if ( isLob( basicType.getSqlTypeDescriptor().getSqlType(), null ) ) {
+ if ( isLob( basicType.getJdbcTypeDescriptor().getJdbcType(), null ) ) {
value.makeLob();
}
}
@@ -2004,9 +2004,9 @@ public class ModelBinder {
private static boolean isLob(Integer sqlType, String sqlTypeName) {
if ( sqlType != null ) {
- return ClobType.INSTANCE.getSqlTypeDescriptor().getSqlType() == sqlType ||
- BlobType.INSTANCE.getSqlTypeDescriptor().getSqlType() == sqlType ||
- NClobType.INSTANCE.getSqlTypeDescriptor().getSqlType() == sqlType;
+ return ClobType.INSTANCE.getJdbcTypeDescriptor().getJdbcType() == sqlType ||
+ BlobType.INSTANCE.getJdbcTypeDescriptor().getJdbcType() == sqlType ||
+ NClobType.INSTANCE.getJdbcTypeDescriptor().getJdbcType() == sqlType;
}
else if ( sqlTypeName != null ) {
return ClobType.INSTANCE.getName().equalsIgnoreCase( sqlTypeName ) ||
diff --git a/hibernate-core/src/main/java/org/hibernate/boot/spi/InFlightMetadataCollector.java b/hibernate-core/src/main/java/org/hibernate/boot/spi/InFlightMetadataCollector.java
index 74fd903f5e..44e50cb3ff 100644
--- a/hibernate-core/src/main/java/org/hibernate/boot/spi/InFlightMetadataCollector.java
+++ b/hibernate-core/src/main/java/org/hibernate/boot/spi/InFlightMetadataCollector.java
@@ -52,7 +52,7 @@ 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.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
/**
* An in-flight representation of Metadata while Metadata is being built.
@@ -320,7 +320,7 @@ public interface InFlightMetadataCollector extends Mapping, MetadataImplementor
void registerValueMappingResolver(Function resolver);
void addJavaTypeRegistration(Class> javaType, JavaTypeDescriptor> jtd);
- void addSqlTypeRegistration(int typeCode, SqlTypeDescriptor std);
+ void addJdbcTypeRegistration(int typeCode, JdbcTypeDescriptor jdbcTypeDescriptor);
interface DelayedPropertyReferenceHandler extends Serializable {
void process(InFlightMetadataCollector metadataCollector);
diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java b/hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java
index 0ca1f4712b..08d31fd0ed 100644
--- a/hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java
+++ b/hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java
@@ -8,7 +8,6 @@ package org.hibernate.cfg;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collection;
import java.util.Collections;
import java.util.EnumSet;
import java.util.HashMap;
@@ -119,8 +118,8 @@ import org.hibernate.annotations.Proxy;
import org.hibernate.annotations.SortComparator;
import org.hibernate.annotations.SortNatural;
import org.hibernate.annotations.Source;
-import org.hibernate.annotations.SqlTypeRegistration;
-import org.hibernate.annotations.SqlTypeRegistrations;
+import org.hibernate.annotations.JdbcTypeRegistration;
+import org.hibernate.annotations.JdbcTypeRegistrations;
import org.hibernate.annotations.TypeDef;
import org.hibernate.annotations.TypeDefs;
import org.hibernate.annotations.Where;
@@ -171,7 +170,7 @@ import org.hibernate.mapping.ToOne;
import org.hibernate.mapping.UnionSubclass;
import org.hibernate.resource.beans.spi.ManagedBeanRegistry;
import org.hibernate.type.descriptor.java.BasicJavaDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
import static org.hibernate.internal.CoreLogging.messageLogger;
@@ -357,14 +356,14 @@ public final class AnnotationBinder {
private static void handleSqlTypeDescriptorRegistration(
MetadataBuildingContext context,
ManagedBeanRegistry managedBeanRegistry,
- SqlTypeRegistration annotation) {
- final Class extends SqlTypeDescriptor> stdClass = annotation.value();
- final SqlTypeDescriptor std = managedBeanRegistry.getBean( stdClass ).getBeanInstance();
+ JdbcTypeRegistration annotation) {
+ final Class extends JdbcTypeDescriptor> jdbcTypeClass = annotation.value();
+ final JdbcTypeDescriptor jdbcTypeDescriptor = managedBeanRegistry.getBean( jdbcTypeClass ).getBeanInstance();
final int typeCode = annotation.registrationCode() == Integer.MIN_VALUE
- ? std.getJdbcTypeCode()
+ ? jdbcTypeDescriptor.getJdbcTypeCode()
: annotation.registrationCode();
- context.getMetadataCollector().addSqlTypeRegistration( typeCode, std );
+ context.getMetadataCollector().addJdbcTypeRegistration( typeCode, jdbcTypeDescriptor );
}
private static void handleJavaTypeDescriptorRegistration(
@@ -883,13 +882,13 @@ public final class AnnotationBinder {
}
}
- if ( annotatedElement.isAnnotationPresent( SqlTypeRegistration.class ) ) {
- final SqlTypeRegistration annotation = annotatedElement.getAnnotation( SqlTypeRegistration.class );
+ if ( annotatedElement.isAnnotationPresent( JdbcTypeRegistration.class ) ) {
+ final JdbcTypeRegistration annotation = annotatedElement.getAnnotation( JdbcTypeRegistration.class );
handleSqlTypeDescriptorRegistration( context, managedBeanRegistry, annotation );
}
- if ( annotatedElement.isAnnotationPresent( SqlTypeRegistrations.class ) ) {
- final SqlTypeRegistrations annotation = annotatedElement.getAnnotation( SqlTypeRegistrations.class );
- final SqlTypeRegistration[] registrations = annotation.value();
+ if ( annotatedElement.isAnnotationPresent( JdbcTypeRegistrations.class ) ) {
+ final JdbcTypeRegistrations annotation = annotatedElement.getAnnotation( JdbcTypeRegistrations.class );
+ final JdbcTypeRegistration[] registrations = annotation.value();
for ( int i = 0; i < registrations.length; i++ ) {
handleSqlTypeDescriptorRegistration( context, managedBeanRegistry, registrations[i] );
}
diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/annotations/BasicValueBinder.java b/hibernate-core/src/main/java/org/hibernate/cfg/annotations/BasicValueBinder.java
index b6c031bc58..33f7567fcd 100644
--- a/hibernate-core/src/main/java/org/hibernate/cfg/annotations/BasicValueBinder.java
+++ b/hibernate-core/src/main/java/org/hibernate/cfg/annotations/BasicValueBinder.java
@@ -27,14 +27,14 @@ import org.hibernate.annotations.CollectionId;
import org.hibernate.annotations.Immutable;
import org.hibernate.annotations.JavaType;
import org.hibernate.annotations.MapKeyJavaType;
-import org.hibernate.annotations.MapKeySqlType;
-import org.hibernate.annotations.MapKeySqlTypeCode;
+import org.hibernate.annotations.MapKeyJdbcType;
+import org.hibernate.annotations.MapKeyJdbcTypeCode;
import org.hibernate.annotations.MapKeyType;
import org.hibernate.annotations.Mutability;
import org.hibernate.annotations.Nationalized;
import org.hibernate.annotations.Parameter;
-import org.hibernate.annotations.SqlType;
-import org.hibernate.annotations.SqlTypeCode;
+import org.hibernate.annotations.JdbcType;
+import org.hibernate.annotations.JdbcTypeCode;
import org.hibernate.annotations.Type;
import org.hibernate.annotations.common.reflection.XClass;
import org.hibernate.annotations.common.reflection.XProperty;
@@ -57,8 +57,8 @@ import org.hibernate.mapping.Table;
import org.hibernate.type.descriptor.java.BasicJavaDescriptor;
import org.hibernate.type.descriptor.java.ImmutableMutabilityPlan;
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;
import org.hibernate.type.spi.TypeConfiguration;
import org.jboss.logging.Logger;
@@ -67,7 +67,7 @@ import org.jboss.logging.Logger;
* @author Steve Ebersole
* @author Emmanuel Bernard
*/
-public class BasicValueBinder implements SqlTypeDescriptorIndicators {
+public class BasicValueBinder implements JdbcTypeDescriptorIndicators {
// todo (6.0) : In light of how we want to build Types (specifically BasicTypes) moving forward this class should undergo major changes
// see the comments in #setType
@@ -97,7 +97,7 @@ public class BasicValueBinder implements SqlTypeDescriptorIndicators {
private String explicitBasicTypeName;
private Map explicitLocalTypeParams;
- private Function explicitSqlTypeAccess;
+ private Function explicitSqlTypeAccess;
private Function explicitJtdAccess;
private Function explicitMutabilityAccess;
private Function implicitJavaTypeAccess;
@@ -508,10 +508,10 @@ public class BasicValueBinder implements SqlTypeDescriptorIndicators {
}
explicitSqlTypeAccess = typeConfiguration -> {
- final MapKeySqlType explicitDescriptorAnn = attributeXProperty.getAnnotation( MapKeySqlType.class );
+ final MapKeyJdbcType explicitDescriptorAnn = attributeXProperty.getAnnotation( MapKeyJdbcType.class );
if ( explicitDescriptorAnn != null ) {
- final SqlType explicitStdAnn = explicitDescriptorAnn.value();
- final Class extends SqlTypeDescriptor> stdImplJavaType = explicitStdAnn.value();
+ final JdbcType explicitStdAnn = explicitDescriptorAnn.value();
+ final Class extends JdbcTypeDescriptor> stdImplJavaType = explicitStdAnn.value();
try {
return stdImplJavaType.newInstance();
@@ -521,10 +521,10 @@ public class BasicValueBinder implements SqlTypeDescriptorIndicators {
}
}
- final MapKeySqlTypeCode explicitCodeAnn = attributeXProperty.getAnnotation( MapKeySqlTypeCode.class );
+ final MapKeyJdbcTypeCode explicitCodeAnn = attributeXProperty.getAnnotation( MapKeyJdbcTypeCode.class );
if ( explicitCodeAnn != null ) {
- final SqlTypeCode explicitSqlTypeAnn = explicitCodeAnn.value();
- return typeConfiguration.getSqlTypeDescriptorRegistry().getDescriptor( explicitSqlTypeAnn.value() );
+ final JdbcTypeCode explicitSqlTypeAnn = explicitCodeAnn.value();
+ return typeConfiguration.getJdbcTypeDescriptorRegistry().getDescriptor( explicitSqlTypeAnn.value() );
}
return null;
@@ -552,9 +552,9 @@ public class BasicValueBinder implements SqlTypeDescriptorIndicators {
XProperty attributeXProperty,
MetadataBuildingContext buildingContext) {
explicitSqlTypeAccess = typeConfiguration -> {
- final SqlType explicitStdAnn = attributeXProperty.getAnnotation( SqlType.class );
+ final JdbcType explicitStdAnn = attributeXProperty.getAnnotation( JdbcType.class );
if ( explicitStdAnn != null ) {
- final Class extends SqlTypeDescriptor> stdImplJavaType = explicitStdAnn.value();
+ final Class extends JdbcTypeDescriptor> stdImplJavaType = explicitStdAnn.value();
try {
return stdImplJavaType.newInstance();
@@ -564,9 +564,9 @@ public class BasicValueBinder implements SqlTypeDescriptorIndicators {
}
}
- final SqlTypeCode explicitSqlTypeAnn = attributeXProperty.getAnnotation( SqlTypeCode.class );
+ final JdbcTypeCode explicitSqlTypeAnn = attributeXProperty.getAnnotation( JdbcTypeCode.class );
if ( explicitSqlTypeAnn != null ) {
- return typeConfiguration.getSqlTypeDescriptorRegistry().getDescriptor( explicitSqlTypeAnn.value() );
+ return typeConfiguration.getJdbcTypeDescriptorRegistry().getDescriptor( explicitSqlTypeAnn.value() );
}
return null;
diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/AbstractHANADialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/AbstractHANADialect.java
index 0bcb8854ee..0e350a6388 100644
--- a/hibernate-core/src/main/java/org/hibernate/dialect/AbstractHANADialect.java
+++ b/hibernate-core/src/main/java/org/hibernate/dialect/AbstractHANADialect.java
@@ -55,7 +55,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.JavaTypeDescriptor;
-import org.hibernate.type.descriptor.sql.*;
+import org.hibernate.type.descriptor.jdbc.*;
import java.io.*;
import java.nio.charset.StandardCharsets;
@@ -277,7 +277,7 @@ public abstract class AbstractHANADialect extends Dialect {
}
}
- private static class HANAStreamBlobTypeDescriptor implements SqlTypeDescriptor {
+ private static class HANAStreamBlobTypeDescriptor implements JdbcTypeDescriptor {
private static final long serialVersionUID = -2476600722093442047L;
@@ -298,7 +298,7 @@ public abstract class AbstractHANADialect extends Dialect {
}
@Override
- public int getSqlType() {
+ public int getJdbcType() {
return Types.BLOB;
}
@@ -569,7 +569,7 @@ public abstract class AbstractHANADialect extends Dialect {
}
}
- public static class HANABlobTypeDescriptor implements SqlTypeDescriptor {
+ public static class HANABlobTypeDescriptor implements JdbcTypeDescriptor {
private static final long serialVersionUID = 5874441715643764323L;
@@ -583,7 +583,7 @@ public abstract class AbstractHANADialect extends Dialect {
}
@Override
- public int getSqlType() {
+ public int getJdbcType() {
return Types.BLOB;
}
@@ -634,7 +634,7 @@ public abstract class AbstractHANADialect extends Dialect {
@Override
protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException {
- SqlTypeDescriptor descriptor = BlobTypeDescriptor.BLOB_BINDING;
+ JdbcTypeDescriptor descriptor = BlobTypeDescriptor.BLOB_BINDING;
if ( byte[].class.isInstance( value ) ) {
// performance shortcut for binding BLOB data in byte[] format
descriptor = BlobTypeDescriptor.PRIMITIVE_ARRAY_BINDING;
@@ -647,7 +647,7 @@ public abstract class AbstractHANADialect extends Dialect {
@Override
protected void doBind(CallableStatement st, X value, String name, WrapperOptions options) throws SQLException {
- SqlTypeDescriptor descriptor = BlobTypeDescriptor.BLOB_BINDING;
+ JdbcTypeDescriptor descriptor = BlobTypeDescriptor.BLOB_BINDING;
if ( byte[].class.isInstance( value ) ) {
// performance shortcut for binding BLOB data in byte[] format
descriptor = BlobTypeDescriptor.PRIMITIVE_ARRAY_BINDING;
@@ -1002,7 +1002,7 @@ public abstract class AbstractHANADialect extends Dialect {
}
@Override
- protected SqlTypeDescriptor getSqlTypeDescriptorOverride(final int sqlCode) {
+ protected JdbcTypeDescriptor getSqlTypeDescriptorOverride(final int sqlCode) {
switch ( sqlCode ) {
case Types.CLOB:
return this.clobTypeDescriptor;
@@ -1475,7 +1475,7 @@ public abstract class AbstractHANADialect extends Dialect {
}
}
- public SqlTypeDescriptor getBlobTypeDescriptor() {
+ public JdbcTypeDescriptor getBlobTypeDescriptor() {
return this.blobTypeDescriptor;
}
diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/AbstractTransactSQLDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/AbstractTransactSQLDialect.java
index 81430795a1..dc3e42adb3 100644
--- a/hibernate-core/src/main/java/org/hibernate/dialect/AbstractTransactSQLDialect.java
+++ b/hibernate-core/src/main/java/org/hibernate/dialect/AbstractTransactSQLDialect.java
@@ -24,8 +24,8 @@ import org.hibernate.query.sqm.mutation.internal.idtable.IdTable;
import org.hibernate.query.sqm.mutation.internal.idtable.LocalTemporaryTableStrategy;
import org.hibernate.query.sqm.mutation.internal.idtable.TempIdTableExporter;
import org.hibernate.query.sqm.mutation.spi.SqmMultiTableMutationStrategy;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
-import org.hibernate.type.descriptor.sql.spi.SqlTypeDescriptorRegistry;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeDescriptorRegistry;
import java.sql.CallableStatement;
import java.sql.ResultSet;
@@ -68,15 +68,15 @@ abstract class AbstractTransactSQLDialect extends Dialect {
}
@Override
- public SqlTypeDescriptor resolveSqlTypeDescriptor(
+ public JdbcTypeDescriptor resolveSqlTypeDescriptor(
int jdbcTypeCode,
int precision,
int scale,
- SqlTypeDescriptorRegistry sqlTypeDescriptorRegistry) {
+ JdbcTypeDescriptorRegistry jdbcTypeDescriptorRegistry) {
if ( jdbcTypeCode == Types.BIT ) {
- return sqlTypeDescriptorRegistry.getDescriptor( Types.BOOLEAN );
+ return jdbcTypeDescriptorRegistry.getDescriptor( Types.BOOLEAN );
}
- return super.resolveSqlTypeDescriptor( jdbcTypeCode, precision, scale, sqlTypeDescriptorRegistry );
+ return super.resolveSqlTypeDescriptor( jdbcTypeCode, precision, scale, jdbcTypeDescriptorRegistry );
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/CUBRIDDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/CUBRIDDialect.java
index 7111d1a769..8424426fdb 100755
--- a/hibernate-core/src/main/java/org/hibernate/dialect/CUBRIDDialect.java
+++ b/hibernate-core/src/main/java/org/hibernate/dialect/CUBRIDDialect.java
@@ -27,8 +27,8 @@ import org.hibernate.sql.ast.tree.Statement;
import org.hibernate.sql.exec.spi.JdbcOperation;
import org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorCUBRIDDatabaseImpl;
import org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
-import org.hibernate.type.descriptor.sql.spi.SqlTypeDescriptorRegistry;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeDescriptorRegistry;
import java.sql.Types;
@@ -104,15 +104,15 @@ public class CUBRIDDialect extends Dialect {
}
@Override
- public SqlTypeDescriptor resolveSqlTypeDescriptor(
+ public JdbcTypeDescriptor resolveSqlTypeDescriptor(
int jdbcTypeCode,
int precision,
int scale,
- SqlTypeDescriptorRegistry sqlTypeDescriptorRegistry) {
+ JdbcTypeDescriptorRegistry jdbcTypeDescriptorRegistry) {
if ( jdbcTypeCode == Types.BIT ) {
- return sqlTypeDescriptorRegistry.getDescriptor( Types.BOOLEAN );
+ return jdbcTypeDescriptorRegistry.getDescriptor( Types.BOOLEAN );
}
- return super.resolveSqlTypeDescriptor( jdbcTypeCode, precision, scale, sqlTypeDescriptorRegistry );
+ return super.resolveSqlTypeDescriptor( jdbcTypeCode, precision, scale, jdbcTypeDescriptorRegistry );
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/CacheDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/CacheDialect.java
index 677db6f49a..ae8edfc161 100644
--- a/hibernate-core/src/main/java/org/hibernate/dialect/CacheDialect.java
+++ b/hibernate-core/src/main/java/org/hibernate/dialect/CacheDialect.java
@@ -34,8 +34,8 @@ 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.StandardBasicTypes;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
-import org.hibernate.type.descriptor.sql.spi.SqlTypeDescriptorRegistry;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeDescriptorRegistry;
import java.sql.CallableStatement;
import java.sql.ResultSet;
@@ -87,15 +87,15 @@ public class CacheDialect extends Dialect {
}
@Override
- public SqlTypeDescriptor resolveSqlTypeDescriptor(
+ public JdbcTypeDescriptor resolveSqlTypeDescriptor(
int jdbcTypeCode,
int precision,
int scale,
- SqlTypeDescriptorRegistry sqlTypeDescriptorRegistry) {
+ JdbcTypeDescriptorRegistry jdbcTypeDescriptorRegistry) {
if ( jdbcTypeCode == Types.BIT ) {
- return sqlTypeDescriptorRegistry.getDescriptor( Types.BOOLEAN );
+ return jdbcTypeDescriptorRegistry.getDescriptor( Types.BOOLEAN );
}
- return super.resolveSqlTypeDescriptor( jdbcTypeCode, precision, scale, sqlTypeDescriptorRegistry );
+ return super.resolveSqlTypeDescriptor( jdbcTypeCode, precision, scale, jdbcTypeDescriptorRegistry );
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/DB2Dialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/DB2Dialect.java
index 594e9681fc..9ea2334d01 100644
--- a/hibernate-core/src/main/java/org/hibernate/dialect/DB2Dialect.java
+++ b/hibernate-core/src/main/java/org/hibernate/dialect/DB2Dialect.java
@@ -41,7 +41,7 @@ import org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorDB
import org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorNoOpImpl;
import org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor;
import org.hibernate.type.StandardBasicTypes;
-import org.hibernate.type.descriptor.sql.*;
+import org.hibernate.type.descriptor.jdbc.*;
import java.sql.CallableStatement;
import java.sql.ResultSet;
@@ -520,7 +520,7 @@ public class DB2Dialect extends Dialect {
}
@Override
- protected SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) {
+ protected JdbcTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) {
final int version = getVersion();
if ( version < 1100 && sqlCode == Types.BOOLEAN ) {
diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/DerbyDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/DerbyDialect.java
index f4a06a9913..f975ce8f1e 100755
--- a/hibernate-core/src/main/java/org/hibernate/dialect/DerbyDialect.java
+++ b/hibernate-core/src/main/java/org/hibernate/dialect/DerbyDialect.java
@@ -52,10 +52,10 @@ import org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorDe
import org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorNoOpImpl;
import org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor;
import org.hibernate.type.StandardBasicTypes;
-import org.hibernate.type.descriptor.sql.DecimalTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SmallIntTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
-import org.hibernate.type.descriptor.sql.TimestampTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.DecimalTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.SmallIntTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.TimestampTypeDescriptor;
import java.sql.DatabaseMetaData;
import java.sql.SQLException;
@@ -487,7 +487,7 @@ public class DerbyDialect extends Dialect {
return false;
}
- protected SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) {
+ protected JdbcTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) {
if ( getVersion() < 1070 && sqlCode == Types.BOOLEAN) {
return SmallIntTypeDescriptor.INSTANCE;
}
diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java
index e59949a6a6..84c82d5d24 100644
--- a/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java
+++ b/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java
@@ -83,9 +83,9 @@ import org.hibernate.tool.schema.spi.Exporter;
import org.hibernate.type.StandardBasicTypes;
import org.hibernate.type.Type;
import org.hibernate.type.descriptor.java.JavaTypeDescriptor;
-import org.hibernate.type.descriptor.sql.ClobTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
-import org.hibernate.type.descriptor.sql.spi.SqlTypeDescriptorRegistry;
+import org.hibernate.type.descriptor.jdbc.ClobTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeDescriptorRegistry;
import javax.persistence.TemporalType;
import java.io.InputStream;
@@ -243,12 +243,12 @@ public abstract class Dialect implements ConversionContext {
sizeStrategy = new SizeStrategyImpl();
}
- public SqlTypeDescriptor resolveSqlTypeDescriptor(
+ public JdbcTypeDescriptor resolveSqlTypeDescriptor(
int jdbcTypeCode,
int precision,
int scale,
- SqlTypeDescriptorRegistry sqlTypeDescriptorRegistry) {
- return sqlTypeDescriptorRegistry.getDescriptor( jdbcTypeCode );
+ JdbcTypeDescriptorRegistry jdbcTypeDescriptorRegistry) {
+ return jdbcTypeDescriptorRegistry.getDescriptor( jdbcTypeCode );
}
/**
@@ -1018,12 +1018,12 @@ public abstract class Dialect implements ConversionContext {
return paren>0 ? result.substring(0, paren) : result;
}
- public String getRawTypeName(SqlTypeDescriptor sqlTypeDescriptor) throws HibernateException {
- return getRawTypeName( sqlTypeDescriptor.getJdbcTypeCode() );
+ public String getRawTypeName(JdbcTypeDescriptor jdbcTypeDescriptor) throws HibernateException {
+ return getRawTypeName( jdbcTypeDescriptor.getJdbcTypeCode() );
}
- public String getTypeName(SqlTypeDescriptor sqlTypeDescriptor) throws HibernateException {
- return getTypeName( sqlTypeDescriptor.getJdbcTypeCode() );
+ public String getTypeName(JdbcTypeDescriptor jdbcTypeDescriptor) throws HibernateException {
+ return getTypeName( jdbcTypeDescriptor.getJdbcTypeCode() );
}
public String getTypeName(int code) throws HibernateException {
@@ -1081,14 +1081,14 @@ public abstract class Dialect implements ConversionContext {
* Get the name of the database type associated with the given
* SqlTypeDescriptor .
*
- * @param sqlTypeDescriptor the SQL type
+ * @param jdbcTypeDescriptor the SQL type
* @param size the length, precision, scale of the column
*
* @return the database type name
*
*/
- public String getTypeName(SqlTypeDescriptor sqlTypeDescriptor, Size size) {
- return getTypeName( sqlTypeDescriptor.getJdbcTypeCode(), size );
+ public String getTypeName(JdbcTypeDescriptor jdbcTypeDescriptor, Size size) {
+ return getTypeName( jdbcTypeDescriptor.getJdbcTypeCode(), size );
}
/**
@@ -1103,7 +1103,7 @@ public abstract class Dialect implements ConversionContext {
if ( length == null && precision == null ) {
//use defaults
size = getSizeStrategy().resolveSize(
- type.getJdbcMapping().getSqlTypeDescriptor(),
+ type.getJdbcMapping().getJdbcTypeDescriptor(),
type.getJdbcMapping().getJavaTypeDescriptor(),
precision,
scale,
@@ -1122,7 +1122,7 @@ public abstract class Dialect implements ConversionContext {
.setScale( scale );
}
- return getTypeName( type.getJdbcMapping().getSqlTypeDescriptor(), size );
+ return getTypeName( type.getJdbcMapping().getJdbcTypeDescriptor(), size );
}
/**
@@ -1150,44 +1150,44 @@ public abstract class Dialect implements ConversionContext {
}
/**
- * Allows the dialect to override a {@link SqlTypeDescriptor}.
+ * Allows the dialect to override a {@link JdbcTypeDescriptor}.
*
* If the passed {@code sqlTypeDescriptor} allows itself to be remapped (per
- * {@link SqlTypeDescriptor#canBeRemapped()}), then this method uses
+ * {@link JdbcTypeDescriptor#canBeRemapped()}), then this method uses
* {@link #getSqlTypeDescriptorOverride} to get an optional override based on the SQL code returned by
- * {@link SqlTypeDescriptor#getJdbcTypeCode()}.
+ * {@link JdbcTypeDescriptor#getJdbcTypeCode()}.
*
* If this dialect does not provide an override or if the {@code sqlTypeDescriptor} does not allow itself to be
* remapped, then this method simply returns the original passed {@code sqlTypeDescriptor}
*
- * @param sqlTypeDescriptor The {@link SqlTypeDescriptor} to override
- * @return The {@link SqlTypeDescriptor} that should be used for this dialect;
+ * @param jdbcTypeDescriptor The {@link JdbcTypeDescriptor} to override
+ * @return The {@link JdbcTypeDescriptor} that should be used for this dialect;
* if there is no override, then original {@code sqlTypeDescriptor} is returned.
* @throws IllegalArgumentException if {@code sqlTypeDescriptor} is null.
*
* @see #getSqlTypeDescriptorOverride
*/
- public SqlTypeDescriptor remapSqlTypeDescriptor(SqlTypeDescriptor sqlTypeDescriptor) {
- if ( sqlTypeDescriptor == null ) {
+ public JdbcTypeDescriptor remapSqlTypeDescriptor(JdbcTypeDescriptor jdbcTypeDescriptor) {
+ if ( jdbcTypeDescriptor == null ) {
throw new IllegalArgumentException( "sqlTypeDescriptor is null" );
}
- if ( ! sqlTypeDescriptor.canBeRemapped() ) {
- return sqlTypeDescriptor;
+ if ( ! jdbcTypeDescriptor.canBeRemapped() ) {
+ return jdbcTypeDescriptor;
}
- final SqlTypeDescriptor overridden = getSqlTypeDescriptorOverride( sqlTypeDescriptor.getJdbcTypeCode() );
- return overridden == null ? sqlTypeDescriptor : overridden;
+ final JdbcTypeDescriptor overridden = getSqlTypeDescriptorOverride( jdbcTypeDescriptor.getJdbcTypeCode() );
+ return overridden == null ? jdbcTypeDescriptor : overridden;
}
/**
- * Returns the {@link SqlTypeDescriptor} that should be used to handle the given JDBC type code. Returns
+ * Returns the {@link JdbcTypeDescriptor} that should be used to handle the given JDBC type code. Returns
* {@code null} if there is no override.
*
* @param sqlCode A {@link Types} constant indicating the SQL column type
- * @return The {@link SqlTypeDescriptor} to use as an override, or {@code null} if there is no override.
+ * @return The {@link JdbcTypeDescriptor} to use as an override, or {@code null} if there is no override.
*/
- protected SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) {
- SqlTypeDescriptor descriptor;
+ protected JdbcTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) {
+ JdbcTypeDescriptor descriptor;
switch ( sqlCode ) {
case Types.CLOB: {
descriptor = useInputStreamToInsertBlob() ? ClobTypeDescriptor.STREAM_BINDING : null;
@@ -3717,12 +3717,12 @@ public abstract class Dialect implements ConversionContext {
public interface SizeStrategy {
/**
* Resolve the {@link Size} to use for columns of the given
- * {@link SqlTypeDescriptor SQL type} and {@link JavaTypeDescriptor Java type}.
+ * {@link JdbcTypeDescriptor SQL type} and {@link JavaTypeDescriptor Java type}.
*
* @return a non-null {@link Size}
*/
Size resolveSize(
- SqlTypeDescriptor sqlType,
+ JdbcTypeDescriptor jdbcType,
JavaTypeDescriptor javaType,
Integer precision,
Integer scale, Long length);
@@ -3731,13 +3731,13 @@ public abstract class Dialect implements ConversionContext {
public class SizeStrategyImpl implements SizeStrategy {
@Override
public Size resolveSize(
- SqlTypeDescriptor sqlType,
+ JdbcTypeDescriptor jdbcType,
JavaTypeDescriptor javaType,
Integer precision,
Integer scale,
Long length) {
final Size size = new Size();
- int jdbcTypeCode = sqlType.getJdbcTypeCode();
+ int jdbcTypeCode = jdbcType.getJdbcTypeCode();
switch (jdbcTypeCode) {
case Types.BIT:
diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/FirebirdDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/FirebirdDialect.java
index 0666d85737..20d69c151f 100644
--- a/hibernate-core/src/main/java/org/hibernate/dialect/FirebirdDialect.java
+++ b/hibernate-core/src/main/java/org/hibernate/dialect/FirebirdDialect.java
@@ -50,8 +50,8 @@ import org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorFi
import org.hibernate.tool.schema.extract.internal.SequenceNameExtractorImpl;
import org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor;
import org.hibernate.type.StandardBasicTypes;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
-import org.hibernate.type.descriptor.sql.spi.SqlTypeDescriptorRegistry;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeDescriptorRegistry;
import java.sql.DatabaseMetaData;
import java.sql.SQLException;
@@ -162,15 +162,15 @@ public class FirebirdDialect extends Dialect {
}
@Override
- public SqlTypeDescriptor resolveSqlTypeDescriptor(
+ public JdbcTypeDescriptor resolveSqlTypeDescriptor(
int jdbcTypeCode,
int precision,
int scale,
- SqlTypeDescriptorRegistry sqlTypeDescriptorRegistry) {
+ JdbcTypeDescriptorRegistry jdbcTypeDescriptorRegistry) {
if ( jdbcTypeCode == Types.BIT ) {
- return sqlTypeDescriptorRegistry.getDescriptor( Types.BOOLEAN );
+ return jdbcTypeDescriptorRegistry.getDescriptor( Types.BOOLEAN );
}
- return super.resolveSqlTypeDescriptor( jdbcTypeCode, precision, scale, sqlTypeDescriptorRegistry );
+ return super.resolveSqlTypeDescriptor( jdbcTypeCode, precision, scale, jdbcTypeDescriptorRegistry );
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/IngresDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/IngresDialect.java
index a94b6d3f32..e5a31d16fd 100644
--- a/hibernate-core/src/main/java/org/hibernate/dialect/IngresDialect.java
+++ b/hibernate-core/src/main/java/org/hibernate/dialect/IngresDialect.java
@@ -35,8 +35,8 @@ import org.hibernate.sql.exec.spi.JdbcOperation;
import org.hibernate.tool.schema.extract.internal.SequenceNameExtractorImpl;
import org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor;
import org.hibernate.type.StandardBasicTypes;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
-import org.hibernate.type.descriptor.sql.spi.SqlTypeDescriptorRegistry;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeDescriptorRegistry;
import java.sql.Types;
import javax.persistence.TemporalType;
@@ -159,15 +159,15 @@ public class IngresDialect extends Dialect {
}
@Override
- public SqlTypeDescriptor resolveSqlTypeDescriptor(
+ public JdbcTypeDescriptor resolveSqlTypeDescriptor(
int jdbcTypeCode,
int precision,
int scale,
- SqlTypeDescriptorRegistry sqlTypeDescriptorRegistry) {
+ JdbcTypeDescriptorRegistry jdbcTypeDescriptorRegistry) {
if ( jdbcTypeCode == Types.BIT ) {
- return sqlTypeDescriptorRegistry.getDescriptor( Types.BOOLEAN );
+ return jdbcTypeDescriptorRegistry.getDescriptor( Types.BOOLEAN );
}
- return super.resolveSqlTypeDescriptor( jdbcTypeCode, precision, scale, sqlTypeDescriptorRegistry );
+ return super.resolveSqlTypeDescriptor( jdbcTypeCode, precision, scale, jdbcTypeDescriptorRegistry );
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/MaxDBDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/MaxDBDialect.java
index 14516b13ec..9f4a4a2527 100644
--- a/hibernate-core/src/main/java/org/hibernate/dialect/MaxDBDialect.java
+++ b/hibernate-core/src/main/java/org/hibernate/dialect/MaxDBDialect.java
@@ -29,8 +29,8 @@ import org.hibernate.sql.exec.spi.JdbcOperation;
import org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorSAPDBDatabaseImpl;
import org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor;
import org.hibernate.type.StandardBasicTypes;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
-import org.hibernate.type.descriptor.sql.spi.SqlTypeDescriptorRegistry;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeDescriptorRegistry;
import java.sql.DatabaseMetaData;
import java.sql.Types;
@@ -64,19 +64,19 @@ public class MaxDBDialect extends Dialect {
}
@Override
- public SqlTypeDescriptor resolveSqlTypeDescriptor(
+ public JdbcTypeDescriptor resolveSqlTypeDescriptor(
int jdbcTypeCode,
int precision,
int scale,
- SqlTypeDescriptorRegistry sqlTypeDescriptorRegistry) {
+ JdbcTypeDescriptorRegistry jdbcTypeDescriptorRegistry) {
switch ( jdbcTypeCode ) {
case Types.NUMERIC:
case Types.DECIMAL:
if ( precision == 19 && scale == 0 ) {
- return sqlTypeDescriptorRegistry.getDescriptor( Types.BIGINT );
+ return jdbcTypeDescriptorRegistry.getDescriptor( Types.BIGINT );
}
}
- return super.resolveSqlTypeDescriptor( jdbcTypeCode, precision, scale, sqlTypeDescriptorRegistry );
+ return super.resolveSqlTypeDescriptor( jdbcTypeCode, precision, scale, jdbcTypeDescriptorRegistry );
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/MySQLDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/MySQLDialect.java
index 85b854c1f9..a616ef4ca0 100644
--- a/hibernate-core/src/main/java/org/hibernate/dialect/MySQLDialect.java
+++ b/hibernate-core/src/main/java/org/hibernate/dialect/MySQLDialect.java
@@ -48,8 +48,8 @@ import org.hibernate.sql.ast.tree.Statement;
import org.hibernate.sql.exec.spi.JdbcOperation;
import org.hibernate.type.StandardBasicTypes;
import org.hibernate.type.descriptor.java.JavaTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
-import org.hibernate.type.descriptor.sql.spi.SqlTypeDescriptorRegistry;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeDescriptorRegistry;
import java.sql.CallableStatement;
import java.sql.ResultSet;
@@ -169,12 +169,12 @@ public class MySQLDialect extends Dialect {
sizeStrategy = new SizeStrategyImpl() {
@Override
public Size resolveSize(
- SqlTypeDescriptor sqlType,
+ JdbcTypeDescriptor jdbcType,
JavaTypeDescriptor javaType,
Integer precision,
Integer scale,
Long length) {
- final int jdbcTypeCode = sqlType.getSqlType();
+ final int jdbcTypeCode = jdbcType.getJdbcType();
switch ( jdbcTypeCode ) {
case Types.BIT:
// MySQL allows BIT with a length up to 64
@@ -182,7 +182,7 @@ public class MySQLDialect extends Dialect {
return Size.length( Math.min( Math.max( length, 1 ), 64 ) );
}
}
- return super.resolveSize( sqlType, javaType, precision, scale, length );
+ return super.resolveSize( jdbcType, javaType, precision, scale, length );
}
};
}
@@ -208,15 +208,15 @@ public class MySQLDialect extends Dialect {
}
@Override
- public SqlTypeDescriptor resolveSqlTypeDescriptor(
+ public JdbcTypeDescriptor resolveSqlTypeDescriptor(
int jdbcTypeCode,
int precision,
int scale,
- SqlTypeDescriptorRegistry sqlTypeDescriptorRegistry) {
+ JdbcTypeDescriptorRegistry jdbcTypeDescriptorRegistry) {
if ( jdbcTypeCode == Types.BIT ) {
- return sqlTypeDescriptorRegistry.getDescriptor( Types.BOOLEAN );
+ return jdbcTypeDescriptorRegistry.getDescriptor( Types.BOOLEAN );
}
- return super.resolveSqlTypeDescriptor( jdbcTypeCode, precision, scale, sqlTypeDescriptorRegistry );
+ return super.resolveSqlTypeDescriptor( jdbcTypeCode, precision, scale, jdbcTypeDescriptorRegistry );
}
@Override
@@ -575,7 +575,7 @@ public class MySQLDialect extends Dialect {
@Override
public String getCastTypeName(SqlExpressable type, Long length, Integer precision, Integer scale) {
- switch ( type.getJdbcMapping().getSqlTypeDescriptor().getJdbcTypeCode() ) {
+ switch ( type.getJdbcMapping().getJdbcTypeDescriptor().getJdbcTypeCode() ) {
case Types.INTEGER:
case Types.BIGINT:
case Types.SMALLINT:
diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/OracleDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/OracleDialect.java
index 00403bcf71..921461bfb9 100644
--- a/hibernate-core/src/main/java/org/hibernate/dialect/OracleDialect.java
+++ b/hibernate-core/src/main/java/org/hibernate/dialect/OracleDialect.java
@@ -61,11 +61,11 @@ import org.hibernate.type.descriptor.JdbcTypeNameMapper;
import org.hibernate.type.descriptor.ValueBinder;
import org.hibernate.type.descriptor.WrapperOptions;
import org.hibernate.type.descriptor.java.JavaTypeDescriptor;
-import org.hibernate.type.descriptor.sql.BasicBinder;
-import org.hibernate.type.descriptor.sql.BlobTypeDescriptor;
-import org.hibernate.type.descriptor.sql.BooleanTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
-import org.hibernate.type.descriptor.sql.spi.SqlTypeDescriptorRegistry;
+import org.hibernate.type.descriptor.jdbc.BasicBinder;
+import org.hibernate.type.descriptor.jdbc.BlobTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.BooleanTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeDescriptorRegistry;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
@@ -600,11 +600,11 @@ public class OracleDialect extends Dialect {
}
@Override
- public SqlTypeDescriptor resolveSqlTypeDescriptor(
+ public JdbcTypeDescriptor resolveSqlTypeDescriptor(
int jdbcTypeCode,
int precision,
int scale,
- SqlTypeDescriptorRegistry sqlTypeDescriptorRegistry) {
+ JdbcTypeDescriptorRegistry jdbcTypeDescriptorRegistry) {
// This is the reverse of what registerNumericTypeMappings registers
switch ( jdbcTypeCode ) {
case Types.NUMERIC:
@@ -612,19 +612,19 @@ public class OracleDialect extends Dialect {
if ( scale == 0 ) {
switch ( precision ) {
case 1:
- return sqlTypeDescriptorRegistry.getDescriptor( Types.BOOLEAN );
+ return jdbcTypeDescriptorRegistry.getDescriptor( Types.BOOLEAN );
case 3:
- return sqlTypeDescriptorRegistry.getDescriptor( Types.TINYINT );
+ return jdbcTypeDescriptorRegistry.getDescriptor( Types.TINYINT );
case 5:
- return sqlTypeDescriptorRegistry.getDescriptor( Types.SMALLINT );
+ return jdbcTypeDescriptorRegistry.getDescriptor( Types.SMALLINT );
case 10:
- return sqlTypeDescriptorRegistry.getDescriptor( Types.INTEGER );
+ return jdbcTypeDescriptorRegistry.getDescriptor( Types.INTEGER );
case 19:
- return sqlTypeDescriptorRegistry.getDescriptor( Types.BIGINT );
+ return jdbcTypeDescriptorRegistry.getDescriptor( Types.BIGINT );
}
}
}
- return super.resolveSqlTypeDescriptor( jdbcTypeCode, precision, scale, sqlTypeDescriptorRegistry );
+ return super.resolveSqlTypeDescriptor( jdbcTypeCode, precision, scale, jdbcTypeDescriptorRegistry );
}
/**
@@ -654,9 +654,9 @@ public class OracleDialect extends Dialect {
BlobTypeDescriptor.PRIMITIVE_ARRAY_BINDING :
BlobTypeDescriptor.DEFAULT;
- typeContributions.contributeSqlTypeDescriptor( descriptor );
+ typeContributions.contributeJdbcTypeDescriptor( descriptor );
}
- typeContributions.contributeSqlTypeDescriptor( new OracleBooleanTypeDescriptor() );
+ typeContributions.contributeJdbcTypeDescriptor( new OracleBooleanTypeDescriptor() );
}
private static final class OracleBooleanTypeDescriptor extends BooleanTypeDescriptor {
diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/PostgreSQLDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/PostgreSQLDialect.java
index 02b06b5b15..ccafdc2508 100644
--- a/hibernate-core/src/main/java/org/hibernate/dialect/PostgreSQLDialect.java
+++ b/hibernate-core/src/main/java/org/hibernate/dialect/PostgreSQLDialect.java
@@ -47,12 +47,13 @@ import org.hibernate.type.descriptor.ValueExtractor;
import org.hibernate.type.descriptor.WrapperOptions;
import org.hibernate.type.descriptor.java.BasicJavaDescriptor;
import org.hibernate.type.descriptor.java.JavaTypeDescriptor;
-import org.hibernate.type.descriptor.sql.BasicBinder;
-import org.hibernate.type.descriptor.sql.BasicExtractor;
-import org.hibernate.type.descriptor.sql.BlobTypeDescriptor;
-import org.hibernate.type.descriptor.sql.ClobTypeDescriptor;
-import org.hibernate.type.descriptor.sql.JdbcLiteralFormatter;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.BasicBinder;
+import org.hibernate.type.descriptor.jdbc.BasicExtractor;
+import org.hibernate.type.descriptor.jdbc.BlobTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.ClobTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcLiteralFormatter;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeDescriptorRegistry;
import org.hibernate.type.spi.TypeConfiguration;
import java.sql.*;
@@ -327,7 +328,7 @@ public class PostgreSQLDialect extends Dialect {
}
@Override
- public SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) {
+ public JdbcTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) {
// For discussion of BLOB support in Postgres, as of 8.4, have a peek at
// http://jdbc.postgresql.org/documentation/84/binary-data.html .
// For the effects in regards to Hibernate see http://in.relation.to/15492.lace
@@ -822,11 +823,11 @@ public class PostgreSQLDialect extends Dialect {
if ( getVersion() >= 820 ) {
// HHH-9562
- typeContributions.contributeSqlTypeDescriptor( PostgresUUIDType.INSTANCE );
+ typeContributions.contributeJdbcTypeDescriptor( PostgresUUIDType.INSTANCE );
}
}
- private static class PostgresUUIDType implements SqlTypeDescriptor {
+ private static class PostgresUUIDType implements JdbcTypeDescriptor {
/**
* Singleton access
*/
@@ -837,18 +838,18 @@ public class PostgreSQLDialect extends Dialect {
* it reports a lot of its types as {@link java.sql.Types#OTHER}, making that
* value useless for distinguishing one SqlTypeDescriptor from another.
* So here we define a "magic value" that is a (hopefully no collisions)
- * unique key within the {@link org.hibernate.type.descriptor.sql.spi.SqlTypeDescriptorRegistry}
+ * unique key within the {@link JdbcTypeDescriptorRegistry}
*/
private static final int JDBC_TYPE_CODE = 3975;
@Override
- public int getSqlType() {
+ public int getJdbcType() {
return JDBC_TYPE_CODE;
}
@Override
public int getJdbcTypeCode() {
- return getSqlType();
+ return getJdbcType();
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/RDMSOS2200Dialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/RDMSOS2200Dialect.java
index d528334867..f56face4f6 100755
--- a/hibernate-core/src/main/java/org/hibernate/dialect/RDMSOS2200Dialect.java
+++ b/hibernate-core/src/main/java/org/hibernate/dialect/RDMSOS2200Dialect.java
@@ -26,8 +26,8 @@ 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.sql.SqlTypeDescriptor;
-import org.hibernate.type.descriptor.sql.spi.SqlTypeDescriptorRegistry;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeDescriptorRegistry;
import org.jboss.logging.Logger;
@@ -110,15 +110,15 @@ public class RDMSOS2200Dialect extends Dialect {
}
@Override
- public SqlTypeDescriptor resolveSqlTypeDescriptor(
+ public JdbcTypeDescriptor resolveSqlTypeDescriptor(
int jdbcTypeCode,
int precision,
int scale,
- SqlTypeDescriptorRegistry sqlTypeDescriptorRegistry) {
+ JdbcTypeDescriptorRegistry jdbcTypeDescriptorRegistry) {
if ( jdbcTypeCode == Types.BIT ) {
- return sqlTypeDescriptorRegistry.getDescriptor( Types.BOOLEAN );
+ return jdbcTypeDescriptorRegistry.getDescriptor( Types.BOOLEAN );
}
- return super.resolveSqlTypeDescriptor( jdbcTypeCode, precision, scale, sqlTypeDescriptorRegistry );
+ return super.resolveSqlTypeDescriptor( jdbcTypeCode, precision, scale, jdbcTypeDescriptorRegistry );
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/SQLServerDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/SQLServerDialect.java
index d4937d85a5..c9af94c2c2 100644
--- a/hibernate-core/src/main/java/org/hibernate/dialect/SQLServerDialect.java
+++ b/hibernate-core/src/main/java/org/hibernate/dialect/SQLServerDialect.java
@@ -33,8 +33,8 @@ 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.StandardBasicTypes;
-import org.hibernate.type.descriptor.sql.SmallIntTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.SmallIntTypeDescriptor;
import java.sql.Types;
import java.util.regex.Pattern;
@@ -129,7 +129,7 @@ public class SQLServerDialect extends AbstractTransactSQLDialect {
}
@Override
- protected SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) {
+ protected JdbcTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) {
return sqlCode == Types.TINYINT
? SmallIntTypeDescriptor.INSTANCE
: super.getSqlTypeDescriptorOverride( sqlCode );
diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/SpannerDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/SpannerDialect.java
index ff0de5f8e9..8aee479c55 100644
--- a/hibernate-core/src/main/java/org/hibernate/dialect/SpannerDialect.java
+++ b/hibernate-core/src/main/java/org/hibernate/dialect/SpannerDialect.java
@@ -788,7 +788,7 @@ public class SpannerDialect extends Dialect {
@Override
public String getCastTypeName(SqlExpressable type, Long length, Integer precision, Integer scale) {
//Spanner doesn't let you specify a length in cast() types
- return super.getRawTypeName( type.getJdbcMapping().getSqlTypeDescriptor() );
+ return super.getRawTypeName( type.getJdbcMapping().getJdbcTypeDescriptor() );
}
/**
diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/SybaseASEDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/SybaseASEDialect.java
index 4b7d57c58c..87bbb629b6 100644
--- a/hibernate-core/src/main/java/org/hibernate/dialect/SybaseASEDialect.java
+++ b/hibernate-core/src/main/java/org/hibernate/dialect/SybaseASEDialect.java
@@ -26,8 +26,8 @@ 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.sql.SqlTypeDescriptor;
-import org.hibernate.type.descriptor.sql.TinyIntTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.TinyIntTypeDescriptor;
import java.sql.Types;
import java.util.Map;
@@ -100,7 +100,7 @@ public class SybaseASEDialect extends SybaseDialect {
}
@Override
- protected SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) {
+ protected JdbcTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) {
return sqlCode == Types.BOOLEAN
? TinyIntTypeDescriptor.INSTANCE
: super.getSqlTypeDescriptorOverride( sqlCode );
diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/SybaseDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/SybaseDialect.java
index 45cbaa2571..f8e5b255b9 100644
--- a/hibernate-core/src/main/java/org/hibernate/dialect/SybaseDialect.java
+++ b/hibernate-core/src/main/java/org/hibernate/dialect/SybaseDialect.java
@@ -16,10 +16,10 @@ 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.sql.BlobTypeDescriptor;
-import org.hibernate.type.descriptor.sql.ClobTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
-import org.hibernate.type.descriptor.sql.spi.SqlTypeDescriptorRegistry;
+import org.hibernate.type.descriptor.jdbc.BlobTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.ClobTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeDescriptorRegistry;
import java.sql.Types;
import javax.persistence.TemporalType;
@@ -53,19 +53,19 @@ public class SybaseDialect extends AbstractTransactSQLDialect {
}
@Override
- public SqlTypeDescriptor resolveSqlTypeDescriptor(
+ public JdbcTypeDescriptor resolveSqlTypeDescriptor(
int jdbcTypeCode,
int precision,
int scale,
- SqlTypeDescriptorRegistry sqlTypeDescriptorRegistry) {
+ JdbcTypeDescriptorRegistry jdbcTypeDescriptorRegistry) {
switch ( jdbcTypeCode ) {
case Types.NUMERIC:
case Types.DECIMAL:
if ( precision == 19 && scale == 0 ) {
- return sqlTypeDescriptorRegistry.getDescriptor( Types.BIGINT );
+ return jdbcTypeDescriptorRegistry.getDescriptor( Types.BIGINT );
}
}
- return super.resolveSqlTypeDescriptor( jdbcTypeCode, precision, scale, sqlTypeDescriptorRegistry );
+ return super.resolveSqlTypeDescriptor( jdbcTypeCode, precision, scale, jdbcTypeDescriptorRegistry );
}
@Override
@@ -90,7 +90,7 @@ public class SybaseDialect extends AbstractTransactSQLDialect {
}
@Override
- protected SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) {
+ protected JdbcTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) {
switch (sqlCode) {
case Types.BLOB:
return BlobTypeDescriptor.PRIMITIVE_ARRAY_BINDING;
diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/TeradataDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/TeradataDialect.java
index 0260bb68c7..2a812eb37d 100644
--- a/hibernate-core/src/main/java/org/hibernate/dialect/TeradataDialect.java
+++ b/hibernate-core/src/main/java/org/hibernate/dialect/TeradataDialect.java
@@ -43,8 +43,8 @@ import org.hibernate.sql.exec.spi.JdbcOperation;
import org.hibernate.tool.schema.internal.StandardIndexExporter;
import org.hibernate.tool.schema.spi.Exporter;
import org.hibernate.type.StandardBasicTypes;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
-import org.hibernate.type.descriptor.sql.spi.SqlTypeDescriptorRegistry;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeDescriptorRegistry;
import java.sql.CallableStatement;
import java.sql.ResultSet;
@@ -123,21 +123,21 @@ public class TeradataDialect extends Dialect {
}
@Override
- public SqlTypeDescriptor resolveSqlTypeDescriptor(
+ public JdbcTypeDescriptor resolveSqlTypeDescriptor(
int jdbcTypeCode,
int precision,
int scale,
- SqlTypeDescriptorRegistry sqlTypeDescriptorRegistry) {
+ JdbcTypeDescriptorRegistry jdbcTypeDescriptorRegistry) {
switch ( jdbcTypeCode ) {
case Types.BIT:
- return sqlTypeDescriptorRegistry.getDescriptor( Types.BOOLEAN );
+ return jdbcTypeDescriptorRegistry.getDescriptor( Types.BOOLEAN );
case Types.NUMERIC:
case Types.DECIMAL:
if ( precision == 19 && scale == 0 ) {
- return sqlTypeDescriptorRegistry.getDescriptor( Types.BIGINT );
+ return jdbcTypeDescriptorRegistry.getDescriptor( Types.BIGINT );
}
}
- return super.resolveSqlTypeDescriptor( jdbcTypeCode, precision, scale, sqlTypeDescriptorRegistry );
+ return super.resolveSqlTypeDescriptor( jdbcTypeCode, precision, scale, jdbcTypeDescriptorRegistry );
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/TimesTenDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/TimesTenDialect.java
index cb300525dc..f932ba0d9a 100644
--- a/hibernate-core/src/main/java/org/hibernate/dialect/TimesTenDialect.java
+++ b/hibernate-core/src/main/java/org/hibernate/dialect/TimesTenDialect.java
@@ -33,8 +33,8 @@ import org.hibernate.sql.exec.spi.JdbcOperation;
import org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorTimesTenDatabaseImpl;
import org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor;
import org.hibernate.type.StandardBasicTypes;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
-import org.hibernate.type.descriptor.sql.spi.SqlTypeDescriptorRegistry;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeDescriptorRegistry;
import java.sql.Types;
import javax.persistence.TemporalType;
@@ -98,15 +98,15 @@ public class TimesTenDialect extends Dialect {
}
@Override
- public SqlTypeDescriptor resolveSqlTypeDescriptor(
+ public JdbcTypeDescriptor resolveSqlTypeDescriptor(
int jdbcTypeCode,
int precision,
int scale,
- SqlTypeDescriptorRegistry sqlTypeDescriptorRegistry) {
+ JdbcTypeDescriptorRegistry jdbcTypeDescriptorRegistry) {
if ( jdbcTypeCode == Types.BIT ) {
- return sqlTypeDescriptorRegistry.getDescriptor( Types.BOOLEAN );
+ return jdbcTypeDescriptorRegistry.getDescriptor( Types.BOOLEAN );
}
- return super.resolveSqlTypeDescriptor( jdbcTypeCode, precision, scale, sqlTypeDescriptorRegistry );
+ return super.resolveSqlTypeDescriptor( jdbcTypeCode, precision, scale, jdbcTypeDescriptorRegistry );
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/AbstractDelegatingWrapperOptions.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/AbstractDelegatingWrapperOptions.java
index 4bc92b674a..ff3efe387a 100644
--- a/hibernate-core/src/main/java/org/hibernate/engine/spi/AbstractDelegatingWrapperOptions.java
+++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/AbstractDelegatingWrapperOptions.java
@@ -10,7 +10,7 @@ import java.util.TimeZone;
import org.hibernate.engine.jdbc.LobCreator;
import org.hibernate.type.descriptor.WrapperOptions;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
/**
* @author Christian Beikov
@@ -34,8 +34,8 @@ public abstract class AbstractDelegatingWrapperOptions implements WrapperOptions
}
@Override
- public SqlTypeDescriptor remapSqlTypeDescriptor(SqlTypeDescriptor sqlTypeDescriptor) {
- return delegate().remapSqlTypeDescriptor( sqlTypeDescriptor );
+ public JdbcTypeDescriptor remapSqlTypeDescriptor(JdbcTypeDescriptor jdbcTypeDescriptor) {
+ return delegate().remapSqlTypeDescriptor( jdbcTypeDescriptor );
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/SessionDelegatorBaseImpl.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/SessionDelegatorBaseImpl.java
index 07f2e2e38f..2eeb7e1bdb 100644
--- a/hibernate-core/src/main/java/org/hibernate/engine/spi/SessionDelegatorBaseImpl.java
+++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/SessionDelegatorBaseImpl.java
@@ -60,7 +60,7 @@ import org.hibernate.query.sql.spi.NativeQueryImplementor;
import org.hibernate.resource.jdbc.spi.JdbcSessionContext;
import org.hibernate.resource.transaction.spi.TransactionCoordinator;
import org.hibernate.stat.SessionStatistics;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
/**
* This class is meant to be extended.
@@ -1101,8 +1101,8 @@ public class SessionDelegatorBaseImpl implements SessionImplementor {
}
@Override
- public SqlTypeDescriptor remapSqlTypeDescriptor(SqlTypeDescriptor sqlTypeDescriptor) {
- return delegate.remapSqlTypeDescriptor( sqlTypeDescriptor );
+ public JdbcTypeDescriptor remapSqlTypeDescriptor(JdbcTypeDescriptor jdbcTypeDescriptor) {
+ return delegate.remapSqlTypeDescriptor( jdbcTypeDescriptor );
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/internal/AbstractSharedSessionContract.java b/hibernate-core/src/main/java/org/hibernate/internal/AbstractSharedSessionContract.java
index 6cf9618f82..d7c11adfda 100644
--- a/hibernate-core/src/main/java/org/hibernate/internal/AbstractSharedSessionContract.java
+++ b/hibernate-core/src/main/java/org/hibernate/internal/AbstractSharedSessionContract.java
@@ -26,7 +26,6 @@ import org.hibernate.FlushMode;
import org.hibernate.Hibernate;
import org.hibernate.HibernateException;
import org.hibernate.Interceptor;
-import org.hibernate.LockMode;
import org.hibernate.MultiTenancyStrategy;
import org.hibernate.NotYetImplementedFor6Exception;
import org.hibernate.SessionEventListener;
@@ -81,7 +80,7 @@ import org.hibernate.resource.jdbc.spi.StatementInspector;
import org.hibernate.resource.transaction.backend.jta.internal.JtaTransactionCoordinatorImpl;
import org.hibernate.resource.transaction.spi.TransactionCoordinator;
import org.hibernate.resource.transaction.spi.TransactionCoordinatorBuilder;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
/**
* Base class for SharedSessionContract/SharedSessionContractImplementor
@@ -581,8 +580,8 @@ public abstract class AbstractSharedSessionContract implements SharedSessionCont
}
@Override
- public SqlTypeDescriptor remapSqlTypeDescriptor(SqlTypeDescriptor sqlTypeDescriptor) {
- return fastSessionServices.remapSqlTypeDescriptor( sqlTypeDescriptor );
+ public JdbcTypeDescriptor remapSqlTypeDescriptor(JdbcTypeDescriptor jdbcTypeDescriptor) {
+ return fastSessionServices.remapSqlTypeDescriptor( jdbcTypeDescriptor );
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/internal/FastSessionServices.java b/hibernate-core/src/main/java/org/hibernate/internal/FastSessionServices.java
index 9abb00d3c9..21b7228814 100644
--- a/hibernate-core/src/main/java/org/hibernate/internal/FastSessionServices.java
+++ b/hibernate-core/src/main/java/org/hibernate/internal/FastSessionServices.java
@@ -66,7 +66,7 @@ import org.hibernate.jpa.internal.util.ConfigurationHelper;
import org.hibernate.jpa.internal.util.LockOptionsHelper;
import org.hibernate.resource.transaction.spi.TransactionCoordinatorBuilder;
import org.hibernate.service.spi.ServiceRegistryImplementor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
import static org.hibernate.cfg.AvailableSettings.JPA_LOCK_SCOPE;
import static org.hibernate.cfg.AvailableSettings.JPA_LOCK_TIMEOUT;
@@ -248,13 +248,13 @@ public final class FastSessionServices {
return elr.getEventListenerGroup( type );
}
- public SqlTypeDescriptor remapSqlTypeDescriptor(SqlTypeDescriptor sqlTypeDescriptor) {
- if ( !sqlTypeDescriptor.canBeRemapped() ) {
- return sqlTypeDescriptor;
+ public JdbcTypeDescriptor remapSqlTypeDescriptor(JdbcTypeDescriptor jdbcTypeDescriptor) {
+ if ( !jdbcTypeDescriptor.canBeRemapped() ) {
+ return jdbcTypeDescriptor;
}
- final SqlTypeDescriptor remapped = dialect.remapSqlTypeDescriptor( sqlTypeDescriptor );
- return remapped == null ? sqlTypeDescriptor : remapped;
+ final JdbcTypeDescriptor remapped = dialect.remapSqlTypeDescriptor( jdbcTypeDescriptor );
+ return remapped == null ? jdbcTypeDescriptor : remapped;
}
private static boolean isTransactionAccessible(SessionFactoryImpl sf, TransactionCoordinatorBuilder transactionCoordinatorBuilder) {
diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/BasicValue.java b/hibernate-core/src/main/java/org/hibernate/mapping/BasicValue.java
index d21feba3d5..7f17a57fcf 100644
--- a/hibernate-core/src/main/java/org/hibernate/mapping/BasicValue.java
+++ b/hibernate-core/src/main/java/org/hibernate/mapping/BasicValue.java
@@ -44,15 +44,15 @@ import org.hibernate.type.descriptor.java.EnumJavaTypeDescriptor;
import org.hibernate.type.descriptor.java.JavaTypeDescriptor;
import org.hibernate.type.descriptor.java.MutabilityPlan;
import org.hibernate.type.descriptor.java.TemporalJavaTypeDescriptor;
-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;
import org.hibernate.type.spi.TypeConfiguration;
/**
* @author Steve Ebersole
*/
@SuppressWarnings({"unchecked", "rawtypes"})
-public class BasicValue extends SimpleValue implements SqlTypeDescriptorIndicators, Resolvable {
+public class BasicValue extends SimpleValue implements JdbcTypeDescriptorIndicators, Resolvable {
private static final CoreMessageLogger log = CoreLogging.messageLogger( BasicValue.class );
private final TypeConfiguration typeConfiguration;
@@ -65,7 +65,7 @@ public class BasicValue extends SimpleValue implements SqlTypeDescriptorIndicato
private Map explicitLocalTypeParams;
private Function explicitJavaTypeAccess;
- private Function explicitSqlTypeAccess;
+ private Function explicitSqlTypeAccess;
private Function explicitMutabilityPlanAccess;
private Function implicitJavaTypeAccess;
@@ -132,7 +132,7 @@ public class BasicValue extends SimpleValue implements SqlTypeDescriptorIndicato
this.explicitJavaTypeAccess = explicitJavaTypeAccess;
}
- public void setExplicitSqlTypeAccess(Function sqlTypeAccess) {
+ public void setExplicitSqlTypeAccess(Function sqlTypeAccess) {
this.explicitSqlTypeAccess = sqlTypeAccess;
}
@@ -255,7 +255,7 @@ public class BasicValue extends SimpleValue implements SqlTypeDescriptorIndicato
if ( column instanceof Column && resolution.getValueConverter() == null ) {
final Column physicalColumn = (Column) column;
if ( physicalColumn.getSqlTypeCode() == null ) {
- physicalColumn.setSqlTypeCode( resolution.getRelationalSqlTypeDescriptor().getJdbcTypeCode() );
+ physicalColumn.setSqlTypeCode( resolution.getJdbcTypeDescriptor().getJdbcTypeCode() );
}
final BasicType> basicType = resolution.getLegacyResolvedBasicType();
@@ -265,7 +265,7 @@ public class BasicValue extends SimpleValue implements SqlTypeDescriptorIndicato
physicalColumn.setCheckConstraint(
basicType.getJavaTypeDescriptor().getCheckCondition(
physicalColumn.getQuotedName( dialect ),
- basicType.getSqlTypeDescriptor(),
+ basicType.getJdbcTypeDescriptor(),
dialect
)
);
@@ -443,11 +443,11 @@ public class BasicValue extends SimpleValue implements SqlTypeDescriptorIndicato
EnumType enumerationStyle,
Function implicitJavaTypeAccess,
Function explicitJtdAccess,
- Function explicitStdAccess,
+ Function explicitStdAccess,
Function explicitMutabilityPlanAccess,
ConverterDescriptor converterDescriptor,
Map localTypeParams,
- SqlTypeDescriptorIndicators stdIndicators,
+ JdbcTypeDescriptorIndicators stdIndicators,
TypeConfiguration typeConfiguration,
MetadataBuildingContext context) {
@@ -666,7 +666,7 @@ public class BasicValue extends SimpleValue implements SqlTypeDescriptorIndicato
* The JavaTypeDescriptor for the relational value as part of
* the relational model (its JDBC representation)
*/
- SqlTypeDescriptor getRelationalSqlTypeDescriptor();
+ JdbcTypeDescriptor getJdbcTypeDescriptor();
/**
* Converter, if any, to convert values between the
diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/Column.java b/hibernate-core/src/main/java/org/hibernate/mapping/Column.java
index e4218dec8f..ae6ad4fd1f 100644
--- a/hibernate-core/src/main/java/org/hibernate/mapping/Column.java
+++ b/hibernate-core/src/main/java/org/hibernate/mapping/Column.java
@@ -268,7 +268,7 @@ public class Column implements Selectable, Serializable, Cloneable {
type = getTypeForComponentValue( mapping, type, getTypeIndex() );
}
return dialect.getSizeStrategy().resolveSize(
- ( (JdbcMapping) type ).getSqlTypeDescriptor(),
+ ( (JdbcMapping) type ).getJdbcTypeDescriptor(),
( (JdbcMapping) type ).getJavaTypeDescriptor(),
precision,
scale,
diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/SimpleValue.java b/hibernate-core/src/main/java/org/hibernate/mapping/SimpleValue.java
index 8632c696a1..31efe455ba 100644
--- a/hibernate-core/src/main/java/org/hibernate/mapping/SimpleValue.java
+++ b/hibernate-core/src/main/java/org/hibernate/mapping/SimpleValue.java
@@ -47,12 +47,12 @@ import org.hibernate.resource.beans.spi.ManagedBeanRegistry;
import org.hibernate.service.ServiceRegistry;
import org.hibernate.type.Type;
import org.hibernate.type.descriptor.JdbcTypeNameMapper;
-import org.hibernate.type.descriptor.converter.AttributeConverterSqlTypeDescriptorAdapter;
+import org.hibernate.type.descriptor.converter.AttributeConverterJdbcTypeDescriptorAdapter;
import org.hibernate.type.descriptor.converter.AttributeConverterTypeAdapter;
import org.hibernate.type.descriptor.java.BasicJavaDescriptor;
-import org.hibernate.type.descriptor.sql.LobTypeMappings;
-import org.hibernate.type.descriptor.sql.NationalizedTypeMappings;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.LobTypeMappings;
+import org.hibernate.type.descriptor.jdbc.NationalizedTypeMappings;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
import org.hibernate.type.spi.TypeConfiguration;
import org.hibernate.usertype.DynamicParameterizedType;
@@ -627,11 +627,11 @@ public abstract class SimpleValue implements KeyValue {
// corresponding to the AttributeConverter's declared "databaseColumnJavaType" (how we read that value out
// of ResultSets). See JdbcTypeJavaClassMappings for details. Again, given example, this should return
// VARCHAR/CHAR
- final SqlTypeDescriptor recommendedSqlType = jpaAttributeConverter.getRelationalJavaTypeDescriptor().getJdbcRecommendedSqlType(
+ final JdbcTypeDescriptor recommendedJdbcType = jpaAttributeConverter.getRelationalJavaTypeDescriptor().getRecommendedJdbcType(
// todo (6.0) : handle the other JdbcRecommendedSqlTypeMappingContext methods
metadata::getTypeConfiguration
);
- int jdbcTypeCode = recommendedSqlType.getSqlType();
+ int jdbcTypeCode = recommendedJdbcType.getJdbcType();
if ( isLob() ) {
if ( LobTypeMappings.isMappedToKnownLobCode( jdbcTypeCode ) ) {
jdbcTypeCode = LobTypeMappings.getLobCodeTypeMapping( jdbcTypeCode );
@@ -657,7 +657,7 @@ public abstract class SimpleValue implements KeyValue {
}
// find the standard SqlTypeDescriptor for that JDBC type code (allow it to be remapped if needed!)
- final SqlTypeDescriptor sqlTypeDescriptor = getMetadata()
+ final JdbcTypeDescriptor jdbcTypeDescriptor = getMetadata()
.getMetadataBuildingOptions()
.getServiceRegistry()
.getService( JdbcServices.class )
@@ -665,14 +665,14 @@ public abstract class SimpleValue implements KeyValue {
.getDialect()
.remapSqlTypeDescriptor(
metadata.getTypeConfiguration()
- .getSqlTypeDescriptorRegistry()
+ .getJdbcTypeDescriptorRegistry()
.getDescriptor( jdbcTypeCode ) );
// and finally construct the adapter, which injects the AttributeConverter calls into the binding/extraction
// process...
- final SqlTypeDescriptor sqlTypeDescriptorAdapter = new AttributeConverterSqlTypeDescriptorAdapter(
+ final JdbcTypeDescriptor jdbcTypeDescriptorAdapter = new AttributeConverterJdbcTypeDescriptorAdapter(
jpaAttributeConverter,
- sqlTypeDescriptor,
+ jdbcTypeDescriptor,
jpaAttributeConverter.getRelationalJavaTypeDescriptor()
);
@@ -688,7 +688,7 @@ public abstract class SimpleValue implements KeyValue {
name,
description,
jpaAttributeConverter,
- sqlTypeDescriptorAdapter,
+ jdbcTypeDescriptorAdapter,
jpaAttributeConverter.getRelationalJavaTypeDescriptor(),
jpaAttributeConverter.getDomainJavaTypeDescriptor(),
null
diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/JdbcMapping.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/JdbcMapping.java
index d165bd910b..a4c31000c8 100644
--- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/JdbcMapping.java
+++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/JdbcMapping.java
@@ -10,7 +10,7 @@ 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.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
/**
* Models the type of a thing that can be used as an expression in a SQL query
@@ -28,10 +28,10 @@ public interface JdbcMapping extends MappingType {
* The descriptor for the SQL type represented by this
* expressable type
*/
- SqlTypeDescriptor getSqlTypeDescriptor();
+ JdbcTypeDescriptor getJdbcTypeDescriptor();
default CastType getCastType() {
- return getSqlTypeDescriptor().getCastType();
+ return getJdbcTypeDescriptor().getCastType();
}
/**
diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MappingModelCreationHelper.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MappingModelCreationHelper.java
index 2cb43f2287..9b7d24bfb2 100644
--- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MappingModelCreationHelper.java
+++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MappingModelCreationHelper.java
@@ -370,7 +370,7 @@ public class MappingModelCreationHelper {
.getBasicTypeRegistry()
.resolve(
valueConverter.getRelationalJavaDescriptor(),
- resolution.getRelationalSqlTypeDescriptor()
+ resolution.getJdbcTypeDescriptor()
);
diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/internal/NamedEnumValueConverter.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/internal/NamedEnumValueConverter.java
index 85c31075b5..de7a01f30d 100644
--- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/internal/NamedEnumValueConverter.java
+++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/internal/NamedEnumValueConverter.java
@@ -11,7 +11,6 @@ import java.io.ObjectInputStream;
import java.io.Serializable;
import java.sql.PreparedStatement;
import java.sql.SQLException;
-import java.sql.Types;
import java.util.Locale;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
@@ -20,7 +19,7 @@ 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.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
/**
* BasicValueConverter handling the conversion of an enum based on
@@ -30,7 +29,7 @@ import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
*/
public class NamedEnumValueConverter> implements EnumValueConverter, Serializable {
private final EnumJavaTypeDescriptor domainTypeDescriptor;
- private final SqlTypeDescriptor sqlTypeDescriptor;
+ private final JdbcTypeDescriptor jdbcTypeDescriptor;
private final JavaTypeDescriptor relationalTypeDescriptor;
private transient ValueExtractor valueExtractor;
@@ -38,14 +37,14 @@ public class NamedEnumValueConverter> implements EnumValueConv
public NamedEnumValueConverter(
EnumJavaTypeDescriptor domainTypeDescriptor,
- SqlTypeDescriptor sqlTypeDescriptor,
+ JdbcTypeDescriptor jdbcTypeDescriptor,
JavaTypeDescriptor relationalTypeDescriptor) {
this.domainTypeDescriptor = domainTypeDescriptor;
- this.sqlTypeDescriptor = sqlTypeDescriptor;
+ this.jdbcTypeDescriptor = jdbcTypeDescriptor;
this.relationalTypeDescriptor = relationalTypeDescriptor;
- this.valueExtractor = sqlTypeDescriptor.getExtractor( relationalTypeDescriptor );
- this.valueBinder = sqlTypeDescriptor.getBinder( relationalTypeDescriptor );
+ this.valueExtractor = jdbcTypeDescriptor.getExtractor( relationalTypeDescriptor );
+ this.valueBinder = jdbcTypeDescriptor.getBinder( relationalTypeDescriptor );
}
@Override
@@ -70,7 +69,7 @@ public class NamedEnumValueConverter> implements EnumValueConv
@Override
public int getJdbcTypeCode() {
- return sqlTypeDescriptor.getJdbcTypeCode();
+ return jdbcTypeDescriptor.getJdbcTypeCode();
}
@Override
@@ -82,8 +81,8 @@ public class NamedEnumValueConverter> implements EnumValueConv
private void readObject(ObjectInputStream stream) throws ClassNotFoundException, IOException {
stream.defaultReadObject();
- this.valueExtractor = sqlTypeDescriptor.getExtractor( relationalTypeDescriptor );
- this.valueBinder = sqlTypeDescriptor.getBinder( relationalTypeDescriptor );
+ this.valueExtractor = jdbcTypeDescriptor.getExtractor( relationalTypeDescriptor );
+ this.valueBinder = jdbcTypeDescriptor.getBinder( relationalTypeDescriptor );
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/internal/OrdinalEnumValueConverter.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/internal/OrdinalEnumValueConverter.java
index d825b3380c..4af913d08e 100644
--- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/internal/OrdinalEnumValueConverter.java
+++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/convert/internal/OrdinalEnumValueConverter.java
@@ -19,7 +19,7 @@ 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.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
/**
* BasicValueConverter handling the conversion of an enum based on
@@ -30,7 +30,7 @@ import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
public class OrdinalEnumValueConverter> implements EnumValueConverter, Serializable {
private final EnumJavaTypeDescriptor enumJavaDescriptor;
- private final SqlTypeDescriptor sqlTypeDescriptor;
+ private final JdbcTypeDescriptor jdbcTypeDescriptor;
private final JavaTypeDescriptor relationalJavaDescriptor;
private transient ValueExtractor valueExtractor;
@@ -38,14 +38,14 @@ public class OrdinalEnumValueConverter> implements EnumValueCo
public OrdinalEnumValueConverter(
EnumJavaTypeDescriptor enumJavaDescriptor,
- SqlTypeDescriptor sqlTypeDescriptor,
+ JdbcTypeDescriptor jdbcTypeDescriptor,
JavaTypeDescriptor relationalJavaDescriptor) {
this.enumJavaDescriptor = enumJavaDescriptor;
- this.sqlTypeDescriptor = sqlTypeDescriptor;
+ this.jdbcTypeDescriptor = jdbcTypeDescriptor;
this.relationalJavaDescriptor = relationalJavaDescriptor;
- this.valueExtractor = sqlTypeDescriptor.getExtractor( relationalJavaDescriptor );
- this.valueBinder = sqlTypeDescriptor.getBinder( relationalJavaDescriptor );
+ this.valueExtractor = jdbcTypeDescriptor.getExtractor( relationalJavaDescriptor );
+ this.valueBinder = jdbcTypeDescriptor.getBinder( relationalJavaDescriptor );
}
@Override
@@ -85,8 +85,8 @@ public class OrdinalEnumValueConverter> implements EnumValueCo
private void readObject(ObjectInputStream stream) throws ClassNotFoundException, IOException {
stream.defaultReadObject();
- this.valueExtractor = sqlTypeDescriptor.getExtractor( relationalJavaDescriptor );
- this.valueBinder = sqlTypeDescriptor.getBinder( relationalJavaDescriptor );
+ this.valueExtractor = jdbcTypeDescriptor.getExtractor( relationalJavaDescriptor );
+ this.valueBinder = jdbcTypeDescriptor.getBinder( relationalJavaDescriptor );
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/AllowableOutputParameterType.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/AllowableOutputParameterType.java
index b28f71ea0d..0f51c91c9d 100644
--- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/AllowableOutputParameterType.java
+++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/AllowableOutputParameterType.java
@@ -10,13 +10,13 @@ import java.sql.CallableStatement;
import java.sql.SQLException;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
/**
* Specialization of DomainType for types that can be used as a
* parameter output for a {@link org.hibernate.procedure.ProcedureCall}
*
- * @apiNote We assume a type that maps to exactly one SQL value, hence {@link #getSqlTypeDescriptor()}
+ * @apiNote We assume a type that maps to exactly one SQL value, hence {@link #getJdbcTypeDescriptor()}
*
* @author Steve Ebersole
*/
@@ -31,7 +31,7 @@ public interface AllowableOutputParameterType extends AllowableParameterType<
/**
* Descriptor for the SQL type mapped by this type.
*/
- SqlTypeDescriptor getSqlTypeDescriptor();
+ JdbcTypeDescriptor getJdbcTypeDescriptor();
/**
* Perform the extraction
diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/BasicTypeImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/BasicTypeImpl.java
index 2d789512e6..ce198c3e45 100644
--- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/BasicTypeImpl.java
+++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/BasicTypeImpl.java
@@ -14,7 +14,7 @@ import org.hibernate.NotYetImplementedFor6Exception;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.metamodel.model.domain.BasicDomainType;
import org.hibernate.type.descriptor.java.JavaTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
/**
* @author Emmanuel Bernard
@@ -45,7 +45,7 @@ public class BasicTypeImpl implements BasicDomainType, Serializable {
}
@Override
- public SqlTypeDescriptor getSqlTypeDescriptor() {
+ public JdbcTypeDescriptor getJdbcTypeDescriptor() {
throw new NotYetImplementedFor6Exception( getClass() );
}
diff --git a/hibernate-core/src/main/java/org/hibernate/procedure/internal/FunctionReturnImpl.java b/hibernate-core/src/main/java/org/hibernate/procedure/internal/FunctionReturnImpl.java
index 131dc850ea..1e4d2e6a54 100644
--- a/hibernate-core/src/main/java/org/hibernate/procedure/internal/FunctionReturnImpl.java
+++ b/hibernate-core/src/main/java/org/hibernate/procedure/internal/FunctionReturnImpl.java
@@ -32,7 +32,7 @@ public class FunctionReturnImpl implements FunctionReturnImplementor {
public FunctionReturnImpl(ProcedureCallImplementor procedureCall, AllowableOutputParameterType ormType) {
this.procedureCall = procedureCall;
- this.jdbcTypeCode = ormType.getSqlTypeDescriptor().getSqlType();
+ this.jdbcTypeCode = ormType.getJdbcTypeDescriptor().getJdbcType();
this.ormType = ormType;
}
diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/idtable/TempIdTableExporter.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/idtable/TempIdTableExporter.java
index eb5b6ca936..dfa7d7249f 100644
--- a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/idtable/TempIdTableExporter.java
+++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/idtable/TempIdTableExporter.java
@@ -57,7 +57,7 @@ public class TempIdTableExporter implements IdTableExporter {
}
buffer.append( column.getColumnName() ).append( ' ' );
- final int sqlTypeCode = column.getJdbcMapping().getSqlTypeDescriptor().getSqlType();
+ final int sqlTypeCode = column.getJdbcMapping().getJdbcTypeDescriptor().getJdbcType();
final String databaseTypeName = databaseTypeNameResolver.apply( sqlTypeCode );
buffer.append( " " ).append( databaseTypeName ).append( " " );
diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/StandardFunctionReturnTypeResolvers.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/StandardFunctionReturnTypeResolvers.java
index 874be2bf35..63ca55badb 100644
--- a/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/StandardFunctionReturnTypeResolvers.java
+++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/StandardFunctionReturnTypeResolvers.java
@@ -137,8 +137,8 @@ public class StandardFunctionReturnTypeResolvers {
//that is determined by how the function is used in the HQL query. In essence
//the types are compatible if the map to the same JDBC type, of if they are
//both numeric types.
- int impliedTypeCode = ((BasicType>) implied).getJdbcMapping().getSqlTypeDescriptor().getJdbcTypeCode();
- int definedTypeCode = ((BasicType>) defined).getJdbcMapping().getSqlTypeDescriptor().getJdbcTypeCode();
+ int impliedTypeCode = ((BasicType>) implied).getJdbcMapping().getJdbcTypeDescriptor().getJdbcTypeCode();
+ int definedTypeCode = ((BasicType>) defined).getJdbcMapping().getJdbcTypeDescriptor().getJdbcTypeCode();
return impliedTypeCode == definedTypeCode
|| isNumeric( impliedTypeCode ) && isNumeric( definedTypeCode );
}
@@ -177,8 +177,8 @@ public class StandardFunctionReturnTypeResolvers {
//that is determined by how the function is used in the HQL query. In essence
//the types are compatible if the map to the same JDBC type, of if they are
//both numeric types.
- int impliedTypeCode = implied.getJdbcMapping().getSqlTypeDescriptor().getJdbcTypeCode();
- int definedTypeCode = defined.getJdbcMapping().getSqlTypeDescriptor().getJdbcTypeCode();
+ int impliedTypeCode = implied.getJdbcMapping().getJdbcTypeDescriptor().getJdbcTypeCode();
+ int definedTypeCode = defined.getJdbcMapping().getJdbcTypeDescriptor().getJdbcTypeCode();
return impliedTypeCode == definedTypeCode
|| isNumeric( impliedTypeCode ) && isNumeric( definedTypeCode );
diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java
index c5906d6e77..8119660319 100644
--- a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java
+++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java
@@ -275,7 +275,7 @@ import org.hibernate.sql.results.internal.StandardEntityGraphTraversalStateImpl;
import org.hibernate.type.BasicType;
import org.hibernate.type.StandardBasicTypes;
import org.hibernate.type.descriptor.java.JavaTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptorIndicators;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators;
import org.hibernate.type.spi.TypeConfiguration;
import org.jboss.logging.Logger;
@@ -293,7 +293,7 @@ import static org.hibernate.type.spi.TypeConfiguration.isDuration;
* @author Steve Ebersole
*/
public abstract class BaseSqmToSqlAstConverter extends BaseSemanticQueryWalker
- implements SqmTranslator, DomainResultCreationState, SqlTypeDescriptorIndicators {
+ implements SqmTranslator, DomainResultCreationState, JdbcTypeDescriptorIndicators {
private static final Logger log = Logger.getLogger( BaseSqmToSqlAstConverter.class );
diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/AbstractSqlAstTranslator.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/AbstractSqlAstTranslator.java
index 0f402b2f6f..e9a5e8c907 100644
--- a/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/AbstractSqlAstTranslator.java
+++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/AbstractSqlAstTranslator.java
@@ -141,8 +141,8 @@ import org.hibernate.sql.results.jdbc.internal.JdbcValuesMappingProducerStandard
import org.hibernate.type.IntegerType;
import org.hibernate.type.StringType;
import org.hibernate.type.descriptor.WrapperOptions;
-import org.hibernate.type.descriptor.sql.JdbcLiteralFormatter;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcLiteralFormatter;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
import static org.hibernate.query.TemporalUnit.NANOSECOND;
import static org.hibernate.sql.ast.SqlTreePrinter.logSqlAst;
@@ -261,8 +261,8 @@ public abstract class AbstractSqlAstTranslator implemen
}
@Override
- public SqlTypeDescriptor remapSqlTypeDescriptor(SqlTypeDescriptor sqlTypeDescriptor) {
- return sessionFactory.getFastSessionServices().remapSqlTypeDescriptor( sqlTypeDescriptor );
+ public JdbcTypeDescriptor remapSqlTypeDescriptor(JdbcTypeDescriptor jdbcTypeDescriptor) {
+ return sessionFactory.getFastSessionServices().remapSqlTypeDescriptor( jdbcTypeDescriptor );
}
@Override
@@ -2442,7 +2442,7 @@ public abstract class AbstractSqlAstTranslator implemen
final JdbcMapping jdbcMapping = literal.getJdbcMapping();
final JdbcLiteralFormatter literalFormatter = jdbcMapping
- .getSqlTypeDescriptor()
+ .getJdbcTypeDescriptor()
.getJdbcLiteralFormatter( jdbcMapping.getJavaTypeDescriptor() );
// If we encounter a plain literal in the select clause which has no literal formatter, we must render it as parameter
@@ -2774,13 +2774,13 @@ public abstract class AbstractSqlAstTranslator implemen
final JdbcMapping jdbcMapping = jdbcParameter.getExpressionType().getJdbcMappings().get( 0 );
// We try to avoid inlining parameters if possible which can be done by wrapping the parameter
// in an expression that is semantically unnecessary e.g. numeric + 0 or concat with an empty string
- if ( jdbcMapping.getSqlTypeDescriptor().isNumber() ) {
+ if ( jdbcMapping.getJdbcTypeDescriptor().isNumber() ) {
appendSql( '(' );
sqlAstNode.accept( this );
appendSql( "+0)" );
break;
}
- else if ( jdbcMapping.getSqlTypeDescriptor().isString() ) {
+ else if ( jdbcMapping.getJdbcTypeDescriptor().isString() ) {
final SqmFunctionDescriptor sqmFunctionDescriptor = getSessionFactory().getQueryEngine()
.getSqmFunctionRegistry()
.findFunctionDescriptor( "concat" );
@@ -3253,7 +3253,7 @@ public abstract class AbstractSqlAstTranslator implemen
else {
assert jdbcParameter.getExpressionType().getJdbcTypeCount() == 1;
final JdbcMapping jdbcMapping = jdbcParameter.getExpressionType().getJdbcMappings().get( 0 );
- final JdbcLiteralFormatter literalFormatter = jdbcMapping.getSqlTypeDescriptor().getJdbcLiteralFormatter( jdbcMapping.getJavaTypeDescriptor() );
+ final JdbcLiteralFormatter literalFormatter = jdbcMapping.getJdbcTypeDescriptor().getJdbcLiteralFormatter( jdbcMapping.getJavaTypeDescriptor() );
if ( literalFormatter == null ) {
throw new IllegalArgumentException( "Can't render parameter as literal, no literal formatter found" );
}
diff --git a/hibernate-core/src/main/java/org/hibernate/sql/results/jdbc/internal/ResultSetAccess.java b/hibernate-core/src/main/java/org/hibernate/sql/results/jdbc/internal/ResultSetAccess.java
index 42127ecc42..3e417a6870 100644
--- a/hibernate-core/src/main/java/org/hibernate/sql/results/jdbc/internal/ResultSetAccess.java
+++ b/hibernate-core/src/main/java/org/hibernate/sql/results/jdbc/internal/ResultSetAccess.java
@@ -15,7 +15,7 @@ import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.sql.results.jdbc.spi.JdbcValuesMetadata;
import org.hibernate.type.BasicType;
import org.hibernate.type.descriptor.java.JavaTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
import org.hibernate.type.spi.TypeConfiguration;
/**
@@ -73,23 +73,23 @@ public interface ResultSetAccess extends JdbcValuesMetadata {
try {
final TypeConfiguration typeConfiguration = getFactory().getTypeConfiguration();
final ResultSetMetaData metaData = getResultSet().getMetaData();
- final SqlTypeDescriptor sqlTypeDescriptor = jdbcServices.getDialect()
+ final JdbcTypeDescriptor jdbcTypeDescriptor = jdbcServices.getDialect()
.resolveSqlTypeDescriptor(
metaData.getColumnType( position ),
metaData.getPrecision( position ),
metaData.getScale( position ),
- typeConfiguration.getSqlTypeDescriptorRegistry()
+ typeConfiguration.getJdbcTypeDescriptorRegistry()
);
final JavaTypeDescriptor javaTypeDescriptor;
if ( explicitJavaTypeDescriptor == null ) {
- javaTypeDescriptor = sqlTypeDescriptor.getJdbcRecommendedJavaTypeMapping( typeConfiguration );
+ javaTypeDescriptor = jdbcTypeDescriptor.getJdbcRecommendedJavaTypeMapping( typeConfiguration );
}
else {
javaTypeDescriptor = explicitJavaTypeDescriptor;
}
return typeConfiguration.getBasicTypeRegistry().resolve(
javaTypeDescriptor,
- sqlTypeDescriptor
+ jdbcTypeDescriptor
);
}
catch (SQLException e) {
diff --git a/hibernate-core/src/main/java/org/hibernate/sql/results/jdbc/spi/JdbcValuesMetadata.java b/hibernate-core/src/main/java/org/hibernate/sql/results/jdbc/spi/JdbcValuesMetadata.java
index d470470e76..d692856c0c 100644
--- a/hibernate-core/src/main/java/org/hibernate/sql/results/jdbc/spi/JdbcValuesMetadata.java
+++ b/hibernate-core/src/main/java/org/hibernate/sql/results/jdbc/spi/JdbcValuesMetadata.java
@@ -8,8 +8,6 @@ package org.hibernate.sql.results.jdbc.spi;
import org.hibernate.type.BasicType;
import org.hibernate.type.descriptor.java.JavaTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
-import org.hibernate.type.spi.TypeConfiguration;
/**
* Access to information about the underlying JDBC values
diff --git a/hibernate-core/src/main/java/org/hibernate/type/AbstractSingleColumnStandardBasicType.java b/hibernate-core/src/main/java/org/hibernate/type/AbstractSingleColumnStandardBasicType.java
index 0579716c57..c69c5420e5 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/AbstractSingleColumnStandardBasicType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/AbstractSingleColumnStandardBasicType.java
@@ -12,7 +12,7 @@ import java.sql.SQLException;
import org.hibernate.HibernateException;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.type.descriptor.java.JavaTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
/**
* TODO : javadoc
@@ -23,13 +23,13 @@ public abstract class AbstractSingleColumnStandardBasicType
extends AbstractStandardBasicType
implements SingleColumnType {
- public AbstractSingleColumnStandardBasicType(SqlTypeDescriptor sqlTypeDescriptor, JavaTypeDescriptor javaTypeDescriptor) {
- super( sqlTypeDescriptor, javaTypeDescriptor );
+ public AbstractSingleColumnStandardBasicType(JdbcTypeDescriptor jdbcTypeDescriptor, JavaTypeDescriptor javaTypeDescriptor) {
+ super( jdbcTypeDescriptor, javaTypeDescriptor );
}
@Override
public final int sqlType() {
- return getSqlTypeDescriptor().getSqlType();
+ return getJdbcTypeDescriptor().getJdbcType();
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/type/AbstractStandardBasicType.java b/hibernate-core/src/main/java/org/hibernate/type/AbstractStandardBasicType.java
index 748acd9000..acc9407c78 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/AbstractStandardBasicType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/AbstractStandardBasicType.java
@@ -28,7 +28,7 @@ import org.hibernate.type.descriptor.ValueExtractor;
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.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
/**
* Convenience base class for {@link BasicType} implementations
@@ -44,7 +44,7 @@ public abstract class AbstractStandardBasicType
// Don't use final here. Need to initialize after-the-fact
// by DynamicParameterizedTypes.
- private SqlTypeDescriptor sqlTypeDescriptor;
+ private JdbcTypeDescriptor jdbcTypeDescriptor;
private JavaTypeDescriptor javaTypeDescriptor;
// sqlTypes need always to be in sync with sqlTypeDescriptor
private int[] sqlTypes;
@@ -52,13 +52,13 @@ public abstract class AbstractStandardBasicType
private ValueBinder jdbcValueBinder;
private ValueExtractor jdbcValueExtractor;
- public AbstractStandardBasicType(SqlTypeDescriptor sqlTypeDescriptor, JavaTypeDescriptor javaTypeDescriptor) {
- this.sqlTypeDescriptor = sqlTypeDescriptor;
- this.sqlTypes = new int[] { sqlTypeDescriptor.getSqlType() };
+ public AbstractStandardBasicType(JdbcTypeDescriptor jdbcTypeDescriptor, JavaTypeDescriptor javaTypeDescriptor) {
+ this.jdbcTypeDescriptor = jdbcTypeDescriptor;
+ this.sqlTypes = new int[] { jdbcTypeDescriptor.getJdbcType() };
this.javaTypeDescriptor = javaTypeDescriptor;
- this.jdbcValueBinder = sqlTypeDescriptor.getBinder( javaTypeDescriptor );
- this.jdbcValueExtractor = sqlTypeDescriptor.getExtractor( javaTypeDescriptor );
+ this.jdbcValueBinder = jdbcTypeDescriptor.getBinder( javaTypeDescriptor );
+ this.jdbcValueExtractor = jdbcTypeDescriptor.getExtractor( javaTypeDescriptor );
}
@Override
@@ -146,20 +146,20 @@ public abstract class AbstractStandardBasicType
public final void setJavaTypeDescriptor( JavaTypeDescriptor javaTypeDescriptor ) {
this.javaTypeDescriptor = javaTypeDescriptor;
- this.jdbcValueBinder = getSqlTypeDescriptor().getBinder( javaTypeDescriptor );
- this.jdbcValueExtractor = getSqlTypeDescriptor().getExtractor( javaTypeDescriptor );
+ this.jdbcValueBinder = getJdbcTypeDescriptor().getBinder( javaTypeDescriptor );
+ this.jdbcValueExtractor = getJdbcTypeDescriptor().getExtractor( javaTypeDescriptor );
}
- public final SqlTypeDescriptor getSqlTypeDescriptor() {
- return sqlTypeDescriptor;
+ public final JdbcTypeDescriptor getJdbcTypeDescriptor() {
+ return jdbcTypeDescriptor;
}
- public final void setSqlTypeDescriptor(SqlTypeDescriptor sqlTypeDescriptor) {
- this.sqlTypeDescriptor = sqlTypeDescriptor;
- this.sqlTypes = new int[] { sqlTypeDescriptor.getSqlType() };
+ public final void setSqlTypeDescriptor(JdbcTypeDescriptor jdbcTypeDescriptor) {
+ this.jdbcTypeDescriptor = jdbcTypeDescriptor;
+ this.sqlTypes = new int[] { jdbcTypeDescriptor.getJdbcType() };
- this.jdbcValueBinder = getSqlTypeDescriptor().getBinder( javaTypeDescriptor );
- this.jdbcValueExtractor = getSqlTypeDescriptor().getExtractor( javaTypeDescriptor );
+ this.jdbcValueBinder = getJdbcTypeDescriptor().getBinder( javaTypeDescriptor );
+ this.jdbcValueExtractor = getJdbcTypeDescriptor().getExtractor( javaTypeDescriptor );
}
@Override
@@ -310,8 +310,8 @@ public abstract class AbstractStandardBasicType
remapSqlTypeDescriptor( options ).getBinder( javaTypeDescriptor ).bind( st, ( T ) value, index, options );
}
- protected SqlTypeDescriptor remapSqlTypeDescriptor(WrapperOptions options) {
- return options.remapSqlTypeDescriptor( sqlTypeDescriptor );
+ protected JdbcTypeDescriptor remapSqlTypeDescriptor(WrapperOptions options) {
+ return options.remapSqlTypeDescriptor( jdbcTypeDescriptor );
}
public void set(PreparedStatement st, T value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException {
diff --git a/hibernate-core/src/main/java/org/hibernate/type/AdaptedImmutableType.java b/hibernate-core/src/main/java/org/hibernate/type/AdaptedImmutableType.java
index b85da74fca..691bfd363d 100755
--- a/hibernate-core/src/main/java/org/hibernate/type/AdaptedImmutableType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/AdaptedImmutableType.java
@@ -19,7 +19,7 @@ public class AdaptedImmutableType extends AbstractSingleColumnStandardBasicTy
private final AbstractStandardBasicType baseMutableType;
public AdaptedImmutableType(AbstractStandardBasicType baseMutableType) {
- super( baseMutableType.getSqlTypeDescriptor(), baseMutableType.getJavaTypeDescriptor() );
+ super( baseMutableType.getJdbcTypeDescriptor(), baseMutableType.getJavaTypeDescriptor() );
this.baseMutableType = baseMutableType;
}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/BasicType.java b/hibernate-core/src/main/java/org/hibernate/type/BasicType.java
index 568301715d..2a2f235fb1 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/BasicType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/BasicType.java
@@ -53,13 +53,13 @@ public interface BasicType extends Type, BasicDomainType, MappingType, Bas
@Override
default ValueExtractor getJdbcValueExtractor() {
//noinspection unchecked
- return getSqlTypeDescriptor().getExtractor( getMappedJavaTypeDescriptor() );
+ return getJdbcTypeDescriptor().getExtractor( getMappedJavaTypeDescriptor() );
}
@Override
default ValueBinder getJdbcValueBinder() {
//noinspection unchecked
- return getSqlTypeDescriptor().getBinder( getMappedJavaTypeDescriptor() );
+ return getJdbcTypeDescriptor().getBinder( getMappedJavaTypeDescriptor() );
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/type/BasicTypeRegistry.java b/hibernate-core/src/main/java/org/hibernate/type/BasicTypeRegistry.java
index 9a3138c4f8..e4c2108bbe 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/BasicTypeRegistry.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/BasicTypeRegistry.java
@@ -17,7 +17,7 @@ import org.hibernate.internal.CoreMessageLogger;
import org.hibernate.internal.util.StringHelper;
import org.hibernate.internal.util.collections.CollectionHelper;
import org.hibernate.type.descriptor.java.JavaTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
import org.hibernate.type.internal.StandardBasicTypeImpl;
import org.hibernate.type.spi.TypeConfiguration;
import org.hibernate.usertype.UserType;
@@ -32,7 +32,7 @@ public class BasicTypeRegistry implements Serializable {
private final TypeConfiguration typeConfiguration;
- private final Map, BasicType>>> registryValues = new ConcurrentHashMap<>();
+ private final Map, BasicType>>> registryValues = new ConcurrentHashMap<>();
private boolean primed;
private final Map> typesByName = new ConcurrentHashMap<>();
@@ -61,7 +61,7 @@ public class BasicTypeRegistry implements Serializable {
* Find an existing BasicType registration for the given JavaTypeDescriptor and
* SqlTypeDescriptor combo or create (and register) one.
*/
- public BasicType resolve(JavaTypeDescriptor jtdToUse, SqlTypeDescriptor stdToUse) {
+ public BasicType resolve(JavaTypeDescriptor jtdToUse, JdbcTypeDescriptor stdToUse) {
//noinspection unchecked
return resolve(
jtdToUse,
@@ -74,7 +74,7 @@ public class BasicTypeRegistry implements Serializable {
* Find an existing BasicType registration for the given JavaTypeDescriptor and
* SqlTypeDescriptor combo or create (and register) one.
*/
- public BasicType resolve(JavaTypeDescriptor jtdToUse, SqlTypeDescriptor stdToUse, Supplier> creator) {
+ public BasicType resolve(JavaTypeDescriptor jtdToUse, JdbcTypeDescriptor stdToUse, Supplier> creator) {
final Map, BasicType>> typeByJtdForStd = registryValues.computeIfAbsent(
stdToUse,
sqlTypeDescriptor -> new ConcurrentHashMap<>()
@@ -118,7 +118,7 @@ public class BasicTypeRegistry implements Serializable {
private void applyOrOverwriteEntry(BasicType> type) {
final Map, BasicType>> mappingsForStdToUse = registryValues.computeIfAbsent(
- type.getSqlTypeDescriptor(),
+ type.getJdbcTypeDescriptor(),
sqlTypeDescriptor -> new ConcurrentHashMap<>()
);
@@ -126,7 +126,7 @@ public class BasicTypeRegistry implements Serializable {
if ( existing != null ) {
LOG.debugf(
"BasicTypeRegistry registration overwritten (%s + %s); previous =`%s`",
- type.getSqlTypeDescriptor().getFriendlyName(),
+ type.getJdbcTypeDescriptor().getFriendlyName(),
type.getJavaTypeDescriptor(),
existing
);
@@ -184,7 +184,7 @@ public class BasicTypeRegistry implements Serializable {
private void primeRegistryEntry(BasicType> type) {
final Map, BasicType>> mappingsForStdToUse = registryValues.computeIfAbsent(
- type.getSqlTypeDescriptor(),
+ type.getJdbcTypeDescriptor(),
sqlTypeDescriptor -> new ConcurrentHashMap<>()
);
@@ -193,7 +193,7 @@ public class BasicTypeRegistry implements Serializable {
if ( existing != null ) {
LOG.debugf(
"Skipping registration of BasicType (%s + %s); still priming. existing = %s",
- type.getSqlTypeDescriptor().getFriendlyName(),
+ type.getJdbcTypeDescriptor().getFriendlyName(),
type.getJavaTypeDescriptor(),
existing
);
diff --git a/hibernate-core/src/main/java/org/hibernate/type/BigDecimalType.java b/hibernate-core/src/main/java/org/hibernate/type/BigDecimalType.java
index 8280eb9d95..f3fe2c0b60 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/BigDecimalType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/BigDecimalType.java
@@ -9,7 +9,7 @@ package org.hibernate.type;
import java.math.BigDecimal;
import org.hibernate.type.descriptor.java.BigDecimalTypeDescriptor;
-import org.hibernate.type.descriptor.sql.NumericTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.NumericTypeDescriptor;
/**
* A type that maps between a {@link java.sql.Types#NUMERIC NUMERIC} and {@link BigDecimal}.
diff --git a/hibernate-core/src/main/java/org/hibernate/type/BigIntegerType.java b/hibernate-core/src/main/java/org/hibernate/type/BigIntegerType.java
index 114a6aa188..153b0ac1bb 100755
--- a/hibernate-core/src/main/java/org/hibernate/type/BigIntegerType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/BigIntegerType.java
@@ -10,7 +10,7 @@ import java.math.BigInteger;
import org.hibernate.dialect.Dialect;
import org.hibernate.type.descriptor.java.BigIntegerTypeDescriptor;
-import org.hibernate.type.descriptor.sql.NumericTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.NumericTypeDescriptor;
/**
* A type that maps between a {@link java.sql.Types#NUMERIC NUMERIC} and {@link BigInteger}.
diff --git a/hibernate-core/src/main/java/org/hibernate/type/BinaryType.java b/hibernate-core/src/main/java/org/hibernate/type/BinaryType.java
index 2d06e44420..2158363ddc 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/BinaryType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/BinaryType.java
@@ -10,7 +10,7 @@ import java.util.Comparator;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.type.descriptor.java.PrimitiveByteArrayTypeDescriptor;
-import org.hibernate.type.descriptor.sql.VarbinaryTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.VarbinaryTypeDescriptor;
/**
* A type that maps between a {@link java.sql.Types#VARBINARY VARBINARY} and {@code byte[]}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/BlobType.java b/hibernate-core/src/main/java/org/hibernate/type/BlobType.java
index b06f42dd47..8628ac6c96 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/BlobType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/BlobType.java
@@ -21,7 +21,7 @@ public class BlobType extends AbstractSingleColumnStandardBasicType {
public static final BlobType INSTANCE = new BlobType();
public BlobType() {
- super( org.hibernate.type.descriptor.sql.BlobTypeDescriptor.DEFAULT, BlobTypeDescriptor.INSTANCE );
+ super( org.hibernate.type.descriptor.jdbc.BlobTypeDescriptor.DEFAULT, BlobTypeDescriptor.INSTANCE );
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/type/BooleanType.java b/hibernate-core/src/main/java/org/hibernate/type/BooleanType.java
index e021b7b550..2b29792e14 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/BooleanType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/BooleanType.java
@@ -11,8 +11,8 @@ import java.sql.Types;
import org.hibernate.dialect.Dialect;
import org.hibernate.type.descriptor.java.BooleanTypeDescriptor;
-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;
/**
* A type that maps between {@link java.sql.Types#BOOLEAN BOOLEAN} and {@link Boolean}
@@ -26,11 +26,11 @@ public class BooleanType
public static final BooleanType INSTANCE = new BooleanType();
public BooleanType() {
- this( org.hibernate.type.descriptor.sql.BooleanTypeDescriptor.INSTANCE, BooleanTypeDescriptor.INSTANCE );
+ this( org.hibernate.type.descriptor.jdbc.BooleanTypeDescriptor.INSTANCE, BooleanTypeDescriptor.INSTANCE );
}
- protected BooleanType(SqlTypeDescriptor sqlTypeDescriptor, BooleanTypeDescriptor javaTypeDescriptor) {
- super( sqlTypeDescriptor, javaTypeDescriptor );
+ protected BooleanType(JdbcTypeDescriptor jdbcTypeDescriptor, BooleanTypeDescriptor javaTypeDescriptor) {
+ super( jdbcTypeDescriptor, javaTypeDescriptor );
}
@Override
public String getName() {
@@ -60,25 +60,25 @@ public class BooleanType
}
@Override
- public BasicType resolveIndicatedType(SqlTypeDescriptorIndicators indicators) {
+ public BasicType resolveIndicatedType(JdbcTypeDescriptorIndicators indicators) {
final int preferredSqlTypeCodeForBoolean = indicators.getPreferredSqlTypeCodeForBoolean();
- final SqlTypeDescriptor sqlTypeDescriptor;
+ final JdbcTypeDescriptor jdbcTypeDescriptor;
// We treat BIT like BOOLEAN because it uses the same JDBC access methods
- if ( preferredSqlTypeCodeForBoolean != Types.BIT && preferredSqlTypeCodeForBoolean != getSqlTypeDescriptor().getJdbcTypeCode() ) {
- sqlTypeDescriptor = indicators.getTypeConfiguration()
- .getSqlTypeDescriptorRegistry()
+ if ( preferredSqlTypeCodeForBoolean != Types.BIT && preferredSqlTypeCodeForBoolean != getJdbcTypeDescriptor().getJdbcTypeCode() ) {
+ jdbcTypeDescriptor = indicators.getTypeConfiguration()
+ .getJdbcTypeDescriptorRegistry()
.getDescriptor( preferredSqlTypeCodeForBoolean );
}
else {
- sqlTypeDescriptor = indicators.getTypeConfiguration()
- .getSqlTypeDescriptorRegistry()
+ jdbcTypeDescriptor = indicators.getTypeConfiguration()
+ .getJdbcTypeDescriptorRegistry()
.getDescriptor( Types.BOOLEAN );
}
- if ( sqlTypeDescriptor != getSqlTypeDescriptor() ) {
+ if ( jdbcTypeDescriptor != getJdbcTypeDescriptor() ) {
//noinspection unchecked
return (BasicType) indicators.getTypeConfiguration()
.getBasicTypeRegistry()
- .resolve( getJavaTypeDescriptor(), sqlTypeDescriptor );
+ .resolve( getJavaTypeDescriptor(), jdbcTypeDescriptor );
}
//noinspection unchecked
diff --git a/hibernate-core/src/main/java/org/hibernate/type/ByteType.java b/hibernate-core/src/main/java/org/hibernate/type/ByteType.java
index 6305af799c..fb01ebcf6f 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/ByteType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/ByteType.java
@@ -12,7 +12,7 @@ import java.util.Comparator;
import org.hibernate.dialect.Dialect;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.type.descriptor.java.ByteTypeDescriptor;
-import org.hibernate.type.descriptor.sql.TinyIntTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.TinyIntTypeDescriptor;
/**
* A type that maps between {@link java.sql.Types#TINYINT TINYINT} and {@link Byte}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/CalendarDateType.java b/hibernate-core/src/main/java/org/hibernate/type/CalendarDateType.java
index 98896832ca..7947b018ef 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/CalendarDateType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/CalendarDateType.java
@@ -13,7 +13,7 @@ import javax.persistence.TemporalType;
import org.hibernate.QueryException;
import org.hibernate.metamodel.model.domain.AllowableTemporalParameterType;
import org.hibernate.type.descriptor.java.CalendarDateTypeDescriptor;
-import org.hibernate.type.descriptor.sql.DateTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.DateTypeDescriptor;
import org.hibernate.type.spi.TypeConfiguration;
/**
diff --git a/hibernate-core/src/main/java/org/hibernate/type/CalendarTimeType.java b/hibernate-core/src/main/java/org/hibernate/type/CalendarTimeType.java
index e01b698a0f..6b8c986e71 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/CalendarTimeType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/CalendarTimeType.java
@@ -13,7 +13,7 @@ import javax.persistence.TemporalType;
import org.hibernate.QueryException;
import org.hibernate.metamodel.model.domain.AllowableTemporalParameterType;
import org.hibernate.type.descriptor.java.CalendarTimeTypeDescriptor;
-import org.hibernate.type.descriptor.sql.TimeTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.TimeTypeDescriptor;
import org.hibernate.type.spi.TypeConfiguration;
/**
diff --git a/hibernate-core/src/main/java/org/hibernate/type/CalendarType.java b/hibernate-core/src/main/java/org/hibernate/type/CalendarType.java
index 2e068b7117..ad46108bec 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/CalendarType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/CalendarType.java
@@ -16,7 +16,7 @@ import org.hibernate.QueryException;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.metamodel.model.domain.AllowableTemporalParameterType;
import org.hibernate.type.descriptor.java.CalendarTypeDescriptor;
-import org.hibernate.type.descriptor.sql.TimestampTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.TimestampTypeDescriptor;
import org.hibernate.type.spi.TypeConfiguration;
/**
diff --git a/hibernate-core/src/main/java/org/hibernate/type/CharArrayType.java b/hibernate-core/src/main/java/org/hibernate/type/CharArrayType.java
index 2c4666c392..997755300c 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/CharArrayType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/CharArrayType.java
@@ -8,9 +8,9 @@ package org.hibernate.type;
import java.sql.Types;
import org.hibernate.type.descriptor.java.PrimitiveCharacterArrayTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptorIndicators;
-import org.hibernate.type.descriptor.sql.VarcharTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators;
+import org.hibernate.type.descriptor.jdbc.VarcharTypeDescriptor;
/**
* A type that maps between {@link java.sql.Types#VARCHAR VARCHAR} and {@code char[]}
@@ -37,15 +37,15 @@ public class CharArrayType
}
@Override
- public BasicType resolveIndicatedType(SqlTypeDescriptorIndicators indicators) {
+ public BasicType resolveIndicatedType(JdbcTypeDescriptorIndicators indicators) {
if ( indicators.isLob() ) {
//noinspection unchecked
return (BasicType) ( indicators.isNationalized() ? CharacterArrayNClobType.INSTANCE : CharacterArrayClobType.INSTANCE );
}
if ( indicators.isNationalized() ) {
- final SqlTypeDescriptor nvarcharType = indicators.getTypeConfiguration()
- .getSqlTypeDescriptorRegistry()
+ final JdbcTypeDescriptor nvarcharType = indicators.getTypeConfiguration()
+ .getJdbcTypeDescriptorRegistry()
.getDescriptor( Types.NVARCHAR );
//noinspection unchecked
diff --git a/hibernate-core/src/main/java/org/hibernate/type/CharacterArrayClobType.java b/hibernate-core/src/main/java/org/hibernate/type/CharacterArrayClobType.java
index f554b6cda5..b0800b55f1 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/CharacterArrayClobType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/CharacterArrayClobType.java
@@ -7,8 +7,8 @@
package org.hibernate.type;
import org.hibernate.type.descriptor.java.CharacterArrayTypeDescriptor;
-import org.hibernate.type.descriptor.sql.ClobTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptorIndicators;
+import org.hibernate.type.descriptor.jdbc.ClobTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators;
/**
* A type that maps between {@link java.sql.Types#CLOB CLOB} and {@link Character Character[]}
@@ -33,7 +33,7 @@ public class CharacterArrayClobType
}
@Override
- public BasicType resolveIndicatedType(SqlTypeDescriptorIndicators indicators) {
+ public BasicType resolveIndicatedType(JdbcTypeDescriptorIndicators indicators) {
//noinspection unchecked
return (BasicType) ( indicators.isNationalized() ? CharacterArrayNClobType.INSTANCE : this );
}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/CharacterArrayNClobType.java b/hibernate-core/src/main/java/org/hibernate/type/CharacterArrayNClobType.java
index c4d48a80b0..8b66f5ffa4 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/CharacterArrayNClobType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/CharacterArrayNClobType.java
@@ -7,7 +7,7 @@
package org.hibernate.type;
import org.hibernate.type.descriptor.java.CharacterArrayTypeDescriptor;
-import org.hibernate.type.descriptor.sql.NClobTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.NClobTypeDescriptor;
/**
* A type that maps between {@link java.sql.Types#NCLOB NCLOB} and {@link Character Character[]}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/CharacterArrayType.java b/hibernate-core/src/main/java/org/hibernate/type/CharacterArrayType.java
index 45db71c7b8..e8375147fe 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/CharacterArrayType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/CharacterArrayType.java
@@ -8,9 +8,9 @@ package org.hibernate.type;
import java.sql.Types;
import org.hibernate.type.descriptor.java.CharacterArrayTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptorIndicators;
-import org.hibernate.type.descriptor.sql.VarcharTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators;
+import org.hibernate.type.descriptor.jdbc.VarcharTypeDescriptor;
import org.hibernate.type.spi.TypeConfiguration;
/**
@@ -38,7 +38,7 @@ public class CharacterArrayType
}
@Override
- public BasicType resolveIndicatedType(SqlTypeDescriptorIndicators indicators) {
+ public BasicType resolveIndicatedType(JdbcTypeDescriptorIndicators indicators) {
if ( indicators.isNationalized() ) {
final TypeConfiguration typeConfiguration = indicators.getTypeConfiguration();
if ( indicators.isLob() ) {
@@ -46,7 +46,7 @@ public class CharacterArrayType
return (BasicType) CharacterArrayNClobType.INSTANCE;
}
else {
- final SqlTypeDescriptor nvarcharType = typeConfiguration.getSqlTypeDescriptorRegistry().getDescriptor( Types.NVARCHAR );
+ final JdbcTypeDescriptor nvarcharType = typeConfiguration.getJdbcTypeDescriptorRegistry().getDescriptor( Types.NVARCHAR );
//noinspection unchecked
return (BasicType) typeConfiguration.getBasicTypeRegistry().resolve( getJavaTypeDescriptor(), nvarcharType );
}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/CharacterNCharType.java b/hibernate-core/src/main/java/org/hibernate/type/CharacterNCharType.java
index 8b9756f03e..6499de2154 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/CharacterNCharType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/CharacterNCharType.java
@@ -10,7 +10,7 @@ import java.io.Serializable;
import org.hibernate.dialect.Dialect;
import org.hibernate.type.descriptor.java.CharacterTypeDescriptor;
-import org.hibernate.type.descriptor.sql.NCharTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.NCharTypeDescriptor;
/**
* A type that maps between {@link java.sql.Types#NCHAR NCHAR(1)} and {@link Character}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/CharacterType.java b/hibernate-core/src/main/java/org/hibernate/type/CharacterType.java
index 88935ea7eb..beda1370f9 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/CharacterType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/CharacterType.java
@@ -10,8 +10,8 @@ import java.io.Serializable;
import org.hibernate.dialect.Dialect;
import org.hibernate.type.descriptor.java.CharacterTypeDescriptor;
-import org.hibernate.type.descriptor.sql.CharTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptorIndicators;
+import org.hibernate.type.descriptor.jdbc.CharTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators;
/**
* A type that maps between {@link java.sql.Types#CHAR CHAR(1)} and {@link Character}
@@ -55,7 +55,7 @@ public class CharacterType
}
@Override
- public BasicType resolveIndicatedType(SqlTypeDescriptorIndicators indicators) {
+ public BasicType resolveIndicatedType(JdbcTypeDescriptorIndicators indicators) {
return (BasicType) ( indicators.isNationalized() ? CharacterNCharType.INSTANCE : this );
}
}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/ClassType.java b/hibernate-core/src/main/java/org/hibernate/type/ClassType.java
index cf8b24ce55..cc0f1eecbe 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/ClassType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/ClassType.java
@@ -6,7 +6,7 @@
*/
package org.hibernate.type;
import org.hibernate.type.descriptor.java.ClassTypeDescriptor;
-import org.hibernate.type.descriptor.sql.VarcharTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.VarcharTypeDescriptor;
/**
* A type that maps between {@link java.sql.Types#VARCHAR VARCHAR} and {@link Class}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/ClobType.java b/hibernate-core/src/main/java/org/hibernate/type/ClobType.java
index e4a8f50bd5..9aef581a13 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/ClobType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/ClobType.java
@@ -10,7 +10,7 @@ import java.sql.Clob;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.type.descriptor.java.ClobTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptorIndicators;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators;
/**
* A type that maps between {@link java.sql.Types#CLOB CLOB} and {@link Clob}
@@ -22,7 +22,7 @@ public class ClobType extends AbstractSingleColumnStandardBasicType implem
public static final ClobType INSTANCE = new ClobType();
public ClobType() {
- super( org.hibernate.type.descriptor.sql.ClobTypeDescriptor.DEFAULT, ClobTypeDescriptor.INSTANCE );
+ super( org.hibernate.type.descriptor.jdbc.ClobTypeDescriptor.DEFAULT, ClobTypeDescriptor.INSTANCE );
}
@Override
@@ -42,7 +42,7 @@ public class ClobType extends AbstractSingleColumnStandardBasicType implem
@SuppressWarnings({"rawtypes", "unchecked"})
@Override
- public BasicType resolveIndicatedType(SqlTypeDescriptorIndicators indicators) {
+ public BasicType resolveIndicatedType(JdbcTypeDescriptorIndicators indicators) {
// todo (6.0) : Support a "wrapped clob"? This would be a (N)VARCHAR column we handle as a Clob in-memory
// - might be especially interesting for streaming based (N)VARCHAR reading
diff --git a/hibernate-core/src/main/java/org/hibernate/type/ComponentType.java b/hibernate-core/src/main/java/org/hibernate/type/ComponentType.java
index 1eca84a601..45a3cb329f 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/ComponentType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/ComponentType.java
@@ -34,7 +34,7 @@ import org.hibernate.tuple.ValueGeneration;
import org.hibernate.tuple.component.ComponentMetamodel;
import org.hibernate.tuple.component.ComponentTuplizer;
import org.hibernate.type.descriptor.java.JavaTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
import org.hibernate.type.spi.TypeConfiguration;
/**
@@ -760,7 +760,7 @@ public class ComponentType extends AbstractType implements CompositeType, Proced
}
@Override
- public SqlTypeDescriptor getSqlTypeDescriptor() {
+ public JdbcTypeDescriptor getJdbcTypeDescriptor() {
throw new NotYetImplementedFor6Exception( getClass() );
}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/CurrencyType.java b/hibernate-core/src/main/java/org/hibernate/type/CurrencyType.java
index 4bc85f9cb2..1dbe33657c 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/CurrencyType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/CurrencyType.java
@@ -10,7 +10,7 @@ import java.util.Currency;
import org.hibernate.dialect.Dialect;
import org.hibernate.type.descriptor.java.CurrencyTypeDescriptor;
-import org.hibernate.type.descriptor.sql.VarcharTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.VarcharTypeDescriptor;
/**
* A type that maps between {@link java.sql.Types#VARCHAR VARCHAR} and {@link Currency}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/CustomType.java b/hibernate-core/src/main/java/org/hibernate/type/CustomType.java
index 2488cdfaf9..0fd49a94a7 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/CustomType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/CustomType.java
@@ -24,7 +24,7 @@ import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.internal.util.collections.ArrayHelper;
import org.hibernate.type.descriptor.java.JavaTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
import org.hibernate.type.spi.TypeConfiguration;
import org.hibernate.usertype.EnhancedUserType;
import org.hibernate.usertype.LoggableUserType;
@@ -56,7 +56,7 @@ public class CustomType
private final String name;
private final JavaTypeDescriptor mappedJavaTypeDescriptor;
- private final SqlTypeDescriptor sqlTypeDescriptor;
+ private final JdbcTypeDescriptor jdbcTypeDescriptor;
private final Size dictatedSize;
private final Size defaultSize;
@@ -73,7 +73,7 @@ public class CustomType
//noinspection unchecked
this.mappedJavaTypeDescriptor = typeConfiguration.getJavaTypeDescriptorRegistry().getDescriptor( userType.returnedClass() );
- this.sqlTypeDescriptor = typeConfiguration.getSqlTypeDescriptorRegistry().getDescriptor( userType.sqlTypes()[0] );
+ this.jdbcTypeDescriptor = typeConfiguration.getJdbcTypeDescriptorRegistry().getDescriptor( userType.sqlTypes()[0] );
if ( userType instanceof Sized ) {
final Sized sized = (Sized) userType;
@@ -94,13 +94,13 @@ public class CustomType
}
@Override
- public SqlTypeDescriptor getSqlTypeDescriptor() {
- return sqlTypeDescriptor;
+ public JdbcTypeDescriptor getJdbcTypeDescriptor() {
+ return jdbcTypeDescriptor;
}
@Override
public int[] sqlTypes(Mapping pi) {
- return new int[] { sqlTypeDescriptor.getSqlType() };
+ return new int[] { jdbcTypeDescriptor.getJdbcType() };
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/type/DateType.java b/hibernate-core/src/main/java/org/hibernate/type/DateType.java
index f1654751fb..bbaec83ba9 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/DateType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/DateType.java
@@ -29,7 +29,7 @@ public class DateType
public static final DateType INSTANCE = new DateType();
public DateType() {
- super( org.hibernate.type.descriptor.sql.DateTypeDescriptor.INSTANCE, JdbcDateTypeDescriptor.INSTANCE );
+ super( org.hibernate.type.descriptor.jdbc.DateTypeDescriptor.INSTANCE, JdbcDateTypeDescriptor.INSTANCE );
}
public String getName() {
diff --git a/hibernate-core/src/main/java/org/hibernate/type/DoubleType.java b/hibernate-core/src/main/java/org/hibernate/type/DoubleType.java
index af25b9c891..280a86e97d 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/DoubleType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/DoubleType.java
@@ -23,7 +23,7 @@ public class DoubleType extends AbstractSingleColumnStandardBasicType im
public static final Double ZERO = 0.0;
public DoubleType() {
- super( org.hibernate.type.descriptor.sql.FloatTypeDescriptor.INSTANCE, DoubleTypeDescriptor.INSTANCE );
+ super( org.hibernate.type.descriptor.jdbc.FloatTypeDescriptor.INSTANCE, DoubleTypeDescriptor.INSTANCE );
}
@Override
public String getName() {
diff --git a/hibernate-core/src/main/java/org/hibernate/type/DurationType.java b/hibernate-core/src/main/java/org/hibernate/type/DurationType.java
index 7989309e58..ce03f677ee 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/DurationType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/DurationType.java
@@ -9,7 +9,7 @@ package org.hibernate.type;
import java.time.Duration;
import org.hibernate.type.descriptor.java.DurationJavaDescriptor;
-import org.hibernate.type.descriptor.sql.NumericTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.NumericTypeDescriptor;
/**
* @author Steve Ebersole
diff --git a/hibernate-core/src/main/java/org/hibernate/type/EnumType.java b/hibernate-core/src/main/java/org/hibernate/type/EnumType.java
index 95031f4c4c..4df5aef0c9 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/EnumType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/EnumType.java
@@ -31,8 +31,8 @@ import org.hibernate.metamodel.model.convert.internal.OrdinalEnumValueConverter;
import org.hibernate.metamodel.model.convert.spi.EnumValueConverter;
import org.hibernate.type.descriptor.java.BasicJavaDescriptor;
import org.hibernate.type.descriptor.java.EnumJavaTypeDescriptor;
-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;
import org.hibernate.type.spi.TypeConfiguration;
import org.hibernate.type.spi.TypeConfigurationAware;
import org.hibernate.usertype.DynamicParameterizedType;
@@ -133,7 +133,7 @@ public class EnumType>
.getJavaTypeDescriptorRegistry()
.getDescriptor( enumClass );
- final LocalSqlTypeDescriptorIndicators indicators = new LocalSqlTypeDescriptorIndicators(
+ final LocalJdbcTypeDescriptorIndicators indicators = new LocalJdbcTypeDescriptorIndicators(
enumType,
columnLength,
reader
@@ -144,19 +144,19 @@ public class EnumType>
enumJavaDescriptor
);
- final SqlTypeDescriptor sqlTypeDescriptor = relationalJtd.getJdbcRecommendedSqlType( indicators );
+ final JdbcTypeDescriptor jdbcTypeDescriptor = relationalJtd.getRecommendedJdbcType( indicators );
if ( isOrdinal ) {
this.enumValueConverter = new OrdinalEnumValueConverter(
enumJavaDescriptor,
- sqlTypeDescriptor,
+ jdbcTypeDescriptor,
relationalJtd
);
}
else {
this.enumValueConverter = new NamedEnumValueConverter(
enumJavaDescriptor,
- sqlTypeDescriptor,
+ jdbcTypeDescriptor,
relationalJtd
);
}
@@ -183,9 +183,9 @@ public class EnumType>
}
private BasicJavaDescriptor> resolveRelationalJavaTypeDescriptor(
- LocalSqlTypeDescriptorIndicators indicators,
+ LocalJdbcTypeDescriptorIndicators indicators,
EnumJavaTypeDescriptor> enumJavaDescriptor) {
- return enumJavaDescriptor.getJdbcRecommendedSqlType( indicators ).getJdbcRecommendedJavaTypeMapping( typeConfiguration );
+ return enumJavaDescriptor.getRecommendedJdbcType( indicators ).getJdbcRecommendedJavaTypeMapping( typeConfiguration );
}
private javax.persistence.EnumType getEnumType(ParameterType reader) {
@@ -226,7 +226,7 @@ public class EnumType>
// this method should only be called for hbm.xml handling
assert parameters.get( PARAMETER_TYPE ) == null;
- final LocalSqlTypeDescriptorIndicators localIndicators = new LocalSqlTypeDescriptorIndicators(
+ final LocalJdbcTypeDescriptorIndicators localIndicators = new LocalJdbcTypeDescriptorIndicators(
// use ORDINAL as default for hbm.xml mappings
javax.persistence.EnumType.ORDINAL,
// Is there a reasonable value here? Limits the
@@ -246,7 +246,7 @@ public class EnumType>
//noinspection rawtypes
return new NamedEnumValueConverter(
enumJavaDescriptor,
- stringJavaDescriptor.getJdbcRecommendedSqlType( localIndicators ),
+ stringJavaDescriptor.getRecommendedJdbcType( localIndicators ),
stringJavaDescriptor
);
}
@@ -254,7 +254,7 @@ public class EnumType>
//noinspection rawtypes
return new OrdinalEnumValueConverter(
enumJavaDescriptor,
- integerJavaDescriptor.getJdbcRecommendedSqlType( localIndicators ),
+ integerJavaDescriptor.getRecommendedJdbcType( localIndicators ),
typeConfiguration.getJavaTypeDescriptorRegistry().getDescriptor( Integer.class )
);
}
@@ -266,7 +266,7 @@ public class EnumType>
//noinspection rawtypes
return new OrdinalEnumValueConverter(
enumJavaDescriptor,
- integerJavaDescriptor.getJdbcRecommendedSqlType( localIndicators ),
+ integerJavaDescriptor.getRecommendedJdbcType( localIndicators ),
typeConfiguration.getJavaTypeDescriptorRegistry().getDescriptor( Integer.class )
);
}
@@ -274,7 +274,7 @@ public class EnumType>
//noinspection rawtypes
return new NamedEnumValueConverter(
enumJavaDescriptor,
- stringJavaDescriptor.getJdbcRecommendedSqlType( localIndicators ),
+ stringJavaDescriptor.getRecommendedJdbcType( localIndicators ),
stringJavaDescriptor
);
}
@@ -292,7 +292,7 @@ public class EnumType>
// the fallback
return new OrdinalEnumValueConverter(
enumJavaDescriptor,
- integerJavaDescriptor.getJdbcRecommendedSqlType( localIndicators ),
+ integerJavaDescriptor.getRecommendedJdbcType( localIndicators ),
typeConfiguration.getJavaTypeDescriptorRegistry().getDescriptor( Integer.class )
);
}
@@ -432,12 +432,12 @@ public class EnumType>
return enumValueConverter instanceof OrdinalEnumValueConverter;
}
- private class LocalSqlTypeDescriptorIndicators implements SqlTypeDescriptorIndicators {
+ private class LocalJdbcTypeDescriptorIndicators implements JdbcTypeDescriptorIndicators {
private final javax.persistence.EnumType enumType;
private final Long columnLength;
private final ParameterType reader;
- public LocalSqlTypeDescriptorIndicators(javax.persistence.EnumType enumType, Long columnLength, ParameterType reader) {
+ public LocalJdbcTypeDescriptorIndicators(javax.persistence.EnumType enumType, Long columnLength, ParameterType reader) {
this.enumType = enumType;
this.columnLength = columnLength;
this.reader = reader;
diff --git a/hibernate-core/src/main/java/org/hibernate/type/FloatType.java b/hibernate-core/src/main/java/org/hibernate/type/FloatType.java
index a9b016e293..c99669f7c8 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/FloatType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/FloatType.java
@@ -23,7 +23,7 @@ public class FloatType extends AbstractSingleColumnStandardBasicType impl
public static final Float ZERO = 0.0f;
public FloatType() {
- super( org.hibernate.type.descriptor.sql.FloatTypeDescriptor.INSTANCE, FloatTypeDescriptor.INSTANCE );
+ super( org.hibernate.type.descriptor.jdbc.FloatTypeDescriptor.INSTANCE, FloatTypeDescriptor.INSTANCE );
}
@Override
public String getName() {
diff --git a/hibernate-core/src/main/java/org/hibernate/type/ImageType.java b/hibernate-core/src/main/java/org/hibernate/type/ImageType.java
index d0547ce398..4623067c0e 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/ImageType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/ImageType.java
@@ -6,7 +6,7 @@
*/
package org.hibernate.type;
import org.hibernate.type.descriptor.java.PrimitiveByteArrayTypeDescriptor;
-import org.hibernate.type.descriptor.sql.LongVarbinaryTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.LongVarbinaryTypeDescriptor;
/**
* A type that maps between {@link java.sql.Types#LONGVARBINARY LONGVARBINARY} and {@code byte[]}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/InstantType.java b/hibernate-core/src/main/java/org/hibernate/type/InstantType.java
index 952d2e4853..5a82962dfd 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/InstantType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/InstantType.java
@@ -17,7 +17,7 @@ import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.internal.util.compare.ComparableComparator;
import org.hibernate.metamodel.model.domain.AllowableTemporalParameterType;
import org.hibernate.type.descriptor.java.InstantJavaDescriptor;
-import org.hibernate.type.descriptor.sql.TimestampTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.TimestampTypeDescriptor;
import org.hibernate.type.spi.TypeConfiguration;
/**
diff --git a/hibernate-core/src/main/java/org/hibernate/type/IntegerType.java b/hibernate-core/src/main/java/org/hibernate/type/IntegerType.java
index f72cb7d02d..cf79e6a048 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/IntegerType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/IntegerType.java
@@ -27,7 +27,7 @@ public class IntegerType extends AbstractSingleColumnStandardBasicType
public static final Integer ZERO = 0;
public IntegerType() {
- super( org.hibernate.type.descriptor.sql.IntegerTypeDescriptor.INSTANCE, IntegerTypeDescriptor.INSTANCE );
+ super( org.hibernate.type.descriptor.jdbc.IntegerTypeDescriptor.INSTANCE, IntegerTypeDescriptor.INSTANCE );
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/type/JavaObjectType.java b/hibernate-core/src/main/java/org/hibernate/type/JavaObjectType.java
index 8f0772d237..a0539abfc2 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/JavaObjectType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/JavaObjectType.java
@@ -7,7 +7,7 @@
package org.hibernate.type;
import org.hibernate.type.descriptor.java.JavaObjectTypeDescriptor;
-import org.hibernate.type.descriptor.sql.ObjectSqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.ObjectJdbcTypeDescriptor;
/**
* @author Steve Ebersole
@@ -19,7 +19,7 @@ public class JavaObjectType extends AbstractSingleColumnStandardBasicType BasicType resolveIndicatedType(SqlTypeDescriptorIndicators indicators) {
+ public BasicType resolveIndicatedType(JdbcTypeDescriptorIndicators indicators) {
if ( indicators.isNationalized() ) {
//noinspection unchecked
return (BasicType) MaterializedNClobType.INSTANCE;
diff --git a/hibernate-core/src/main/java/org/hibernate/type/MaterializedNClobType.java b/hibernate-core/src/main/java/org/hibernate/type/MaterializedNClobType.java
index 64a7f8b05a..6381ca0e89 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/MaterializedNClobType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/MaterializedNClobType.java
@@ -7,7 +7,7 @@
package org.hibernate.type;
import org.hibernate.type.descriptor.java.StringTypeDescriptor;
-import org.hibernate.type.descriptor.sql.NClobTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.NClobTypeDescriptor;
/**
* A type that maps between {@link java.sql.Types#CLOB CLOB} and {@link String}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/NClobType.java b/hibernate-core/src/main/java/org/hibernate/type/NClobType.java
index bf736ce373..6f17b3cdb6 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/NClobType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/NClobType.java
@@ -21,7 +21,7 @@ public class NClobType extends AbstractSingleColumnStandardBasicType {
public static final NClobType INSTANCE = new NClobType();
public NClobType() {
- super( org.hibernate.type.descriptor.sql.NClobTypeDescriptor.DEFAULT, NClobTypeDescriptor.INSTANCE );
+ super( org.hibernate.type.descriptor.jdbc.NClobTypeDescriptor.DEFAULT, NClobTypeDescriptor.INSTANCE );
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/type/NTextType.java b/hibernate-core/src/main/java/org/hibernate/type/NTextType.java
index f041d6bef4..62e41123cc 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/NTextType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/NTextType.java
@@ -7,7 +7,7 @@
package org.hibernate.type;
import org.hibernate.type.descriptor.java.StringTypeDescriptor;
-import org.hibernate.type.descriptor.sql.LongNVarcharTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.LongNVarcharTypeDescriptor;
/**
* A type that maps between {@link java.sql.Types#LONGNVARCHAR LONGNVARCHAR} and {@link String}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/NumericBooleanType.java b/hibernate-core/src/main/java/org/hibernate/type/NumericBooleanType.java
index efb173432a..ac6008d4ea 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/NumericBooleanType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/NumericBooleanType.java
@@ -9,9 +9,11 @@ package org.hibernate.type;
import java.io.Serializable;
import org.hibernate.dialect.Dialect;
+import org.hibernate.metamodel.model.convert.spi.BasicValueConverter;
import org.hibernate.query.CastType;
import org.hibernate.type.descriptor.java.BooleanTypeDescriptor;
-import org.hibernate.type.descriptor.sql.IntegerTypeDescriptor;
+import org.hibernate.type.descriptor.java.JavaTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.IntegerTypeDescriptor;
/**
* A type that maps between {@link java.sql.Types#INTEGER INTEGER} and {@link Boolean} (using 1 and 0)
@@ -20,9 +22,10 @@ import org.hibernate.type.descriptor.sql.IntegerTypeDescriptor;
*/
public class NumericBooleanType
extends AbstractSingleColumnStandardBasicType
- implements PrimitiveType, DiscriminatorType {
+ implements PrimitiveType, DiscriminatorType, ConvertedBasicType {
public static final NumericBooleanType INSTANCE = new NumericBooleanType();
+ public static final NumericConverter CONVERTER = new NumericConverter();
public NumericBooleanType() {
super( IntegerTypeDescriptor.INSTANCE, BooleanTypeDescriptor.INSTANCE );
@@ -51,4 +54,47 @@ public class NumericBooleanType
public CastType getCastType() {
return CastType.INTEGER_BOOLEAN;
}
+
+ @Override
+ public BasicValueConverter getValueConverter() {
+ return CONVERTER;
+ }
+
+ private static class NumericConverter implements BasicValueConverter {
+ @Override
+ public Boolean toDomainValue(Integer relationalForm) {
+ if ( relationalForm == null ) {
+ return null;
+ }
+
+ if ( 1 == relationalForm ) {
+ return true;
+ }
+
+ if ( 0 == relationalForm ) {
+ return false;
+ }
+
+ return null;
+ }
+
+ @Override
+ public Integer toRelationalValue(Boolean domainForm) {
+ if ( domainForm == null ) {
+ return null;
+ }
+
+ return domainForm ? 1 : 0;
+ }
+
+ @Override
+ public JavaTypeDescriptor getDomainJavaDescriptor() {
+ return BooleanTypeDescriptor.INSTANCE;
+ }
+
+ @Override
+ public JavaTypeDescriptor getRelationalJavaDescriptor() {
+ return org.hibernate.type.descriptor.java.IntegerTypeDescriptor.INSTANCE;
+ }
+ }
}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/OffsetDateTimeType.java b/hibernate-core/src/main/java/org/hibernate/type/OffsetDateTimeType.java
index f8aa980ad9..c3e2a6f121 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/OffsetDateTimeType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/OffsetDateTimeType.java
@@ -16,7 +16,7 @@ import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.metamodel.model.domain.AllowableTemporalParameterType;
import org.hibernate.query.CastType;
import org.hibernate.type.descriptor.java.OffsetDateTimeJavaDescriptor;
-import org.hibernate.type.descriptor.sql.TimestampWithTimeZoneDescriptor;
+import org.hibernate.type.descriptor.jdbc.TimestampWithTimeZoneDescriptor;
import org.hibernate.type.spi.TypeConfiguration;
/**
diff --git a/hibernate-core/src/main/java/org/hibernate/type/OffsetTimeType.java b/hibernate-core/src/main/java/org/hibernate/type/OffsetTimeType.java
index 9efe94615c..f3f88cda43 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/OffsetTimeType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/OffsetTimeType.java
@@ -12,7 +12,7 @@ import javax.persistence.TemporalType;
import org.hibernate.QueryException;
import org.hibernate.metamodel.model.domain.AllowableTemporalParameterType;
import org.hibernate.type.descriptor.java.OffsetTimeJavaDescriptor;
-import org.hibernate.type.descriptor.sql.TimeTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.TimeTypeDescriptor;
import org.hibernate.type.spi.TypeConfiguration;
/**
diff --git a/hibernate-core/src/main/java/org/hibernate/type/PostgresUUIDType.java b/hibernate-core/src/main/java/org/hibernate/type/PostgresUUIDType.java
index c2cac94328..18222f8546 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/PostgresUUIDType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/PostgresUUIDType.java
@@ -19,9 +19,9 @@ import org.hibernate.type.descriptor.WrapperOptions;
import org.hibernate.type.descriptor.java.BasicJavaDescriptor;
import org.hibernate.type.descriptor.java.JavaTypeDescriptor;
import org.hibernate.type.descriptor.java.UUIDTypeDescriptor;
-import org.hibernate.type.descriptor.sql.BasicBinder;
-import org.hibernate.type.descriptor.sql.BasicExtractor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.BasicBinder;
+import org.hibernate.type.descriptor.jdbc.BasicExtractor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
import org.hibernate.type.spi.TypeConfiguration;
/**
@@ -35,7 +35,7 @@ public class PostgresUUIDType extends AbstractSingleColumnStandardBasicType( javaTypeDescriptor, this ) {
@Override
protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException {
- st.setObject( index, javaTypeDescriptor.unwrap( value, UUID.class, options ), getSqlType() );
+ st.setObject( index, javaTypeDescriptor.unwrap( value, UUID.class, options ), getJdbcType() );
}
@Override
protected void doBind(CallableStatement st, X value, String name, WrapperOptions options)
throws SQLException {
- st.setObject( name, javaTypeDescriptor.unwrap( value, UUID.class, options ), getSqlType() );
+ st.setObject( name, javaTypeDescriptor.unwrap( value, UUID.class, options ), getJdbcType() );
}
};
}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/PrimitiveCharacterArrayClobType.java b/hibernate-core/src/main/java/org/hibernate/type/PrimitiveCharacterArrayClobType.java
index 02f782260a..518ce187d0 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/PrimitiveCharacterArrayClobType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/PrimitiveCharacterArrayClobType.java
@@ -6,8 +6,8 @@
*/
package org.hibernate.type;
import org.hibernate.type.descriptor.java.PrimitiveCharacterArrayTypeDescriptor;
-import org.hibernate.type.descriptor.sql.ClobTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptorIndicators;
+import org.hibernate.type.descriptor.jdbc.ClobTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators;
/**
* Map a char[] to a Clob
@@ -29,7 +29,7 @@ public class PrimitiveCharacterArrayClobType
}
@Override
- public BasicType resolveIndicatedType(SqlTypeDescriptorIndicators indicators) {
+ public BasicType resolveIndicatedType(JdbcTypeDescriptorIndicators indicators) {
if ( indicators.isNationalized() ) {
//noinspection unchecked
return (BasicType) PrimitiveCharacterArrayNClobType.INSTANCE;
diff --git a/hibernate-core/src/main/java/org/hibernate/type/PrimitiveCharacterArrayNClobType.java b/hibernate-core/src/main/java/org/hibernate/type/PrimitiveCharacterArrayNClobType.java
index a907e93038..b5a93fdd43 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/PrimitiveCharacterArrayNClobType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/PrimitiveCharacterArrayNClobType.java
@@ -7,7 +7,7 @@
package org.hibernate.type;
import org.hibernate.type.descriptor.java.PrimitiveCharacterArrayTypeDescriptor;
-import org.hibernate.type.descriptor.sql.NClobTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.NClobTypeDescriptor;
/**
* Map a char[] to a NClob
diff --git a/hibernate-core/src/main/java/org/hibernate/type/RowVersionType.java b/hibernate-core/src/main/java/org/hibernate/type/RowVersionType.java
index 9415167b35..e1c4595d29 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/RowVersionType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/RowVersionType.java
@@ -10,7 +10,7 @@ import java.util.Comparator;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.type.descriptor.java.RowVersionTypeDescriptor;
-import org.hibernate.type.descriptor.sql.VarbinaryTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.VarbinaryTypeDescriptor;
/**
* A type that maps between a {@link java.sql.Types#VARBINARY VARBINARY} and {@code byte[]}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/SerializableToBlobType.java b/hibernate-core/src/main/java/org/hibernate/type/SerializableToBlobType.java
index fa69bcd100..ca149cf321 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/SerializableToBlobType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/SerializableToBlobType.java
@@ -12,7 +12,7 @@ import java.util.Properties;
import org.hibernate.MappingException;
import org.hibernate.internal.util.ReflectHelper;
import org.hibernate.type.descriptor.java.SerializableTypeDescriptor;
-import org.hibernate.type.descriptor.sql.BlobTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.BlobTypeDescriptor;
import org.hibernate.usertype.DynamicParameterizedType;
/**
diff --git a/hibernate-core/src/main/java/org/hibernate/type/SerializableType.java b/hibernate-core/src/main/java/org/hibernate/type/SerializableType.java
index 7eba3b8103..9f04f19e0a 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/SerializableType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/SerializableType.java
@@ -9,7 +9,7 @@ package org.hibernate.type;
import java.io.Serializable;
import org.hibernate.type.descriptor.java.SerializableTypeDescriptor;
-import org.hibernate.type.descriptor.sql.VarbinaryTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.VarbinaryTypeDescriptor;
/**
* A type that maps between a {@link java.sql.Types#VARBINARY VARBINARY} and {@link Serializable} classes.
diff --git a/hibernate-core/src/main/java/org/hibernate/type/ShortType.java b/hibernate-core/src/main/java/org/hibernate/type/ShortType.java
index 106131740a..5a96cac2ac 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/ShortType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/ShortType.java
@@ -12,7 +12,7 @@ import java.util.Comparator;
import org.hibernate.dialect.Dialect;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.type.descriptor.java.ShortTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SmallIntTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.SmallIntTypeDescriptor;
/**
* A type that maps between {@link java.sql.Types#SMALLINT SMALLINT} and {@link Short}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/SqlTypeDescriptorIndicatorCapable.java b/hibernate-core/src/main/java/org/hibernate/type/SqlTypeDescriptorIndicatorCapable.java
index b06f58ba77..83ebb7a29f 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/SqlTypeDescriptorIndicatorCapable.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/SqlTypeDescriptorIndicatorCapable.java
@@ -6,7 +6,7 @@
*/
package org.hibernate.type;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptorIndicators;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators;
/**
* @author Steve Ebersole
@@ -15,5 +15,5 @@ public interface SqlTypeDescriptorIndicatorCapable extends BasicType {
/**
* For Types whose resolution can be affected by SqlTypeDescriptorIndicators
*/
- BasicType resolveIndicatedType(SqlTypeDescriptorIndicators indicators);
+ BasicType resolveIndicatedType(JdbcTypeDescriptorIndicators indicators);
}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/StandardBasicTypeTemplate.java b/hibernate-core/src/main/java/org/hibernate/type/StandardBasicTypeTemplate.java
index 54b5fdc489..6612fe6300 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/StandardBasicTypeTemplate.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/StandardBasicTypeTemplate.java
@@ -7,7 +7,7 @@
package org.hibernate.type;
import org.hibernate.type.descriptor.java.JavaTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor;
/**
* A BasicType adapter targeting partial portability to 6.0's type
@@ -22,14 +22,14 @@ public class StandardBasicTypeTemplate extends AbstractSingleColumnStandardBa
private final String[] registrationKeys;
public StandardBasicTypeTemplate(
- SqlTypeDescriptor sqlTypeDescriptor,
+ JdbcTypeDescriptor jdbcTypeDescriptor,
JavaTypeDescriptor javaTypeDescriptor,
String... registrationKeys) {
- super( sqlTypeDescriptor, javaTypeDescriptor );
+ super( jdbcTypeDescriptor, javaTypeDescriptor );
this.registrationKeys = registrationKeys;
this.name = javaTypeDescriptor.getJavaType() == null ? "(map-mode)" : javaTypeDescriptor.getJavaType().getTypeName()
- + " -> " + sqlTypeDescriptor.getSqlType();
+ + " -> " + jdbcTypeDescriptor.getJdbcType();
}
@Override
diff --git a/hibernate-core/src/main/java/org/hibernate/type/StandardBasicTypes.java b/hibernate-core/src/main/java/org/hibernate/type/StandardBasicTypes.java
index 797ecb9cbe..7446ce7d20 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/StandardBasicTypes.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/StandardBasicTypes.java
@@ -31,8 +31,8 @@ import java.util.UUID;
import org.hibernate.type.descriptor.java.CharacterArrayTypeDescriptor;
import org.hibernate.type.descriptor.java.PrimitiveCharacterArrayTypeDescriptor;
-import org.hibernate.type.descriptor.sql.ClobTypeDescriptor;
-import org.hibernate.type.descriptor.sql.NClobTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.ClobTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.NClobTypeDescriptor;
import org.hibernate.type.internal.StandardBasicTypeImpl;
import org.hibernate.type.spi.TypeConfiguration;
diff --git a/hibernate-core/src/main/java/org/hibernate/type/StringNVarcharType.java b/hibernate-core/src/main/java/org/hibernate/type/StringNVarcharType.java
index 4116eb2355..e5560229ff 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/StringNVarcharType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/StringNVarcharType.java
@@ -8,7 +8,7 @@ package org.hibernate.type;
import org.hibernate.dialect.Dialect;
import org.hibernate.type.descriptor.java.StringTypeDescriptor;
-import org.hibernate.type.descriptor.sql.NVarcharTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.NVarcharTypeDescriptor;
/**
* A type that maps between {@link java.sql.Types#VARCHAR VARCHAR} and {@link String}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/StringType.java b/hibernate-core/src/main/java/org/hibernate/type/StringType.java
index 0cb67b1b03..0bf34f48ba 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/StringType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/StringType.java
@@ -7,8 +7,8 @@
package org.hibernate.type;
import org.hibernate.dialect.Dialect;
import org.hibernate.type.descriptor.java.StringTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptorIndicators;
-import org.hibernate.type.descriptor.sql.VarcharTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators;
+import org.hibernate.type.descriptor.jdbc.VarcharTypeDescriptor;
/**
* A type that maps between {@link java.sql.Types#VARCHAR VARCHAR} and {@link String}
@@ -49,7 +49,7 @@ public class StringType
@SuppressWarnings({"rawtypes", "unchecked"})
@Override
- public BasicType resolveIndicatedType(SqlTypeDescriptorIndicators indicators) {
+ public BasicType resolveIndicatedType(JdbcTypeDescriptorIndicators indicators) {
if ( indicators.isLob() ) {
return indicators.isNationalized() ? MaterializedNClobType.INSTANCE : MaterializedClobType.INSTANCE;
}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/TextType.java b/hibernate-core/src/main/java/org/hibernate/type/TextType.java
index 8231a53732..2767680084 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/TextType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/TextType.java
@@ -6,8 +6,8 @@
*/
package org.hibernate.type;
import org.hibernate.type.descriptor.java.StringTypeDescriptor;
-import org.hibernate.type.descriptor.sql.LongVarcharTypeDescriptor;
-import org.hibernate.type.descriptor.sql.SqlTypeDescriptorIndicators;
+import org.hibernate.type.descriptor.jdbc.LongVarcharTypeDescriptor;
+import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators;
/**
* A type that maps between {@link java.sql.Types#LONGVARCHAR LONGVARCHAR} and {@link String}
@@ -30,7 +30,7 @@ public class TextType
}
@Override
- public BasicType resolveIndicatedType(SqlTypeDescriptorIndicators indicators) {
+ public