Package org.hibernate.boot.spi
Interface InFlightMetadataCollector
-
- All Superinterfaces:
Mapping,Metadata,MetadataImplementor
public interface InFlightMetadataCollector extends Mapping, MetadataImplementor
An in-flight representation of Metadata while Metadata is being built.- Since:
- 5.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceInFlightMetadataCollector.DelayedPropertyReferenceHandlerstatic classInFlightMetadataCollector.DuplicateSecondaryTableExceptionstatic interfaceInFlightMetadataCollector.EntityTableXref
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description voidaddAnyMetaDef(AnyMetaDef defAnn)voidaddAttributeConverter(java.lang.Class<? extends AttributeConverter> converterClass)voidaddAttributeConverter(ConverterDescriptor descriptor)default voidaddAttributeConverter(AttributeConverterDefinition converter)Deprecated.AttributeConverterDefinition forces early resolution of the AttributeConverter instance, which precludes resolution of the converter fromManagedBeanRegistry(CDI, etc).voidaddAuxiliaryDatabaseObject(AuxiliaryDatabaseObject auxiliaryDatabaseObject)Add metadata pertaining to an auxiliary database object to this repository.AnnotatedClassTypeaddClassType(org.hibernate.annotations.common.reflection.XClass clazz)voidaddCollectionBinding(Collection collection)Add collection mapping metadata to this repository.voidaddColumnNameBinding(Table table, java.lang.String logicalColumnName, Column column)voidaddColumnNameBinding(Table table, Identifier logicalColumnName, Column column)voidaddDefaultIdentifierGenerator(IdentifierGeneratorDefinition generatorDefinition)voidaddDefaultNamedNativeQuery(NamedSQLQueryDefinition query)voidaddDefaultNamedProcedureCallDefinition(NamedProcedureCallDefinition procedureCallDefinition)voidaddDefaultQuery(NamedQueryDefinition queryDefinition)voidaddDefaultResultSetMapping(ResultSetMappingDefinition definition)voidaddDelayedPropertyReferenceHandler(InFlightMetadataCollector.DelayedPropertyReferenceHandler handler)TableaddDenormalizedTable(java.lang.String schema, java.lang.String catalog, java.lang.String name, boolean isAbstract, java.lang.String subselect, Table includedTable)Adds a 'denormalized table' to this repository.voidaddEntityBinding(PersistentClass persistentClass)Add the PersistentClass for an entity mapping.InFlightMetadataCollector.EntityTableXrefaddEntityTableXref(java.lang.String entityName, Identifier primaryTableLogicalName, Table primaryTable, InFlightMetadataCollector.EntityTableXref superEntityTableXref)voidaddFetchProfile(FetchProfile profile)voidaddFilterDefinition(FilterDefinition definition)Adds a filter definition to this repository.voidaddIdentifierGenerator(IdentifierGeneratorDefinition generatorDefinition)voidaddImport(java.lang.String entityName, java.lang.String rename)Adds an import (HQL entity rename).voidaddJpaIndexHolders(Table table, java.util.List<JPAIndexHolder> jpaIndexHolders)voidaddMappedBy(java.lang.String name, java.lang.String mappedBy, java.lang.String propertyName)voidaddMappedSuperclass(java.lang.Class type, MappedSuperclass mappedSuperclass)voidaddNamedEntityGraph(NamedEntityGraphDefinition namedEntityGraphDefinition)Adds metadata for a named entity graph to this repositoryvoidaddNamedNativeQuery(NamedSQLQueryDefinition query)Adds metadata for a named SQL query to this repository.voidaddNamedProcedureCallDefinition(NamedProcedureCallDefinition definition)Adds metadata for a named stored procedure call to this repository.voidaddNamedQuery(NamedQueryDefinition query)Adds metadata for a named query to this repository.voidaddPropertyAnnotatedWithMapsId(org.hibernate.annotations.common.reflection.XClass entity, PropertyData propertyAnnotatedElement)voidaddPropertyAnnotatedWithMapsIdSpecj(org.hibernate.annotations.common.reflection.XClass entity, PropertyData specJPropertyData, java.lang.String s)voidaddPropertyReference(java.lang.String entityName, java.lang.String propertyName)voidaddPropertyReferencedAssociation(java.lang.String s, java.lang.String propertyName, java.lang.String syntheticPropertyName)voidaddResultSetMapping(ResultSetMappingDefinition sqlResultSetMapping)Adds the metadata for a named SQL result set mapping to this repository.voidaddSecondPass(SecondPass secondPass)voidaddSecondPass(SecondPass sp, boolean onTopOfTheQueue)TableaddTable(java.lang.String schema, java.lang.String catalog, java.lang.String name, java.lang.String subselect, boolean isAbstract)Adds table metadata to this repository returning the created metadata instance.voidaddTableNameBinding(java.lang.String schema, java.lang.String catalog, java.lang.String logicalName, java.lang.String realTableName, Table denormalizedSuperTable)voidaddTableNameBinding(Identifier logicalName, Table table)voidaddToOneAndIdProperty(org.hibernate.annotations.common.reflection.XClass entity, PropertyData propertyAnnotatedElement)voidaddTypeDefinition(TypeDefinition typeDefinition)Adds a type definition to this metadata repository.voidaddUniqueConstraintHolders(Table table, java.util.List<UniqueConstraintHolder> uniqueConstraints)voidaddUniqueConstraints(Table table, java.util.List uniqueConstraints)voidaddUniquePropertyReference(java.lang.String entityName, java.lang.String propertyName)AnyMetaDefgetAnyMetaDef(java.lang.String anyMetaDefName)ConverterAutoApplyHandlergetAttributeConverterAutoApplyHandler()BootstrapContextgetBootstrapContext()org.hibernate.boot.internal.ClassmateContextgetClassmateContext()Deprecated.UseBootstrapContext.getClassmateContext()instead.AnnotatedClassTypegetClassType(org.hibernate.annotations.common.reflection.XClass clazz)java.util.Map<java.lang.String,PersistentClass>getEntityBindingMap()Needed for SecondPass handlingInFlightMetadataCollector.EntityTableXrefgetEntityTableXref(java.lang.String entityName)java.lang.StringgetFromMappedBy(java.lang.String ownerEntityName, java.lang.String propertyName)java.util.Map<java.lang.String,Join>getJoins(java.lang.String entityName)java.lang.StringgetLogicalColumnName(Table table, java.lang.String physicalName)java.lang.StringgetLogicalColumnName(Table table, Identifier physicalName)java.lang.StringgetLogicalTableName(Table ownerTable)MappedSuperclassgetMappedSuperclass(java.lang.Class type)java.lang.StringgetPhysicalColumnName(Table table, java.lang.String logicalName)java.lang.StringgetPhysicalColumnName(Table table, Identifier logicalName)java.lang.StringgetPhysicalTableName(java.lang.String logicalName)java.lang.StringgetPhysicalTableName(Identifier logicalName)PropertyDatagetPropertyAnnotatedWithIdAndToOne(org.hibernate.annotations.common.reflection.XClass persistentXClass, java.lang.String propertyName)PropertyDatagetPropertyAnnotatedWithMapsId(org.hibernate.annotations.common.reflection.XClass persistentXClass, java.lang.String propertyName)java.lang.StringgetPropertyReferencedAssociation(java.lang.String entityName, java.lang.String mappedBy)booleanisInSecondPass()NaturalIdUniqueKeyBinderlocateNaturalIdUniqueKeyBinder(java.lang.String entityName)voidregisterNaturalIdUniqueKeyBinder(java.lang.String entityName, NaturalIdUniqueKeyBinder ukBinder)-
Methods inherited from interface org.hibernate.engine.spi.Mapping
getIdentifierGeneratorFactory, getIdentifierPropertyName, getIdentifierType, getReferencedPropertyType
-
Methods inherited from interface org.hibernate.boot.Metadata
buildSessionFactory, collectTableMappings, getCollectionBinding, getCollectionBindings, getDatabase, getEntityBinding, getEntityBindings, getFetchProfile, getFetchProfiles, getFilterDefinition, getFilterDefinitions, getIdentifierGenerator, getImports, getNamedEntityGraph, getNamedEntityGraphs, getNamedNativeQueryDefinition, getNamedNativeQueryDefinitions, getNamedProcedureCallDefinitions, getNamedQueryDefinition, getNamedQueryDefinitions, getResultSetMapping, getResultSetMappingDefinitions, getSessionFactoryBuilder, getSqlFunctionMap, getTypeDefinition, getUUID
-
Methods inherited from interface org.hibernate.boot.spi.MetadataImplementor
buildNamedQueryRepository, getMappedSuperclassMappingsCopy, getMetadataBuildingOptions, getTypeConfiguration, getTypeResolver, initSessionFactory, validate
-
-
-
-
Method Detail
-
getBootstrapContext
BootstrapContext getBootstrapContext()
-
addEntityBinding
void addEntityBinding(PersistentClass persistentClass) throws DuplicateMappingException
Add the PersistentClass for an entity mapping.- Parameters:
persistentClass- The entity metadata- Throws:
DuplicateMappingException- Indicates there was already an entry corresponding to the given entity name.
-
getEntityBindingMap
java.util.Map<java.lang.String,PersistentClass> getEntityBindingMap()
Needed for SecondPass handling
-
addImport
void addImport(java.lang.String entityName, java.lang.String rename) throws DuplicateMappingExceptionAdds an import (HQL entity rename).- Parameters:
entityName- The entity name being renamed.rename- The rename- Throws:
DuplicateMappingException- If rename already is mapped to another entity name in this repository.
-
addCollectionBinding
void addCollectionBinding(Collection collection) throws DuplicateMappingException
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(java.lang.String schema, java.lang.String catalog, java.lang.String name, java.lang.String subselect, boolean isAbstract)
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(java.lang.String schema, java.lang.String catalog, java.lang.String name, boolean isAbstract, java.lang.String subselect, Table includedTable) 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- ???- Returns:
- The created table metadata.
- Throws:
DuplicateMappingException- If such a table mapping already exists.
-
addNamedQuery
void addNamedQuery(NamedQueryDefinition query) throws DuplicateMappingException
Adds metadata for a named query to this repository.- Parameters:
query- The metadata- Throws:
DuplicateMappingException- If a query already exists with that name.
-
addNamedNativeQuery
void addNamedNativeQuery(NamedSQLQueryDefinition query) throws DuplicateMappingException
Adds metadata for a named SQL query to this repository.- Parameters:
query- The metadata- Throws:
DuplicateMappingException- If a query already exists with that name.
-
addResultSetMapping
void addResultSetMapping(ResultSetMappingDefinition sqlResultSetMapping) throws DuplicateMappingException
Adds the metadata for a named SQL result set mapping to this repository.- Parameters:
sqlResultSetMapping- The metadata- Throws:
DuplicateMappingException- If metadata for another SQL result mapping was already found under the given name.
-
addNamedProcedureCallDefinition
void addNamedProcedureCallDefinition(NamedProcedureCallDefinition definition) throws DuplicateMappingException
Adds metadata for a named stored procedure call to this repository.- Parameters:
definition- The procedure call information- Throws:
DuplicateMappingException- If a query already exists with that name.
-
addNamedEntityGraph
void addNamedEntityGraph(NamedEntityGraphDefinition namedEntityGraphDefinition)
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
void addTypeDefinition(TypeDefinition typeDefinition)
Adds a type definition to this metadata repository.- Parameters:
typeDefinition- The named type definition to add.- Throws:
DuplicateMappingException- If a TypeDefinition already exists with that name.
-
addFilterDefinition
void addFilterDefinition(FilterDefinition definition)
Adds a filter definition to this repository.- Parameters:
definition- The filter definition to add.- Throws:
DuplicateMappingException- If a FilterDefinition already exists with that name.
-
addAuxiliaryDatabaseObject
void addAuxiliaryDatabaseObject(AuxiliaryDatabaseObject auxiliaryDatabaseObject)
Add metadata pertaining to an auxiliary database object to this repository.- Parameters:
auxiliaryDatabaseObject- The metadata.
-
addFetchProfile
void addFetchProfile(FetchProfile profile)
-
addIdentifierGenerator
void addIdentifierGenerator(IdentifierGeneratorDefinition generatorDefinition)
-
addAttributeConverter
@Deprecated default void addAttributeConverter(AttributeConverterDefinition converter)
Deprecated.AttributeConverterDefinition forces early resolution of the AttributeConverter instance, which precludes resolution of the converter fromManagedBeanRegistry(CDI, etc). Instead one of: *addAttributeConverter(ConverterDescriptor)*addAttributeConverter(Class)*addAttributeConverter(Class)
-
addAttributeConverter
void addAttributeConverter(ConverterDescriptor descriptor)
-
addAttributeConverter
void addAttributeConverter(java.lang.Class<? extends AttributeConverter> converterClass)
-
getAttributeConverterAutoApplyHandler
ConverterAutoApplyHandler getAttributeConverterAutoApplyHandler()
-
addSecondPass
void addSecondPass(SecondPass secondPass)
-
addSecondPass
void addSecondPass(SecondPass sp, boolean onTopOfTheQueue)
-
addTableNameBinding
void addTableNameBinding(Identifier logicalName, Table table)
-
addTableNameBinding
void addTableNameBinding(java.lang.String schema, java.lang.String catalog, java.lang.String logicalName, java.lang.String realTableName, Table denormalizedSuperTable)
-
getLogicalTableName
java.lang.String getLogicalTableName(Table ownerTable)
-
getPhysicalTableName
java.lang.String getPhysicalTableName(Identifier logicalName)
-
getPhysicalTableName
java.lang.String getPhysicalTableName(java.lang.String logicalName)
-
addColumnNameBinding
void addColumnNameBinding(Table table, Identifier logicalColumnName, Column column)
-
addColumnNameBinding
void addColumnNameBinding(Table table, java.lang.String logicalColumnName, Column column)
-
getPhysicalColumnName
java.lang.String getPhysicalColumnName(Table table, Identifier logicalName) throws MappingException
- Throws:
MappingException
-
getPhysicalColumnName
java.lang.String getPhysicalColumnName(Table table, java.lang.String logicalName) throws MappingException
- Throws:
MappingException
-
getLogicalColumnName
java.lang.String getLogicalColumnName(Table table, Identifier physicalName)
-
getLogicalColumnName
java.lang.String getLogicalColumnName(Table table, java.lang.String physicalName)
-
addDefaultIdentifierGenerator
void addDefaultIdentifierGenerator(IdentifierGeneratorDefinition generatorDefinition)
-
addDefaultQuery
void addDefaultQuery(NamedQueryDefinition queryDefinition)
-
addDefaultNamedNativeQuery
void addDefaultNamedNativeQuery(NamedSQLQueryDefinition query)
-
addDefaultResultSetMapping
void addDefaultResultSetMapping(ResultSetMappingDefinition definition)
-
addDefaultNamedProcedureCallDefinition
void addDefaultNamedProcedureCallDefinition(NamedProcedureCallDefinition procedureCallDefinition)
-
addAnyMetaDef
void addAnyMetaDef(AnyMetaDef defAnn)
-
getAnyMetaDef
AnyMetaDef getAnyMetaDef(java.lang.String anyMetaDefName)
-
addClassType
AnnotatedClassType addClassType(org.hibernate.annotations.common.reflection.XClass clazz)
-
getClassType
AnnotatedClassType getClassType(org.hibernate.annotations.common.reflection.XClass clazz)
-
addMappedSuperclass
void addMappedSuperclass(java.lang.Class type, MappedSuperclass mappedSuperclass)
-
getMappedSuperclass
MappedSuperclass getMappedSuperclass(java.lang.Class type)
-
getPropertyAnnotatedWithMapsId
PropertyData getPropertyAnnotatedWithMapsId(org.hibernate.annotations.common.reflection.XClass persistentXClass, java.lang.String propertyName)
-
addPropertyAnnotatedWithMapsId
void addPropertyAnnotatedWithMapsId(org.hibernate.annotations.common.reflection.XClass entity, PropertyData propertyAnnotatedElement)
-
addPropertyAnnotatedWithMapsIdSpecj
void addPropertyAnnotatedWithMapsIdSpecj(org.hibernate.annotations.common.reflection.XClass entity, PropertyData specJPropertyData, java.lang.String s)
-
addToOneAndIdProperty
void addToOneAndIdProperty(org.hibernate.annotations.common.reflection.XClass entity, PropertyData propertyAnnotatedElement)
-
getPropertyAnnotatedWithIdAndToOne
PropertyData getPropertyAnnotatedWithIdAndToOne(org.hibernate.annotations.common.reflection.XClass persistentXClass, java.lang.String propertyName)
-
isInSecondPass
boolean isInSecondPass()
-
locateNaturalIdUniqueKeyBinder
NaturalIdUniqueKeyBinder locateNaturalIdUniqueKeyBinder(java.lang.String entityName)
-
registerNaturalIdUniqueKeyBinder
void registerNaturalIdUniqueKeyBinder(java.lang.String entityName, NaturalIdUniqueKeyBinder ukBinder)
-
getClassmateContext
@Deprecated org.hibernate.boot.internal.ClassmateContext getClassmateContext()
Deprecated.UseBootstrapContext.getClassmateContext()instead.Access to the shared Classmate objects used throughout Hibernate's bootstrap process.- Returns:
- Access to the shared Classmate delegates.
-
addDelayedPropertyReferenceHandler
void addDelayedPropertyReferenceHandler(InFlightMetadataCollector.DelayedPropertyReferenceHandler handler)
-
addPropertyReference
void addPropertyReference(java.lang.String entityName, java.lang.String propertyName)
-
addUniquePropertyReference
void addUniquePropertyReference(java.lang.String entityName, java.lang.String propertyName)
-
addPropertyReferencedAssociation
void addPropertyReferencedAssociation(java.lang.String s, java.lang.String propertyName, java.lang.String syntheticPropertyName)
-
getPropertyReferencedAssociation
java.lang.String getPropertyReferencedAssociation(java.lang.String entityName, java.lang.String mappedBy)
-
addMappedBy
void addMappedBy(java.lang.String name, java.lang.String mappedBy, java.lang.String propertyName)
-
getFromMappedBy
java.lang.String getFromMappedBy(java.lang.String ownerEntityName, java.lang.String propertyName)
-
addUniqueConstraints
void addUniqueConstraints(Table table, java.util.List uniqueConstraints)
-
addUniqueConstraintHolders
void addUniqueConstraintHolders(Table table, java.util.List<UniqueConstraintHolder> uniqueConstraints)
-
addJpaIndexHolders
void addJpaIndexHolders(Table table, java.util.List<JPAIndexHolder> jpaIndexHolders)
-
getEntityTableXref
InFlightMetadataCollector.EntityTableXref getEntityTableXref(java.lang.String entityName)
-
addEntityTableXref
InFlightMetadataCollector.EntityTableXref addEntityTableXref(java.lang.String entityName, Identifier primaryTableLogicalName, Table primaryTable, InFlightMetadataCollector.EntityTableXref superEntityTableXref)
-
getJoins
java.util.Map<java.lang.String,Join> getJoins(java.lang.String entityName)
-
-