move TypeBeanInstanceProducer as per the todo

This commit is contained in:
Gavin King 2024-11-14 13:38:20 +01:00
parent b0ff5b1bec
commit df974fd1fb
5 changed files with 20 additions and 20 deletions

View File

@ -17,7 +17,6 @@
import org.hibernate.boot.archive.scan.spi.ScanOptions; import org.hibernate.boot.archive.scan.spi.ScanOptions;
import org.hibernate.boot.archive.scan.spi.Scanner; import org.hibernate.boot.archive.scan.spi.Scanner;
import org.hibernate.boot.archive.spi.ArchiveDescriptorFactory; import org.hibernate.boot.archive.spi.ArchiveDescriptorFactory;
import org.hibernate.boot.model.TypeBeanInstanceProducer;
import org.hibernate.boot.model.convert.spi.ConverterDescriptor; import org.hibernate.boot.model.convert.spi.ConverterDescriptor;
import org.hibernate.boot.model.relational.AuxiliaryDatabaseObject; import org.hibernate.boot.model.relational.AuxiliaryDatabaseObject;
import org.hibernate.boot.registry.StandardServiceRegistry; import org.hibernate.boot.registry.StandardServiceRegistry;

View File

@ -2,7 +2,7 @@
* SPDX-License-Identifier: LGPL-2.1-or-later * SPDX-License-Identifier: LGPL-2.1-or-later
* Copyright Red Hat Inc. and Hibernate Authors * Copyright Red Hat Inc. and Hibernate Authors
*/ */
package org.hibernate.boot.model; package org.hibernate.boot.internal;
import org.hibernate.InstantiationException; import org.hibernate.InstantiationException;
import org.hibernate.Internal; import org.hibernate.Internal;
@ -19,7 +19,7 @@
* *
* @author Christian Beikov * @author Christian Beikov
*/ */
@Internal //TODO: move this to org.hibernate.boot.internal, where its only usage is @Internal
public class TypeBeanInstanceProducer implements BeanInstanceProducer, TypeBootstrapContext { public class TypeBeanInstanceProducer implements BeanInstanceProducer, TypeBootstrapContext {
private final ConfigurationService configurationService; private final ConfigurationService configurationService;

View File

@ -14,6 +14,7 @@
import org.hibernate.boot.archive.scan.spi.ScanOptions; import org.hibernate.boot.archive.scan.spi.ScanOptions;
import org.hibernate.boot.archive.spi.ArchiveDescriptorFactory; import org.hibernate.boot.archive.spi.ArchiveDescriptorFactory;
import org.hibernate.boot.internal.ClassmateContext; import org.hibernate.boot.internal.ClassmateContext;
import org.hibernate.boot.internal.TypeBeanInstanceProducer;
import org.hibernate.boot.model.convert.spi.ConverterDescriptor; import org.hibernate.boot.model.convert.spi.ConverterDescriptor;
import org.hibernate.boot.model.relational.AuxiliaryDatabaseObject; import org.hibernate.boot.model.relational.AuxiliaryDatabaseObject;
import org.hibernate.boot.registry.StandardServiceRegistry; import org.hibernate.boot.registry.StandardServiceRegistry;
@ -61,7 +62,7 @@ public interface BootstrapContext {
/** /**
* The {@link BeanInstanceProducer} to use when creating custom type references. * The {@link BeanInstanceProducer} to use when creating custom type references.
* *
* @implNote Usually a {@link org.hibernate.boot.model.TypeBeanInstanceProducer}. * @implNote Usually a {@link TypeBeanInstanceProducer}.
*/ */
BeanInstanceProducer getCustomTypeProducer(); BeanInstanceProducer getCustomTypeProducer();

View File

@ -53,8 +53,8 @@ protected <T> T processSchemaResultSet(
ExtractionContext.ResultSetProcessor<T> processor) ExtractionContext.ResultSetProcessor<T> processor)
throws SQLException { throws SQLException {
try ( ResultSet resultSet = try ( ResultSet resultSet =
getJdbcDatabaseMetaData() getJdbcDatabaseMetaData()
.getSchemas( catalog, schemaPattern ) ) { .getSchemas( catalog, schemaPattern ) ) {
return processor.process( resultSet ); return processor.process( resultSet );
} }
} }
@ -68,8 +68,8 @@ protected <T> T processTableResultSet(
ExtractionContext.ResultSetProcessor<T> processor) ExtractionContext.ResultSetProcessor<T> processor)
throws SQLException { throws SQLException {
try ( ResultSet resultSet = try ( ResultSet resultSet =
getJdbcDatabaseMetaData() getJdbcDatabaseMetaData()
.getTables( catalog, schemaPattern, tableNamePattern, types) ) { .getTables( catalog, schemaPattern, tableNamePattern, types) ) {
return processor.process( resultSet ); return processor.process( resultSet );
} }
} }
@ -83,8 +83,8 @@ protected <T> T processColumnsResultSet(
ExtractionContext.ResultSetProcessor<T> processor) ExtractionContext.ResultSetProcessor<T> processor)
throws SQLException { throws SQLException {
try ( ResultSet resultSet = try ( ResultSet resultSet =
getJdbcDatabaseMetaData() getJdbcDatabaseMetaData()
.getColumns( catalog, schemaPattern, tableNamePattern, columnNamePattern ) ) { .getColumns( catalog, schemaPattern, tableNamePattern, columnNamePattern ) ) {
return processor.process( resultSet ); return processor.process( resultSet );
} }
} }
@ -97,8 +97,8 @@ protected <T> T processPrimaryKeysResultSet(
ExtractionContext.ResultSetProcessor<T> processor) ExtractionContext.ResultSetProcessor<T> processor)
throws SQLException { throws SQLException {
try ( ResultSet resultSet = try ( ResultSet resultSet =
getJdbcDatabaseMetaData() getJdbcDatabaseMetaData()
.getPrimaryKeys( catalogFilter, schemaFilter, tableName.getText() ) ) { .getPrimaryKeys( catalogFilter, schemaFilter, tableName.getText() ) ) {
return processor.process( resultSet ); return processor.process( resultSet );
} }
} }
@ -113,8 +113,8 @@ protected <T> T processIndexInfoResultSet(
ExtractionContext.ResultSetProcessor<T> processor) ExtractionContext.ResultSetProcessor<T> processor)
throws SQLException { throws SQLException {
try ( ResultSet resultSet = try ( ResultSet resultSet =
getJdbcDatabaseMetaData() getJdbcDatabaseMetaData()
.getIndexInfo( catalog, schema, table, unique, approximate ) ) { .getIndexInfo( catalog, schema, table, unique, approximate ) ) {
return processor.process( resultSet ); return processor.process( resultSet );
} }
} }
@ -127,8 +127,8 @@ protected <T> T processImportedKeysResultSet(
ExtractionContext.ResultSetProcessor<T> processor) ExtractionContext.ResultSetProcessor<T> processor)
throws SQLException { throws SQLException {
try ( ResultSet resultSet = try ( ResultSet resultSet =
getJdbcDatabaseMetaData() getJdbcDatabaseMetaData()
.getImportedKeys( catalog, schema, table ) ) { .getImportedKeys( catalog, schema, table ) ) {
return processor.process( resultSet ); return processor.process( resultSet );
} }
} }
@ -144,9 +144,9 @@ protected <T> T processCrossReferenceResultSet(
ExtractionContext.ResultSetProcessor<T> processor) ExtractionContext.ResultSetProcessor<T> processor)
throws SQLException { throws SQLException {
try ( ResultSet resultSet = try ( ResultSet resultSet =
getJdbcDatabaseMetaData() getJdbcDatabaseMetaData()
.getCrossReference( parentCatalog, parentSchema, parentTable, .getCrossReference( parentCatalog, parentSchema, parentTable,
foreignCatalog, foreignSchema, foreignTable) ) { foreignCatalog, foreignSchema, foreignTable) ) {
return processor.process( resultSet ); return processor.process( resultSet );
} }
} }

View File

@ -17,7 +17,7 @@
import org.hibernate.boot.archive.spi.ArchiveDescriptorFactory; import org.hibernate.boot.archive.spi.ArchiveDescriptorFactory;
import org.hibernate.boot.internal.ClassLoaderAccessImpl; import org.hibernate.boot.internal.ClassLoaderAccessImpl;
import org.hibernate.boot.internal.ClassmateContext; import org.hibernate.boot.internal.ClassmateContext;
import org.hibernate.boot.model.TypeBeanInstanceProducer; import org.hibernate.boot.internal.TypeBeanInstanceProducer;
import org.hibernate.boot.model.convert.spi.ConverterDescriptor; import org.hibernate.boot.model.convert.spi.ConverterDescriptor;
import org.hibernate.boot.model.relational.AuxiliaryDatabaseObject; import org.hibernate.boot.model.relational.AuxiliaryDatabaseObject;
import org.hibernate.boot.registry.StandardServiceRegistry; import org.hibernate.boot.registry.StandardServiceRegistry;