Class MappingMetamodelImpl
java.lang.Object
org.hibernate.metamodel.model.domain.internal.MappingMetamodelImpl
- All Implemented Interfaces:
Metamodel
,Serializable
,MappingMetamodel
,JpaMetamodel
,MappingMetamodelImplementor
,QueryParameterBindingTypeResolver
,BindingContext
public class MappingMetamodelImpl
extends Object
implements MappingMetamodelImplementor, JpaMetamodel, Metamodel, QueryParameterBindingTypeResolver, BindingContext, Serializable
Implementation of the JPA-defined contract
Metamodel
.
Really more of the mapping model than the domain model, though
it does have reference to the JpaMetamodel
.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMappingMetamodelImpl
(TypeConfiguration typeConfiguration, ServiceRegistry serviceRegistry) -
Method Summary
Modifier and TypeMethodDescription<X> EmbeddableDomainType
<X> embeddable
(Class<X> cls) embeddable
(String embeddableName) Access to an embeddable type from FQN<X> EntityDomainType
<X> Access to an entity supporting Hibernate's entity-name feature<E extends Enum<E>>
EenumValue
(EnumJavaType<E> enumType, String enumValueName) Find a collection mapping descriptor based on its role.Find a collection mapping descriptor based on its role.@Nullable EmbeddableDomainType
<?> findEmbeddableType
(@Nullable String embeddableName) Same asJpaMetamodel.embeddable(String)
exceptnull
is returned rather than throwing an exception<X> @Nullable EmbeddableDomainType
<X> findEmbeddableType
(Class<X> cls) Same asJpaMetamodel.embeddable(Class)
exceptnull
is returned rather than throwing an exceptionfindEntityDescriptor
(Class<?> entityJavaType) Find an entity mapping descriptor based on its Class.findEntityDescriptor
(String entityName) Find an entity mapping descriptor based on its Hibernate entity-name.@Nullable EntityDomainType
<?> findEntityType
(@Nullable String entityName) Same asJpaMetamodel.entity(String)
exceptnull
is returned rather than throwing an exception<X> EntityDomainType
<X> findEntityType
(Class<X> cls) Same asJpaMetamodel.entity(Class)
exceptnull
is returned rather than throwing an exception<X> @Nullable ManagedDomainType
<X> findManagedType
(@Nullable String typeName) Same asJpaMetamodel.managedType(String)
exceptnull
is returned rather than throwing an exception<X> ManagedDomainType
<X> findManagedType
(Class<X> cls) Same asJpaMetamodel.managedType(Class)
exceptnull
is returned rather than throwing an exceptionvoid
void
Visit the mapping descriptors for all collections defined in the modelvoid
Visit all entity mapping descriptors defined in the modelString[]
Get the names of all collections known to this MetamodelString[]
Get the names of all entities known to this MetamodelGet a collection mapping descriptor based on its roleGet a collection mapping descriptor based on its rolegetCollectionRolesByEntityParticipant
(String entityName) Retrieves a set of all the collection roles in which the given entity is a participant, as either an index or an element.Set
<EmbeddableType<?>> Get an EmbeddableMappingType based on its NavigableRole.Set
<EntityType<?>> getEntityDescriptor
(Class<?> entityJavaType) Get an entity mapping descriptor based on its Class.getEntityDescriptor
(String entityName) Get an entity mapping descriptor based on its Hibernate entity-nameGet an entity mapping descriptor based on its NavigableRole.Access to the EntityNameResolver instance that Hibernate is configured to use for determining the entity descriptor from an instance of an entityEnumJavaType
<?> getEnumType
(String className) getEnumTypesForValue
(String enumValue) <X> EntityDomainType
<X> getHqlEntityReference
(String entityName) Specialized handling for resolving entity-name references in an HQL querygetImportedName
(String name) <T> T
getJavaConstant
(String className, String fieldName) JavaType
<?> getJavaConstantType
(String className, String fieldName) Set
<ManagedType<?>> TheTypeConfiguration
this metamodel is associated withboolean
isEntityClass
(Class<?> entityJavaType) locateEntityDescriptor
(Class<?> byClass) Deprecated, for removal: This API element is subject to removal in a future version.<X> ManagedDomainType
<X> managedType
(Class<X> cls) <X> ManagedDomainType
<X> managedType
(String typeName) Access to a managed type through its namequalifyImportableName
(String queryName) <X> EntityDomainType
<X> resolveHqlEntityReference
(String entityName) Specialized handling for resolving entity-name references in an HQL queryresolveMappingExpressible
(SqmExpressible<?> sqmExpressible, Function<NavigablePath, TableGroup> tableGroupLocator) <T> BindableType
<T> resolveParameterBindType
(Class<T> javaType) <T> BindableType
<? super T> resolveParameterBindType
(T bindValue) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hibernate.type.BindingContext
resolveExpressible
-
Constructor Details
-
MappingMetamodelImpl
-
-
Method Details
-
getJpaMetamodel
- Specified by:
getJpaMetamodel
in interfaceBindingContext
-
finishInitialization
-
getTypeConfiguration
Description copied from interface:MappingMetamodel
TheTypeConfiguration
this metamodel is associated with- Specified by:
getTypeConfiguration
in interfaceBindingContext
- Specified by:
getTypeConfiguration
in interfaceMappingMetamodel
- Specified by:
getTypeConfiguration
in interfaceQueryParameterBindingTypeResolver
-
getMappingMetamodel
- Specified by:
getMappingMetamodel
in interfaceBindingContext
- Specified by:
getMappingMetamodel
in interfaceQueryParameterBindingTypeResolver
-
getServiceRegistry
-
forEachEntityDescriptor
Description copied from interface:MappingMetamodel
Visit all entity mapping descriptors defined in the model- Specified by:
forEachEntityDescriptor
in interfaceMappingMetamodel
-
streamEntityDescriptors
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
streamEntityDescriptors
in interfaceMappingMetamodel
-
getEntityDescriptor
Description copied from interface:MappingMetamodel
Get an entity mapping descriptor based on its Hibernate entity-name- Specified by:
getEntityDescriptor
in interfaceMappingMetamodel
- See Also:
-
findEntityDescriptor
Description copied from interface:MappingMetamodel
Find an entity mapping descriptor based on its Hibernate entity-name.- Specified by:
findEntityDescriptor
in interfaceMappingMetamodel
-
findEntityDescriptor
Description copied from interface:MappingMetamodel
Find an entity mapping descriptor based on its Class.- Specified by:
findEntityDescriptor
in interfaceMappingMetamodel
-
isEntityClass
- Specified by:
isEntityClass
in interfaceMappingMetamodel
-
getEntityDescriptor
Description copied from interface:MappingMetamodel
Get an entity mapping descriptor based on its Class.- Specified by:
getEntityDescriptor
in interfaceMappingMetamodel
- See Also:
-
locateEntityDescriptor
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:MappingMetamodel
Locate an entity mapping descriptor by Class. The passed Class might refer to either the entity Class directly, or it might name a proxy interface for the entity. This method accounts for both, preferring the direct entity name.- Specified by:
locateEntityDescriptor
in interfaceMappingMetamodel
-
entity
- Specified by:
entity
in interfaceJpaMetamodel
- Specified by:
entity
in interfaceMetamodel
-
managedType
- Specified by:
managedType
in interfaceJpaMetamodel
- Specified by:
managedType
in interfaceMetamodel
-
embeddable
- Specified by:
embeddable
in interfaceJpaMetamodel
- Specified by:
embeddable
in interfaceMetamodel
-
getManagedTypes
- Specified by:
getManagedTypes
in interfaceMetamodel
-
getEntities
- Specified by:
getEntities
in interfaceMetamodel
-
getEmbeddables
- Specified by:
getEmbeddables
in interfaceMetamodel
-
findManagedType
Description copied from interface:JpaMetamodel
Same asJpaMetamodel.managedType(String)
exceptnull
is returned rather than throwing an exception- Specified by:
findManagedType
in interfaceJpaMetamodel
-
managedType
Description copied from interface:JpaMetamodel
Access to a managed type through its name- Specified by:
managedType
in interfaceJpaMetamodel
-
findEntityType
Description copied from interface:JpaMetamodel
Same asJpaMetamodel.entity(String)
exceptnull
is returned rather than throwing an exception- Specified by:
findEntityType
in interfaceJpaMetamodel
-
entity
Description copied from interface:JpaMetamodel
Access to an entity supporting Hibernate's entity-name feature- Specified by:
entity
in interfaceJpaMetamodel
- Specified by:
entity
in interfaceMetamodel
-
findEmbeddableType
Description copied from interface:JpaMetamodel
Same asJpaMetamodel.embeddable(String)
exceptnull
is returned rather than throwing an exception- Specified by:
findEmbeddableType
in interfaceJpaMetamodel
-
embeddable
Description copied from interface:JpaMetamodel
Access to an embeddable type from FQN- Specified by:
embeddable
in interfaceJpaMetamodel
-
getHqlEntityReference
Description copied from interface:JpaMetamodel
Specialized handling for resolving entity-name references in an HQL query- Specified by:
getHqlEntityReference
in interfaceJpaMetamodel
-
resolveHqlEntityReference
Description copied from interface:JpaMetamodel
Specialized handling for resolving entity-name references in an HQL query- Specified by:
resolveHqlEntityReference
in interfaceJpaMetamodel
-
findManagedType
Description copied from interface:JpaMetamodel
Same asJpaMetamodel.managedType(Class)
exceptnull
is returned rather than throwing an exception- Specified by:
findManagedType
in interfaceJpaMetamodel
-
findEntityType
Description copied from interface:JpaMetamodel
Same asJpaMetamodel.entity(Class)
exceptnull
is returned rather than throwing an exception- Specified by:
findEntityType
in interfaceJpaMetamodel
-
findEmbeddableType
Description copied from interface:JpaMetamodel
Same asJpaMetamodel.embeddable(Class)
exceptnull
is returned rather than throwing an exception- Specified by:
findEmbeddableType
in interfaceJpaMetamodel
-
qualifyImportableName
- Specified by:
qualifyImportableName
in interfaceJpaMetamodel
-
getEnumTypesForValue
- Specified by:
getEnumTypesForValue
in interfaceJpaMetamodel
-
getJavaConstantType
- Specified by:
getJavaConstantType
in interfaceJpaMetamodel
-
getJavaConstant
- Specified by:
getJavaConstant
in interfaceJpaMetamodel
-
getEnumType
- Specified by:
getEnumType
in interfaceJpaMetamodel
-
enumValue
- Specified by:
enumValue
in interfaceJpaMetamodel
-
getImportedName
- Specified by:
getImportedName
in interfaceMappingMetamodel
-
forEachCollectionDescriptor
Description copied from interface:MappingMetamodel
Visit the mapping descriptors for all collections defined in the model- Specified by:
forEachCollectionDescriptor
in interfaceMappingMetamodel
-
streamCollectionDescriptors
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
streamCollectionDescriptors
in interfaceMappingMetamodel
-
getCollectionDescriptor
Description copied from interface:MappingMetamodel
Get a collection mapping descriptor based on its role- Specified by:
getCollectionDescriptor
in interfaceMappingMetamodel
- See Also:
-
findCollectionDescriptor
Description copied from interface:MappingMetamodel
Find a collection mapping descriptor based on its role. Returnsnull
if the role does not refer to a collection- Specified by:
findCollectionDescriptor
in interfaceMappingMetamodel
- See Also:
-
resolveMappingExpressible
public MappingModelExpressible<?> resolveMappingExpressible(SqmExpressible<?> sqmExpressible, Function<NavigablePath, TableGroup> tableGroupLocator) - Specified by:
resolveMappingExpressible
in interfaceMappingMetamodel
-
getCollectionRolesByEntityParticipant
Description copied from interface:MappingMetamodelImplementor
Retrieves a set of all the collection roles in which the given entity is a participant, as either an index or an element.- Specified by:
getCollectionRolesByEntityParticipant
in interfaceMappingMetamodelImplementor
- Parameters:
entityName
- The entity name for which to get the collection roles.- Returns:
- set of all the collection roles in which the given entityName participates.
-
getEntityNameResolvers
Description copied from interface:MappingMetamodelImplementor
Access to the EntityNameResolver instance that Hibernate is configured to use for determining the entity descriptor from an instance of an entity- Specified by:
getEntityNameResolvers
in interfaceMappingMetamodelImplementor
-
getAllEntityNames
Description copied from interface:MappingMetamodelImplementor
Get the names of all entities known to this Metamodel- Specified by:
getAllEntityNames
in interfaceMappingMetamodelImplementor
- Returns:
- All the entity names
-
getAllCollectionRoles
Description copied from interface:MappingMetamodelImplementor
Get the names of all collections known to this Metamodel- Specified by:
getAllCollectionRoles
in interfaceMappingMetamodelImplementor
- Returns:
- All the entity names
-
resolveParameterBindType
- Specified by:
resolveParameterBindType
in interfaceQueryParameterBindingTypeResolver
-
resolveParameterBindType
- Specified by:
resolveParameterBindType
in interfaceQueryParameterBindingTypeResolver
-