Package org.hibernate.jpa
Interface HibernateEntityManagerFactory
-
- All Superinterfaces:
EntityManagerFactory,Serializable
- All Known Subinterfaces:
HibernateEntityManagerFactory,SessionFactory,SessionFactoryImplementor
- All Known Implementing Classes:
SessionFactoryDelegatingImpl
@Deprecated public interface HibernateEntityManagerFactory extends EntityManagerFactory, Serializable
Deprecated.(since 5.2) Use SessionFactory (or SessionFactoryImplementor) as it now extends EntityManagerFactory directlyContract giving access to the underlyingSessionFactoryfrom anEntityManagerFactory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description <T> List<EntityGraph<? super T>>findEntityGraphsByType(Class<T> entityClass)Deprecated.Find allEntityGraphs associated with a given entity type.default StringgetEntityManagerFactoryName()Deprecated.- no longer necessary.default EntityTypegetEntityTypeByName(String entityName)Deprecated.Use org.hibernate.MetamodelImplementor#getEntityTypeByName instead.MetamodelgetMetamodel()Deprecated.default SessionFactoryImplementorgetSessionFactory()Deprecated.The expectation is that SessionFactory implementors also implement EntityManagerFactory; so this call really should just returnthis-
Methods inherited from interface javax.persistence.EntityManagerFactory
addNamedEntityGraph, addNamedQuery, close, createEntityManager, createEntityManager, createEntityManager, createEntityManager, getCache, getCriteriaBuilder, getPersistenceUnitUtil, getProperties, isOpen, unwrap
-
-
-
-
Method Detail
-
getSessionFactory
@Deprecated default SessionFactoryImplementor getSessionFactory()
Deprecated.The expectation is that SessionFactory implementors also implement EntityManagerFactory; so this call really should just returnthisObtain the underlying Hibernate SessionFactory.- Returns:
- The underlying Hibernate SessionFactory
-
findEntityGraphsByType
<T> List<EntityGraph<? super T>> findEntityGraphsByType(Class<T> entityClass)
Deprecated.Find allEntityGraphs associated with a given entity type.- Parameters:
entityClass- the entity type for which to find allEntityGraphs.- Returns:
- A list of
EntityGraphinstances associated with the given entity type. The empty list is returned in case there are not entity graphs.
-
getMetamodel
Metamodel getMetamodel()
Deprecated.- Specified by:
getMetamodelin interfaceEntityManagerFactory
-
getEntityManagerFactoryName
@Deprecated default String getEntityManagerFactoryName()
Deprecated.- no longer necessary. all references can be directly replaced with calls toSessionFactoryOptions.getSessionFactoryName()viagetSessionFactory()->SessionFactory.getSessionFactoryOptions()Returns the name of the factory. The name is either can be specified via the property hibernate.ejb.entitymanager_factory_name. If the property is not set the persistence unit name is used. If persistence unit name is not available, a unique name will be generated.- Returns:
- the name of the factory.
-
getEntityTypeByName
@Deprecated default EntityType getEntityTypeByName(String entityName)
Deprecated.Use org.hibernate.MetamodelImplementor#getEntityTypeByName instead.Find an entity type by name- Parameters:
entityName- entity name- Returns:
- the
EntityTypefor the specified name
-
-