Package org.hibernate.engine.spi
Class SessionFactoryDelegatingImpl
- java.lang.Object
-
- org.hibernate.engine.spi.SessionFactoryDelegatingImpl
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Serializable
,java.lang.AutoCloseable
,javax.naming.Referenceable
,EntityManagerFactory
,Mapping
,SessionFactoryImplementor
,HibernateEntityManagerFactory
,QueryParameterBindingTypeResolver
,SessionFactory
public class SessionFactoryDelegatingImpl extends java.lang.Object implements SessionFactoryImplementor, SessionFactory
Base delegating implementation of the SessionFactory and SessionFactoryImplementor contracts for intended for easier implementation of SessionFactory.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hibernate.engine.spi.SessionFactoryImplementor
SessionFactoryImplementor.DeserializationResolver<T extends SessionFactoryImplementor>
-
-
Constructor Summary
Constructors Constructor Description SessionFactoryDelegatingImpl(SessionFactoryImplementor delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <T> void
addNamedEntityGraph(java.lang.String graphName, EntityGraph<T> entityGraph)
void
addNamedQuery(java.lang.String name, Query query)
void
addObserver(SessionFactoryObserver observer)
void
close()
Destroy this SessionFactory and release all resources (caches, connection pools, etc).boolean
containsFetchProfileDefinition(java.lang.String name)
Determine if this session factory contains a fetch profile definition registered under the given name.EntityManager
createEntityManager()
EntityManager
createEntityManager(java.util.Map map)
EntityManager
createEntityManager(SynchronizationType synchronizationType)
EntityManager
createEntityManager(SynchronizationType synchronizationType, java.util.Map map)
protected SessionFactoryImplementor
delegate()
EntityGraph
findEntityGraphByName(java.lang.String name)
<T> java.util.List<EntityGraph<? super T>>
findEntityGraphsByType(java.lang.Class<T> entityClass)
Find allEntityGraph
s associated with a given entity type.java.util.Map<java.lang.String,ClassMetadata>
getAllClassMetadata()
Retrieve theClassMetadata
for all mapped entities.java.util.Map
getAllCollectionMetadata()
Get theCollectionMetadata
for all mapped collections.CacheImplementor
getCache()
Obtain direct access to the underlying cache regions.ClassMetadata
getClassMetadata(java.lang.Class entityClass)
Retrieve theClassMetadata
associated with the given entity class.ClassMetadata
getClassMetadata(java.lang.String entityName)
Retrieve theClassMetadata
associated with the given entity class.CollectionMetadata
getCollectionMetadata(java.lang.String roleName)
Get theCollectionMetadata
associated with the named collection role.CollectionPersister
getCollectionPersister(java.lang.String role)
java.util.Map<java.lang.String,CollectionPersister>
getCollectionPersisters()
java.util.Set<java.lang.String>
getCollectionRolesByEntityParticipant(java.lang.String entityName)
CriteriaBuilder
getCriteriaBuilder()
Session
getCurrentSession()
Obtains the current session.CurrentTenantIdentifierResolver
getCurrentTenantIdentifierResolver()
CustomEntityDirtinessStrategy
getCustomEntityDirtinessStrategy()
java.util.Set
getDefinedFilterNames()
Obtain a set of the names of all filters defined on this SessionFactory.SessionFactoryImplementor.DeserializationResolver
getDeserializationResolver()
Dialect
getDialect()
Get the SQL dialect.EntityNotFoundDelegate
getEntityNotFoundDelegate()
EntityPersister
getEntityPersister(java.lang.String entityName)
java.util.Map<java.lang.String,EntityPersister>
getEntityPersisters()
FetchProfile
getFetchProfile(java.lang.String name)
Retrieve fetch profile by name.FilterDefinition
getFilterDefinition(java.lang.String filterName)
Obtain the definition of a filter by name.IdentifierGenerator
getIdentifierGenerator(java.lang.String rootEntityName)
Get the identifier generator for the hierarchyIdentifierGeneratorFactory
getIdentifierGeneratorFactory()
Allow access to the id generator factory, though this is only needed/allowed from configuration.java.lang.String
getIdentifierPropertyName(java.lang.String className)
Type
getIdentifierType(java.lang.String className)
java.lang.String[]
getImplementors(java.lang.String className)
Get the names of all persistent classes that implement/extend the given interface/classjava.lang.String
getImportedClassName(java.lang.String name)
Get a class name, using query language importsInterceptor
getInterceptor()
Get the factory scoped interceptor for this factory.JdbcServices
getJdbcServices()
Get the JdbcServices.MetamodelImplementor
getMetamodel()
java.lang.String
getName()
Access to the name (if one) assigned to the SessionFactoryNamedQueryDefinition
getNamedQuery(java.lang.String queryName)
NamedQueryRepository
getNamedQueryRepository()
Provides access to the named query repositoryNamedSQLQueryDefinition
getNamedSQLQuery(java.lang.String queryName)
PersistenceUnitUtil
getPersistenceUnitUtil()
java.util.Map<java.lang.String,java.lang.Object>
getProperties()
QueryPlanCache
getQueryPlanCache()
Access to the cachres of HQL/JPQL and native query plans.javax.naming.Reference
getReference()
Type
getReferencedPropertyType(java.lang.String className, java.lang.String propertyName)
ResultSetMappingDefinition
getResultSetMapping(java.lang.String name)
java.lang.String[]
getReturnAliases(java.lang.String queryString)
Get the return aliases of a queryType[]
getReturnTypes(java.lang.String queryString)
Get the return types of a queryServiceRegistryImplementor
getServiceRegistry()
Access to the ServiceRegistry for this SessionFactory.SessionFactoryOptions
getSessionFactoryOptions()
Get the special options used to build the factory.Settings
getSettings()
SQLExceptionConverter
getSQLExceptionConverter()
Retrieves the SQLExceptionConverter in effect for this SessionFactory.SqlExceptionHelper
getSQLExceptionHelper()
Retrieves the SqlExceptionHelper in effect for this SessionFactory.SQLFunctionRegistry
getSqlFunctionRegistry()
StatisticsImplementor
getStatistics()
Retrieve the statistics fopr this factory.StatisticsImplementor
getStatisticsImplementor()
TypeHelper
getTypeHelper()
Retrieve this factory'sTypeHelper
.TypeResolver
getTypeResolver()
Deprecated.(since 5.3) No replacement, access to and handling of Types will be much different in 6.0java.lang.String
getUuid()
Get the UUID for this SessionFactory.boolean
isClosed()
Is this factory already closed?boolean
isOpen()
java.lang.Iterable<EntityNameResolver>
iterateEntityNameResolvers()
EntityPersister
locateEntityPersister(java.lang.Class byClass)
EntityPersister
locateEntityPersister(java.lang.String byName)
Session
openSession()
Open aSession
.StatelessSession
openStatelessSession()
Open a new stateless session.StatelessSession
openStatelessSession(java.sql.Connection connection)
Open a new stateless session, utilizing the specified JDBCConnection
.Session
openTemporarySession()
Get a non-transactional "current" session (used by hibernate-envers)void
registerNamedQueryDefinition(java.lang.String name, NamedQueryDefinition definition)
void
registerNamedSQLQueryDefinition(java.lang.String name, NamedSQLQueryDefinition definition)
Type
resolveParameterBindType(java.lang.Class clazz)
Type
resolveParameterBindType(java.lang.Object bindValue)
<T> T
unwrap(java.lang.Class<T> cls)
SessionBuilderImplementor
withOptions()
Obtain aSession
builder.StatelessSessionBuilder
withStatelessOptions()
Obtain aStatelessSession
builder.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.jpa.HibernateEntityManagerFactory
getEntityManagerFactoryName, getEntityTypeByName, getSessionFactory
-
-
-
-
Constructor Detail
-
SessionFactoryDelegatingImpl
public SessionFactoryDelegatingImpl(SessionFactoryImplementor delegate)
-
-
Method Detail
-
delegate
protected SessionFactoryImplementor delegate()
-
getSessionFactoryOptions
public SessionFactoryOptions getSessionFactoryOptions()
Description copied from interface:SessionFactory
Get the special options used to build the factory.- Specified by:
getSessionFactoryOptions
in interfaceSessionFactory
- Returns:
- The special options used to build the factory.
-
withOptions
public SessionBuilderImplementor withOptions()
Description copied from interface:SessionFactory
Obtain aSession
builder.- Specified by:
withOptions
in interfaceSessionFactory
- Specified by:
withOptions
in interfaceSessionFactoryImplementor
- Returns:
- The session builder
-
openSession
public Session openSession() throws HibernateException
Description copied from interface:SessionFactory
Open aSession
. JDBCconnection(s
will be obtained from the configuredConnectionProvider
as needed to perform requested work.- Specified by:
openSession
in interfaceSessionFactory
- Returns:
- The created session.
- Throws:
HibernateException
- Indicates a problem opening the session; pretty rare here.
-
getCurrentSession
public Session getCurrentSession() throws HibernateException
Description copied from interface:SessionFactory
Obtains the current session. The definition of what exactly "current" means controlled by theCurrentSessionContext
impl configured for use. Note that for backwards compatibility, if aCurrentSessionContext
is not configured but JTA is configured this will default to theJTASessionContext
impl.- Specified by:
getCurrentSession
in interfaceSessionFactory
- Returns:
- The current session.
- Throws:
HibernateException
- Indicates an issue locating a suitable current session.
-
withStatelessOptions
public StatelessSessionBuilder withStatelessOptions()
Description copied from interface:SessionFactory
Obtain aStatelessSession
builder.- Specified by:
withStatelessOptions
in interfaceSessionFactory
- Returns:
- The stateless session builder
-
openStatelessSession
public StatelessSession openStatelessSession()
Description copied from interface:SessionFactory
Open a new stateless session.- Specified by:
openStatelessSession
in interfaceSessionFactory
- Returns:
- The created stateless session.
-
openStatelessSession
public StatelessSession openStatelessSession(java.sql.Connection connection)
Description copied from interface:SessionFactory
Open a new stateless session, utilizing the specified JDBCConnection
.- Specified by:
openStatelessSession
in interfaceSessionFactory
- Parameters:
connection
- Connection provided by the application.- Returns:
- The created stateless session.
-
getClassMetadata
public ClassMetadata getClassMetadata(java.lang.Class entityClass)
Description copied from interface:SessionFactory
Retrieve theClassMetadata
associated with the given entity class.- Specified by:
getClassMetadata
in interfaceSessionFactory
- Parameters:
entityClass
- The entity class- Returns:
- The metadata associated with the given entity; may be null if no such entity was mapped.
-
getClassMetadata
public ClassMetadata getClassMetadata(java.lang.String entityName)
Description copied from interface:SessionFactory
Retrieve theClassMetadata
associated with the given entity class.- Specified by:
getClassMetadata
in interfaceSessionFactory
- Parameters:
entityName
- The entity class- Returns:
- The metadata associated with the given entity; may be null if no such entity was mapped.
-
getCollectionMetadata
public CollectionMetadata getCollectionMetadata(java.lang.String roleName)
Description copied from interface:SessionFactory
Get theCollectionMetadata
associated with the named collection role.- Specified by:
getCollectionMetadata
in interfaceSessionFactory
- Parameters:
roleName
- The collection role (in form [owning-entity-name].[collection-property-name]).- Returns:
- The metadata associated with the given collection; may be null if no such collection was mapped.
-
getAllClassMetadata
public java.util.Map<java.lang.String,ClassMetadata> getAllClassMetadata()
Description copied from interface:SessionFactory
Retrieve theClassMetadata
for all mapped entities.- Specified by:
getAllClassMetadata
in interfaceSessionFactory
- Returns:
- A map containing all
ClassMetadata
keyed by the correspondingString
entity-name.
-
getAllCollectionMetadata
public java.util.Map getAllCollectionMetadata()
Description copied from interface:SessionFactory
Get theCollectionMetadata
for all mapped collections.- Specified by:
getAllCollectionMetadata
in interfaceSessionFactory
- Returns:
- a map from String to CollectionMetadata
-
getStatistics
public StatisticsImplementor getStatistics()
Description copied from interface:SessionFactory
Retrieve the statistics fopr this factory.- Specified by:
getStatistics
in interfaceSessionFactory
- Specified by:
getStatistics
in interfaceSessionFactoryImplementor
- Returns:
- The statistics.
-
close
public void close() throws HibernateException
Description copied from interface:SessionFactory
Destroy this SessionFactory and release all resources (caches, connection pools, etc). It is the responsibility of the application to ensure that there are no opensessions
before calling this method as the impact on thosesessions
is indeterminate. No-ops if alreadyclosed
.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in interfaceEntityManagerFactory
- Specified by:
close
in interfaceSessionFactory
- Throws:
HibernateException
- Indicates an issue closing the factory.
-
isClosed
public boolean isClosed()
Description copied from interface:SessionFactory
Is this factory already closed?- Specified by:
isClosed
in interfaceSessionFactory
- Returns:
- True if this factory is already closed; false otherwise.
-
getCache
public CacheImplementor getCache()
Description copied from interface:SessionFactory
Obtain direct access to the underlying cache regions.- Specified by:
getCache
in interfaceEntityManagerFactory
- Specified by:
getCache
in interfaceSessionFactory
- Specified by:
getCache
in interfaceSessionFactoryImplementor
- Returns:
- The direct cache access API.
-
getPersistenceUnitUtil
public PersistenceUnitUtil getPersistenceUnitUtil()
- Specified by:
getPersistenceUnitUtil
in interfaceEntityManagerFactory
-
addNamedQuery
public void addNamedQuery(java.lang.String name, Query query)
- Specified by:
addNamedQuery
in interfaceEntityManagerFactory
-
unwrap
public <T> T unwrap(java.lang.Class<T> cls)
- Specified by:
unwrap
in interfaceEntityManagerFactory
-
addNamedEntityGraph
public <T> void addNamedEntityGraph(java.lang.String graphName, EntityGraph<T> entityGraph)
- Specified by:
addNamedEntityGraph
in interfaceEntityManagerFactory
-
getDefinedFilterNames
public java.util.Set getDefinedFilterNames()
Description copied from interface:SessionFactory
Obtain a set of the names of all filters defined on this SessionFactory.- Specified by:
getDefinedFilterNames
in interfaceSessionFactory
- Returns:
- The set of filter names.
-
getFilterDefinition
public FilterDefinition getFilterDefinition(java.lang.String filterName) throws HibernateException
Description copied from interface:SessionFactory
Obtain the definition of a filter by name.- Specified by:
getFilterDefinition
in interfaceSessionFactory
- Parameters:
filterName
- The name of the filter for which to obtain the definition.- Returns:
- The filter definition.
- Throws:
HibernateException
- If no filter defined with the given name.
-
containsFetchProfileDefinition
public boolean containsFetchProfileDefinition(java.lang.String name)
Description copied from interface:SessionFactory
Determine if this session factory contains a fetch profile definition registered under the given name.- Specified by:
containsFetchProfileDefinition
in interfaceSessionFactory
- Parameters:
name
- The name to check- Returns:
- True if there is such a fetch profile; false otherwise.
-
getTypeHelper
public TypeHelper getTypeHelper()
Description copied from interface:SessionFactory
Retrieve this factory'sTypeHelper
.- Specified by:
getTypeHelper
in interfaceSessionFactory
- Returns:
- The factory's
TypeHelper
-
getTypeResolver
@Deprecated public TypeResolver getTypeResolver()
Deprecated.(since 5.3) No replacement, access to and handling of Types will be much different in 6.0Retrieve theType
resolver associated with this factory.- Specified by:
getTypeResolver
in interfaceSessionFactoryImplementor
- Returns:
- The type resolver
-
getProperties
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
- Specified by:
getProperties
in interfaceEntityManagerFactory
-
getEntityPersister
public EntityPersister getEntityPersister(java.lang.String entityName) throws MappingException
- Specified by:
getEntityPersister
in interfaceSessionFactoryImplementor
- Throws:
MappingException
-
getEntityPersisters
public java.util.Map<java.lang.String,EntityPersister> getEntityPersisters()
- Specified by:
getEntityPersisters
in interfaceSessionFactoryImplementor
-
getCollectionPersister
public CollectionPersister getCollectionPersister(java.lang.String role) throws MappingException
- Specified by:
getCollectionPersister
in interfaceSessionFactoryImplementor
- Throws:
MappingException
-
getCollectionPersisters
public java.util.Map<java.lang.String,CollectionPersister> getCollectionPersisters()
- Specified by:
getCollectionPersisters
in interfaceSessionFactoryImplementor
-
getJdbcServices
public JdbcServices getJdbcServices()
Description copied from interface:SessionFactoryImplementor
Get the JdbcServices.- Specified by:
getJdbcServices
in interfaceSessionFactoryImplementor
- Returns:
- the JdbcServices
-
getDialect
public Dialect getDialect()
Description copied from interface:SessionFactoryImplementor
Get the SQL dialect. Shorthand forgetJdbcServices().getDialect()
- Specified by:
getDialect
in interfaceSessionFactoryImplementor
- Returns:
- The dialect
-
getInterceptor
public Interceptor getInterceptor()
Description copied from interface:SessionFactoryImplementor
Get the factory scoped interceptor for this factory.- Specified by:
getInterceptor
in interfaceSessionFactoryImplementor
- Returns:
- The factory scope interceptor, or null if none.
-
getQueryPlanCache
public QueryPlanCache getQueryPlanCache()
Description copied from interface:SessionFactoryImplementor
Access to the cachres of HQL/JPQL and native query plans.- Specified by:
getQueryPlanCache
in interfaceSessionFactoryImplementor
- Returns:
- The query plan cache
-
getReturnTypes
public Type[] getReturnTypes(java.lang.String queryString) throws HibernateException
Description copied from interface:SessionFactoryImplementor
Get the return types of a query- Specified by:
getReturnTypes
in interfaceSessionFactoryImplementor
- Throws:
HibernateException
-
getReturnAliases
public java.lang.String[] getReturnAliases(java.lang.String queryString) throws HibernateException
Description copied from interface:SessionFactoryImplementor
Get the return aliases of a query- Specified by:
getReturnAliases
in interfaceSessionFactoryImplementor
- Throws:
HibernateException
-
getImplementors
public java.lang.String[] getImplementors(java.lang.String className) throws MappingException
Description copied from interface:SessionFactoryImplementor
Get the names of all persistent classes that implement/extend the given interface/class- Specified by:
getImplementors
in interfaceSessionFactoryImplementor
- Throws:
MappingException
-
getImportedClassName
public java.lang.String getImportedClassName(java.lang.String name)
Description copied from interface:SessionFactoryImplementor
Get a class name, using query language imports- Specified by:
getImportedClassName
in interfaceSessionFactoryImplementor
-
findEntityGraphByName
public EntityGraph findEntityGraphByName(java.lang.String name)
- Specified by:
findEntityGraphByName
in interfaceSessionFactoryImplementor
-
getStatisticsImplementor
public StatisticsImplementor getStatisticsImplementor()
- Specified by:
getStatisticsImplementor
in interfaceSessionFactoryImplementor
-
getNamedQuery
public NamedQueryDefinition getNamedQuery(java.lang.String queryName)
- Specified by:
getNamedQuery
in interfaceSessionFactoryImplementor
-
registerNamedQueryDefinition
public void registerNamedQueryDefinition(java.lang.String name, NamedQueryDefinition definition)
- Specified by:
registerNamedQueryDefinition
in interfaceSessionFactoryImplementor
-
getNamedSQLQuery
public NamedSQLQueryDefinition getNamedSQLQuery(java.lang.String queryName)
- Specified by:
getNamedSQLQuery
in interfaceSessionFactoryImplementor
-
registerNamedSQLQueryDefinition
public void registerNamedSQLQueryDefinition(java.lang.String name, NamedSQLQueryDefinition definition)
- Specified by:
registerNamedSQLQueryDefinition
in interfaceSessionFactoryImplementor
-
getResultSetMapping
public ResultSetMappingDefinition getResultSetMapping(java.lang.String name)
- Specified by:
getResultSetMapping
in interfaceSessionFactoryImplementor
-
getIdentifierGenerator
public IdentifierGenerator getIdentifierGenerator(java.lang.String rootEntityName)
Description copied from interface:SessionFactoryImplementor
Get the identifier generator for the hierarchy- Specified by:
getIdentifierGenerator
in interfaceSessionFactoryImplementor
-
getSQLExceptionConverter
public SQLExceptionConverter getSQLExceptionConverter()
Description copied from interface:SessionFactoryImplementor
Retrieves the SQLExceptionConverter in effect for this SessionFactory.- Specified by:
getSQLExceptionConverter
in interfaceSessionFactoryImplementor
- Returns:
- The SQLExceptionConverter for this SessionFactory.
-
getSQLExceptionHelper
public SqlExceptionHelper getSQLExceptionHelper()
Description copied from interface:SessionFactoryImplementor
Retrieves the SqlExceptionHelper in effect for this SessionFactory.- Specified by:
getSQLExceptionHelper
in interfaceSessionFactoryImplementor
- Returns:
- The SqlExceptionHelper for this SessionFactory.
-
getSettings
public Settings getSettings()
- Specified by:
getSettings
in interfaceSessionFactoryImplementor
-
openTemporarySession
public Session openTemporarySession() throws HibernateException
Description copied from interface:SessionFactoryImplementor
Get a non-transactional "current" session (used by hibernate-envers)- Specified by:
openTemporarySession
in interfaceSessionFactoryImplementor
- Throws:
HibernateException
-
getCollectionRolesByEntityParticipant
public java.util.Set<java.lang.String> getCollectionRolesByEntityParticipant(java.lang.String entityName)
- Specified by:
getCollectionRolesByEntityParticipant
in interfaceSessionFactoryImplementor
- 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.
-
getEntityNotFoundDelegate
public EntityNotFoundDelegate getEntityNotFoundDelegate()
- Specified by:
getEntityNotFoundDelegate
in interfaceSessionFactoryImplementor
-
getSqlFunctionRegistry
public SQLFunctionRegistry getSqlFunctionRegistry()
- Specified by:
getSqlFunctionRegistry
in interfaceSessionFactoryImplementor
-
getFetchProfile
public FetchProfile getFetchProfile(java.lang.String name)
Description copied from interface:SessionFactoryImplementor
Retrieve fetch profile by name.- Specified by:
getFetchProfile
in interfaceSessionFactoryImplementor
- Parameters:
name
- The name of the profile to retrieve.- Returns:
- The profile definition
-
getServiceRegistry
public ServiceRegistryImplementor getServiceRegistry()
Description copied from interface:SessionFactoryImplementor
Access to the ServiceRegistry for this SessionFactory.- Specified by:
getServiceRegistry
in interfaceSessionFactoryImplementor
- Returns:
- The factory's ServiceRegistry
-
addObserver
public void addObserver(SessionFactoryObserver observer)
- Specified by:
addObserver
in interfaceSessionFactoryImplementor
-
getCustomEntityDirtinessStrategy
public CustomEntityDirtinessStrategy getCustomEntityDirtinessStrategy()
- Specified by:
getCustomEntityDirtinessStrategy
in interfaceSessionFactoryImplementor
-
getCurrentTenantIdentifierResolver
public CurrentTenantIdentifierResolver getCurrentTenantIdentifierResolver()
- Specified by:
getCurrentTenantIdentifierResolver
in interfaceSessionFactoryImplementor
-
getNamedQueryRepository
public NamedQueryRepository getNamedQueryRepository()
Description copied from interface:SessionFactoryImplementor
Provides access to the named query repository- Specified by:
getNamedQueryRepository
in interfaceSessionFactoryImplementor
- Returns:
- The repository for named query definitions
-
iterateEntityNameResolvers
public java.lang.Iterable<EntityNameResolver> iterateEntityNameResolvers()
- Specified by:
iterateEntityNameResolvers
in interfaceSessionFactoryImplementor
-
locateEntityPersister
public EntityPersister locateEntityPersister(java.lang.Class byClass)
- Specified by:
locateEntityPersister
in interfaceSessionFactoryImplementor
-
locateEntityPersister
public EntityPersister locateEntityPersister(java.lang.String byName)
- Specified by:
locateEntityPersister
in interfaceSessionFactoryImplementor
-
getDeserializationResolver
public SessionFactoryImplementor.DeserializationResolver getDeserializationResolver()
- Specified by:
getDeserializationResolver
in interfaceSessionFactoryImplementor
-
getIdentifierGeneratorFactory
public IdentifierGeneratorFactory getIdentifierGeneratorFactory()
Description copied from interface:Mapping
Allow access to the id generator factory, though this is only needed/allowed from configuration.- Specified by:
getIdentifierGeneratorFactory
in interfaceMapping
- Returns:
- Access to the identifier generator factory
-
getIdentifierType
public Type getIdentifierType(java.lang.String className) throws MappingException
- Specified by:
getIdentifierType
in interfaceMapping
- Throws:
MappingException
-
getIdentifierPropertyName
public java.lang.String getIdentifierPropertyName(java.lang.String className) throws MappingException
- Specified by:
getIdentifierPropertyName
in interfaceMapping
- Throws:
MappingException
-
getReferencedPropertyType
public Type getReferencedPropertyType(java.lang.String className, java.lang.String propertyName) throws MappingException
- Specified by:
getReferencedPropertyType
in interfaceMapping
- Throws:
MappingException
-
getUuid
public java.lang.String getUuid()
Description copied from interface:SessionFactoryImplementor
Get the UUID for this SessionFactory. The value is generated as aUUID
, but kept as a String.- Specified by:
getUuid
in interfaceSessionFactoryImplementor
- Returns:
- The UUID for this SessionFactory.
- See Also:
SessionFactoryRegistry.getSessionFactory(java.lang.String)
-
getName
public java.lang.String getName()
Description copied from interface:SessionFactoryImplementor
Access to the name (if one) assigned to the SessionFactory- Specified by:
getName
in interfaceSessionFactoryImplementor
- Returns:
- The name for the SessionFactory
-
getReference
public javax.naming.Reference getReference() throws javax.naming.NamingException
- Specified by:
getReference
in interfacejavax.naming.Referenceable
- Throws:
javax.naming.NamingException
-
findEntityGraphsByType
public <T> java.util.List<EntityGraph<? super T>> findEntityGraphsByType(java.lang.Class<T> entityClass)
Description copied from interface:HibernateEntityManagerFactory
Find allEntityGraph
s associated with a given entity type.- Specified by:
findEntityGraphsByType
in interfaceHibernateEntityManagerFactory
- 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.
-
createEntityManager
public EntityManager createEntityManager()
- Specified by:
createEntityManager
in interfaceEntityManagerFactory
-
createEntityManager
public EntityManager createEntityManager(java.util.Map map)
- Specified by:
createEntityManager
in interfaceEntityManagerFactory
-
createEntityManager
public EntityManager createEntityManager(SynchronizationType synchronizationType)
- Specified by:
createEntityManager
in interfaceEntityManagerFactory
-
createEntityManager
public EntityManager createEntityManager(SynchronizationType synchronizationType, java.util.Map map)
- Specified by:
createEntityManager
in interfaceEntityManagerFactory
-
getCriteriaBuilder
public CriteriaBuilder getCriteriaBuilder()
- Specified by:
getCriteriaBuilder
in interfaceEntityManagerFactory
-
getMetamodel
public MetamodelImplementor getMetamodel()
- Specified by:
getMetamodel
in interfaceEntityManagerFactory
- Specified by:
getMetamodel
in interfaceHibernateEntityManagerFactory
- Specified by:
getMetamodel
in interfaceSessionFactoryImplementor
-
isOpen
public boolean isOpen()
- Specified by:
isOpen
in interfaceEntityManagerFactory
-
resolveParameterBindType
public Type resolveParameterBindType(java.lang.Object bindValue)
- Specified by:
resolveParameterBindType
in interfaceQueryParameterBindingTypeResolver
-
resolveParameterBindType
public Type resolveParameterBindType(java.lang.Class clazz)
- Specified by:
resolveParameterBindType
in interfaceQueryParameterBindingTypeResolver
-
-