Package org.hibernate.jpa
Interface HibernateEntityManagerFactory
-
- All Superinterfaces:
EntityManagerFactory
,java.io.Serializable
- All Known Subinterfaces:
HibernateEntityManagerFactory
,SessionFactory
,SessionFactoryImplementor
- All Known Implementing Classes:
SessionFactoryDelegatingImpl
@Deprecated public interface HibernateEntityManagerFactory extends EntityManagerFactory, java.io.Serializable
Deprecated.(since 5.2) Use SessionFactory (or SessionFactoryImplementor) as it now extends EntityManagerFactory directlyContract giving access to the underlyingSessionFactory
from anEntityManagerFactory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description <T> java.util.List<EntityGraph<? super T>>
findEntityGraphsByType(java.lang.Class<T> entityClass)
Deprecated.Find allEntityGraph
s associated with a given entity type.default java.lang.String
getEntityManagerFactoryName()
Deprecated.- no longer necessary.default EntityType
getEntityTypeByName(java.lang.String entityName)
Deprecated.Use org.hibernate.MetamodelImplementor#getEntityTypeByName instead.Metamodel
getMetamodel()
Deprecated.default SessionFactoryImplementor
getSessionFactory()
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 returnthis
Obtain the underlying Hibernate SessionFactory.- Returns:
- The underlying Hibernate SessionFactory
-
findEntityGraphsByType
<T> java.util.List<EntityGraph<? super T>> findEntityGraphsByType(java.lang.Class<T> entityClass)
Deprecated.Find allEntityGraph
s associated with a given entity type.- Parameters:
entityClass
- the entity type for which to find allEntityGraph
s.- Returns:
- A list of
EntityGraph
instances associated with the given entity type. The empty list is returned in case there are not entity graphs.
-
getMetamodel
Metamodel getMetamodel()
Deprecated.- Specified by:
getMetamodel
in interfaceEntityManagerFactory
-
getEntityManagerFactoryName
@Deprecated default java.lang.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(java.lang.String entityName)
Deprecated.Use org.hibernate.MetamodelImplementor#getEntityTypeByName instead.Find an entity type by name- Parameters:
entityName
- entity name- Returns:
- the
EntityType
for the specified name
-
-