Package org.hibernate.testing.orm.junit
Class DialectFeatureChecks.FakeMetadataBuildingContext
java.lang.Object
org.hibernate.testing.orm.junit.DialectFeatureChecks.FakeMetadataBuildingContext
- All Implemented Interfaces:
Metadata
,InFlightMetadataCollector
,MetadataBuildingContext
,MetadataImplementor
,MappingContext
- Enclosing class:
- DialectFeatureChecks
public static class DialectFeatureChecks.FakeMetadataBuildingContext
extends Object
implements MetadataBuildingContext, InFlightMetadataCollector
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.boot.spi.InFlightMetadataCollector
InFlightMetadataCollector.CollectionTypeRegistrationDescriptor, InFlightMetadataCollector.DelayedPropertyReferenceHandler, InFlightMetadataCollector.DuplicateSecondaryTableException, InFlightMetadataCollector.EntityTableXref
-
Constructor Summary
ConstructorsConstructorDescriptionFakeMetadataBuildingContext
(TypeConfiguration typeConfiguration, SqmFunctionRegistry functionRegistry) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttributeConverter
(Class<? extends AttributeConverter<?, ?>> converterClass) Apply anAttributeConverter
void
addAttributeConverter
(ConverterDescriptor descriptor) Apply the descriptor for anAttributeConverter
void
addAuxiliaryDatabaseObject
(AuxiliaryDatabaseObject auxiliaryDatabaseObject) Add metadata pertaining to an auxiliary database object to this repository.addClassType
(org.hibernate.models.spi.ClassDetails classDetails) void
addCollectionBinding
(Collection collection) Add collection mapping metadata to this repository.void
addCollectionTypeRegistration
(CollectionTypeRegistration registrationAnnotation) void
addCollectionTypeRegistration
(CollectionClassification classification, InFlightMetadataCollector.CollectionTypeRegistrationDescriptor descriptor) void
addColumnNameBinding
(Table table, String logicalColumnName, Column column) void
addColumnNameBinding
(Table table, Identifier logicalColumnName, Column column) void
addDefaultIdentifierGenerator
(IdentifierGeneratorDefinition generatorDefinition) void
void
addDefaultNamedProcedureCall
(NamedProcedureCallDefinitionImpl procedureCallDefinition) void
addDefaultQuery
(NamedHqlQueryDefinition<?> queryDefinition) void
void
addDelayedPropertyReferenceHandler
(InFlightMetadataCollector.DelayedPropertyReferenceHandler handler) addDenormalizedTable
(String schema, String catalog, String name, boolean isAbstract, String subselect, Table includedTable, MetadataBuildingContext buildingContext) Adds a 'denormalized table' to this repository.void
addEntityBinding
(PersistentClass persistentClass) Add thePersistentClass
for an entity mapping.addEntityTableXref
(String entityName, Identifier primaryTableLogicalName, Table primaryTable, InFlightMetadataCollector.EntityTableXref superEntityTableXref) void
addFetchProfile
(FetchProfile profile) Add aFetchProfile
.void
addFilterDefinition
(FilterDefinition definition) Adds a filter definition to this repository.void
addIdentifierGenerator
(IdentifierGeneratorDefinition generatorDefinition) void
Adds an import (for use in HQL).void
addJavaTypeRegistration
(Class<?> javaType, JavaType<?> jtd) void
addJdbcTypeRegistration
(int typeCode, JdbcType jdbcType) void
addMappedBy
(String name, String mappedBy, String propertyName) void
addMappedSuperclass
(Class<?> type, MappedSuperclass mappedSuperclass) void
addNamedEntityGraph
(NamedEntityGraphDefinition namedEntityGraphDefinition) Adds metadata for a named entity graph to this repositoryvoid
Adds metadata for a named SQL query to this collector.void
Adds metadata for a named stored procedure call to this collector.void
addNamedQuery
(NamedHqlQueryDefinition<?> query) Adds metadata for a named query to this repository.void
addPropertyAnnotatedWithMapsId
(org.hibernate.models.spi.ClassDetails entityClassDetails, PropertyData propertyAnnotatedElement) void
addPropertyAnnotatedWithMapsIdSpecj
(org.hibernate.models.spi.ClassDetails entityClassDetails, PropertyData specJPropertyData, String s) void
addPropertyReference
(String entityName, String propertyName) void
addPropertyReferencedAssociation
(String s, String propertyName, String syntheticPropertyName) void
addRegisteredConversion
(RegisteredConversion conversion) void
addResultSetMapping
(NamedResultSetMappingDescriptor resultSetMappingDefinition) Adds the metadata for a named SQL result set mapping to this collector.void
addSecondPass
(SecondPass secondPass) void
addSecondPass
(SecondPass sp, boolean onTopOfTheQueue) addTable
(String schema, String catalog, String name, String subselect, boolean isAbstract, MetadataBuildingContext buildingContext) Adds table metadata to this repository returning the created metadata instance.void
addTableNameBinding
(String schema, String catalog, String logicalName, String realTableName, Table denormalizedSuperTable) void
addTableNameBinding
(Identifier logicalName, Table table) void
addToOneAndIdProperty
(org.hibernate.models.spi.ClassDetails entityClassDetails, PropertyData propertyAnnotatedElement) void
addTypeDefinition
(TypeDefinition typeDefinition) Adds a type definition to this metadata repository.void
addUniquePropertyReference
(String entityName, String propertyName) Short-hand form of building aSessionFactory
through 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) Access to the options specified by theMetadataBuilder
getClassType
(org.hibernate.models.spi.ClassDetails classDetails) 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 theConverterRegistry
which may be used to registerAttributeConverter
s.The name of the contributor whose mappings we are currently processingRetrieve the database model.Access to mapping defaults in effect for this contextList<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 ofPersistentClass
by 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 ownerEntityName, String propertyName) Access to theSqmFunctionRegistry
belonging to theBootstrapContext
getGenericComponent
(Class<?> componentClass) getIdentifierGenerator
(String name) getIdentifierPropertyName
(String className) getIdentifierType
(String className) 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 thisMetadata
Access to the collector of metadata as we build it.getNamedEntityGraph
(String name) Retrieve named query metadata by name.Retrieve named SQL query metadata.Retrieve named procedure metadata.Not sure how I feel about this exposed heregetPhysicalColumnName
(Table table, String logicalName) getPhysicalColumnName
(Table table, Identifier logicalName) getPhysicalTableName
(String logicalName) getPhysicalTableName
(Identifier logicalName) getPropertyAnnotatedWithIdAndToOne
(org.hibernate.models.spi.ClassDetails persistentClassDetails, String propertyName) getPropertyAnnotatedWithMapsId
(org.hibernate.models.spi.ClassDetails persistentClassDetails, String propertyName) getPropertyReferencedAssociation
(String entityName, String mappedBy) getReferencedPropertyType
(String className, String propertyName) getResultSetMapping
(String name) Retrieve the metadata for a named SQL result set mapping.Get the builder forSessionFactory
instances based on this metamodel.org.hibernate.models.spi.SourceModelBuildingContext
Access to theTypeConfiguration
belonging to theBootstrapContext
getTypeDefinition
(String typeName) Retrieve a type definition by name.Access to theTypeDefinitionRegistry
, which may be used to add type definitions to this metadata repository.getUUID()
Gets theUUID
for this metamodel.void
initSessionFactory
(SessionFactoryImplementor sessionFactoryImplementor) boolean
locateNaturalIdUniqueKeyBinder
(String entityName) void
orderColumns
(boolean forceOrdering) void
registerComponent
(Component component) void
registerCompositeUserType
(Class<?> embeddableType, Class<? extends CompositeUserType<?>> userType) void
registerEmbeddableInstantiator
(Class<?> embeddableType, Class<? extends EmbeddableInstantiator> instantiator) void
registerEmbeddableSubclass
(org.hibernate.models.spi.ClassDetails superclass, org.hibernate.models.spi.ClassDetails subclass) void
registerGenericComponent
(Component component) void
registerNaturalIdUniqueKeyBinder
(String entityName, NaturalIdUniqueKeyBinder ukBinder) void
registerUserType
(Class<?> embeddableType, Class<? extends UserType<?>> userType) void
resolveEmbeddableDiscriminatorType
(Class<?> embeddableClass, Supplier<DiscriminatorType<?>> supplier) void
validate()
void
visitNamedHqlQueryDefinitions
(Consumer<NamedHqlQueryDefinition<?>> definitionConsumer) Visit all named HQL query definitionsvoid
visitNamedNativeQueryDefinitions
(Consumer<NamedNativeQueryDefinition<?>> definitionConsumer) Visit all named native query definitionsvoid
visitNamedProcedureCallDefinition
(Consumer<NamedProcedureCallDefinition> definitionConsumer) Visit all named callable query definitionsvoid
visitNamedResultSetMappingDefinition
(Consumer<NamedResultSetMappingDescriptor> definitionConsumer) Visit all named SQL result set mapping definitionsvoid
visitRegisteredComponents
(Consumer<Component> consumer) 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.InFlightMetadataCollector
getAnnotationDescriptorRegistry, getClassDetailsRegistry
Methods inherited from interface org.hibernate.boot.spi.MetadataBuildingContext
getPreferredSqlTypeCodeForArray, getPreferredSqlTypeCodeForBoolean, getPreferredSqlTypeCodeForDuration, getPreferredSqlTypeCodeForInstant, getPreferredSqlTypeCodeForUuid, isPreferJavaTimeJdbcTypesEnabled, isPreferNativeEnumTypesEnabled
-
Constructor Details
-
FakeMetadataBuildingContext
public FakeMetadataBuildingContext(TypeConfiguration typeConfiguration, SqmFunctionRegistry functionRegistry)
-
-
Method Details
-
getBootstrapContext
- Specified by:
getBootstrapContext
in interfaceInFlightMetadataCollector
- 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
-
getDatabase
Description copied from interface:Metadata
Retrieve the database model.- Specified by:
getDatabase
in interfaceMetadata
- Returns:
- The database model.
-
getMetadataBuildingOptions
Description copied from interface:MetadataImplementor
Access to the options used to build thisMetadata
- Specified by:
getMetadataBuildingOptions
in interfaceMetadataImplementor
- Returns:
- The
MetadataBuildingOptions
-
getTypeConfiguration
Description copied from interface:MetadataImplementor
Access to theTypeConfiguration
belonging to theBootstrapContext
- Specified by:
getTypeConfiguration
in interfaceMetadataImplementor
-
getFunctionRegistry
Description copied from interface:MetadataImplementor
Access to theSqmFunctionRegistry
belonging to theBootstrapContext
- Specified by:
getFunctionRegistry
in interfaceMetadataImplementor
-
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
Description copied from interface:InFlightMetadataCollector
Access to theTypeDefinitionRegistry
, which may be used to add type definitions to this metadata repository.- Specified by:
getTypeDefinitionRegistry
in interfaceInFlightMetadataCollector
- 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
-
getSourceModelBuildingContext
public org.hibernate.models.spi.SourceModelBuildingContext getSourceModelBuildingContext()- Specified by:
getSourceModelBuildingContext
in interfaceInFlightMetadataCollector
-
getGlobalRegistrations
- Specified by:
getGlobalRegistrations
in interfaceInFlightMetadataCollector
-
getPersistenceUnitMetadata
- Specified by:
getPersistenceUnitMetadata
in interfaceInFlightMetadataCollector
-
addEntityBinding
Description copied from interface:InFlightMetadataCollector
Add thePersistentClass
for an entity mapping.- Specified by:
addEntityBinding
in interfaceInFlightMetadataCollector
- Parameters:
persistentClass
- The entity metadata- Throws:
DuplicateMappingException
- Indicates there was already an entry corresponding to the given entity name.
-
getEntityBindingMap
Description copied from interface:InFlightMetadataCollector
A map ofPersistentClass
by entity name. Needed forSecondPass
handling.- Specified by:
getEntityBindingMap
in interfaceInFlightMetadataCollector
-
registerComponent
- Specified by:
registerComponent
in interfaceInFlightMetadataCollector
-
registerGenericComponent
- Specified by:
registerGenericComponent
in interfaceInFlightMetadataCollector
-
registerEmbeddableSubclass
public void registerEmbeddableSubclass(org.hibernate.models.spi.ClassDetails superclass, org.hibernate.models.spi.ClassDetails subclass) - Specified by:
registerEmbeddableSubclass
in interfaceInFlightMetadataCollector
-
getEmbeddableSubclasses
public List<org.hibernate.models.spi.ClassDetails> getEmbeddableSubclasses(org.hibernate.models.spi.ClassDetails superclass) - Specified by:
getEmbeddableSubclasses
in interfaceInFlightMetadataCollector
-
addImport
Description copied from interface:InFlightMetadataCollector
Adds an import (for use in HQL).- Specified by:
addImport
in interfaceInFlightMetadataCollector
- 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
Description copied from interface:InFlightMetadataCollector
Add collection mapping metadata to this repository.- Specified by:
addCollectionBinding
in interfaceInFlightMetadataCollector
- Parameters:
collection
- The collection metadata- Throws:
DuplicateMappingException
- Indicates there was already an entry corresponding to the given collection role
-
addTable
public Table addTable(String schema, String catalog, String name, String subselect, boolean isAbstract, MetadataBuildingContext buildingContext) Description copied from interface:InFlightMetadataCollector
Adds table metadata to this repository returning the created metadata instance.- Specified by:
addTable
in interfaceInFlightMetadataCollector
- 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
public Table addDenormalizedTable(String schema, String catalog, String name, boolean isAbstract, String subselect, Table includedTable, MetadataBuildingContext buildingContext) throws DuplicateMappingException Description copied from interface:InFlightMetadataCollector
Adds a 'denormalized table' to this repository.- Specified by:
addDenormalizedTable
in interfaceInFlightMetadataCollector
- 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
Description copied from interface:InFlightMetadataCollector
Adds metadata for a named query to this repository.- Specified by:
addNamedQuery
in interfaceInFlightMetadataCollector
- Parameters:
query
- The metadata- Throws:
DuplicateMappingException
- If a query already exists with that name.
-
addNamedNativeQuery
public void addNamedNativeQuery(NamedNativeQueryDefinition<?> query) throws DuplicateMappingException Description copied from interface:InFlightMetadataCollector
Adds metadata for a named SQL query to this collector.- Specified by:
addNamedNativeQuery
in interfaceInFlightMetadataCollector
- Throws:
DuplicateMappingException
-
addResultSetMapping
public void addResultSetMapping(NamedResultSetMappingDescriptor resultSetMappingDefinition) throws DuplicateMappingException Description copied from interface:InFlightMetadataCollector
Adds the metadata for a named SQL result set mapping to this collector.- Specified by:
addResultSetMapping
in interfaceInFlightMetadataCollector
- Throws:
DuplicateMappingException
-
addNamedProcedureCallDefinition
public void addNamedProcedureCallDefinition(NamedProcedureCallDefinition definition) throws DuplicateMappingException Description copied from interface:InFlightMetadataCollector
Adds metadata for a named stored procedure call to this collector.- Specified by:
addNamedProcedureCallDefinition
in interfaceInFlightMetadataCollector
- Throws:
DuplicateMappingException
-
addNamedEntityGraph
Description copied from interface:InFlightMetadataCollector
Adds metadata for a named entity graph to this repository- Specified by:
addNamedEntityGraph
in interfaceInFlightMetadataCollector
- Parameters:
namedEntityGraphDefinition
- The procedure call information
-
addTypeDefinition
Description copied from interface:InFlightMetadataCollector
Adds a type definition to this metadata repository.- Specified by:
addTypeDefinition
in interfaceInFlightMetadataCollector
- Parameters:
typeDefinition
- The named type definition to add.- See Also:
-
addFilterDefinition
Description copied from interface:InFlightMetadataCollector
Adds a filter definition to this repository.- Specified by:
addFilterDefinition
in interfaceInFlightMetadataCollector
- Parameters:
definition
- The filter definition to add.
-
addAuxiliaryDatabaseObject
Description copied from interface:InFlightMetadataCollector
Add metadata pertaining to an auxiliary database object to this repository.- Specified by:
addAuxiliaryDatabaseObject
in interfaceInFlightMetadataCollector
- Parameters:
auxiliaryDatabaseObject
- The metadata.
-
addFetchProfile
Description copied from interface:InFlightMetadataCollector
Add aFetchProfile
.- Specified by:
addFetchProfile
in interfaceInFlightMetadataCollector
-
addIdentifierGenerator
- Specified by:
addIdentifierGenerator
in interfaceInFlightMetadataCollector
-
getConverterRegistry
Description copied from interface:InFlightMetadataCollector
Obtain theConverterRegistry
which may be used to registerAttributeConverter
s.- Specified by:
getConverterRegistry
in interfaceInFlightMetadataCollector
-
addAttributeConverter
Description copied from interface:InFlightMetadataCollector
Apply the descriptor for anAttributeConverter
- Specified by:
addAttributeConverter
in interfaceInFlightMetadataCollector
-
addAttributeConverter
Description copied from interface:InFlightMetadataCollector
Apply anAttributeConverter
- Specified by:
addAttributeConverter
in interfaceInFlightMetadataCollector
-
addRegisteredConversion
- Specified by:
addRegisteredConversion
in interfaceInFlightMetadataCollector
-
getAttributeConverterAutoApplyHandler
- Specified by:
getAttributeConverterAutoApplyHandler
in interfaceInFlightMetadataCollector
-
addSecondPass
- Specified by:
addSecondPass
in interfaceInFlightMetadataCollector
-
addSecondPass
- Specified by:
addSecondPass
in interfaceInFlightMetadataCollector
-
addTableNameBinding
- Specified by:
addTableNameBinding
in interfaceInFlightMetadataCollector
-
addTableNameBinding
public void addTableNameBinding(String schema, String catalog, String logicalName, String realTableName, Table denormalizedSuperTable) - Specified by:
addTableNameBinding
in interfaceInFlightMetadataCollector
-
getLogicalTableName
- Specified by:
getLogicalTableName
in interfaceInFlightMetadataCollector
-
getPhysicalTableName
- Specified by:
getPhysicalTableName
in interfaceInFlightMetadataCollector
-
getPhysicalTableName
- Specified by:
getPhysicalTableName
in interfaceInFlightMetadataCollector
-
addColumnNameBinding
- Specified by:
addColumnNameBinding
in interfaceInFlightMetadataCollector
-
addColumnNameBinding
- Specified by:
addColumnNameBinding
in interfaceInFlightMetadataCollector
-
getPhysicalColumnName
- Specified by:
getPhysicalColumnName
in interfaceInFlightMetadataCollector
- Throws:
MappingException
-
getPhysicalColumnName
- Specified by:
getPhysicalColumnName
in interfaceInFlightMetadataCollector
- Throws:
MappingException
-
getLogicalColumnName
- Specified by:
getLogicalColumnName
in interfaceInFlightMetadataCollector
-
getLogicalColumnName
- Specified by:
getLogicalColumnName
in interfaceInFlightMetadataCollector
-
addDefaultIdentifierGenerator
- Specified by:
addDefaultIdentifierGenerator
in interfaceInFlightMetadataCollector
-
addDefaultQuery
- Specified by:
addDefaultQuery
in interfaceInFlightMetadataCollector
-
addDefaultNamedNativeQuery
- Specified by:
addDefaultNamedNativeQuery
in interfaceInFlightMetadataCollector
-
addDefaultResultSetMapping
- Specified by:
addDefaultResultSetMapping
in interfaceInFlightMetadataCollector
-
addDefaultNamedProcedureCall
- Specified by:
addDefaultNamedProcedureCall
in interfaceInFlightMetadataCollector
-
addClassType
- Specified by:
addClassType
in interfaceInFlightMetadataCollector
-
getClassType
- Specified by:
getClassType
in interfaceInFlightMetadataCollector
-
addMappedSuperclass
- Specified by:
addMappedSuperclass
in interfaceInFlightMetadataCollector
-
getMappedSuperclass
- Specified by:
getMappedSuperclass
in interfaceInFlightMetadataCollector
-
getPropertyAnnotatedWithMapsId
public PropertyData getPropertyAnnotatedWithMapsId(org.hibernate.models.spi.ClassDetails persistentClassDetails, String propertyName) - Specified by:
getPropertyAnnotatedWithMapsId
in interfaceInFlightMetadataCollector
-
addPropertyAnnotatedWithMapsId
public void addPropertyAnnotatedWithMapsId(org.hibernate.models.spi.ClassDetails entityClassDetails, PropertyData propertyAnnotatedElement) - Specified by:
addPropertyAnnotatedWithMapsId
in interfaceInFlightMetadataCollector
-
addPropertyAnnotatedWithMapsIdSpecj
public void addPropertyAnnotatedWithMapsIdSpecj(org.hibernate.models.spi.ClassDetails entityClassDetails, PropertyData specJPropertyData, String s) - Specified by:
addPropertyAnnotatedWithMapsIdSpecj
in interfaceInFlightMetadataCollector
-
addToOneAndIdProperty
public void addToOneAndIdProperty(org.hibernate.models.spi.ClassDetails entityClassDetails, PropertyData propertyAnnotatedElement) - Specified by:
addToOneAndIdProperty
in interfaceInFlightMetadataCollector
-
getPropertyAnnotatedWithIdAndToOne
public PropertyData getPropertyAnnotatedWithIdAndToOne(org.hibernate.models.spi.ClassDetails persistentClassDetails, String propertyName) - Specified by:
getPropertyAnnotatedWithIdAndToOne
in interfaceInFlightMetadataCollector
-
isInSecondPass
public boolean isInSecondPass()- Specified by:
isInSecondPass
in interfaceInFlightMetadataCollector
-
locateNaturalIdUniqueKeyBinder
- Specified by:
locateNaturalIdUniqueKeyBinder
in interfaceInFlightMetadataCollector
-
registerNaturalIdUniqueKeyBinder
- Specified by:
registerNaturalIdUniqueKeyBinder
in interfaceInFlightMetadataCollector
-
registerValueMappingResolver
- Specified by:
registerValueMappingResolver
in interfaceInFlightMetadataCollector
-
addJavaTypeRegistration
- Specified by:
addJavaTypeRegistration
in interfaceInFlightMetadataCollector
-
addJdbcTypeRegistration
- Specified by:
addJdbcTypeRegistration
in interfaceInFlightMetadataCollector
-
registerEmbeddableInstantiator
public void registerEmbeddableInstantiator(Class<?> embeddableType, Class<? extends EmbeddableInstantiator> instantiator) - Specified by:
registerEmbeddableInstantiator
in interfaceInFlightMetadataCollector
-
findRegisteredEmbeddableInstantiator
public Class<? extends EmbeddableInstantiator> findRegisteredEmbeddableInstantiator(Class<?> embeddableType) - Specified by:
findRegisteredEmbeddableInstantiator
in interfaceInFlightMetadataCollector
-
registerCompositeUserType
public void registerCompositeUserType(Class<?> embeddableType, Class<? extends CompositeUserType<?>> userType) - Specified by:
registerCompositeUserType
in interfaceInFlightMetadataCollector
-
findRegisteredCompositeUserType
public Class<? extends CompositeUserType<?>> findRegisteredCompositeUserType(Class<?> embeddableType) - Specified by:
findRegisteredCompositeUserType
in interfaceInFlightMetadataCollector
-
registerUserType
- Specified by:
registerUserType
in interfaceInFlightMetadataCollector
-
findRegisteredUserType
- Specified by:
findRegisteredUserType
in interfaceInFlightMetadataCollector
-
addCollectionTypeRegistration
- Specified by:
addCollectionTypeRegistration
in interfaceInFlightMetadataCollector
-
addCollectionTypeRegistration
public void addCollectionTypeRegistration(CollectionClassification classification, InFlightMetadataCollector.CollectionTypeRegistrationDescriptor descriptor) - Specified by:
addCollectionTypeRegistration
in interfaceInFlightMetadataCollector
-
findCollectionTypeRegistration
public InFlightMetadataCollector.CollectionTypeRegistrationDescriptor findCollectionTypeRegistration(CollectionClassification classification) - Specified by:
findCollectionTypeRegistration
in interfaceInFlightMetadataCollector
-
addDelayedPropertyReferenceHandler
public void addDelayedPropertyReferenceHandler(InFlightMetadataCollector.DelayedPropertyReferenceHandler handler) - Specified by:
addDelayedPropertyReferenceHandler
in interfaceInFlightMetadataCollector
-
addPropertyReference
- Specified by:
addPropertyReference
in interfaceInFlightMetadataCollector
-
addUniquePropertyReference
- Specified by:
addUniquePropertyReference
in interfaceInFlightMetadataCollector
-
addPropertyReferencedAssociation
public void addPropertyReferencedAssociation(String s, String propertyName, String syntheticPropertyName) - Specified by:
addPropertyReferencedAssociation
in interfaceInFlightMetadataCollector
-
getPropertyReferencedAssociation
- Specified by:
getPropertyReferencedAssociation
in interfaceInFlightMetadataCollector
-
addMappedBy
- Specified by:
addMappedBy
in interfaceInFlightMetadataCollector
-
getFromMappedBy
- Specified by:
getFromMappedBy
in interfaceInFlightMetadataCollector
-
getEntityTableXref
- Specified by:
getEntityTableXref
in interfaceInFlightMetadataCollector
-
addEntityTableXref
public InFlightMetadataCollector.EntityTableXref addEntityTableXref(String entityName, Identifier primaryTableLogicalName, Table primaryTable, InFlightMetadataCollector.EntityTableXref superEntityTableXref) - Specified by:
addEntityTableXref
in interfaceInFlightMetadataCollector
-
getJoins
- Specified by:
getJoins
in interfaceInFlightMetadataCollector
-
getSessionFactoryBuilder
Description copied from interface:Metadata
Get the builder forSessionFactory
instances based on this metamodel.- Specified by:
getSessionFactoryBuilder
in interfaceMetadata
- Returns:
- The builder for
SessionFactory
instances.
-
buildSessionFactory
Description copied from interface:Metadata
Short-hand form of building aSessionFactory
through the builder without any additional option overrides.- Specified by:
buildSessionFactory
in interfaceMetadata
- Returns:
- THe built SessionFactory.
-
getUUID
Description copied from interface:Metadata
Gets theUUID
for this metamodel. -
getEntityBindings
Description copied from interface:Metadata
Retrieves the PersistentClass entity metadata representation for all known entities. Returned collection is immutable- Specified by:
getEntityBindings
in interfaceMetadata
- Returns:
- All PersistentClass representations.
-
getEntityBinding
Description copied from interface:Metadata
Retrieves the PersistentClass entity mapping metadata representation for the given entity name.- Specified by:
getEntityBinding
in interfaceMetadata
- Parameters:
entityName
- The entity name for which to retrieve the metadata.- Returns:
- The entity mapping metadata, or
null
if no matching entity found.
-
getCollectionBindings
Description copied from interface:Metadata
Retrieves the Collection metadata representation for all known collections. Returned collection is immutable- Specified by:
getCollectionBindings
in interfaceMetadata
- Returns:
- All Collection representations.
-
getCollectionBinding
Description copied from interface:Metadata
Retrieves the collection mapping metadata for the given collection role.- Specified by:
getCollectionBinding
in interfaceMetadata
- Parameters:
role
- The collection role for which to retrieve the metadata.- Returns:
- The collection mapping metadata, or
null
if no matching collection found.
-
getImports
Description copied from interface:Metadata
Retrieves all defined imports (class renames).- Specified by:
getImports
in interfaceMetadata
- Returns:
- All imports
-
getNamedHqlQueryMapping
Description copied from interface:Metadata
Retrieve named query metadata by name.- Specified by:
getNamedHqlQueryMapping
in interfaceMetadata
- Returns:
- The named query metadata, or
null
.
-
visitNamedHqlQueryDefinitions
Description copied from interface:Metadata
Visit all named HQL query definitions- Specified by:
visitNamedHqlQueryDefinitions
in interfaceMetadata
-
getNamedNativeQueryMapping
Description copied from interface:Metadata
Retrieve named SQL query metadata.- Specified by:
getNamedNativeQueryMapping
in interfaceMetadata
- Returns:
- The named query metadata, or
null
-
visitNamedNativeQueryDefinitions
public void visitNamedNativeQueryDefinitions(Consumer<NamedNativeQueryDefinition<?>> definitionConsumer) Description copied from interface:Metadata
Visit all named native query definitions- Specified by:
visitNamedNativeQueryDefinitions
in interfaceMetadata
-
getNamedProcedureCallMapping
Description copied from interface:Metadata
Retrieve named procedure metadata.- Specified by:
getNamedProcedureCallMapping
in interfaceMetadata
- Returns:
- The named procedure metadata, or
null
-
visitNamedProcedureCallDefinition
public void visitNamedProcedureCallDefinition(Consumer<NamedProcedureCallDefinition> definitionConsumer) Description copied from interface:Metadata
Visit all named callable query definitions- Specified by:
visitNamedProcedureCallDefinition
in interfaceMetadata
-
getResultSetMapping
Description copied from interface:Metadata
Retrieve the metadata for a named SQL result set mapping.- Specified by:
getResultSetMapping
in interfaceMetadata
- Parameters:
name
- The mapping name.- Returns:
- The named result set mapping metadata, or
null
if none found.
-
visitNamedResultSetMappingDefinition
public void visitNamedResultSetMappingDefinition(Consumer<NamedResultSetMappingDescriptor> definitionConsumer) Description copied from interface:Metadata
Visit all named SQL result set mapping definitions- Specified by:
visitNamedResultSetMappingDefinition
in interfaceMetadata
-
getTypeDefinition
Description copied from interface:Metadata
Retrieve a type definition by name.- Specified by:
getTypeDefinition
in interfaceMetadata
- Returns:
- The named type definition, or
null
-
getFilterDefinitions
Description copied from interface:Metadata
Retrieves the complete map of filter definitions. Returned map is immutable- Specified by:
getFilterDefinitions
in interfaceMetadata
- Returns:
- The filter definition map.
-
getFilterDefinition
Description copied from interface:Metadata
Retrieves a filter definition by name.- Specified by:
getFilterDefinition
in interfaceMetadata
- Parameters:
name
- The name of the filter definition to retrieve .- Returns:
- The filter definition, or
null
.
-
getFetchProfile
- Specified by:
getFetchProfile
in interfaceMetadata
-
getFetchProfiles
- Specified by:
getFetchProfiles
in interfaceMetadata
-
getNamedEntityGraph
- Specified by:
getNamedEntityGraph
in interfaceMetadata
-
getNamedEntityGraphs
- Specified by:
getNamedEntityGraphs
in interfaceMetadata
-
getIdentifierGenerator
- Specified by:
getIdentifierGenerator
in interfaceMetadata
-
collectTableMappings
- Specified by:
collectTableMappings
in interfaceMetadata
-
getSqlFunctionMap
- Specified by:
getSqlFunctionMap
in interfaceMetadata
-
getContributors
Description copied from interface:Metadata
All of the known model contributors- Specified by:
getContributors
in interfaceMetadata
-
buildNamedQueryRepository
- Specified by:
buildNamedQueryRepository
in interfaceMetadataImplementor
-
orderColumns
public void orderColumns(boolean forceOrdering) - Specified by:
orderColumns
in interfaceMetadataImplementor
-
validate
- Specified by:
validate
in interfaceMetadataImplementor
- Throws:
MappingException
-
getMappedSuperclassMappingsCopy
- Specified by:
getMappedSuperclassMappingsCopy
in interfaceMetadataImplementor
-
initSessionFactory
- Specified by:
initSessionFactory
in interfaceMetadataImplementor
-
visitRegisteredComponents
- Specified by:
visitRegisteredComponents
in interfaceMetadataImplementor
-
getGenericComponent
- Specified by:
getGenericComponent
in interfaceMetadataImplementor
-
resolveEmbeddableDiscriminatorType
public DiscriminatorType<?> resolveEmbeddableDiscriminatorType(Class<?> embeddableClass, Supplier<DiscriminatorType<?>> supplier) - Specified by:
resolveEmbeddableDiscriminatorType
in interfaceMetadataImplementor
-
getIdentifierType
- Specified by:
getIdentifierType
in interfaceMappingContext
- Throws:
MappingException
-
getIdentifierPropertyName
- Specified by:
getIdentifierPropertyName
in interfaceMappingContext
- Throws:
MappingException
-
getReferencedPropertyType
public Type getReferencedPropertyType(String className, String propertyName) throws MappingException - Specified by:
getReferencedPropertyType
in interfaceMappingContext
- Throws:
MappingException
-