Class MappingDocument
- java.lang.Object
-
- org.hibernate.boot.model.source.internal.hbm.MappingDocument
-
- All Implemented Interfaces:
HbmLocalMetadataBuildingContext
,LocalMetadataBuildingContext
,MetadataSourceProcessor
,MetadataBuildingContext
public class MappingDocument extends Object implements HbmLocalMetadataBuildingContext, MetadataSourceProcessor
Aggregates together information about a mapping document.
-
-
Constructor Summary
Constructors Constructor Description MappingDocument(String contributor, JaxbHbmHibernateMapping documentRoot, Origin origin, MetadataBuildingContext rootBuildingContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
determineEntityName(String entityName, String clazz)
String
determineEntityName(EntityInfo entityElement)
PersistentClass
findEntityBinding(String entityName, String clazz)
void
finishUp()
General finish up step.BootstrapContext
getBootstrapContext()
MetadataBuildingOptions
getBuildingOptions()
Access to the options specified by theMetadataBuilder
String
getCurrentContributorName()
The name of the contributor whose mappings we are currently processingJaxbHbmHibernateMapping
getDocumentRoot()
MappingDefaults
getMappingDefaults()
Access to mapping defaults in effect for this contextInFlightMetadataCollector
getMetadataCollector()
Access to the collector of metadata as we build it.ObjectNameNormalizer
getObjectNameNormalizer()
Not sure how I feel about this exposed hereOrigin
getOrigin()
Obtain the origin for this contextToolingHintContext
getToolingHintContext()
TypeDefinitionRegistry
getTypeDefinitionRegistry()
void
postProcessEntityHierarchies()
void
prepare()
A general preparation step.void
prepareForEntityHierarchyProcessing()
void
processAuxiliaryDatabaseObjectDefinitions()
Process allAuxiliaryDatabaseObject
definitions.void
processEntityHierarchies(Set<String> processedEntityNames)
void
processFetchProfiles()
Process all fetch profiles.void
processFilterDefinitions()
Process all filter definitions.void
processIdentifierGenerators()
Process all custom identifier generator declarations,void
processNamedQueries()
Process all "root" named queries.void
processQueryRenames()
Process all explicit query renames (imports).void
processResultSetMappings()
Process ResultSet mappings for native queries.void
processTypeDefinitions()
Process all custom Type definitions.String
qualifyClassName(String name)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.boot.spi.MetadataBuildingContext
getPreferredSqlTypeCodeForArray, getPreferredSqlTypeCodeForBoolean, getPreferredSqlTypeCodeForDuration, getPreferredSqlTypeCodeForInstant, getPreferredSqlTypeCodeForUuid
-
-
-
-
Constructor Detail
-
MappingDocument
public MappingDocument(String contributor, JaxbHbmHibernateMapping documentRoot, Origin origin, MetadataBuildingContext rootBuildingContext)
-
-
Method Detail
-
getDocumentRoot
public JaxbHbmHibernateMapping getDocumentRoot()
-
getToolingHintContext
public ToolingHintContext getToolingHintContext()
- Specified by:
getToolingHintContext
in interfaceHbmLocalMetadataBuildingContext
-
determineEntityName
public String determineEntityName(EntityInfo entityElement)
- Specified by:
determineEntityName
in interfaceHbmLocalMetadataBuildingContext
-
determineEntityName
public String determineEntityName(String entityName, String clazz)
- Specified by:
determineEntityName
in interfaceHbmLocalMetadataBuildingContext
-
qualifyClassName
public String qualifyClassName(String name)
- Specified by:
qualifyClassName
in interfaceHbmLocalMetadataBuildingContext
-
findEntityBinding
public PersistentClass findEntityBinding(String entityName, String clazz)
- Specified by:
findEntityBinding
in interfaceHbmLocalMetadataBuildingContext
-
getOrigin
public Origin getOrigin()
Description copied from interface:LocalMetadataBuildingContext
Obtain the origin for this context- Specified by:
getOrigin
in interfaceLocalMetadataBuildingContext
- Returns:
- The origin
-
getBootstrapContext
public BootstrapContext getBootstrapContext()
- Specified by:
getBootstrapContext
in interfaceMetadataBuildingContext
-
getBuildingOptions
public MetadataBuildingOptions getBuildingOptions()
Description copied from interface:MetadataBuildingContext
Access to the options specified by theMetadataBuilder
- Specified by:
getBuildingOptions
in interfaceMetadataBuildingContext
- Returns:
- The options
-
getMappingDefaults
public MappingDefaults getMappingDefaults()
Description copied from interface:MetadataBuildingContext
Access to mapping defaults in effect for this context- Specified by:
getMappingDefaults
in interfaceMetadataBuildingContext
- Returns:
- The mapping defaults.
-
getMetadataCollector
public InFlightMetadataCollector getMetadataCollector()
Description copied from interface:MetadataBuildingContext
Access to the collector of metadata as we build it.- Specified by:
getMetadataCollector
in interfaceMetadataBuildingContext
- Returns:
- The metadata collector.
-
getObjectNameNormalizer
public ObjectNameNormalizer getObjectNameNormalizer()
Description copied from interface:MetadataBuildingContext
Not sure how I feel about this exposed here- Specified by:
getObjectNameNormalizer
in interfaceMetadataBuildingContext
- Returns:
- The ObjectNameNormalizer
-
getTypeDefinitionRegistry
public TypeDefinitionRegistry getTypeDefinitionRegistry()
- Specified by:
getTypeDefinitionRegistry
in interfaceMetadataBuildingContext
-
getCurrentContributorName
public String getCurrentContributorName()
Description copied from interface:MetadataBuildingContext
The name of the contributor whose mappings we are currently processing- Specified by:
getCurrentContributorName
in interfaceMetadataBuildingContext
-
prepare
public void prepare()
Description copied from interface:MetadataSourceProcessor
A general preparation step. Called first.- Specified by:
prepare
in interfaceMetadataSourceProcessor
-
processTypeDefinitions
public void processTypeDefinitions()
Description copied from interface:MetadataSourceProcessor
Process all custom Type definitions. This step has no prerequisites.- Specified by:
processTypeDefinitions
in interfaceMetadataSourceProcessor
-
processQueryRenames
public void processQueryRenames()
Description copied from interface:MetadataSourceProcessor
Process all explicit query renames (imports). This step has no prerequisites.- Specified by:
processQueryRenames
in interfaceMetadataSourceProcessor
-
processFilterDefinitions
public void processFilterDefinitions()
Description copied from interface:MetadataSourceProcessor
Process all filter definitions.This step depends on
MetadataSourceProcessor.processTypeDefinitions()
- Specified by:
processFilterDefinitions
in interfaceMetadataSourceProcessor
-
processFetchProfiles
public void processFetchProfiles()
Description copied from interface:MetadataSourceProcessor
Process all fetch profiles.todo : does this step depend on any others??
- Specified by:
processFetchProfiles
in interfaceMetadataSourceProcessor
-
processAuxiliaryDatabaseObjectDefinitions
public void processAuxiliaryDatabaseObjectDefinitions()
Description copied from interface:MetadataSourceProcessor
Process allAuxiliaryDatabaseObject
definitions.This step has no prerequisites.
- Specified by:
processAuxiliaryDatabaseObjectDefinitions
in interfaceMetadataSourceProcessor
-
processNamedQueries
public void processNamedQueries()
Description copied from interface:MetadataSourceProcessor
Process all "root" named queries. These are named queries not defined on a specific entity (which will be handled later duringMetadataSourceProcessor.processEntityHierarchies(java.util.Set<java.lang.String>)
).This step has no prerequisites. The returns associated with named native queries can depend on entity binding being complete, but those are handled later during
MetadataSourceProcessor.processResultSetMappings()
.- Specified by:
processNamedQueries
in interfaceMetadataSourceProcessor
-
processIdentifierGenerators
public void processIdentifierGenerators()
Description copied from interface:MetadataSourceProcessor
Process all custom identifier generator declarations,- Specified by:
processIdentifierGenerators
in interfaceMetadataSourceProcessor
-
prepareForEntityHierarchyProcessing
public void prepareForEntityHierarchyProcessing()
- Specified by:
prepareForEntityHierarchyProcessing
in interfaceMetadataSourceProcessor
-
processEntityHierarchies
public void processEntityHierarchies(Set<String> processedEntityNames)
- Specified by:
processEntityHierarchies
in interfaceMetadataSourceProcessor
-
postProcessEntityHierarchies
public void postProcessEntityHierarchies()
- Specified by:
postProcessEntityHierarchies
in interfaceMetadataSourceProcessor
-
processResultSetMappings
public void processResultSetMappings()
Description copied from interface:MetadataSourceProcessor
Process ResultSet mappings for native queries. At the moment, this step hasMetadataSourceProcessor.processEntityHierarchies(java.util.Set<java.lang.String>)
as a prerequisite because the parsing of the returns access the entity bindings.- Specified by:
processResultSetMappings
in interfaceMetadataSourceProcessor
-
finishUp
public void finishUp()
Description copied from interface:MetadataSourceProcessor
General finish up step. Called last.- Specified by:
finishUp
in interfaceMetadataSourceProcessor
-
-