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)exceptnullis returned rather than throwing an exception<X> @Nullable EmbeddableDomainType<X> findEmbeddableType(Class<X> cls) Same asJpaMetamodel.embeddable(Class)exceptnullis 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)exceptnullis returned rather than throwing an exception<X> EntityDomainType<X> findEntityType(Class<X> cls) Same asJpaMetamodel.entity(Class)exceptnullis returned rather than throwing an exception<X> @Nullable ManagedDomainType<X> findManagedType(@Nullable String typeName) Same asJpaMetamodel.managedType(String)exceptnullis returned rather than throwing an exception<X> ManagedDomainType<X> findManagedType(Class<X> cls) Same asJpaMetamodel.managedType(Class)exceptnullis returned rather than throwing an exceptionvoidvoidVisit the mapping descriptors for all collections defined in the modelvoidVisit 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> TgetJavaConstant(String className, String fieldName) JavaType<?> getJavaConstantType(String className, String fieldName) Set<ManagedType<?>> TheTypeConfigurationthis metamodel is associated withbooleanisEntityClass(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, waitMethods inherited from interface org.hibernate.type.BindingContext
resolveExpressible
-
Constructor Details
-
MappingMetamodelImpl
-
-
Method Details
-
getJpaMetamodel
- Specified by:
getJpaMetamodelin interfaceBindingContext
-
finishInitialization
-
getTypeConfiguration
Description copied from interface:MappingMetamodelTheTypeConfigurationthis metamodel is associated with- Specified by:
getTypeConfigurationin interfaceBindingContext- Specified by:
getTypeConfigurationin interfaceMappingMetamodel- Specified by:
getTypeConfigurationin interfaceQueryParameterBindingTypeResolver
-
getMappingMetamodel
- Specified by:
getMappingMetamodelin interfaceBindingContext- Specified by:
getMappingMetamodelin interfaceQueryParameterBindingTypeResolver
-
getServiceRegistry
-
forEachEntityDescriptor
Description copied from interface:MappingMetamodelVisit all entity mapping descriptors defined in the model- Specified by:
forEachEntityDescriptorin interfaceMappingMetamodel
-
streamEntityDescriptors
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
streamEntityDescriptorsin interfaceMappingMetamodel
-
getEntityDescriptor
Description copied from interface:MappingMetamodelGet an entity mapping descriptor based on its Hibernate entity-name- Specified by:
getEntityDescriptorin interfaceMappingMetamodel- See Also:
-
findEntityDescriptor
Description copied from interface:MappingMetamodelFind an entity mapping descriptor based on its Hibernate entity-name.- Specified by:
findEntityDescriptorin interfaceMappingMetamodel
-
findEntityDescriptor
Description copied from interface:MappingMetamodelFind an entity mapping descriptor based on its Class.- Specified by:
findEntityDescriptorin interfaceMappingMetamodel
-
isEntityClass
- Specified by:
isEntityClassin interfaceMappingMetamodel
-
getEntityDescriptor
Description copied from interface:MappingMetamodelGet an entity mapping descriptor based on its Class.- Specified by:
getEntityDescriptorin interfaceMappingMetamodel- See Also:
-
locateEntityDescriptor
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:MappingMetamodelLocate 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:
locateEntityDescriptorin interfaceMappingMetamodel
-
entity
- Specified by:
entityin interfaceJpaMetamodel- Specified by:
entityin interfaceMetamodel
-
managedType
- Specified by:
managedTypein interfaceJpaMetamodel- Specified by:
managedTypein interfaceMetamodel
-
embeddable
- Specified by:
embeddablein interfaceJpaMetamodel- Specified by:
embeddablein interfaceMetamodel
-
getManagedTypes
- Specified by:
getManagedTypesin interfaceMetamodel
-
getEntities
- Specified by:
getEntitiesin interfaceMetamodel
-
getEmbeddables
- Specified by:
getEmbeddablesin interfaceMetamodel
-
findManagedType
Description copied from interface:JpaMetamodelSame asJpaMetamodel.managedType(String)exceptnullis returned rather than throwing an exception- Specified by:
findManagedTypein interfaceJpaMetamodel
-
managedType
Description copied from interface:JpaMetamodelAccess to a managed type through its name- Specified by:
managedTypein interfaceJpaMetamodel
-
findEntityType
Description copied from interface:JpaMetamodelSame asJpaMetamodel.entity(String)exceptnullis returned rather than throwing an exception- Specified by:
findEntityTypein interfaceJpaMetamodel
-
entity
Description copied from interface:JpaMetamodelAccess to an entity supporting Hibernate's entity-name feature- Specified by:
entityin interfaceJpaMetamodel- Specified by:
entityin interfaceMetamodel
-
findEmbeddableType
Description copied from interface:JpaMetamodelSame asJpaMetamodel.embeddable(String)exceptnullis returned rather than throwing an exception- Specified by:
findEmbeddableTypein interfaceJpaMetamodel
-
embeddable
Description copied from interface:JpaMetamodelAccess to an embeddable type from FQN- Specified by:
embeddablein interfaceJpaMetamodel
-
getHqlEntityReference
Description copied from interface:JpaMetamodelSpecialized handling for resolving entity-name references in an HQL query- Specified by:
getHqlEntityReferencein interfaceJpaMetamodel
-
resolveHqlEntityReference
Description copied from interface:JpaMetamodelSpecialized handling for resolving entity-name references in an HQL query- Specified by:
resolveHqlEntityReferencein interfaceJpaMetamodel
-
findManagedType
Description copied from interface:JpaMetamodelSame asJpaMetamodel.managedType(Class)exceptnullis returned rather than throwing an exception- Specified by:
findManagedTypein interfaceJpaMetamodel
-
findEntityType
Description copied from interface:JpaMetamodelSame asJpaMetamodel.entity(Class)exceptnullis returned rather than throwing an exception- Specified by:
findEntityTypein interfaceJpaMetamodel
-
findEmbeddableType
Description copied from interface:JpaMetamodelSame asJpaMetamodel.embeddable(Class)exceptnullis returned rather than throwing an exception- Specified by:
findEmbeddableTypein interfaceJpaMetamodel
-
qualifyImportableName
- Specified by:
qualifyImportableNamein interfaceJpaMetamodel
-
getEnumTypesForValue
- Specified by:
getEnumTypesForValuein interfaceJpaMetamodel
-
getJavaConstantType
- Specified by:
getJavaConstantTypein interfaceJpaMetamodel
-
getJavaConstant
- Specified by:
getJavaConstantin interfaceJpaMetamodel
-
getEnumType
- Specified by:
getEnumTypein interfaceJpaMetamodel
-
enumValue
- Specified by:
enumValuein interfaceJpaMetamodel
-
getImportedName
- Specified by:
getImportedNamein interfaceMappingMetamodel
-
forEachCollectionDescriptor
Description copied from interface:MappingMetamodelVisit the mapping descriptors for all collections defined in the model- Specified by:
forEachCollectionDescriptorin interfaceMappingMetamodel
-
streamCollectionDescriptors
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
streamCollectionDescriptorsin interfaceMappingMetamodel
-
getCollectionDescriptor
Description copied from interface:MappingMetamodelGet a collection mapping descriptor based on its role- Specified by:
getCollectionDescriptorin interfaceMappingMetamodel- See Also:
-
findCollectionDescriptor
Description copied from interface:MappingMetamodelFind a collection mapping descriptor based on its role. Returnsnullif the role does not refer to a collection- Specified by:
findCollectionDescriptorin interfaceMappingMetamodel- See Also:
-
resolveMappingExpressible
public MappingModelExpressible<?> resolveMappingExpressible(SqmExpressible<?> sqmExpressible, Function<NavigablePath, TableGroup> tableGroupLocator) - Specified by:
resolveMappingExpressiblein interfaceMappingMetamodel
-
getCollectionRolesByEntityParticipant
Description copied from interface:MappingMetamodelImplementorRetrieves a set of all the collection roles in which the given entity is a participant, as either an index or an element.- Specified by:
getCollectionRolesByEntityParticipantin 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:MappingMetamodelImplementorAccess to the EntityNameResolver instance that Hibernate is configured to use for determining the entity descriptor from an instance of an entity- Specified by:
getEntityNameResolversin interfaceMappingMetamodelImplementor
-
getAllEntityNames
Description copied from interface:MappingMetamodelImplementorGet the names of all entities known to this Metamodel- Specified by:
getAllEntityNamesin interfaceMappingMetamodelImplementor- Returns:
- All the entity names
-
getAllCollectionRoles
Description copied from interface:MappingMetamodelImplementorGet the names of all collections known to this Metamodel- Specified by:
getAllCollectionRolesin interfaceMappingMetamodelImplementor- Returns:
- All the entity names
-
resolveParameterBindType
- Specified by:
resolveParameterBindTypein interfaceQueryParameterBindingTypeResolver
-
resolveParameterBindType
- Specified by:
resolveParameterBindTypein interfaceQueryParameterBindingTypeResolver
-