接口 MetamodelImplementor
-
- 所有超级接口:
javax.persistence.metamodel.Metamodel,Metamodel
- 所有已知实现类:
MetamodelImpl
public interface MetamodelImplementor extends Metamodel
Hibernate extension to the JPAMetamodelcontract- 作者:
- Steve Ebersole
-
-
方法概要
所有方法 实例方法 抽象方法 默认方法 已过时的方法 修饰符和类型 方法 说明 <T> voidaddNamedEntityGraph(String graphName, javax.persistence.EntityGraph<T> entityGraph)已过时。UseaddNamedEntityGraph(String, RootGraphImplementor)instead.<T> voidaddNamedEntityGraph(String graphName, RootGraphImplementor<T> entityGraph)voidclose()CollectionPersistercollectionPersister(String role)Get the persister object for a collection role.Map<String,CollectionPersister>collectionPersisters()Get all collection persisters as a Map, which collection role as the key and the persister is the value.<X> EmbeddedTypeDescriptor<X>embeddable(Class<X> cls)<X> EntityTypeDescriptor<X>entity(Class<X> cls)<X> EntityTypeDescriptor<X>entity(String entityName)Access to an entity supporting Hibernate's entity-name featureEntityPersisterentityPersister(Class entityClass)Locate the persister for an entity by the entity class.EntityPersisterentityPersister(String entityName)Locate the persister for an entity by the entity-nameMap<String,EntityPersister>entityPersisters()Get all entity persisters as a Map, which entity name its the key and the persister is the value.<T> RootGraphImplementor<T>findEntityGraphByName(String name)<T> List<RootGraphImplementor<? super T>>findEntityGraphsByJavaType(Class<T> entityClass)default <T> List<javax.persistence.EntityGraph<? super T>>findEntityGraphsByType(Class<T> entityClass)已过时。UsefindEntityGraphsByJavaType(Class)instead.String[]getAllCollectionRoles()Get the names of all collections known to this MetamodelString[]getAllEntityNames()Get the names of all entities known to this MetamodelSet<String>getCollectionRolesByEntityParticipant(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.Collection<EntityNameResolver>getEntityNameResolvers()default EntityTypeDescriptorgetEntityTypeByName(String entityName)SessionFactoryImplementorgetSessionFactory()Access to the SessionFactory that this Metamodel instance is bound to.TypeConfigurationgetTypeConfiguration()Access to the TypeConfiguration in effect for this SessionFactory/MetamodelEntityPersisterlocateEntityPersister(Class byClass)Locate an EntityPersister by the entity class.EntityPersisterlocateEntityPersister(String byName)Locate the entity persister by name.<X> ManagedTypeDescriptor<X>managedType(Class<X> cls)-
从接口继承的方法 org.hibernate.Metamodel
getImplementors, getImportedClassName
-
-
-
-
方法详细资料
-
getTypeConfiguration
TypeConfiguration getTypeConfiguration()
Access to the TypeConfiguration in effect for this SessionFactory/Metamodel- 返回:
- Access to the TypeConfiguration
-
getSessionFactory
SessionFactoryImplementor getSessionFactory()
从接口复制的说明:MetamodelAccess to the SessionFactory that this Metamodel instance is bound to.- 指定者:
getSessionFactory在接口中Metamodel- 返回:
- The SessionFactory
-
getEntityNameResolvers
Collection<EntityNameResolver> getEntityNameResolvers()
-
locateEntityPersister
EntityPersister locateEntityPersister(Class byClass)
Locate an EntityPersister by the entity class. The passed Class might refer to either the entity name directly, or it might name a proxy interface for the entity. This method accounts for both, preferring the direct named entity name.- 参数:
byClass- The concrete Class or proxy interface for the entity to locate the persister for.- 返回:
- The located EntityPersister, never
null - 抛出:
UnknownEntityTypeException- If a matching EntityPersister cannot be located
-
locateEntityPersister
EntityPersister locateEntityPersister(String byName)
Locate the entity persister by name.- 参数:
byName- The entity name- 返回:
- The located EntityPersister, never
null - 抛出:
UnknownEntityTypeException- If a matching EntityPersister cannot be located
-
entityPersister
EntityPersister entityPersister(Class entityClass)
Locate the persister for an entity by the entity class.- 参数:
entityClass- The entity class- 返回:
- The entity persister
- 抛出:
MappingException- Indicates persister for that class could not be found.
-
entityPersister
EntityPersister entityPersister(String entityName)
Locate the persister for an entity by the entity-name- 参数:
entityName- The name of the entity for which to retrieve the persister.- 返回:
- The persister
- 抛出:
MappingException- Indicates persister could not be found with that name.
-
entityPersisters
Map<String,EntityPersister> entityPersisters()
Get all entity persisters as a Map, which entity name its the key and the persister is the value.- 返回:
- The Map contains all entity persisters.
-
collectionPersister
CollectionPersister collectionPersister(String role)
Get the persister object for a collection role.- 参数:
role- The role of the collection for which to retrieve the persister.- 返回:
- The persister
- 抛出:
MappingException- Indicates persister could not be found with that role.
-
collectionPersisters
Map<String,CollectionPersister> collectionPersisters()
Get all collection persisters as a Map, which collection role as the key and the persister is the value.- 返回:
- The Map contains all collection persisters.
-
getCollectionRolesByEntityParticipant
Set<String> getCollectionRolesByEntityParticipant(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.- 参数:
entityName- The entity name for which to get the collection roles.- 返回:
- set of all the collection roles in which the given entityName participates.
-
getAllEntityNames
String[] getAllEntityNames()
Get the names of all entities known to this Metamodel- 返回:
- All of the entity names
-
getAllCollectionRoles
String[] getAllCollectionRoles()
Get the names of all collections known to this Metamodel- 返回:
- All of the entity names
-
addNamedEntityGraph
<T> void addNamedEntityGraph(String graphName, RootGraphImplementor<T> entityGraph)
-
addNamedEntityGraph
@Deprecated <T> void addNamedEntityGraph(String graphName, javax.persistence.EntityGraph<T> entityGraph)
已过时。UseaddNamedEntityGraph(String, RootGraphImplementor)instead.
-
findEntityGraphByName
<T> RootGraphImplementor<T> findEntityGraphByName(String name)
-
findEntityGraphsByJavaType
<T> List<RootGraphImplementor<? super T>> findEntityGraphsByJavaType(Class<T> entityClass)
-
findEntityGraphsByType
@Deprecated default <T> List<javax.persistence.EntityGraph<? super T>> findEntityGraphsByType(Class<T> entityClass)
已过时。UsefindEntityGraphsByJavaType(Class)instead.
-
close
void close()
-
entity
<X> EntityTypeDescriptor<X> entity(String entityName)
从接口复制的说明:MetamodelAccess to an entity supporting Hibernate's entity-name feature
-
entity
<X> EntityTypeDescriptor<X> entity(Class<X> cls)
- 指定者:
entity在接口中javax.persistence.metamodel.Metamodel
-
managedType
<X> ManagedTypeDescriptor<X> managedType(Class<X> cls)
- 指定者:
managedType在接口中javax.persistence.metamodel.Metamodel
-
embeddable
<X> EmbeddedTypeDescriptor<X> embeddable(Class<X> cls)
- 指定者:
embeddable在接口中javax.persistence.metamodel.Metamodel
-
getEntityTypeByName
default EntityTypeDescriptor getEntityTypeByName(String entityName)
- 指定者:
getEntityTypeByName在接口中Metamodel
-
-