Package org.hibernate.boot.internal
Class InFlightMetadataCollectorImpl
java.lang.Object
org.hibernate.boot.internal.InFlightMetadataCollectorImpl
- All Implemented Interfaces:
Metadata
,ConverterRegistry
,InFlightMetadataCollector
,MetadataImplementor
,GeneratorSettings
,MappingContext
public class InFlightMetadataCollectorImpl
extends Object
implements InFlightMetadataCollector, ConverterRegistry, GeneratorSettings
The implementation of the in-flight
metadata collector contract.
The usage expectation is that this class is used until all Metadata info is
collected and then buildMetadataInstance(org.hibernate.boot.spi.MetadataBuildingContext)
is called to generate
the complete (and immutable) Metadata object.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.boot.spi.InFlightMetadataCollector
InFlightMetadataCollector.CollectionTypeRegistrationDescriptor, InFlightMetadataCollector.DelayedPropertyReferenceHandler, InFlightMetadataCollector.DuplicateSecondaryTableException, InFlightMetadataCollector.EntityTableXref
-
Constructor Summary
ConstructorsConstructorDescriptionInFlightMetadataCollectorImpl
(BootstrapContext bootstrapContext, MetadataBuildingOptions options) InFlightMetadataCollectorImpl
(BootstrapContext bootstrapContext, org.hibernate.models.spi.SourceModelBuildingContext sourceModelBuildingContext, MetadataBuildingOptions options) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttributeConverter
(Class<? extends AttributeConverter<?, ?>> converterClass) Apply anAttributeConverter
void
addAttributeConverter
(ConverterDescriptor descriptor) Apply the descriptor for anAttributeConverter
void
addAuxiliaryDatabaseObject
(AuxiliaryDatabaseObject auxiliaryDatabaseObject) Add metadata pertaining to an auxiliary database object to this repository.addClassType
(org.hibernate.models.spi.ClassDetails clazz) void
addCollectionBinding
(Collection collection) Add collection mapping metadata to this repository.void
addCollectionTypeRegistration
(CollectionTypeRegistration registrationAnnotation) void
addCollectionTypeRegistration
(CollectionClassification classification, InFlightMetadataCollector.CollectionTypeRegistrationDescriptor descriptor) void
addColumnNameBinding
(Table table, String logicalName, Column column) void
addColumnNameBinding
(Table table, Identifier logicalName, Column column) void
void
void
void
addDefaultQuery
(NamedHqlQueryDefinition<?> queryDefinition) void
void
addDelayedPropertyReferenceHandler
(InFlightMetadataCollector.DelayedPropertyReferenceHandler handler) addDenormalizedTable
(String schemaName, String catalogName, String name, boolean isAbstract, String subselectFragment, Table includedTable, MetadataBuildingContext buildingContext) Adds a 'denormalized table' to this repository.void
addEntityBinding
(PersistentClass persistentClass) Add thePersistentClass
for an entity mapping.addEntityTableXref
(String entityName, Identifier primaryTableLogicalName, Table primaryTable, InFlightMetadataCollector.EntityTableXref superEntityTableXref) void
addFetchProfile
(FetchProfile profile) Add aFetchProfile
.void
addFilterDefinition
(FilterDefinition filterDefinition) Adds a filter definition to this repository.void
void
Adds an import (for use in HQL).void
addJavaTypeRegistration
(Class<?> javaType, JavaType<?> jtd) void
addJdbcTypeRegistration
(int typeCode, JdbcType jdbcType) void
addMappedBy
(String entityName, String propertyName, String inversePropertyName) void
addMappedSuperclass
(Class<?> type, MappedSuperclass mappedSuperclass) void
addNamedEntityGraph
(NamedEntityGraphDefinition definition) Adds metadata for a named entity graph to this repositoryvoid
Adds metadata for a named SQL query to this collector.void
Adds metadata for a named stored procedure call to this collector.void
addNamedQuery
(NamedHqlQueryDefinition<?> def) Adds metadata for a named query to this repository.void
addOverridableConverter
(Class<? extends AttributeConverter<?, ?>> converterClass) Apply anAttributeConverter
that may be overridden by competing convertersvoid
addPropertyAnnotatedWithMapsId
(org.hibernate.models.spi.ClassDetails entityType, PropertyData property) void
addPropertyAnnotatedWithMapsIdSpecj
(org.hibernate.models.spi.ClassDetails entityType, PropertyData property, String mapsIdValue) void
addPropertyReference
(String referencedClass, String propertyName) void
addPropertyReferencedAssociation
(String entityName, String propertyName, String propertyRef) void
addRegisteredConversion
(RegisteredConversion conversion) void
addResultSetMapping
(NamedResultSetMappingDescriptor resultSetMappingDescriptor) Adds the metadata for a named SQL result set mapping to this collector.void
addSecondPass
(SecondPass secondPass) void
addSecondPass
(SecondPass secondPass, boolean onTopOfTheQueue) addTable
(String schemaName, String catalogName, String name, String subselectFragment, boolean isAbstract, MetadataBuildingContext buildingContext) Adds table metadata to this repository returning the created metadata instance.void
addTableNameBinding
(String schema, String catalog, String logicalName, String realTableName, Table denormalizedSuperTable) void
addTableNameBinding
(Identifier logicalName, Table table) void
addToOneAndIdProperty
(org.hibernate.models.spi.ClassDetails entityType, PropertyData property) void
addTypeDefinition
(TypeDefinition typeDefinition) Adds a type definition to this metadata repository.void
addUniquePropertyReference
(String referencedClass, String propertyName) void
applyResultSetMapping
(NamedResultSetMappingDescriptor resultSetMappingDescriptor) buildMetadataInstance
(MetadataBuildingContext buildingContext) Builds the complete and immutable Metadata instance from the collected info.Short-hand form of building aSessionFactory
through the builder without any additional option overrides.findCollectionTypeRegistration
(CollectionClassification classification) Class<? extends CompositeUserType<?>>
findRegisteredCompositeUserType
(Class<?> embeddableType) Class<? extends EmbeddableInstantiator>
findRegisteredEmbeddableInstantiator
(Class<?> embeddableType) findRegisteredUserType
(Class<?> basicType) getClassType
(org.hibernate.models.spi.ClassDetails clazz) getCollectionBinding
(String role) Retrieves the collection mapping metadata for the given collection role.Retrieves the Collection metadata representation for all known collections.All of the known model contributorsObtain theConverterRegistry
which may be used to registerAttributeConverter
s.Retrieve the database model.List<org.hibernate.models.spi.ClassDetails>
getEmbeddableSubclasses
(org.hibernate.models.spi.ClassDetails superclass) getEntityBinding
(String entityName) Retrieves the PersistentClass entity mapping metadata representation for the given entity name.A map ofPersistentClass
by entity name.Retrieves the PersistentClass entity metadata representation for all known entities.getEntityTableXref
(String entityName) getFetchProfile
(String name) getFilterDefinition
(String name) Retrieves a filter definition by name.Retrieves the complete map of filter definitions.getFromMappedBy
(String entityName, String propertyName) Access to theSqmFunctionRegistry
belonging to theBootstrapContext
getGenericComponent
(Class<?> componentClass) getIdentifierGenerator
(String name) getIdentifierPropertyName
(String entityName) getIdentifierType
(String entityName) Retrieves all defined imports (class renames).getLogicalColumnName
(Table table, String physicalName) getLogicalColumnName
(Table table, Identifier physicalName) getLogicalTableName
(Table ownerTable) getMappedSuperclass
(Class<?> type) Access to the options used to build thisMetadata
getNamedEntityGraph
(String name) Retrieve named query metadata by name.Retrieve named SQL query metadata.Retrieve named procedure metadata.getPhysicalColumnName
(Table table, String logicalName) getPhysicalColumnName
(Table table, Identifier logicalName) getPhysicalTableName
(String logicalName) getPhysicalTableName
(Identifier logicalName) getPropertyAnnotatedWithIdAndToOne
(org.hibernate.models.spi.ClassDetails entityType, String propertyName) getPropertyAnnotatedWithMapsId
(org.hibernate.models.spi.ClassDetails entityType, String propertyName) getPropertyReferencedAssociation
(String entityName, String propertyName) getReferencedPropertyType
(String entityName, String propertyName) getResultSetMapping
(String name) Retrieve the metadata for a named SQL result set mapping.Get the builder forSessionFactory
instances based on this metamodel.org.hibernate.models.spi.SourceModelBuildingContext
Access to theTypeConfiguration
belonging to theBootstrapContext
getTypeDefinition
(String registrationKey) Retrieve a type definition by name.Access to theTypeDefinitionRegistry
, which may be used to add type definitions to this metadata repository.getUUID()
Gets theUUID
for this metamodel.void
initSessionFactory
(SessionFactoryImplementor sessionFactory) boolean
locateNaturalIdUniqueKeyBinder
(String entityName) void
orderColumns
(boolean forceOrdering) void
processSecondPasses
(MetadataBuildingContext buildingContext) Ugh! But we need this done before we ask Envers to produce its entities.void
registerComponent
(Component component) void
registerCompositeUserType
(Class<?> embeddableType, Class<? extends CompositeUserType<?>> userType) void
registerEmbeddableInstantiator
(Class<?> embeddableType, Class<? extends EmbeddableInstantiator> instantiator) void
registerEmbeddableSubclass
(org.hibernate.models.spi.ClassDetails superclass, org.hibernate.models.spi.ClassDetails subclass) void
registerGenericComponent
(Component component) void
registerNaturalIdUniqueKeyBinder
(String entityName, NaturalIdUniqueKeyBinder ukBinder) void
registerUserType
(Class<?> basicType, Class<? extends UserType<?>> userType) void
resolveEmbeddableDiscriminatorType
(Class<?> embeddableClass, Supplier<DiscriminatorType<?>> supplier) protected void
secondPassCompileForeignKeys
(Table table, Set<ForeignKey> done, MetadataBuildingContext buildingContext) void
validate()
void
visitNamedHqlQueryDefinitions
(Consumer<NamedHqlQueryDefinition<?>> definitionConsumer) Visit all named HQL query definitionsvoid
visitNamedNativeQueryDefinitions
(Consumer<NamedNativeQueryDefinition<?>> definitionConsumer) Visit all named native query definitionsvoid
visitNamedProcedureCallDefinition
(Consumer<NamedProcedureCallDefinition> definitionConsumer) Visit all named callable query definitionsvoid
visitNamedResultSetMappingDefinition
(Consumer<NamedResultSetMappingDescriptor> definitionConsumer) Visit all named SQL result set mapping definitionsvoid
visitRegisteredComponents
(Consumer<Component> consumer) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hibernate.boot.spi.InFlightMetadataCollector
getAnnotationDescriptorRegistry, getClassDetailsRegistry
-
Constructor Details
-
InFlightMetadataCollectorImpl
public InFlightMetadataCollectorImpl(BootstrapContext bootstrapContext, org.hibernate.models.spi.SourceModelBuildingContext sourceModelBuildingContext, MetadataBuildingOptions options) -
InFlightMetadataCollectorImpl
public InFlightMetadataCollectorImpl(BootstrapContext bootstrapContext, MetadataBuildingOptions options)
-
-
Method Details
-
getUUID
Description copied from interface:Metadata
Gets theUUID
for this metamodel. -
getMetadataBuildingOptions
Description copied from interface:MetadataImplementor
Access to the options used to build thisMetadata
- Specified by:
getMetadataBuildingOptions
in interfaceMetadataImplementor
- Returns:
- The
MetadataBuildingOptions
-
getBootstrapContext
- Specified by:
getBootstrapContext
in interfaceInFlightMetadataCollector
-
getSourceModelBuildingContext
public org.hibernate.models.spi.SourceModelBuildingContext getSourceModelBuildingContext()- Specified by:
getSourceModelBuildingContext
in interfaceInFlightMetadataCollector
-
getGlobalRegistrations
- Specified by:
getGlobalRegistrations
in interfaceInFlightMetadataCollector
-
getPersistenceUnitMetadata
- Specified by:
getPersistenceUnitMetadata
in interfaceInFlightMetadataCollector
-
getTypeConfiguration
Description copied from interface:MetadataImplementor
Access to theTypeConfiguration
belonging to theBootstrapContext
- Specified by:
getTypeConfiguration
in interfaceMetadataImplementor
-
getFunctionRegistry
Description copied from interface:MetadataImplementor
Access to theSqmFunctionRegistry
belonging to theBootstrapContext
- Specified by:
getFunctionRegistry
in interfaceMetadataImplementor
-
getDatabase
Description copied from interface:Metadata
Retrieve the database model.- Specified by:
getDatabase
in interfaceMetadata
- Returns:
- The database model.
-
buildNamedQueryRepository
- Specified by:
buildNamedQueryRepository
in interfaceMetadataImplementor
-
getSqlFunctionMap
- Specified by:
getSqlFunctionMap
in interfaceMetadata
-
getContributors
Description copied from interface:Metadata
All of the known model contributors- Specified by:
getContributors
in interfaceMetadata
-
orderColumns
public void orderColumns(boolean forceOrdering) - Specified by:
orderColumns
in interfaceMetadataImplementor
-
validate
- Specified by:
validate
in interfaceMetadataImplementor
- Throws:
MappingException
-
getMappedSuperclassMappingsCopy
- Specified by:
getMappedSuperclassMappingsCopy
in interfaceMetadataImplementor
-
initSessionFactory
- Specified by:
initSessionFactory
in interfaceMetadataImplementor
-
registerComponent
- Specified by:
registerComponent
in interfaceInFlightMetadataCollector
-
visitRegisteredComponents
- Specified by:
visitRegisteredComponents
in interfaceMetadataImplementor
-
registerGenericComponent
- Specified by:
registerGenericComponent
in interfaceInFlightMetadataCollector
-
getGenericComponent
- Specified by:
getGenericComponent
in interfaceMetadataImplementor
-
registerEmbeddableSubclass
public void registerEmbeddableSubclass(org.hibernate.models.spi.ClassDetails superclass, org.hibernate.models.spi.ClassDetails subclass) - Specified by:
registerEmbeddableSubclass
in interfaceInFlightMetadataCollector
-
getEmbeddableSubclasses
public List<org.hibernate.models.spi.ClassDetails> getEmbeddableSubclasses(org.hibernate.models.spi.ClassDetails superclass) - Specified by:
getEmbeddableSubclasses
in interfaceInFlightMetadataCollector
-
resolveEmbeddableDiscriminatorType
public DiscriminatorType<?> resolveEmbeddableDiscriminatorType(Class<?> embeddableClass, Supplier<DiscriminatorType<?>> supplier) - Specified by:
resolveEmbeddableDiscriminatorType
in interfaceMetadataImplementor
-
getSessionFactoryBuilder
Description copied from interface:Metadata
Get the builder forSessionFactory
instances based on this metamodel.- Specified by:
getSessionFactoryBuilder
in interfaceMetadata
- Returns:
- The builder for
SessionFactory
instances.
-
buildSessionFactory
Description copied from interface:Metadata
Short-hand form of building aSessionFactory
through the builder without any additional option overrides.- Specified by:
buildSessionFactory
in interfaceMetadata
- Returns:
- THe built SessionFactory.
-
getEntityBindings
Description copied from interface:Metadata
Retrieves the PersistentClass entity metadata representation for all known entities. Returned collection is immutable- Specified by:
getEntityBindings
in interfaceMetadata
- Returns:
- All PersistentClass representations.
-
getEntityBindingMap
Description copied from interface:InFlightMetadataCollector
A map ofPersistentClass
by entity name. Needed forSecondPass
handling.- Specified by:
getEntityBindingMap
in interfaceInFlightMetadataCollector
-
getEntityBinding
Description copied from interface:Metadata
Retrieves the PersistentClass entity mapping metadata representation for the given entity name.- Specified by:
getEntityBinding
in interfaceMetadata
- Parameters:
entityName
- The entity name for which to retrieve the metadata.- Returns:
- The entity mapping metadata, or
null
if no matching entity found.
-
addEntityBinding
Description copied from interface:InFlightMetadataCollector
Add thePersistentClass
for an entity mapping.- Specified by:
addEntityBinding
in interfaceInFlightMetadataCollector
- Parameters:
persistentClass
- The entity metadata- Throws:
DuplicateMappingException
- Indicates there was already an entry corresponding to the given entity name.
-
getCollectionBindings
Description copied from interface:Metadata
Retrieves the Collection metadata representation for all known collections. Returned collection is immutable- Specified by:
getCollectionBindings
in interfaceMetadata
- Returns:
- All Collection representations.
-
getCollectionBinding
Description copied from interface:Metadata
Retrieves the collection mapping metadata for the given collection role.- Specified by:
getCollectionBinding
in interfaceMetadata
- Parameters:
role
- The collection role for which to retrieve the metadata.- Returns:
- The collection mapping metadata, or
null
if no matching collection found.
-
addCollectionBinding
Description copied from interface:InFlightMetadataCollector
Add collection mapping metadata to this repository.- Specified by:
addCollectionBinding
in interfaceInFlightMetadataCollector
- Parameters:
collection
- The collection metadata- Throws:
DuplicateMappingException
- Indicates there was already an entry corresponding to the given collection role
-
getTypeDefinitionRegistry
Description copied from interface:InFlightMetadataCollector
Access to theTypeDefinitionRegistry
, which may be used to add type definitions to this metadata repository.- Specified by:
getTypeDefinitionRegistry
in interfaceInFlightMetadataCollector
-
getTypeDefinition
Description copied from interface:Metadata
Retrieve a type definition by name.- Specified by:
getTypeDefinition
in interfaceMetadata
- Returns:
- The named type definition, or
null
-
addTypeDefinition
Description copied from interface:InFlightMetadataCollector
Adds a type definition to this metadata repository.- Specified by:
addTypeDefinition
in interfaceInFlightMetadataCollector
- Parameters:
typeDefinition
- The named type definition to add.- See Also:
-
registerValueMappingResolver
- Specified by:
registerValueMappingResolver
in interfaceInFlightMetadataCollector
-
addJavaTypeRegistration
- Specified by:
addJavaTypeRegistration
in interfaceInFlightMetadataCollector
-
addJdbcTypeRegistration
- Specified by:
addJdbcTypeRegistration
in interfaceInFlightMetadataCollector
-
registerEmbeddableInstantiator
public void registerEmbeddableInstantiator(Class<?> embeddableType, Class<? extends EmbeddableInstantiator> instantiator) - Specified by:
registerEmbeddableInstantiator
in interfaceInFlightMetadataCollector
-
findRegisteredEmbeddableInstantiator
public Class<? extends EmbeddableInstantiator> findRegisteredEmbeddableInstantiator(Class<?> embeddableType) - Specified by:
findRegisteredEmbeddableInstantiator
in interfaceInFlightMetadataCollector
-
registerCompositeUserType
public void registerCompositeUserType(Class<?> embeddableType, Class<? extends CompositeUserType<?>> userType) - Specified by:
registerCompositeUserType
in interfaceInFlightMetadataCollector
-
findRegisteredCompositeUserType
public Class<? extends CompositeUserType<?>> findRegisteredCompositeUserType(Class<?> embeddableType) - Specified by:
findRegisteredCompositeUserType
in interfaceInFlightMetadataCollector
-
registerUserType
- Specified by:
registerUserType
in interfaceInFlightMetadataCollector
-
findRegisteredUserType
- Specified by:
findRegisteredUserType
in interfaceInFlightMetadataCollector
-
addCollectionTypeRegistration
- Specified by:
addCollectionTypeRegistration
in interfaceInFlightMetadataCollector
-
addCollectionTypeRegistration
public void addCollectionTypeRegistration(CollectionClassification classification, InFlightMetadataCollector.CollectionTypeRegistrationDescriptor descriptor) - Specified by:
addCollectionTypeRegistration
in interfaceInFlightMetadataCollector
-
findCollectionTypeRegistration
public InFlightMetadataCollector.CollectionTypeRegistrationDescriptor findCollectionTypeRegistration(CollectionClassification classification) - Specified by:
findCollectionTypeRegistration
in interfaceInFlightMetadataCollector
-
getConverterRegistry
Description copied from interface:InFlightMetadataCollector
Obtain theConverterRegistry
which may be used to registerAttributeConverter
s.- Specified by:
getConverterRegistry
in interfaceInFlightMetadataCollector
-
getAttributeConverterManager
-
addAttributeConverter
Description copied from interface:InFlightMetadataCollector
Apply anAttributeConverter
- Specified by:
addAttributeConverter
in interfaceConverterRegistry
- Specified by:
addAttributeConverter
in interfaceInFlightMetadataCollector
-
addOverridableConverter
Description copied from interface:ConverterRegistry
Apply anAttributeConverter
that may be overridden by competing converters- Specified by:
addOverridableConverter
in interfaceConverterRegistry
-
addAttributeConverter
Description copied from interface:InFlightMetadataCollector
Apply the descriptor for anAttributeConverter
- Specified by:
addAttributeConverter
in interfaceConverterRegistry
- Specified by:
addAttributeConverter
in interfaceInFlightMetadataCollector
-
addRegisteredConversion
- Specified by:
addRegisteredConversion
in interfaceConverterRegistry
- Specified by:
addRegisteredConversion
in interfaceInFlightMetadataCollector
-
getAttributeConverterAutoApplyHandler
- Specified by:
getAttributeConverterAutoApplyHandler
in interfaceConverterRegistry
- Specified by:
getAttributeConverterAutoApplyHandler
in interfaceInFlightMetadataCollector
-
getFilterDefinitions
Description copied from interface:Metadata
Retrieves the complete map of filter definitions. Returned map is immutable- Specified by:
getFilterDefinitions
in interfaceMetadata
- Returns:
- The filter definition map.
-
getFilterDefinition
Description copied from interface:Metadata
Retrieves a filter definition by name.- Specified by:
getFilterDefinition
in interfaceMetadata
- Parameters:
name
- The name of the filter definition to retrieve .- Returns:
- The filter definition, or
null
.
-
addFilterDefinition
Description copied from interface:InFlightMetadataCollector
Adds a filter definition to this repository.- Specified by:
addFilterDefinition
in interfaceInFlightMetadataCollector
- Parameters:
filterDefinition
- The filter definition to add.
-
getFetchProfiles
- Specified by:
getFetchProfiles
in interfaceMetadata
-
getFetchProfile
- Specified by:
getFetchProfile
in interfaceMetadata
-
addFetchProfile
Description copied from interface:InFlightMetadataCollector
Add aFetchProfile
.- Specified by:
addFetchProfile
in interfaceInFlightMetadataCollector
-
getIdentifierGenerator
- Specified by:
getIdentifierGenerator
in interfaceMetadata
-
collectTableMappings
- Specified by:
collectTableMappings
in interfaceMetadata
-
addIdentifierGenerator
- Specified by:
addIdentifierGenerator
in interfaceInFlightMetadataCollector
-
addDefaultIdentifierGenerator
- Specified by:
addDefaultIdentifierGenerator
in interfaceInFlightMetadataCollector
-
getNamedEntityGraph
- Specified by:
getNamedEntityGraph
in interfaceMetadata
-
getNamedEntityGraphs
- Specified by:
getNamedEntityGraphs
in interfaceMetadata
-
addNamedEntityGraph
Description copied from interface:InFlightMetadataCollector
Adds metadata for a named entity graph to this repository- Specified by:
addNamedEntityGraph
in interfaceInFlightMetadataCollector
- Parameters:
definition
- The procedure call information
-
getNamedHqlQueryMapping
Description copied from interface:Metadata
Retrieve named query metadata by name.- Specified by:
getNamedHqlQueryMapping
in interfaceMetadata
- Returns:
- The named query metadata, or
null
.
-
visitNamedHqlQueryDefinitions
Description copied from interface:Metadata
Visit all named HQL query definitions- Specified by:
visitNamedHqlQueryDefinitions
in interfaceMetadata
-
addNamedQuery
Description copied from interface:InFlightMetadataCollector
Adds metadata for a named query to this repository.- Specified by:
addNamedQuery
in interfaceInFlightMetadataCollector
- Parameters:
def
- The metadata
-
addDefaultQuery
- Specified by:
addDefaultQuery
in interfaceInFlightMetadataCollector
-
getNamedNativeQueryMapping
Description copied from interface:Metadata
Retrieve named SQL query metadata.- Specified by:
getNamedNativeQueryMapping
in interfaceMetadata
- Returns:
- The named query metadata, or
null
-
visitNamedNativeQueryDefinitions
public void visitNamedNativeQueryDefinitions(Consumer<NamedNativeQueryDefinition<?>> definitionConsumer) Description copied from interface:Metadata
Visit all named native query definitions- Specified by:
visitNamedNativeQueryDefinitions
in interfaceMetadata
-
addNamedNativeQuery
Description copied from interface:InFlightMetadataCollector
Adds metadata for a named SQL query to this collector.- Specified by:
addNamedNativeQuery
in interfaceInFlightMetadataCollector
-
addDefaultNamedNativeQuery
- Specified by:
addDefaultNamedNativeQuery
in interfaceInFlightMetadataCollector
-
getNamedProcedureCallMapping
Description copied from interface:Metadata
Retrieve named procedure metadata.- Specified by:
getNamedProcedureCallMapping
in interfaceMetadata
- Returns:
- The named procedure metadata, or
null
-
visitNamedProcedureCallDefinition
public void visitNamedProcedureCallDefinition(Consumer<NamedProcedureCallDefinition> definitionConsumer) Description copied from interface:Metadata
Visit all named callable query definitions- Specified by:
visitNamedProcedureCallDefinition
in interfaceMetadata
-
addNamedProcedureCallDefinition
Description copied from interface:InFlightMetadataCollector
Adds metadata for a named stored procedure call to this collector.- Specified by:
addNamedProcedureCallDefinition
in interfaceInFlightMetadataCollector
-
addDefaultNamedProcedureCall
- Specified by:
addDefaultNamedProcedureCall
in interfaceInFlightMetadataCollector
-
getResultSetMapping
Description copied from interface:Metadata
Retrieve the metadata for a named SQL result set mapping.- Specified by:
getResultSetMapping
in interfaceMetadata
- Parameters:
name
- The mapping name.- Returns:
- The named result set mapping metadata, or
null
if none found.
-
visitNamedResultSetMappingDefinition
public void visitNamedResultSetMappingDefinition(Consumer<NamedResultSetMappingDescriptor> definitionConsumer) Description copied from interface:Metadata
Visit all named SQL result set mapping definitions- Specified by:
visitNamedResultSetMappingDefinition
in interfaceMetadata
-
addResultSetMapping
Description copied from interface:InFlightMetadataCollector
Adds the metadata for a named SQL result set mapping to this collector.- Specified by:
addResultSetMapping
in interfaceInFlightMetadataCollector
-
applyResultSetMapping
-
addDefaultResultSetMapping
- Specified by:
addDefaultResultSetMapping
in interfaceInFlightMetadataCollector
-
getImports
Description copied from interface:Metadata
Retrieves all defined imports (class renames).- Specified by:
getImports
in interfaceMetadata
- Returns:
- All imports
-
addImport
Description copied from interface:InFlightMetadataCollector
Adds an import (for use in HQL).- Specified by:
addImport
in interfaceInFlightMetadataCollector
- Parameters:
importName
- The name to be used in HQLclassName
- The fully-qualified name of the class
-
addTable
public Table addTable(String schemaName, String catalogName, String name, String subselectFragment, boolean isAbstract, MetadataBuildingContext buildingContext) Description copied from interface:InFlightMetadataCollector
Adds table metadata to this repository returning the created metadata instance.- Specified by:
addTable
in interfaceInFlightMetadataCollector
- Parameters:
schemaName
- The named schema in which the table belongs (or null).catalogName
- The named catalog in which the table belongs (or null).name
- The table namesubselectFragment
- A select statement which defines a logical table, much like a DB view.isAbstract
- Is the table abstract (i.e. not really existing in the DB)?- Returns:
- The created table metadata, or the existing reference.
-
addDenormalizedTable
public Table addDenormalizedTable(String schemaName, String catalogName, String name, boolean isAbstract, String subselectFragment, Table includedTable, MetadataBuildingContext buildingContext) throws DuplicateMappingException Description copied from interface:InFlightMetadataCollector
Adds a 'denormalized table' to this repository.- Specified by:
addDenormalizedTable
in interfaceInFlightMetadataCollector
- Parameters:
schemaName
- The named schema in which the table belongs (or null).catalogName
- The named catalog in which the table belongs (or null).name
- The table nameisAbstract
- Is the table abstract (i.e. not really existing in the DB)?subselectFragment
- A select statement which defines a logical table, much like a DB view.includedTable
- The "common" table- Returns:
- The created table metadata.
- Throws:
DuplicateMappingException
- If such a table mapping already exists.
-
getIdentifierType
- Specified by:
getIdentifierType
in interfaceMappingContext
- Throws:
MappingException
-
getIdentifierPropertyName
- Specified by:
getIdentifierPropertyName
in interfaceMappingContext
- Throws:
MappingException
-
getReferencedPropertyType
public Type getReferencedPropertyType(String entityName, String propertyName) throws MappingException - Specified by:
getReferencedPropertyType
in interfaceMappingContext
- Throws:
MappingException
-
addTableNameBinding
- Specified by:
addTableNameBinding
in interfaceInFlightMetadataCollector
-
addTableNameBinding
public void addTableNameBinding(String schema, String catalog, String logicalName, String realTableName, Table denormalizedSuperTable) - Specified by:
addTableNameBinding
in interfaceInFlightMetadataCollector
-
getLogicalTableName
- Specified by:
getLogicalTableName
in interfaceInFlightMetadataCollector
-
getPhysicalTableName
- Specified by:
getPhysicalTableName
in interfaceInFlightMetadataCollector
-
getPhysicalTableName
- Specified by:
getPhysicalTableName
in interfaceInFlightMetadataCollector
-
addColumnNameBinding
public void addColumnNameBinding(Table table, String logicalName, Column column) throws DuplicateMappingException - Specified by:
addColumnNameBinding
in interfaceInFlightMetadataCollector
- Throws:
DuplicateMappingException
-
addColumnNameBinding
public void addColumnNameBinding(Table table, Identifier logicalName, Column column) throws DuplicateMappingException - Specified by:
addColumnNameBinding
in interfaceInFlightMetadataCollector
- Throws:
DuplicateMappingException
-
getPhysicalColumnName
- Specified by:
getPhysicalColumnName
in interfaceInFlightMetadataCollector
- Throws:
MappingException
-
getPhysicalColumnName
- Specified by:
getPhysicalColumnName
in interfaceInFlightMetadataCollector
- Throws:
MappingException
-
getLogicalColumnName
- Specified by:
getLogicalColumnName
in interfaceInFlightMetadataCollector
- Throws:
MappingException
-
getLogicalColumnName
- Specified by:
getLogicalColumnName
in interfaceInFlightMetadataCollector
- Throws:
MappingException
-
addAuxiliaryDatabaseObject
Description copied from interface:InFlightMetadataCollector
Add metadata pertaining to an auxiliary database object to this repository.- Specified by:
addAuxiliaryDatabaseObject
in interfaceInFlightMetadataCollector
- Parameters:
auxiliaryDatabaseObject
- The metadata.
-
getClassType
- Specified by:
getClassType
in interfaceInFlightMetadataCollector
-
addClassType
- Specified by:
addClassType
in interfaceInFlightMetadataCollector
-
addMappedSuperclass
- Specified by:
addMappedSuperclass
in interfaceInFlightMetadataCollector
-
getMappedSuperclass
- Specified by:
getMappedSuperclass
in interfaceInFlightMetadataCollector
-
getPropertyAnnotatedWithMapsId
public PropertyData getPropertyAnnotatedWithMapsId(org.hibernate.models.spi.ClassDetails entityType, String propertyName) - Specified by:
getPropertyAnnotatedWithMapsId
in interfaceInFlightMetadataCollector
-
addPropertyAnnotatedWithMapsId
public void addPropertyAnnotatedWithMapsId(org.hibernate.models.spi.ClassDetails entityType, PropertyData property) - Specified by:
addPropertyAnnotatedWithMapsId
in interfaceInFlightMetadataCollector
-
addPropertyAnnotatedWithMapsIdSpecj
public void addPropertyAnnotatedWithMapsIdSpecj(org.hibernate.models.spi.ClassDetails entityType, PropertyData property, String mapsIdValue) - Specified by:
addPropertyAnnotatedWithMapsIdSpecj
in interfaceInFlightMetadataCollector
-
getPropertyAnnotatedWithIdAndToOne
public PropertyData getPropertyAnnotatedWithIdAndToOne(org.hibernate.models.spi.ClassDetails entityType, String propertyName) - Specified by:
getPropertyAnnotatedWithIdAndToOne
in interfaceInFlightMetadataCollector
-
addToOneAndIdProperty
public void addToOneAndIdProperty(org.hibernate.models.spi.ClassDetails entityType, PropertyData property) - Specified by:
addToOneAndIdProperty
in interfaceInFlightMetadataCollector
-
addMappedBy
- Specified by:
addMappedBy
in interfaceInFlightMetadataCollector
-
getFromMappedBy
- Specified by:
getFromMappedBy
in interfaceInFlightMetadataCollector
-
addPropertyReferencedAssociation
public void addPropertyReferencedAssociation(String entityName, String propertyName, String propertyRef) - Specified by:
addPropertyReferencedAssociation
in interfaceInFlightMetadataCollector
-
getPropertyReferencedAssociation
- Specified by:
getPropertyReferencedAssociation
in interfaceInFlightMetadataCollector
-
addPropertyReference
- Specified by:
addPropertyReference
in interfaceInFlightMetadataCollector
-
addDelayedPropertyReferenceHandler
public void addDelayedPropertyReferenceHandler(InFlightMetadataCollector.DelayedPropertyReferenceHandler handler) - Specified by:
addDelayedPropertyReferenceHandler
in interfaceInFlightMetadataCollector
-
addUniquePropertyReference
- Specified by:
addUniquePropertyReference
in interfaceInFlightMetadataCollector
-
getEntityTableXref
- Specified by:
getEntityTableXref
in interfaceInFlightMetadataCollector
-
addEntityTableXref
public InFlightMetadataCollector.EntityTableXref addEntityTableXref(String entityName, Identifier primaryTableLogicalName, Table primaryTable, InFlightMetadataCollector.EntityTableXref superEntityTableXref) - Specified by:
addEntityTableXref
in interfaceInFlightMetadataCollector
-
getJoins
- Specified by:
getJoins
in interfaceInFlightMetadataCollector
-
addSecondPass
- Specified by:
addSecondPass
in interfaceInFlightMetadataCollector
-
addSecondPass
- Specified by:
addSecondPass
in interfaceInFlightMetadataCollector
-
processSecondPasses
Ugh! But we need this done before we ask Envers to produce its entities. -
secondPassCompileForeignKeys
protected void secondPassCompileForeignKeys(Table table, Set<ForeignKey> done, MetadataBuildingContext buildingContext) throws MappingException - Throws:
MappingException
-
locateNaturalIdUniqueKeyBinder
- Specified by:
locateNaturalIdUniqueKeyBinder
in interfaceInFlightMetadataCollector
-
registerNaturalIdUniqueKeyBinder
- Specified by:
registerNaturalIdUniqueKeyBinder
in interfaceInFlightMetadataCollector
-
isInSecondPass
public boolean isInSecondPass()- Specified by:
isInSecondPass
in interfaceInFlightMetadataCollector
-
buildMetadataInstance
Builds the complete and immutable Metadata instance from the collected info.- Returns:
- The complete and immutable Metadata instance
-
getDefaultCatalog
- Specified by:
getDefaultCatalog
in interfaceGeneratorSettings
-
getDefaultSchema
- Specified by:
getDefaultSchema
in interfaceGeneratorSettings
-
getSqlStringGenerationContext
- Specified by:
getSqlStringGenerationContext
in interfaceGeneratorSettings
-