Package org.hibernate.boot.spi
Interface InFlightMetadataCollector
-
- All Superinterfaces:
Mapping
,Metadata
,MetadataImplementor
- All Known Implementing Classes:
InFlightMetadataCollectorImpl
public interface InFlightMetadataCollector extends MetadataImplementor
An in-flight representation ofMetadata
while it is being built.- Since:
- 5.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
InFlightMetadataCollector.CollectionTypeRegistrationDescriptor
static interface
InFlightMetadataCollector.DelayedPropertyReferenceHandler
static class
InFlightMetadataCollector.DuplicateSecondaryTableException
static interface
InFlightMetadataCollector.EntityTableXref
-
Method Summary
-
Methods inherited from interface org.hibernate.engine.spi.Mapping
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, validate, visitRegisteredComponents
-
-
-
-
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
Map<String,PersistentClass> getEntityBindingMap()
Needed for SecondPass handling
-
registerComponent
void registerComponent(Component component)
-
registerGenericComponent
void registerGenericComponent(Component component)
-
addImport
void addImport(String importName, String className) throws DuplicateMappingException
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
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(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
void addNamedQuery(NamedHqlQueryDefinition 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(NamedNativeQueryDefinition query) throws DuplicateMappingException
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
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
@Deprecated void addTypeDefinition(TypeDefinition typeDefinition)
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()
-
getTypeDefinitionRegistry
TypeDefinitionRegistry getTypeDefinitionRegistry()
Access to theTypeDefinitionRegistry
, which may be used to add type definitions to this metadata repository.
-
addFilterDefinition
void addFilterDefinition(FilterDefinition definition)
Adds a filter definition to this repository.- Parameters:
definition
- The filter definition to add.- Throws:
DuplicateMappingException
- If aFilterDefinition
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)
Add aFetchProfile
.
-
addIdentifierGenerator
void addIdentifierGenerator(IdentifierGeneratorDefinition generatorDefinition)
-
getConverterRegistry
ConverterRegistry getConverterRegistry()
Obtain theConverterRegistry
which may be used to registerAttributeConverter
s.
-
addAttributeConverter
@Deprecated(since="6.2") void addAttributeConverter(ConverterDescriptor descriptor)
Deprecated.Apply the descriptor for anAttributeConverter
-
addAttributeConverter
@Deprecated(since="6.2") void addAttributeConverter(Class<? extends AttributeConverter<?,?>> converterClass)
Deprecated.Apply anAttributeConverter
-
addRegisteredConversion
@Deprecated(since="6.2") void addRegisteredConversion(RegisteredConversion conversion)
Deprecated.
-
getAttributeConverterAutoApplyHandler
@Deprecated(since="6.2") ConverterAutoApplyHandler getAttributeConverterAutoApplyHandler()
Deprecated.
-
addSecondPass
void addSecondPass(SecondPass secondPass)
-
addSecondPass
void addSecondPass(SecondPass sp, boolean onTopOfTheQueue)
-
addTableNameBinding
void addTableNameBinding(Identifier logicalName, Table table)
-
addTableNameBinding
void addTableNameBinding(String schema, String catalog, String logicalName, String realTableName, Table denormalizedSuperTable)
-
getPhysicalTableName
String getPhysicalTableName(Identifier logicalName)
-
addColumnNameBinding
void addColumnNameBinding(Table table, Identifier logicalColumnName, Column column)
-
addColumnNameBinding
void addColumnNameBinding(Table table, String logicalColumnName, Column column)
-
getPhysicalColumnName
String getPhysicalColumnName(Table table, Identifier logicalName) throws MappingException
- Throws:
MappingException
-
getPhysicalColumnName
String getPhysicalColumnName(Table table, String logicalName) throws MappingException
- Throws:
MappingException
-
getLogicalColumnName
String getLogicalColumnName(Table table, Identifier physicalName)
-
addDefaultIdentifierGenerator
void addDefaultIdentifierGenerator(IdentifierGeneratorDefinition generatorDefinition)
-
addDefaultQuery
void addDefaultQuery(NamedHqlQueryDefinition queryDefinition)
-
addDefaultNamedNativeQuery
void addDefaultNamedNativeQuery(NamedNativeQueryDefinition query)
-
addDefaultResultSetMapping
void addDefaultResultSetMapping(NamedResultSetMappingDescriptor definition)
-
addDefaultNamedProcedureCall
void addDefaultNamedProcedureCall(NamedProcedureCallDefinitionImpl procedureCallDefinition)
-
addClassType
AnnotatedClassType addClassType(org.hibernate.annotations.common.reflection.XClass clazz)
-
getClassType
AnnotatedClassType getClassType(org.hibernate.annotations.common.reflection.XClass clazz)
-
addMappedSuperclass
void addMappedSuperclass(Class<?> type, MappedSuperclass mappedSuperclass)
-
getMappedSuperclass
MappedSuperclass getMappedSuperclass(Class<?> type)
-
getPropertyAnnotatedWithMapsId
PropertyData getPropertyAnnotatedWithMapsId(org.hibernate.annotations.common.reflection.XClass persistentXClass, 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, String s)
-
addToOneAndIdProperty
void addToOneAndIdProperty(org.hibernate.annotations.common.reflection.XClass entity, PropertyData propertyAnnotatedElement)
-
getPropertyAnnotatedWithIdAndToOne
PropertyData getPropertyAnnotatedWithIdAndToOne(org.hibernate.annotations.common.reflection.XClass persistentXClass, String propertyName)
-
isInSecondPass
boolean isInSecondPass()
-
locateNaturalIdUniqueKeyBinder
NaturalIdUniqueKeyBinder locateNaturalIdUniqueKeyBinder(String entityName)
-
registerNaturalIdUniqueKeyBinder
void registerNaturalIdUniqueKeyBinder(String entityName, NaturalIdUniqueKeyBinder ukBinder)
-
registerValueMappingResolver
void registerValueMappingResolver(Function<MetadataBuildingContext,Boolean> resolver)
-
addJdbcTypeRegistration
void addJdbcTypeRegistration(int typeCode, JdbcType jdbcType)
-
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
Class<? extends CompositeUserType<?>> findRegisteredCompositeUserType(Class<?> embeddableType)
-
registerUserType
void registerUserType(Class<?> embeddableType, Class<? extends UserType<?>> userType)
-
addCollectionTypeRegistration
void addCollectionTypeRegistration(CollectionTypeRegistration registrationAnnotation)
-
addCollectionTypeRegistration
void addCollectionTypeRegistration(CollectionClassification classification, InFlightMetadataCollector.CollectionTypeRegistrationDescriptor descriptor)
-
findCollectionTypeRegistration
InFlightMetadataCollector.CollectionTypeRegistrationDescriptor findCollectionTypeRegistration(CollectionClassification classification)
-
addDelayedPropertyReferenceHandler
void addDelayedPropertyReferenceHandler(InFlightMetadataCollector.DelayedPropertyReferenceHandler handler)
-
addPropertyReferencedAssociation
void addPropertyReferencedAssociation(String s, String propertyName, String syntheticPropertyName)
-
getPropertyReferencedAssociation
String getPropertyReferencedAssociation(String entityName, String mappedBy)
-
getEntityTableXref
InFlightMetadataCollector.EntityTableXref getEntityTableXref(String entityName)
-
addEntityTableXref
InFlightMetadataCollector.EntityTableXref addEntityTableXref(String entityName, Identifier primaryTableLogicalName, Table primaryTable, InFlightMetadataCollector.EntityTableXref superEntityTableXref)
-
-