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
ConstructorsConstructorDescriptionMappingDocument
(String contributor, JaxbHbmHibernateMapping documentRoot, Origin origin, MetadataBuildingContext rootBuildingContext) -
Method Summary
Modifier and TypeMethodDescriptiondetermineEntityName
(String entityName, String clazz) determineEntityName
(EntityInfo entityElement) findEntityBinding
(String entityName, String clazz) void
finishUp()
General finish up step.Access to the options specified by theMetadataBuilder
The name of the contributor whose mappings we are currently processingAccess to mapping defaults in effect for this contextAccess to the collector of metadata as we build it.Not sure how I feel about this exposed hereObtain the origin for this contextvoid
void
prepare()
A general preparation step.void
void
Process allAuxiliaryDatabaseObject
definitions.void
processEntityHierarchies
(Set<String> processedEntityNames) void
Process all fetch profiles.void
Process all filter definitions.void
Process all custom identifier generator declarations,void
Process all "root" named queries.void
Process all explicit query renames (imports).void
Process ResultSet mappings for native queries.void
Process all custom Type definitions.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, isPreferJavaTimeJdbcTypesEnabled, isPreferNativeEnumTypesEnabled
-
Constructor Details
-
MappingDocument
public MappingDocument(String contributor, JaxbHbmHibernateMapping documentRoot, Origin origin, MetadataBuildingContext rootBuildingContext)
-
-
Method Details
-
getDocumentRoot
-
getToolingHintContext
- Specified by:
getToolingHintContext
in interfaceHbmLocalMetadataBuildingContext
-
determineEntityName
- Specified by:
determineEntityName
in interfaceHbmLocalMetadataBuildingContext
-
determineEntityName
- Specified by:
determineEntityName
in interfaceHbmLocalMetadataBuildingContext
-
qualifyClassName
- Specified by:
qualifyClassName
in interfaceHbmLocalMetadataBuildingContext
-
findEntityBinding
- Specified by:
findEntityBinding
in interfaceHbmLocalMetadataBuildingContext
-
getOrigin
Description copied from interface:LocalMetadataBuildingContext
Obtain the origin for this context- Specified by:
getOrigin
in interfaceLocalMetadataBuildingContext
- Returns:
- The origin
-
getBootstrapContext
- Specified by:
getBootstrapContext
in interfaceMetadataBuildingContext
-
getBuildingOptions
Description copied from interface:MetadataBuildingContext
Access to the options specified by theMetadataBuilder
- Specified by:
getBuildingOptions
in interfaceMetadataBuildingContext
- Returns:
- The options
-
getEffectiveDefaults
Description copied from interface:MetadataBuildingContext
Access to mapping defaults in effect for this context- Specified by:
getEffectiveDefaults
in interfaceMetadataBuildingContext
- Returns:
- The mapping defaults.
-
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
Description copied from interface:MetadataBuildingContext
Not sure how I feel about this exposed here- Specified by:
getObjectNameNormalizer
in interfaceMetadataBuildingContext
- Returns:
- The ObjectNameNormalizer
-
getTypeDefinitionRegistry
- Specified by:
getTypeDefinitionRegistry
in interfaceMetadataBuildingContext
-
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
- 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
-