Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
import org.hibernate.boot.archive.scan.spi.ScanOptions;
import org.hibernate.boot.archive.scan.spi.Scanner;
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.relational.AuxiliaryDatabaseObject;
import org.hibernate.boot.registry.StandardServiceRegistry;
import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
import org.hibernate.boot.registry.selector.spi.StrategySelector;
import org.hibernate.boot.spi.BootstrapContext;
import org.hibernate.boot.spi.ClassLoaderAccess;
import org.hibernate.boot.spi.ClassmateContext;
import org.hibernate.boot.spi.MetadataBuildingOptions;
import org.hibernate.cfg.AvailableSettings;
import org.hibernate.engine.config.spi.ConfigurationService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* SPDX-License-Identifier: LGPL-2.1-or-later
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.model;
package org.hibernate.boot.internal;

import org.hibernate.InstantiationException;
import org.hibernate.Internal;
Expand All @@ -19,7 +19,7 @@
*
* @author Christian Beikov
*/
@Internal //TODO: move this to org.hibernate.boot.internal, where its only usage is
@Internal
public class TypeBeanInstanceProducer implements BeanInstanceProducer, TypeBootstrapContext {
private final ConfigurationService configurationService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import java.util.List;

import org.hibernate.boot.internal.ClassmateContext;
import org.hibernate.boot.spi.ClassmateContext;
import org.hibernate.boot.model.convert.spi.AutoApplicableConverterDescriptor;
import org.hibernate.boot.model.convert.spi.ConverterDescriptor;
import org.hibernate.boot.model.convert.spi.JpaAttributeConverterCreationContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
package org.hibernate.boot.model.convert.internal;

import org.hibernate.boot.internal.ClassmateContext;
import org.hibernate.boot.spi.ClassmateContext;
import org.hibernate.boot.model.convert.spi.JpaAttributeConverterCreationContext;
import org.hibernate.resource.beans.spi.ManagedBean;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import org.hibernate.AnnotationException;
import org.hibernate.HibernateException;
import org.hibernate.boot.internal.ClassmateContext;
import org.hibernate.boot.spi.ClassmateContext;
import org.hibernate.boot.spi.MetadataBuildingContext;
import org.hibernate.internal.util.GenericsHelper;
import org.hibernate.internal.util.type.PrimitiveWrapperHelper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
package org.hibernate.boot.model.convert.internal;

import org.hibernate.boot.internal.ClassmateContext;
import org.hibernate.boot.spi.ClassmateContext;
import org.hibernate.boot.model.convert.spi.JpaAttributeConverterCreationContext;
import org.hibernate.resource.beans.spi.ManagedBean;
import org.hibernate.resource.beans.spi.ProvidedInstanceManagedBeanImpl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import java.util.Map;

import org.hibernate.AnnotationException;
import org.hibernate.boot.internal.ClassmateContext;
import org.hibernate.boot.spi.ClassmateContext;
import org.hibernate.boot.jaxb.mapping.spi.JaxbConverterImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityListenerContainerImpl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.util.List;
import java.util.Objects;

import org.hibernate.boot.internal.ClassmateContext;
import org.hibernate.boot.spi.ClassmateContext;
import org.hibernate.boot.model.convert.internal.AutoApplicableConverterDescriptorBypassedImpl;
import org.hibernate.boot.model.convert.internal.AutoApplicableConverterDescriptorStandardImpl;
import org.hibernate.boot.model.convert.internal.ConverterHelper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import org.hibernate.boot.archive.scan.spi.ScanEnvironment;
import org.hibernate.boot.archive.scan.spi.ScanOptions;
import org.hibernate.boot.archive.spi.ArchiveDescriptorFactory;
import org.hibernate.boot.internal.ClassmateContext;
import org.hibernate.boot.model.convert.spi.ConverterDescriptor;
import org.hibernate.boot.model.relational.AuxiliaryDatabaseObject;
import org.hibernate.boot.registry.StandardServiceRegistry;
Expand Down Expand Up @@ -61,7 +60,7 @@ public interface BootstrapContext {
/**
* The {@link BeanInstanceProducer} to use when creating custom type references.
*
* @implNote Usually a {@link org.hibernate.boot.model.TypeBeanInstanceProducer}.
* @implNote Usually a {@link org.hibernate.boot.internal.TypeBeanInstanceProducer}.
*/
BeanInstanceProducer getCustomTypeProducer();

Expand Down Expand Up @@ -104,9 +103,8 @@ public interface BootstrapContext {
/**
* Access to the shared {@link ClassmateContext} object used
* throughout the bootstrap process.
*
* @return Access to the shared {@link ClassmateContext} delegates.
*/
@Incubating
ClassmateContext getClassmateContext();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@
* SPDX-License-Identifier: LGPL-2.1-or-later
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.internal;
package org.hibernate.boot.spi;

import com.fasterxml.classmate.MemberResolver;
import com.fasterxml.classmate.TypeResolver;
import org.hibernate.Incubating;

/**
* Exposes the Classmate {@link TypeResolver} and {@link MemberResolver}.
*
* @author Steve Ebersole
*/
@Incubating
public class ClassmateContext {
private TypeResolver typeResolver = new TypeResolver();
private MemberResolver memberResolver = new MemberResolver( typeResolver );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.hibernate.boot.MetadataBuilder;
import org.hibernate.boot.MetadataSources;
import org.hibernate.boot.SessionFactoryBuilder;
import org.hibernate.boot.internal.ClassmateContext;
import org.hibernate.boot.spi.ClassmateContext;
import org.hibernate.boot.jaxb.spi.Binding;
import org.hibernate.boot.model.FunctionContributor;
import org.hibernate.boot.model.NamedEntityGraphDefinition;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.hibernate.boot.cfgxml.spi.CfgXmlAccessService;
import org.hibernate.boot.cfgxml.spi.LoadedConfig;
import org.hibernate.boot.cfgxml.spi.MappingReference;
import org.hibernate.boot.internal.ClassmateContext;
import org.hibernate.boot.spi.ClassmateContext;
import org.hibernate.boot.jaxb.hbm.spi.JaxbHbmHibernateMapping;
import org.hibernate.boot.jaxb.hbm.spi.JaxbHbmRootEntityType;
import org.hibernate.boot.jaxb.spi.Binding;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import org.hibernate.annotations.SoftDelete;
import org.hibernate.annotations.SoftDeleteType;
import org.hibernate.annotations.TimeZoneStorageType;
import org.hibernate.boot.internal.ClassmateContext;
import org.hibernate.boot.spi.ClassmateContext;
import org.hibernate.boot.model.TypeDefinition;
import org.hibernate.boot.model.convert.internal.AutoApplicableConverterDescriptorBypassedImpl;
import org.hibernate.boot.model.convert.internal.InstanceBasedConverterDescriptor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ protected <T> T processSchemaResultSet(
ExtractionContext.ResultSetProcessor<T> processor)
throws SQLException {
try ( ResultSet resultSet =
getJdbcDatabaseMetaData()
.getSchemas( catalog, schemaPattern ) ) {
getJdbcDatabaseMetaData()
.getSchemas( catalog, schemaPattern ) ) {
return processor.process( resultSet );
}
}
Expand All @@ -68,8 +68,8 @@ protected <T> T processTableResultSet(
ExtractionContext.ResultSetProcessor<T> processor)
throws SQLException {
try ( ResultSet resultSet =
getJdbcDatabaseMetaData()
.getTables( catalog, schemaPattern, tableNamePattern, types) ) {
getJdbcDatabaseMetaData()
.getTables( catalog, schemaPattern, tableNamePattern, types) ) {
return processor.process( resultSet );
}
}
Expand All @@ -83,8 +83,8 @@ protected <T> T processColumnsResultSet(
ExtractionContext.ResultSetProcessor<T> processor)
throws SQLException {
try ( ResultSet resultSet =
getJdbcDatabaseMetaData()
.getColumns( catalog, schemaPattern, tableNamePattern, columnNamePattern ) ) {
getJdbcDatabaseMetaData()
.getColumns( catalog, schemaPattern, tableNamePattern, columnNamePattern ) ) {
return processor.process( resultSet );
}
}
Expand All @@ -97,8 +97,8 @@ protected <T> T processPrimaryKeysResultSet(
ExtractionContext.ResultSetProcessor<T> processor)
throws SQLException {
try ( ResultSet resultSet =
getJdbcDatabaseMetaData()
.getPrimaryKeys( catalogFilter, schemaFilter, tableName.getText() ) ) {
getJdbcDatabaseMetaData()
.getPrimaryKeys( catalogFilter, schemaFilter, tableName.getText() ) ) {
return processor.process( resultSet );
}
}
Expand All @@ -113,8 +113,8 @@ protected <T> T processIndexInfoResultSet(
ExtractionContext.ResultSetProcessor<T> processor)
throws SQLException {
try ( ResultSet resultSet =
getJdbcDatabaseMetaData()
.getIndexInfo( catalog, schema, table, unique, approximate ) ) {
getJdbcDatabaseMetaData()
.getIndexInfo( catalog, schema, table, unique, approximate ) ) {
return processor.process( resultSet );
}
}
Expand All @@ -127,8 +127,8 @@ protected <T> T processImportedKeysResultSet(
ExtractionContext.ResultSetProcessor<T> processor)
throws SQLException {
try ( ResultSet resultSet =
getJdbcDatabaseMetaData()
.getImportedKeys( catalog, schema, table ) ) {
getJdbcDatabaseMetaData()
.getImportedKeys( catalog, schema, table ) ) {
return processor.process( resultSet );
}
}
Expand All @@ -144,9 +144,9 @@ protected <T> T processCrossReferenceResultSet(
ExtractionContext.ResultSetProcessor<T> processor)
throws SQLException {
try ( ResultSet resultSet =
getJdbcDatabaseMetaData()
.getCrossReference( parentCatalog, parentSchema, parentTable,
foreignCatalog, foreignSchema, foreignTable) ) {
getJdbcDatabaseMetaData()
.getCrossReference( parentCatalog, parentSchema, parentTable,
foreignCatalog, foreignSchema, foreignTable) ) {
return processor.process( resultSet );
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
import org.hibernate.boot.archive.scan.spi.ScanOptions;
import org.hibernate.boot.archive.spi.ArchiveDescriptorFactory;
import org.hibernate.boot.internal.ClassLoaderAccessImpl;
import org.hibernate.boot.internal.ClassmateContext;
import org.hibernate.boot.model.TypeBeanInstanceProducer;
import org.hibernate.boot.spi.ClassmateContext;
import org.hibernate.boot.internal.TypeBeanInstanceProducer;
import org.hibernate.boot.model.convert.spi.ConverterDescriptor;
import org.hibernate.boot.model.relational.AuxiliaryDatabaseObject;
import org.hibernate.boot.registry.StandardServiceRegistry;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.hibernate.boot.archive.scan.spi.ScanResult;
import org.hibernate.boot.archive.scan.spi.Scanner;
import org.hibernate.boot.archive.spi.InputStreamAccess;
import org.hibernate.boot.internal.ClassmateContext;
import org.hibernate.boot.spi.ClassmateContext;
import org.hibernate.boot.model.convert.spi.ConverterDescriptor;
import org.hibernate.boot.model.process.internal.ManagedResourcesImpl;
import org.hibernate.boot.model.process.internal.ScanningCoordinator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.boot.MetadataSources;
import org.hibernate.boot.internal.ClassmateContext;
import org.hibernate.boot.spi.ClassmateContext;
import org.hibernate.boot.model.convert.internal.InstanceBasedConverterDescriptor;
import org.hibernate.boot.registry.StandardServiceRegistry;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import org.hibernate.boot.archive.scan.spi.ScanEnvironment;
import org.hibernate.boot.archive.scan.spi.ScanOptions;
import org.hibernate.boot.archive.spi.ArchiveDescriptorFactory;
import org.hibernate.boot.internal.ClassmateContext;
import org.hibernate.boot.spi.ClassmateContext;
import org.hibernate.boot.internal.MetadataBuilderImpl;
import org.hibernate.boot.model.convert.spi.ConverterDescriptor;
import org.hibernate.boot.model.relational.AuxiliaryDatabaseObject;
Expand Down
Loading