Package org.hibernate.boot.spi
Interface InFlightMetadataCollector
- All Superinterfaces:
MappingContext
,Metadata
,MetadataImplementor
- All Known Implementing Classes:
DialectFeatureChecks.FakeMetadataBuildingContext
,InFlightMetadataCollectorImpl
An in-flight representation of
Metadata
while it is being built.- Since:
- 5.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
static interface
static class
static interface
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttributeConverter
(Class<? extends AttributeConverter<?, ?>> converterClass) Deprecated.void
addAttributeConverter
(ConverterDescriptor descriptor) Deprecated.void
addAuxiliaryDatabaseObject
(AuxiliaryDatabaseObject auxiliaryDatabaseObject) Add metadata pertaining to an auxiliary database object to this repository.addClassType
(org.hibernate.models.spi.ClassDetails classDetails) 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 logicalColumnName, Column column) void
addColumnNameBinding
(Table table, Identifier logicalColumnName, Column column) void
addDefaultIdentifierGenerator
(IdentifierGeneratorDefinition generatorDefinition) void
void
addDefaultNamedProcedureCall
(NamedProcedureCallDefinitionImpl procedureCallDefinition) void
addDefaultQuery
(NamedHqlQueryDefinition<?> queryDefinition) void
void
addDelayedPropertyReferenceHandler
(InFlightMetadataCollector.DelayedPropertyReferenceHandler handler) addDenormalizedTable
(String schema, String catalog, String name, boolean isAbstract, String subselect, 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 definition) Adds a filter definition to this repository.void
addIdentifierGenerator
(IdentifierGeneratorDefinition generatorDefinition) void
Adds an import (for use in HQL).void
addJavaTypeRegistration
(Class<?> javaType, JavaType<?> jtd) void
addJdbcTypeRegistration
(int typeCode, JdbcType jdbcType) void
addMappedBy
(String name, String mappedBy, String propertyName) void
addMappedSuperclass
(Class<?> type, MappedSuperclass mappedSuperclass) void
addNamedEntityGraph
(NamedEntityGraphDefinition namedEntityGraphDefinition) 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<?> query) Adds metadata for a named query to this repository.void
addPropertyAnnotatedWithMapsId
(org.hibernate.models.spi.ClassDetails entityClassDetails, PropertyData propertyAnnotatedElement) void
addPropertyAnnotatedWithMapsIdSpecj
(org.hibernate.models.spi.ClassDetails entityClassDetails, PropertyData specJPropertyData, String s) void
addPropertyReference
(String entityName, String propertyName) void
addPropertyReferencedAssociation
(String s, String propertyName, String syntheticPropertyName) void
addRegisteredConversion
(RegisteredConversion conversion) Deprecated.void
addResultSetMapping
(NamedResultSetMappingDescriptor resultSetMappingDefinition) Adds the metadata for a named SQL result set mapping to this collector.void
addSecondPass
(SecondPass secondPass) void
addSecondPass
(SecondPass sp, boolean onTopOfTheQueue) addTable
(String schema, String catalog, String name, String subselect, 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 entityClassDetails, PropertyData propertyAnnotatedElement) void
addTypeDefinition
(TypeDefinition typeDefinition) Deprecated.UsegetTypeDefinitionRegistry()
insteadvoid
addUniquePropertyReference
(String entityName, String propertyName) findCollectionTypeRegistration
(CollectionClassification classification) Class<? extends CompositeUserType<?>>
findRegisteredCompositeUserType
(Class<?> embeddableType) Class<? extends EmbeddableInstantiator>
findRegisteredEmbeddableInstantiator
(Class<?> embeddableType) findRegisteredUserType
(Class<?> basicType) default org.hibernate.models.spi.AnnotationDescriptorRegistry
Deprecated.default org.hibernate.models.spi.ClassDetailsRegistry
getClassType
(org.hibernate.models.spi.ClassDetails classDetails) Obtain theConverterRegistry
which may be used to registerAttributeConverter
s.List<org.hibernate.models.spi.ClassDetails>
getEmbeddableSubclasses
(org.hibernate.models.spi.ClassDetails superclass) A map ofPersistentClass
by entity name.getEntityTableXref
(String entityName) getFromMappedBy
(String ownerEntityName, String propertyName) getLogicalColumnName
(Table table, String physicalName) getLogicalColumnName
(Table table, Identifier physicalName) getLogicalTableName
(Table ownerTable) getMappedSuperclass
(Class<?> type) getPhysicalColumnName
(Table table, String logicalName) getPhysicalColumnName
(Table table, Identifier logicalName) getPhysicalTableName
(String logicalName) getPhysicalTableName
(Identifier logicalName) getPropertyAnnotatedWithIdAndToOne
(org.hibernate.models.spi.ClassDetails persistentClassDetails, String propertyName) getPropertyAnnotatedWithMapsId
(org.hibernate.models.spi.ClassDetails persistentClassDetails, String propertyName) getPropertyReferencedAssociation
(String entityName, String mappedBy) org.hibernate.models.spi.SourceModelBuildingContext
Access to theTypeDefinitionRegistry
, which may be used to add type definitions to this metadata repository.boolean
locateNaturalIdUniqueKeyBinder
(String entityName) 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<?> embeddableType, Class<? extends UserType<?>> userType) void
Methods inherited from interface org.hibernate.type.MappingContext
getIdentifierPropertyName, getIdentifierType, getReferencedPropertyType
Methods inherited from interface org.hibernate.boot.Metadata
buildSessionFactory, collectTableMappings, getCollectionBinding, getCollectionBindings, getContributors, getDatabase, getEntityBinding, getEntityBindings, getFetchProfile, getFetchProfiles, getFilterDefinition, getFilterDefinitions, getIdentifierGenerator, getImports, getNamedEntityGraph, getNamedEntityGraphs, getNamedHqlQueryMapping, getNamedNativeQueryMapping, getNamedProcedureCallMapping, getResultSetMapping, getSessionFactoryBuilder, getSqlFunctionMap, getTypeDefinition, getUUID, visitNamedHqlQueryDefinitions, visitNamedNativeQueryDefinitions, visitNamedProcedureCallDefinition, visitNamedResultSetMappingDefinition
Methods inherited from interface org.hibernate.boot.spi.MetadataImplementor
buildNamedQueryRepository, getFunctionRegistry, getGenericComponent, getMappedSuperclassMappingsCopy, getMetadataBuildingOptions, getTypeConfiguration, initSessionFactory, orderColumns, resolveEmbeddableDiscriminatorType, validate, visitRegisteredComponents
-
Method Details
-
getBootstrapContext
BootstrapContext getBootstrapContext() -
getSourceModelBuildingContext
org.hibernate.models.spi.SourceModelBuildingContext getSourceModelBuildingContext() -
getClassDetailsRegistry
default org.hibernate.models.spi.ClassDetailsRegistry getClassDetailsRegistry() -
getAnnotationDescriptorRegistry
default org.hibernate.models.spi.AnnotationDescriptorRegistry getAnnotationDescriptorRegistry() -
getGlobalRegistrations
GlobalRegistrations getGlobalRegistrations() -
getPersistenceUnitMetadata
PersistenceUnitMetadata getPersistenceUnitMetadata() -
addEntityBinding
Add thePersistentClass
for an entity mapping.- Parameters:
persistentClass
- The entity metadata- Throws:
DuplicateMappingException
- Indicates there was already an entry corresponding to the given entity name.
-
getEntityBindingMap
Map<String,PersistentClass> getEntityBindingMap()A map ofPersistentClass
by entity name. Needed forSecondPass
handling. -
registerComponent
-
registerGenericComponent
-
registerEmbeddableSubclass
void registerEmbeddableSubclass(org.hibernate.models.spi.ClassDetails superclass, org.hibernate.models.spi.ClassDetails subclass) -
getEmbeddableSubclasses
List<org.hibernate.models.spi.ClassDetails> getEmbeddableSubclasses(org.hibernate.models.spi.ClassDetails superclass) -
addImport
Adds an import (for use in HQL).- Parameters:
importName
- The name to be used in HQLclassName
- The fully-qualified name of the class- Throws:
DuplicateMappingException
- If className already is mapped to another entity name in this repository.
-
addCollectionBinding
Add collection mapping metadata to this repository.- Parameters:
collection
- The collection metadata- Throws:
DuplicateMappingException
- Indicates there was already an entry corresponding to the given collection role
-
addTable
Table addTable(String schema, String catalog, String name, String subselect, boolean isAbstract, MetadataBuildingContext buildingContext) Adds table metadata to this repository returning the created metadata instance.- Parameters:
schema
- The named schema in which the table belongs (or null).catalog
- The named catalog in which the table belongs (or null).name
- The table namesubselect
- 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
Table addDenormalizedTable(String schema, String catalog, String name, boolean isAbstract, String subselect, Table includedTable, MetadataBuildingContext buildingContext) throws DuplicateMappingException Adds a 'denormalized table' to this repository.- Parameters:
schema
- The named schema in which the table belongs (or null).catalog
- 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)?subselect
- 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.
-
addNamedQuery
Adds metadata for a named query to this repository.- Parameters:
query
- The metadata- Throws:
DuplicateMappingException
- If a query already exists with that name.
-
addNamedNativeQuery
Adds metadata for a named SQL query to this collector.- Throws:
DuplicateMappingException
-
addResultSetMapping
void addResultSetMapping(NamedResultSetMappingDescriptor resultSetMappingDefinition) throws DuplicateMappingException Adds the metadata for a named SQL result set mapping to this collector.- Throws:
DuplicateMappingException
-
addNamedProcedureCallDefinition
void addNamedProcedureCallDefinition(NamedProcedureCallDefinition definition) throws DuplicateMappingException Adds metadata for a named stored procedure call to this collector.- Throws:
DuplicateMappingException
-
addNamedEntityGraph
Adds metadata for a named entity graph to this repository- Parameters:
namedEntityGraphDefinition
- The procedure call information- Throws:
DuplicateMappingException
- If an entity graph already exists with that name.
-
addTypeDefinition
Deprecated.UsegetTypeDefinitionRegistry()
insteadAdds a type definition to this metadata repository.- Parameters:
typeDefinition
- The named type definition to add.- Throws:
DuplicateMappingException
- If aTypeDefinition
already exists with that name.- See Also:
-
getTypeDefinitionRegistry
TypeDefinitionRegistry getTypeDefinitionRegistry()Access to theTypeDefinitionRegistry
, which may be used to add type definitions to this metadata repository. -
addFilterDefinition
Adds a filter definition to this repository.- Parameters:
definition
- The filter definition to add.- Throws:
DuplicateMappingException
- If aFilterDefinition
already exists with that name.
-
addAuxiliaryDatabaseObject
Add metadata pertaining to an auxiliary database object to this repository.- Parameters:
auxiliaryDatabaseObject
- The metadata.
-
addFetchProfile
Add aFetchProfile
. -
addIdentifierGenerator
-
getConverterRegistry
ConverterRegistry getConverterRegistry()Obtain theConverterRegistry
which may be used to registerAttributeConverter
s. -
addAttributeConverter
Deprecated.Apply the descriptor for anAttributeConverter
-
addAttributeConverter
@Deprecated(since="6.2") void addAttributeConverter(Class<? extends AttributeConverter<?, ?>> converterClass) Deprecated.Apply anAttributeConverter
-
addRegisteredConversion
Deprecated. -
getAttributeConverterAutoApplyHandler
Deprecated. -
addSecondPass
-
addSecondPass
-
addTableNameBinding
-
addTableNameBinding
-
getLogicalTableName
-
getPhysicalTableName
-
getPhysicalTableName
-
addColumnNameBinding
-
addColumnNameBinding
-
getPhysicalColumnName
- Throws:
MappingException
-
getPhysicalColumnName
- Throws:
MappingException
-
getLogicalColumnName
-
getLogicalColumnName
-
addDefaultIdentifierGenerator
-
addDefaultQuery
-
addDefaultNamedNativeQuery
-
addDefaultResultSetMapping
-
addDefaultNamedProcedureCall
-
addClassType
-
getClassType
-
addMappedSuperclass
-
getMappedSuperclass
-
getPropertyAnnotatedWithMapsId
PropertyData getPropertyAnnotatedWithMapsId(org.hibernate.models.spi.ClassDetails persistentClassDetails, String propertyName) -
addPropertyAnnotatedWithMapsId
void addPropertyAnnotatedWithMapsId(org.hibernate.models.spi.ClassDetails entityClassDetails, PropertyData propertyAnnotatedElement) -
addPropertyAnnotatedWithMapsIdSpecj
void addPropertyAnnotatedWithMapsIdSpecj(org.hibernate.models.spi.ClassDetails entityClassDetails, PropertyData specJPropertyData, String s) -
addToOneAndIdProperty
void addToOneAndIdProperty(org.hibernate.models.spi.ClassDetails entityClassDetails, PropertyData propertyAnnotatedElement) -
getPropertyAnnotatedWithIdAndToOne
PropertyData getPropertyAnnotatedWithIdAndToOne(org.hibernate.models.spi.ClassDetails persistentClassDetails, String propertyName) -
isInSecondPass
boolean isInSecondPass() -
locateNaturalIdUniqueKeyBinder
-
registerNaturalIdUniqueKeyBinder
-
registerValueMappingResolver
-
addJavaTypeRegistration
-
addJdbcTypeRegistration
-
registerEmbeddableInstantiator
void registerEmbeddableInstantiator(Class<?> embeddableType, Class<? extends EmbeddableInstantiator> instantiator) -
findRegisteredEmbeddableInstantiator
Class<? extends EmbeddableInstantiator> findRegisteredEmbeddableInstantiator(Class<?> embeddableType) -
registerCompositeUserType
void registerCompositeUserType(Class<?> embeddableType, Class<? extends CompositeUserType<?>> userType) -
findRegisteredCompositeUserType
-
registerUserType
-
findRegisteredUserType
-
addCollectionTypeRegistration
-
addCollectionTypeRegistration
void addCollectionTypeRegistration(CollectionClassification classification, InFlightMetadataCollector.CollectionTypeRegistrationDescriptor descriptor) -
findCollectionTypeRegistration
InFlightMetadataCollector.CollectionTypeRegistrationDescriptor findCollectionTypeRegistration(CollectionClassification classification) -
addDelayedPropertyReferenceHandler
void addDelayedPropertyReferenceHandler(InFlightMetadataCollector.DelayedPropertyReferenceHandler handler) -
addPropertyReference
-
addUniquePropertyReference
-
addPropertyReferencedAssociation
-
getPropertyReferencedAssociation
-
addMappedBy
-
getFromMappedBy
-
getEntityTableXref
-
addEntityTableXref
InFlightMetadataCollector.EntityTableXref addEntityTableXref(String entityName, Identifier primaryTableLogicalName, Table primaryTable, InFlightMetadataCollector.EntityTableXref superEntityTableXref) -
getJoins
-
getConverterRegistry()