Package org.hibernate.engine.spi
Interface SessionFactoryImplementor
-
- All Superinterfaces:
AutoCloseable,Closeable,jakarta.persistence.EntityManagerFactory,Mapping,QueryParameterBindingTypeResolver,Referenceable,Serializable,SessionFactory,SqlAstCreationContext,SqmCreationContext
- All Known Implementing Classes:
SessionFactoryDelegatingImpl,SessionFactoryImpl
public interface SessionFactoryImplementor extends Mapping, SessionFactory, SqmCreationContext, SqlAstCreationContext, QueryParameterBindingTypeResolver
Defines the internal contract between theSessionFactoryand the internal implementation of Hibernate.- See Also:
SessionFactory,SessionFactoryImpl
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceSessionFactoryImplementor.DeserializationResolver<T extends SessionFactoryImplementor>Contract for resolving this SessionFactory on deserialization-
Nested classes/interfaces inherited from interface org.hibernate.SessionFactory
SessionFactory.TransactionManagementException
-
-
Method Summary
-
Methods inherited from interface jakarta.persistence.EntityManagerFactory
addNamedEntityGraph, addNamedQuery, createEntityManager, createEntityManager, createEntityManager, createEntityManager, getPersistenceUnitUtil, getProperties, isOpen, unwrap
-
Methods inherited from interface org.hibernate.engine.spi.Mapping
getIdentifierPropertyName, getIdentifierType, getReferencedPropertyType
-
Methods inherited from interface org.hibernate.query.spi.QueryParameterBindingTypeResolver
resolveParameterBindType, resolveParameterBindType
-
Methods inherited from interface javax.naming.Referenceable
getReference
-
Methods inherited from interface org.hibernate.SessionFactory
close, containsFetchProfileDefinition, findEntityGraphsByType, fromSession, fromTransaction, getCurrentSession, getDefinedFilterNames, getFilterDefinition, getSessionFactoryOptions, inSession, inTransaction, isClosed, openSession, openStatelessSession, openStatelessSession, withStatelessOptions
-
Methods inherited from interface org.hibernate.sql.ast.spi.SqlAstCreationContext
getMaximumFetchDepth
-
Methods inherited from interface org.hibernate.query.sqm.spi.SqmCreationContext
getJpaMetamodel, getNodeBuilder
-
-
-
-
Method Detail
-
getUuid
String getUuid()
Get the UUID for this SessionFactory.The value is generated as a
UUID, but kept as a String.- Returns:
- The UUID for this SessionFactory.
- See Also:
SessionFactoryRegistry.getSessionFactory(java.lang.String)
-
getName
String getName()
Access to the name (if one) assigned to the SessionFactory- Returns:
- The name for the SessionFactory
-
getTypeConfiguration
TypeConfiguration getTypeConfiguration()
- Specified by:
getTypeConfigurationin interfaceQueryParameterBindingTypeResolver
-
getSessionFactory
default SessionFactoryImplementor getSessionFactory()
Description copied from interface:SqlAstCreationContextThe SessionFactory- Specified by:
getSessionFactoryin interfaceSqlAstCreationContext
-
getMappingMetamodel
default MappingMetamodelImplementor getMappingMetamodel()
Description copied from interface:SqlAstCreationContextThe runtime MappingMetamodelImplementor- Specified by:
getMappingMetamodelin interfaceSqlAstCreationContext
-
getQueryEngine
QueryEngine getQueryEngine()
- Specified by:
getQueryEnginein interfaceSqmCreationContext
-
getCriteriaBuilder
HibernateCriteriaBuilder getCriteriaBuilder()
- Specified by:
getCriteriaBuilderin interfacejakarta.persistence.EntityManagerFactory
-
withOptions
SessionBuilderImplementor withOptions()
Description copied from interface:SessionFactoryObtain a session builder for creating newSessions with certain customized options.- Specified by:
withOptionsin interfaceSessionFactory- Returns:
- The session builder
-
openTemporarySession
Session openTemporarySession() throws HibernateException
Get a non-transactional "current" session (used by hibernate-envers)- Throws:
HibernateException
-
getCache
CacheImplementor getCache()
Description copied from interface:SessionFactoryObtain direct access to the underlying cache regions.- Specified by:
getCachein interfacejakarta.persistence.EntityManagerFactory- Specified by:
getCachein interfaceSessionFactory- Returns:
- The direct cache access API.
-
getStatistics
StatisticsImplementor getStatistics()
Description copied from interface:SessionFactoryRetrieve the statistics for this factory.- Specified by:
getStatisticsin interfaceSessionFactory- Returns:
- The statistics.
-
getRuntimeMetamodels
RuntimeMetamodelsImplementor getRuntimeMetamodels()
-
getServiceRegistry
ServiceRegistryImplementor getServiceRegistry()
Access to the ServiceRegistry for this SessionFactory.- Specified by:
getServiceRegistryin interfaceSqlAstCreationContext- Specified by:
getServiceRegistryin interfaceSqmCreationContext- Returns:
- The factory's ServiceRegistry
-
getEventEngine
EventEngine getEventEngine()
Get the EventEngine associated with this SessionFactory
-
getFetchProfile
FetchProfile getFetchProfile(String name)
Retrieve fetch profile by name.- Parameters:
name- The name of the profile to retrieve.- Returns:
- The profile definition
-
getIdentifierGenerator
IdentifierGenerator getIdentifierGenerator(String rootEntityName)
Get the identifier generator for the hierarchy
-
getEntityNotFoundDelegate
EntityNotFoundDelegate getEntityNotFoundDelegate()
-
addObserver
void addObserver(SessionFactoryObserver observer)
-
getCustomEntityDirtinessStrategy
CustomEntityDirtinessStrategy getCustomEntityDirtinessStrategy()
-
getCurrentTenantIdentifierResolver
CurrentTenantIdentifierResolver getCurrentTenantIdentifierResolver()
-
getFastSessionServices
FastSessionServices getFastSessionServices()
- Returns:
- the FastSessionServices instance associated with this SessionFactory
-
getWrapperOptions
WrapperOptions getWrapperOptions()
-
getDeserializationResolver
SessionFactoryImplementor.DeserializationResolver getDeserializationResolver()
-
getJdbcServices
JdbcServices getJdbcServices()
Get the JdbcServices.- Returns:
- the JdbcServices
-
getSqlStringGenerationContext
SqlStringGenerationContext getSqlStringGenerationContext()
-
getMetamodel
@Deprecated MetamodelImplementor getMetamodel()
Deprecated.no longer for internal use, usegetMappingMetamodel()orSqmCreationContext.getJpaMetamodel()- Specified by:
getMetamodelin interfacejakarta.persistence.EntityManagerFactory
-
findEntityGraphByName
RootGraphImplementor<?> findEntityGraphByName(String name)
-
-