Package org.hibernate.boot.spi
Interface InFlightMetadataCollector
- All Superinterfaces:
MappingContext,Metadata,MetadataImplementor
- All Known Implementing Classes:
InFlightMetadataCollectorImpl
An in-flight representation of
Metadata while it is being built.- Since:
- 5.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic interfacestatic classstatic interface -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttributeConverter(Class<? extends AttributeConverter<?, ?>> converterClass) Deprecated.voidaddAttributeConverter(ConverterDescriptor<?, ?> descriptor) Deprecated.voidaddAuxiliaryDatabaseObject(AuxiliaryDatabaseObject auxiliaryDatabaseObject) Add metadata pertaining to an auxiliary database object to this repository.addClassType(org.hibernate.models.spi.ClassDetails classDetails) voidaddCollectionBinding(Collection collection) Add collection mapping metadata to this repository.voidaddCollectionTypeRegistration(CollectionTypeRegistration registrationAnnotation) voidaddCollectionTypeRegistration(CollectionClassification classification, InFlightMetadataCollector.CollectionTypeRegistrationDescriptor descriptor) voidaddColumnNameBinding(Table table, String logicalColumnName, Column column) voidaddColumnNameBinding(Table table, Identifier logicalColumnName, Column column) voidaddDefaultIdentifierGenerator(IdentifierGeneratorDefinition generatorDefinition) voidvoidaddDefaultNamedProcedureCall(NamedProcedureCallDefinitionImpl procedureCallDefinition) voidaddDefaultQuery(NamedHqlQueryDefinition<?> queryDefinition) voidvoidaddDelayedPropertyReferenceHandler(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.voidaddEntityBinding(PersistentClass persistentClass) Add thePersistentClassfor an entity mapping.addEntityTableXref(String entityName, Identifier primaryTableLogicalName, Table primaryTable, InFlightMetadataCollector.EntityTableXref superEntityTableXref) voidaddFetchProfile(FetchProfile profile) Add aFetchProfile.voidaddFilterDefinition(FilterDefinition definition) Adds a filter definition to this repository.voidaddIdentifierGenerator(IdentifierGeneratorDefinition generatorDefinition) voidAdds an import (for use in HQL).voidaddJavaTypeRegistration(Class<?> javaType, JavaType<?> jtd) voidaddJdbcTypeRegistration(int typeCode, JdbcType jdbcType) voidaddMappedBy(String name, String mappedBy, String propertyName) voidaddMappedSuperclass(Class<?> type, MappedSuperclass mappedSuperclass) voidaddNamedEntityGraph(NamedEntityGraphDefinition namedEntityGraphDefinition) Adds metadata for a named entity graph to this repositoryvoidAdds metadata for a named SQL query to this collector.voidAdds metadata for a named stored procedure call to this collector.voidaddNamedQuery(NamedHqlQueryDefinition<?> query) Adds metadata for a named query to this repository.voidaddPropertyAnnotatedWithMapsId(org.hibernate.models.spi.ClassDetails entityClassDetails, PropertyData propertyAnnotatedElement) voidaddPropertyReference(String entityName, String propertyName) voidaddPropertyReferencedAssociation(String entityName, String propertyName, String syntheticPropertyName) voidaddRegisteredConversion(RegisteredConversion conversion) Deprecated.voidaddResultSetMapping(NamedResultSetMappingDescriptor resultSetMappingDefinition) Adds the metadata for a named SQL result set mapping to this collector.voidaddSecondPass(SecondPass secondPass) voidaddSecondPass(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.voidaddTableNameBinding(String schema, String catalog, String logicalName, String realTableName, Table denormalizedSuperTable) voidaddTableNameBinding(Identifier logicalName, Table table) voidaddToOneAndIdProperty(org.hibernate.models.spi.ClassDetails entityClassDetails, PropertyData propertyAnnotatedElement) voidaddTypeDefinition(TypeDefinition typeDefinition) Deprecated.UsegetTypeDefinitionRegistry()insteadvoidaddUniquePropertyReference(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.AnnotationDescriptorRegistryDeprecated.default org.hibernate.models.spi.ClassDetailsRegistrygetClassType(org.hibernate.models.spi.ClassDetails classDetails) Obtain theConverterRegistrywhich may be used to registerAttributeConverters.List<org.hibernate.models.spi.ClassDetails> getEmbeddableSubclasses(org.hibernate.models.spi.ClassDetails superclass) A map ofPersistentClassby 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) default org.hibernate.models.spi.ModelsContextDeprecated.Use BootstrapContext.getModelsContext() instead.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) Access to theTypeDefinitionRegistry, which may be used to add type definitions to this metadata repository.booleanlocateNaturalIdUniqueKeyBinder(String entityName) voidregisterComponent(Component component) voidregisterCompositeUserType(Class<?> embeddableType, Class<? extends CompositeUserType<?>> userType) voidregisterEmbeddableInstantiator(Class<?> embeddableType, Class<? extends EmbeddableInstantiator> instantiator) voidregisterEmbeddableSubclass(org.hibernate.models.spi.ClassDetails superclass, org.hibernate.models.spi.ClassDetails subclass) voidregisterGenericComponent(Component component) voidregisterNaturalIdUniqueKeyBinder(String entityName, NaturalIdUniqueKeyBinder ukBinder) voidregisterUserType(Class<?> embeddableType, Class<? extends UserType<?>> userType) voidMethods inherited from interface org.hibernate.type.MappingContext
getIdentifierPropertyName, getIdentifierType, getReferencedPropertyTypeMethods inherited from interface org.hibernate.boot.Metadata
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, visitNamedResultSetMappingDefinitionMethods inherited from interface org.hibernate.boot.spi.MetadataImplementor
buildNamedQueryRepository, buildSessionFactory, getFunctionRegistry, getGenericComponent, getMappedSuperclassMappingsCopy, getMetadataBuildingOptions, getTypeConfiguration, initSessionFactory, orderColumns, resolveEmbeddableDiscriminatorType, validate, visitRegisteredComponents
-
Method Details
-
getBootstrapContext
BootstrapContext getBootstrapContext() -
getModelsContext
Deprecated.Use BootstrapContext.getModelsContext() instead. -
getClassDetailsRegistry
default org.hibernate.models.spi.ClassDetailsRegistry getClassDetailsRegistry() -
getAnnotationDescriptorRegistry
default org.hibernate.models.spi.AnnotationDescriptorRegistry getAnnotationDescriptorRegistry() -
getGlobalRegistrations
GlobalRegistrations getGlobalRegistrations() -
getPersistenceUnitMetadata
PersistenceUnitMetadata getPersistenceUnitMetadata() -
addEntityBinding
Add thePersistentClassfor 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 ofPersistentClassby entity name. Needed forSecondPasshandling. -
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 aTypeDefinitionalready 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 aFilterDefinitionalready 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 theConverterRegistrywhich may be used to registerAttributeConverters. -
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) -
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()