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) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttributeConverter(Class<? extends AttributeConverter<?, ?>> converterClass) Apply anAttributeConvertervoidaddAttributeConverter(ConverterDescriptor<?, ?> descriptor) Apply the descriptor for anAttributeConvertervoidaddAuxiliaryDatabaseObject(AuxiliaryDatabaseObject auxiliaryDatabaseObject) Add metadata pertaining to an auxiliary database object to this repository.addClassType(org.hibernate.models.spi.ClassDetails clazz) voidaddCollectionBinding(Collection collection) Add collection mapping metadata to this repository.voidaddCollectionTypeRegistration(CollectionTypeRegistration registrationAnnotation) voidaddCollectionTypeRegistration(CollectionClassification classification, InFlightMetadataCollector.CollectionTypeRegistrationDescriptor descriptor) voidaddColumnNameBinding(Table table, String logicalName, Column column) voidaddColumnNameBinding(Table table, Identifier logicalName, Column column) voidvoidvoidvoidaddDefaultQuery(NamedHqlQueryDefinition<?> queryDefinition) voidvoidaddDelayedPropertyReferenceHandler(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.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 filterDefinition) Adds a filter definition to this repository.voidvoidAdds an import (for use in HQL).voidaddJavaTypeRegistration(Class<?> javaType, JavaType<?> jtd) voidaddJdbcTypeRegistration(int typeCode, JdbcType jdbcType) voidaddMappedBy(String entityName, String propertyName, String inversePropertyName) voidaddMappedSuperclass(Class<?> type, MappedSuperclass mappedSuperclass) voidaddNamedEntityGraph(NamedEntityGraphDefinition definition) 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<?> def) Adds metadata for a named query to this repository.voidaddOverridableConverter(Class<? extends AttributeConverter<?, ?>> converterClass) Apply anAttributeConverterthat may be overridden by competing convertersvoidaddPropertyAnnotatedWithMapsId(org.hibernate.models.spi.ClassDetails entityType, PropertyData property) voidaddPropertyReference(String referencedClass, String propertyName) voidaddPropertyReferencedAssociation(String entityName, String propertyName, String propertyRef) voidaddRegisteredConversion(RegisteredConversion conversion) voidaddResultSetMapping(NamedResultSetMappingDescriptor resultSetMappingDescriptor) Adds the metadata for a named SQL result set mapping to this collector.voidaddSecondPass(SecondPass secondPass) voidaddSecondPass(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.voidaddTableNameBinding(String schema, String catalog, String logicalName, String realTableName, Table denormalizedSuperTable) voidaddTableNameBinding(Identifier logicalName, Table table) voidaddToOneAndIdProperty(org.hibernate.models.spi.ClassDetails entityType, PropertyData property) voidaddTypeDefinition(TypeDefinition typeDefinition) Adds a type definition to this metadata repository.voidaddUniquePropertyReference(String referencedClass, String propertyName) voidapplyResultSetMapping(NamedResultSetMappingDescriptor resultSetMappingDescriptor) buildMetadataInstance(MetadataBuildingContext buildingContext) Builds the complete and immutable Metadata instance from the collected info.Short-hand form of building aSessionFactorythrough 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 theConverterRegistrywhich may be used to registerAttributeConverters.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 ofPersistentClassby 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 theSqmFunctionRegistrybelonging to theBootstrapContextgetGenericComponent(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 thisMetadatagetNamedEntityGraph(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 forSessionFactoryinstances based on this metamodel.Access to theTypeConfigurationbelonging to theBootstrapContextgetTypeDefinition(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 theUUIDfor this metamodel.voidinitSessionFactory(SessionFactoryImplementor sessionFactory) booleanlocateNaturalIdUniqueKeyBinder(String entityName) voidorderColumns(boolean forceOrdering) voidprocessSecondPasses(MetadataBuildingContext buildingContext) Ugh! But we need this done before we ask Envers to produce its entities.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<?> basicType, Class<? extends UserType<?>> userType) voidresolveEmbeddableDiscriminatorType(Class<?> embeddableClass, Supplier<DiscriminatorType<?>> supplier) protected voidsecondPassCompileForeignKeys(Table table, Set<ForeignKey> done, MetadataBuildingContext buildingContext) voidvalidate()voidvisitNamedHqlQueryDefinitions(Consumer<NamedHqlQueryDefinition<?>> definitionConsumer) Visit all named HQL query definitionsvoidvisitNamedNativeQueryDefinitions(Consumer<NamedNativeQueryDefinition<?>> definitionConsumer) Visit all named native query definitionsvoidvisitNamedProcedureCallDefinition(Consumer<NamedProcedureCallDefinition> definitionConsumer) Visit all named callable query definitionsvoidvisitNamedResultSetMappingDefinition(Consumer<NamedResultSetMappingDescriptor> definitionConsumer) Visit all named SQL result set mapping definitionsvoidvisitRegisteredComponents(Consumer<Component> consumer) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.boot.spi.InFlightMetadataCollector
getAnnotationDescriptorRegistry, getClassDetailsRegistry, getModelsContext
-
Constructor Details
-
InFlightMetadataCollectorImpl
public InFlightMetadataCollectorImpl(BootstrapContext bootstrapContext, MetadataBuildingOptions options)
-
-
Method Details
-
getUUID
Description copied from interface:MetadataGets theUUIDfor this metamodel. -
getMetadataBuildingOptions
Description copied from interface:MetadataImplementorAccess to the options used to build thisMetadata- Specified by:
getMetadataBuildingOptionsin interfaceMetadataImplementor- Returns:
- The
MetadataBuildingOptions
-
getBootstrapContext
- Specified by:
getBootstrapContextin interfaceInFlightMetadataCollector
-
getGlobalRegistrations
- Specified by:
getGlobalRegistrationsin interfaceInFlightMetadataCollector
-
getPersistenceUnitMetadata
- Specified by:
getPersistenceUnitMetadatain interfaceInFlightMetadataCollector
-
getTypeConfiguration
Description copied from interface:MetadataImplementorAccess to theTypeConfigurationbelonging to theBootstrapContext- Specified by:
getTypeConfigurationin interfaceMetadataImplementor
-
getFunctionRegistry
Description copied from interface:MetadataImplementorAccess to theSqmFunctionRegistrybelonging to theBootstrapContext- Specified by:
getFunctionRegistryin interfaceMetadataImplementor
-
getDatabase
Description copied from interface:MetadataRetrieve the database model.- Specified by:
getDatabasein interfaceMetadata- Returns:
- The database model.
-
buildNamedQueryRepository
- Specified by:
buildNamedQueryRepositoryin interfaceMetadataImplementor
-
getSqlFunctionMap
- Specified by:
getSqlFunctionMapin interfaceMetadata
-
getContributors
Description copied from interface:MetadataAll of the known model contributors- Specified by:
getContributorsin interfaceMetadata
-
orderColumns
public void orderColumns(boolean forceOrdering) - Specified by:
orderColumnsin interfaceMetadataImplementor
-
validate
- Specified by:
validatein interfaceMetadataImplementor- Throws:
MappingException
-
getMappedSuperclassMappingsCopy
- Specified by:
getMappedSuperclassMappingsCopyin interfaceMetadataImplementor
-
initSessionFactory
- Specified by:
initSessionFactoryin interfaceMetadataImplementor
-
registerComponent
- Specified by:
registerComponentin interfaceInFlightMetadataCollector
-
visitRegisteredComponents
- Specified by:
visitRegisteredComponentsin interfaceMetadataImplementor
-
registerGenericComponent
- Specified by:
registerGenericComponentin interfaceInFlightMetadataCollector
-
getGenericComponent
- Specified by:
getGenericComponentin interfaceMetadataImplementor
-
registerEmbeddableSubclass
public void registerEmbeddableSubclass(org.hibernate.models.spi.ClassDetails superclass, org.hibernate.models.spi.ClassDetails subclass) - Specified by:
registerEmbeddableSubclassin interfaceInFlightMetadataCollector
-
getEmbeddableSubclasses
public List<org.hibernate.models.spi.ClassDetails> getEmbeddableSubclasses(org.hibernate.models.spi.ClassDetails superclass) - Specified by:
getEmbeddableSubclassesin interfaceInFlightMetadataCollector
-
resolveEmbeddableDiscriminatorType
public DiscriminatorType<?> resolveEmbeddableDiscriminatorType(Class<?> embeddableClass, Supplier<DiscriminatorType<?>> supplier) - Specified by:
resolveEmbeddableDiscriminatorTypein interfaceMetadataImplementor
-
getSessionFactoryBuilder
Description copied from interface:MetadataGet the builder forSessionFactoryinstances based on this metamodel.- Specified by:
getSessionFactoryBuilderin interfaceMetadata- Returns:
- The builder for
SessionFactoryinstances.
-
buildSessionFactory
Description copied from interface:MetadataShort-hand form of building aSessionFactorythrough the builder without any additional option overrides.- Specified by:
buildSessionFactoryin interfaceMetadata- Specified by:
buildSessionFactoryin interfaceMetadataImplementor- Returns:
- THe built SessionFactory.
-
getEntityBindings
Description copied from interface:MetadataRetrieves the PersistentClass entity metadata representation for all known entities. Returned collection is immutable- Specified by:
getEntityBindingsin interfaceMetadata- Returns:
- All PersistentClass representations.
-
getEntityBindingMap
Description copied from interface:InFlightMetadataCollectorA map ofPersistentClassby entity name. Needed forSecondPasshandling.- Specified by:
getEntityBindingMapin interfaceInFlightMetadataCollector
-
getEntityBinding
Description copied from interface:MetadataRetrieves the PersistentClass entity mapping metadata representation for the given entity name.- Specified by:
getEntityBindingin interfaceMetadata- Parameters:
entityName- The entity name for which to retrieve the metadata.- Returns:
- The entity mapping metadata, or
nullif no matching entity found.
-
addEntityBinding
Description copied from interface:InFlightMetadataCollectorAdd thePersistentClassfor an entity mapping.- Specified by:
addEntityBindingin 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:MetadataRetrieves the Collection metadata representation for all known collections. Returned collection is immutable- Specified by:
getCollectionBindingsin interfaceMetadata- Returns:
- All Collection representations.
-
getCollectionBinding
Description copied from interface:MetadataRetrieves the collection mapping metadata for the given collection role.- Specified by:
getCollectionBindingin interfaceMetadata- Parameters:
role- The collection role for which to retrieve the metadata.- Returns:
- The collection mapping metadata, or
nullif no matching collection found.
-
addCollectionBinding
Description copied from interface:InFlightMetadataCollectorAdd collection mapping metadata to this repository.- Specified by:
addCollectionBindingin 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:InFlightMetadataCollectorAccess to theTypeDefinitionRegistry, which may be used to add type definitions to this metadata repository.- Specified by:
getTypeDefinitionRegistryin interfaceInFlightMetadataCollector
-
getTypeDefinition
Description copied from interface:MetadataRetrieve a type definition by name.- Specified by:
getTypeDefinitionin interfaceMetadata- Returns:
- The named type definition, or
null
-
addTypeDefinition
Description copied from interface:InFlightMetadataCollectorAdds a type definition to this metadata repository.- Specified by:
addTypeDefinitionin interfaceInFlightMetadataCollector- Parameters:
typeDefinition- The named type definition to add.- See Also:
-
registerValueMappingResolver
- Specified by:
registerValueMappingResolverin interfaceInFlightMetadataCollector
-
addJavaTypeRegistration
- Specified by:
addJavaTypeRegistrationin interfaceInFlightMetadataCollector
-
addJdbcTypeRegistration
- Specified by:
addJdbcTypeRegistrationin interfaceInFlightMetadataCollector
-
registerEmbeddableInstantiator
public void registerEmbeddableInstantiator(Class<?> embeddableType, Class<? extends EmbeddableInstantiator> instantiator) - Specified by:
registerEmbeddableInstantiatorin interfaceInFlightMetadataCollector
-
findRegisteredEmbeddableInstantiator
public Class<? extends EmbeddableInstantiator> findRegisteredEmbeddableInstantiator(Class<?> embeddableType) - Specified by:
findRegisteredEmbeddableInstantiatorin interfaceInFlightMetadataCollector
-
registerCompositeUserType
public void registerCompositeUserType(Class<?> embeddableType, Class<? extends CompositeUserType<?>> userType) - Specified by:
registerCompositeUserTypein interfaceInFlightMetadataCollector
-
findRegisteredCompositeUserType
public Class<? extends CompositeUserType<?>> findRegisteredCompositeUserType(Class<?> embeddableType) - Specified by:
findRegisteredCompositeUserTypein interfaceInFlightMetadataCollector
-
registerUserType
- Specified by:
registerUserTypein interfaceInFlightMetadataCollector
-
findRegisteredUserType
- Specified by:
findRegisteredUserTypein interfaceInFlightMetadataCollector
-
addCollectionTypeRegistration
- Specified by:
addCollectionTypeRegistrationin interfaceInFlightMetadataCollector
-
addCollectionTypeRegistration
public void addCollectionTypeRegistration(CollectionClassification classification, InFlightMetadataCollector.CollectionTypeRegistrationDescriptor descriptor) - Specified by:
addCollectionTypeRegistrationin interfaceInFlightMetadataCollector
-
findCollectionTypeRegistration
public InFlightMetadataCollector.CollectionTypeRegistrationDescriptor findCollectionTypeRegistration(CollectionClassification classification) - Specified by:
findCollectionTypeRegistrationin interfaceInFlightMetadataCollector
-
getConverterRegistry
Description copied from interface:InFlightMetadataCollectorObtain theConverterRegistrywhich may be used to registerAttributeConverters.- Specified by:
getConverterRegistryin interfaceInFlightMetadataCollector
-
getAttributeConverterManager
-
addAttributeConverter
Description copied from interface:InFlightMetadataCollectorApply anAttributeConverter- Specified by:
addAttributeConverterin interfaceConverterRegistry- Specified by:
addAttributeConverterin interfaceInFlightMetadataCollector
-
addOverridableConverter
Description copied from interface:ConverterRegistryApply anAttributeConverterthat may be overridden by competing converters- Specified by:
addOverridableConverterin interfaceConverterRegistry
-
addAttributeConverter
Description copied from interface:InFlightMetadataCollectorApply the descriptor for anAttributeConverter- Specified by:
addAttributeConverterin interfaceConverterRegistry- Specified by:
addAttributeConverterin interfaceInFlightMetadataCollector
-
addRegisteredConversion
- Specified by:
addRegisteredConversionin interfaceConverterRegistry- Specified by:
addRegisteredConversionin interfaceInFlightMetadataCollector
-
getAttributeConverterAutoApplyHandler
- Specified by:
getAttributeConverterAutoApplyHandlerin interfaceConverterRegistry- Specified by:
getAttributeConverterAutoApplyHandlerin interfaceInFlightMetadataCollector
-
getFilterDefinitions
Description copied from interface:MetadataRetrieves the complete map of filter definitions. Returned map is immutable- Specified by:
getFilterDefinitionsin interfaceMetadata- Returns:
- The filter definition map.
-
getFilterDefinition
Description copied from interface:MetadataRetrieves a filter definition by name.- Specified by:
getFilterDefinitionin interfaceMetadata- Parameters:
name- The name of the filter definition to retrieve .- Returns:
- The filter definition, or
null.
-
addFilterDefinition
Description copied from interface:InFlightMetadataCollectorAdds a filter definition to this repository.- Specified by:
addFilterDefinitionin interfaceInFlightMetadataCollector- Parameters:
filterDefinition- The filter definition to add.
-
getFetchProfiles
- Specified by:
getFetchProfilesin interfaceMetadata
-
getFetchProfile
- Specified by:
getFetchProfilein interfaceMetadata
-
addFetchProfile
Description copied from interface:InFlightMetadataCollectorAdd aFetchProfile.- Specified by:
addFetchProfilein interfaceInFlightMetadataCollector
-
getIdentifierGenerator
- Specified by:
getIdentifierGeneratorin interfaceMetadata
-
collectTableMappings
- Specified by:
collectTableMappingsin interfaceMetadata
-
addIdentifierGenerator
- Specified by:
addIdentifierGeneratorin interfaceInFlightMetadataCollector
-
addDefaultIdentifierGenerator
- Specified by:
addDefaultIdentifierGeneratorin interfaceInFlightMetadataCollector
-
getNamedEntityGraph
- Specified by:
getNamedEntityGraphin interfaceMetadata
-
getNamedEntityGraphs
- Specified by:
getNamedEntityGraphsin interfaceMetadata
-
addNamedEntityGraph
Description copied from interface:InFlightMetadataCollectorAdds metadata for a named entity graph to this repository- Specified by:
addNamedEntityGraphin interfaceInFlightMetadataCollector- Parameters:
definition- The procedure call information
-
getNamedHqlQueryMapping
Description copied from interface:MetadataRetrieve named query metadata by name.- Specified by:
getNamedHqlQueryMappingin interfaceMetadata- Returns:
- The named query metadata, or
null.
-
visitNamedHqlQueryDefinitions
Description copied from interface:MetadataVisit all named HQL query definitions- Specified by:
visitNamedHqlQueryDefinitionsin interfaceMetadata
-
addNamedQuery
Description copied from interface:InFlightMetadataCollectorAdds metadata for a named query to this repository.- Specified by:
addNamedQueryin interfaceInFlightMetadataCollector- Parameters:
def- The metadata
-
addDefaultQuery
- Specified by:
addDefaultQueryin interfaceInFlightMetadataCollector
-
getNamedNativeQueryMapping
Description copied from interface:MetadataRetrieve named SQL query metadata.- Specified by:
getNamedNativeQueryMappingin interfaceMetadata- Returns:
- The named query metadata, or
null
-
visitNamedNativeQueryDefinitions
public void visitNamedNativeQueryDefinitions(Consumer<NamedNativeQueryDefinition<?>> definitionConsumer) Description copied from interface:MetadataVisit all named native query definitions- Specified by:
visitNamedNativeQueryDefinitionsin interfaceMetadata
-
addNamedNativeQuery
Description copied from interface:InFlightMetadataCollectorAdds metadata for a named SQL query to this collector.- Specified by:
addNamedNativeQueryin interfaceInFlightMetadataCollector
-
addDefaultNamedNativeQuery
- Specified by:
addDefaultNamedNativeQueryin interfaceInFlightMetadataCollector
-
getNamedProcedureCallMapping
Description copied from interface:MetadataRetrieve named procedure metadata.- Specified by:
getNamedProcedureCallMappingin interfaceMetadata- Returns:
- The named procedure metadata, or
null
-
visitNamedProcedureCallDefinition
public void visitNamedProcedureCallDefinition(Consumer<NamedProcedureCallDefinition> definitionConsumer) Description copied from interface:MetadataVisit all named callable query definitions- Specified by:
visitNamedProcedureCallDefinitionin interfaceMetadata
-
addNamedProcedureCallDefinition
Description copied from interface:InFlightMetadataCollectorAdds metadata for a named stored procedure call to this collector.- Specified by:
addNamedProcedureCallDefinitionin interfaceInFlightMetadataCollector
-
addDefaultNamedProcedureCall
- Specified by:
addDefaultNamedProcedureCallin interfaceInFlightMetadataCollector
-
getResultSetMapping
Description copied from interface:MetadataRetrieve the metadata for a named SQL result set mapping.- Specified by:
getResultSetMappingin interfaceMetadata- Parameters:
name- The mapping name.- Returns:
- The named result set mapping metadata, or
nullif none found.
-
visitNamedResultSetMappingDefinition
public void visitNamedResultSetMappingDefinition(Consumer<NamedResultSetMappingDescriptor> definitionConsumer) Description copied from interface:MetadataVisit all named SQL result set mapping definitions- Specified by:
visitNamedResultSetMappingDefinitionin interfaceMetadata
-
addResultSetMapping
Description copied from interface:InFlightMetadataCollectorAdds the metadata for a named SQL result set mapping to this collector.- Specified by:
addResultSetMappingin interfaceInFlightMetadataCollector
-
applyResultSetMapping
-
addDefaultResultSetMapping
- Specified by:
addDefaultResultSetMappingin interfaceInFlightMetadataCollector
-
getImports
Description copied from interface:MetadataRetrieves all defined imports (class renames).- Specified by:
getImportsin interfaceMetadata- Returns:
- All imports
-
addImport
Description copied from interface:InFlightMetadataCollectorAdds an import (for use in HQL).- Specified by:
addImportin 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:InFlightMetadataCollectorAdds table metadata to this repository returning the created metadata instance.- Specified by:
addTablein 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:InFlightMetadataCollectorAdds a 'denormalized table' to this repository.- Specified by:
addDenormalizedTablein 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:
getIdentifierTypein interfaceMappingContext- Throws:
MappingException
-
getIdentifierPropertyName
- Specified by:
getIdentifierPropertyNamein interfaceMappingContext- Throws:
MappingException
-
getReferencedPropertyType
public Type getReferencedPropertyType(String entityName, String propertyName) throws MappingException - Specified by:
getReferencedPropertyTypein interfaceMappingContext- Throws:
MappingException
-
addTableNameBinding
- Specified by:
addTableNameBindingin interfaceInFlightMetadataCollector
-
addTableNameBinding
public void addTableNameBinding(String schema, String catalog, String logicalName, String realTableName, Table denormalizedSuperTable) - Specified by:
addTableNameBindingin interfaceInFlightMetadataCollector
-
getLogicalTableName
- Specified by:
getLogicalTableNamein interfaceInFlightMetadataCollector
-
getPhysicalTableName
- Specified by:
getPhysicalTableNamein interfaceInFlightMetadataCollector
-
getPhysicalTableName
- Specified by:
getPhysicalTableNamein interfaceInFlightMetadataCollector
-
addColumnNameBinding
public void addColumnNameBinding(Table table, String logicalName, Column column) throws DuplicateMappingException - Specified by:
addColumnNameBindingin interfaceInFlightMetadataCollector- Throws:
DuplicateMappingException
-
addColumnNameBinding
public void addColumnNameBinding(Table table, Identifier logicalName, Column column) throws DuplicateMappingException - Specified by:
addColumnNameBindingin interfaceInFlightMetadataCollector- Throws:
DuplicateMappingException
-
getPhysicalColumnName
- Specified by:
getPhysicalColumnNamein interfaceInFlightMetadataCollector- Throws:
MappingException
-
getPhysicalColumnName
- Specified by:
getPhysicalColumnNamein interfaceInFlightMetadataCollector- Throws:
MappingException
-
getLogicalColumnName
- Specified by:
getLogicalColumnNamein interfaceInFlightMetadataCollector- Throws:
MappingException
-
getLogicalColumnName
- Specified by:
getLogicalColumnNamein interfaceInFlightMetadataCollector- Throws:
MappingException
-
addAuxiliaryDatabaseObject
Description copied from interface:InFlightMetadataCollectorAdd metadata pertaining to an auxiliary database object to this repository.- Specified by:
addAuxiliaryDatabaseObjectin interfaceInFlightMetadataCollector- Parameters:
auxiliaryDatabaseObject- The metadata.
-
getClassType
- Specified by:
getClassTypein interfaceInFlightMetadataCollector
-
addClassType
- Specified by:
addClassTypein interfaceInFlightMetadataCollector
-
addMappedSuperclass
- Specified by:
addMappedSuperclassin interfaceInFlightMetadataCollector
-
getMappedSuperclass
- Specified by:
getMappedSuperclassin interfaceInFlightMetadataCollector
-
getPropertyAnnotatedWithMapsId
public PropertyData getPropertyAnnotatedWithMapsId(org.hibernate.models.spi.ClassDetails entityType, String propertyName) - Specified by:
getPropertyAnnotatedWithMapsIdin interfaceInFlightMetadataCollector
-
addPropertyAnnotatedWithMapsId
public void addPropertyAnnotatedWithMapsId(org.hibernate.models.spi.ClassDetails entityType, PropertyData property) - Specified by:
addPropertyAnnotatedWithMapsIdin interfaceInFlightMetadataCollector
-
getPropertyAnnotatedWithIdAndToOne
public PropertyData getPropertyAnnotatedWithIdAndToOne(org.hibernate.models.spi.ClassDetails entityType, String propertyName) - Specified by:
getPropertyAnnotatedWithIdAndToOnein interfaceInFlightMetadataCollector
-
addToOneAndIdProperty
public void addToOneAndIdProperty(org.hibernate.models.spi.ClassDetails entityType, PropertyData property) - Specified by:
addToOneAndIdPropertyin interfaceInFlightMetadataCollector
-
addMappedBy
- Specified by:
addMappedByin interfaceInFlightMetadataCollector
-
getFromMappedBy
- Specified by:
getFromMappedByin interfaceInFlightMetadataCollector
-
addPropertyReferencedAssociation
public void addPropertyReferencedAssociation(String entityName, String propertyName, String propertyRef) - Specified by:
addPropertyReferencedAssociationin interfaceInFlightMetadataCollector
-
getPropertyReferencedAssociation
- Specified by:
getPropertyReferencedAssociationin interfaceInFlightMetadataCollector
-
addPropertyReference
- Specified by:
addPropertyReferencein interfaceInFlightMetadataCollector
-
addDelayedPropertyReferenceHandler
public void addDelayedPropertyReferenceHandler(InFlightMetadataCollector.DelayedPropertyReferenceHandler handler) - Specified by:
addDelayedPropertyReferenceHandlerin interfaceInFlightMetadataCollector
-
addUniquePropertyReference
- Specified by:
addUniquePropertyReferencein interfaceInFlightMetadataCollector
-
getEntityTableXref
- Specified by:
getEntityTableXrefin interfaceInFlightMetadataCollector
-
addEntityTableXref
public InFlightMetadataCollector.EntityTableXref addEntityTableXref(String entityName, Identifier primaryTableLogicalName, Table primaryTable, InFlightMetadataCollector.EntityTableXref superEntityTableXref) - Specified by:
addEntityTableXrefin interfaceInFlightMetadataCollector
-
getJoins
- Specified by:
getJoinsin interfaceInFlightMetadataCollector
-
addSecondPass
- Specified by:
addSecondPassin interfaceInFlightMetadataCollector
-
addSecondPass
- Specified by:
addSecondPassin 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:
locateNaturalIdUniqueKeyBinderin interfaceInFlightMetadataCollector
-
registerNaturalIdUniqueKeyBinder
- Specified by:
registerNaturalIdUniqueKeyBinderin interfaceInFlightMetadataCollector
-
isInSecondPass
public boolean isInSecondPass()- Specified by:
isInSecondPassin interfaceInFlightMetadataCollector
-
buildMetadataInstance
Builds the complete and immutable Metadata instance from the collected info.- Returns:
- The complete and immutable Metadata instance
-
getDefaultCatalog
- Specified by:
getDefaultCatalogin interfaceGeneratorSettings
-
getDefaultSchema
- Specified by:
getDefaultSchemain interfaceGeneratorSettings
-
getSqlStringGenerationContext
- Specified by:
getSqlStringGenerationContextin interfaceGeneratorSettings
-