Top Description Fields Constructors Methods
org.hibernate.engine.spi

public Class SessionFactoryDelegatingImpl

extends Object
implements SessionFactoryImplementor, SessionFactory
Class Inheritance
All Implemented Interfaces
org.hibernate.SessionFactory, java.io.Closeable, java.lang.AutoCloseable, java.io.Serializable, javax.naming.Referenceable, jakarta.persistence.EntityManagerFactory, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.query.spi.QueryParameterBindingTypeResolver, org.hibernate.sql.ast.spi.SqlAstCreationContext, org.hibernate.query.sqm.spi.SqmCreationContext, org.hibernate.engine.spi.Mapping
Imports
java.sql.Connection, java.util.List, .Map, .Set, javax.naming.NamingException, .Reference, jakarta.persistence.EntityGraph, .EntityManager, .PersistenceUnitUtil, .Query, .SynchronizationType, org.hibernate.CustomEntityDirtinessStrategy, .HibernateException, .MappingException, .Session, .SessionFactory, .SessionFactoryObserver, .StatelessSession, .StatelessSessionBuilder, org.hibernate.boot.model.relational.SqlStringGenerationContext, org.hibernate.boot.spi.SessionFactoryOptions, org.hibernate.cache.spi.CacheImplementor, org.hibernate.context.spi.CurrentTenantIdentifierResolver, org.hibernate.engine.jdbc.spi.JdbcServices, org.hibernate.engine.profile.FetchProfile, org.hibernate.event.spi.EventEngine, org.hibernate.graph.spi.RootGraphImplementor, org.hibernate.id.IdentifierGenerator, org.hibernate.internal.FastSessionServices, org.hibernate.metamodel.model.domain.spi.JpaMetamodelImplementor, org.hibernate.metamodel.spi.MetamodelImplementor, .RuntimeMetamodelsImplementor, org.hibernate.proxy.EntityNotFoundDelegate, org.hibernate.query.BindableType, org.hibernate.query.criteria.HibernateCriteriaBuilder, org.hibernate.query.spi.QueryEngine, org.hibernate.relational.SchemaManager, org.hibernate.service.spi.ServiceRegistryImplementor, org.hibernate.stat.spi.StatisticsImplementor, org.hibernate.generator.Generator, org.hibernate.type.Type, org.hibernate.type.descriptor.WrapperOptions, org.hibernate.type.descriptor.java.JavaType, org.hibernate.type.spi.TypeConfiguration

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Base delegating implementation of the SessionFactory and SessionFactoryImplementor contracts for intended for easier implementation of SessionFactory.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final SessionFactoryImplementor
delegate

Deprecated as a consequence of SessionFactoryImplementor being deprecated.

Constructor Summary

AccessConstructor and Description
public
SessionFactoryDelegatingImpl(SessionFactoryImplementor delegate)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.

Method Summary

Modifier and TypeMethod and Description
public <T> void
addNamedEntityGraph(String
name for the entity graph
graphName
,
EntityGraph<T>
entity graph
entityGraph
)

Implements jakarta.persistence.EntityManagerFactory.addNamedEntityGraph.

Add a named copy of the EntityGraph to the EntityManagerFactory.
public void
addNamedQuery(String
name for the query
name
,
Query
Query, TypedQuery, or StoredProcedureQuery object
query
)

Implements jakarta.persistence.EntityManagerFactory.addNamedQuery.

Define the query, typed query, or stored procedure query as a named query such that future query objects can be created from it using the createNamedQuery or createNamedStoredProcedureQuery method.
public void
public String
bestGuessEntityName(Object object)

Implements org.hibernate.engine.spi.SessionFactoryImplementor.bestGuessEntityName.

The best guess entity name for an entity not in an association
public void
close()

Implements org.hibernate.SessionFactory.close.

Destroy this SessionFactory and release all its resources, including caches and connection pools.
public boolean
containsFetchProfileDefinition(String
The name to check
name
)

Overrides default org.hibernate.SessionFactory.containsFetchProfileDefinition.

Determine if there is a fetch profile definition registered under the given name.
public EntityManager
createEntityManager()

Implements jakarta.persistence.EntityManagerFactory.createEntityManager.

Create a new application-managed EntityManager.
public EntityManager
createEntityManager(Map<K, V>
properties for entity manager
map
)

Implements jakarta.persistence.EntityManagerFactory.createEntityManager.

Create a new application-managed EntityManager with the specified Map of properties.
public EntityManager
createEntityManager(SynchronizationType
how and when the entity manager should be synchronized with the current JTA transaction
synchronizationType
)

Implements jakarta.persistence.EntityManagerFactory.createEntityManager.

Create a new JTA application-managed EntityManager with the specified synchronization type.
public EntityManager
createEntityManager(SynchronizationType
how and when the entity manager should be synchronized with the current JTA transaction
synchronizationType
,
Map<K, V>
properties for entity manager
map
)

Implements jakarta.persistence.EntityManagerFactory.createEntityManager.

Create a new JTA application-managed EntityManager with the specified synchronization type and map of properties.
protected SessionFactoryImplementor
delegate()

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
public RootGraphImplementor<?>
findEntityGraphByName(String name)

Implements org.hibernate.engine.spi.SessionFactoryImplementor.findEntityGraphByName, org.hibernate.SessionFactory.findEntityGraphByName.

Return the root EntityGraph with the given name, or null if there is no graph with the given name.
public <T> List<EntityGraph<? super T>>
findEntityGraphsByType(Class<T> entityClass)

Implements org.hibernate.SessionFactory.findEntityGraphsByType.

Return all EntityGraphs registered for the given entity type.
public CacheImplementor
getCache()

Implements org.hibernate.engine.spi.SessionFactoryImplementor.getCache, org.hibernate.SessionFactory.getCache.

Obtain direct access to the underlying cache regions.
public Set<String>
public HibernateCriteriaBuilder
public Session
getCurrentSession()

Implements org.hibernate.SessionFactory.getCurrentSession.

Obtains the current session, an instance of Session implicitly associated with some context or scope.
public CurrentTenantIdentifierResolver<Object>
public CustomEntityDirtinessStrategy
public Set<String>
public Set<String>
public SessionFactoryImplementor.DeserializationResolver<?>
public EntityNotFoundDelegate
public EventEngine
getEventEngine()

Implements org.hibernate.engine.spi.SessionFactoryImplementor.getEventEngine.

Get the EventEngine associated with this SessionFactory
public FastSessionServices
public FetchProfile
getFetchProfile(String
The name of the profile to retrieve.
name
)

Implements org.hibernate.engine.spi.SessionFactoryImplementor.getFetchProfile.

Retrieve fetch profile by name.
public FilterDefinition
getFilterDefinition(String
The name of the filter for which to obtain the definition.
filterName
)

Implements org.hibernate.engine.spi.SessionFactoryImplementor.getFilterDefinition, org.hibernate.SessionFactory.getFilterDefinition.

Deprecated
Obtain the definition of a filter by name.
public Generator
getGenerator(String rootEntityName)

Implements org.hibernate.engine.spi.SessionFactoryImplementor.getGenerator.

Get the identifier generator for the hierarchy
public IdentifierGenerator
getIdentifierGenerator(String rootEntityName)

Implements org.hibernate.engine.spi.SessionFactoryImplementor.getIdentifierGenerator.

Get the identifier generator for the hierarchy
public String
public Type
public JdbcServices
public JpaMetamodelImplementor
public Integer
getMaximumFetchDepth()

Implements org.hibernate.sql.ast.spi.SqlAstCreationContext.getMaximumFetchDepth.

When creating org.hibernate.sql.results.graph.Fetch references, defines a limit to how deep we should join for fetches.
public MetamodelImplementor
getMetamodel()

Implements org.hibernate.engine.spi.SessionFactoryImplementor.getMetamodel, jakarta.persistence.EntityManagerFactory.getMetamodel.

Deprecated
Return an instance of Metamodel interface for access to the metamodel of the persistence unit.
public String
getName()

Implements org.hibernate.engine.spi.SessionFactoryImplementor.getName.

Access to the name (if one) assigned to the SessionFactory
public PersistenceUnitUtil
getPersistenceUnitUtil()

Implements jakarta.persistence.EntityManagerFactory.getPersistenceUnitUtil.

Return interface providing access to utility methods for the persistence unit.
public Map<String, Object>
getProperties()

Implements jakarta.persistence.EntityManagerFactory.getProperties.

Get the properties and associated values that are in effect for the entity manager factory.
public QueryEngine
public Reference
getReference()

Implements javax.naming.Referenceable.getReference.

Retrieves the Reference of this object.
public Type
public RuntimeMetamodelsImplementor
public SchemaManager
getSchemaManager()

Implements org.hibernate.SessionFactory.getSchemaManager.

A SchemaManager with the same default catalog and schema as pooled connections belonging to this factory.
public ServiceRegistryImplementor
getServiceRegistry()

Implements org.hibernate.engine.spi.SessionFactoryImplementor.getServiceRegistry.

Access to the ServiceRegistry for this SessionFactory.
public SessionFactoryOptions
public SqlStringGenerationContext
public StatisticsImplementor
public JavaType<Object>
public TypeConfiguration
public String
getUuid()

Implements org.hibernate.engine.spi.SessionFactoryImplementor.getUuid.

Get the UUID for this SessionFactory.
public WrapperOptions
public boolean
isClosed()

Implements org.hibernate.SessionFactory.isClosed.

Is this factory already closed?
public boolean
isOpen()

Implements jakarta.persistence.EntityManagerFactory.isOpen.

Indicates whether the factory is open.
public SessionImplementor
openSession()

Implements org.hibernate.engine.spi.SessionFactoryImplementor.openSession, org.hibernate.SessionFactory.openSession.

Overrides SessionFactory#openSession() to widen the return type: this is useful for internal code depending on SessionFactoryImplementor as it would otherwise need to frequently resort to casting to the internal contract.
public StatelessSession
public StatelessSession
openStatelessSession(Connection
Connection provided by the application.
connection
)

Implements org.hibernate.SessionFactory.openStatelessSession.

Open a new stateless session, utilizing the specified JDBC Connection.
public SessionImplementor
openTemporarySession()

Implements org.hibernate.engine.spi.SessionFactoryImplementor.openTemporarySession.

Get a non-transactional "current" session (used by hibernate-envers)
public <T> BindableType<? super T>
public <T> BindableType<T>
public <T> T
unwrap(Class<T>
the class of the object to be returned. This is normally either the underlying EntityManagerFactory implementation class or an interface that it implements.
cls
)

Implements jakarta.persistence.EntityManagerFactory.unwrap.

Return an object of the specified type to allow access to the provider-specific API.
public SessionBuilderImplementor
public StatelessSessionBuilder
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait