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, org.hibernate.jpa.HibernateEntityManagerFactory, javax.persistence.EntityManagerFactory, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.query.spi.QueryParameterBindingTypeResolver, org.hibernate.engine.spi.Mapping
Annotations
@SuppressWarnings:deprecation, unused
Imports
java.sql.Connection, java.util.List, .Map, .Set, javax.naming.NamingException, .Reference, javax.persistence.EntityGraph, .EntityManager, .PersistenceUnitUtil, .Query, .SynchronizationType, javax.persistence.criteria.CriteriaBuilder, org.hibernate.CustomEntityDirtinessStrategy, .EntityNameResolver, .HibernateException, .Interceptor, .MappingException, .Session, .SessionFactory, .SessionFactoryObserver, .StatelessSession, .StatelessSessionBuilder, .TypeHelper, org.hibernate.boot.model.relational.SqlStringGenerationContext, org.hibernate.boot.spi.SessionFactoryOptions, org.hibernate.cache.spi.CacheImplementor, org.hibernate.cfg.Settings, org.hibernate.context.spi.CurrentTenantIdentifierResolver, org.hibernate.dialect.Dialect, org.hibernate.dialect.function.SQLFunctionRegistry, org.hibernate.engine.ResultSetMappingDefinition, org.hibernate.engine.jdbc.spi.JdbcServices, .SqlExceptionHelper, org.hibernate.engine.profile.FetchProfile, org.hibernate.engine.query.spi.QueryPlanCache, org.hibernate.event.spi.EventEngine, org.hibernate.exception.spi.SQLExceptionConverter, org.hibernate.graph.spi.RootGraphImplementor, org.hibernate.id.IdentifierGenerator, org.hibernate.id.factory.IdentifierGeneratorFactory, org.hibernate.internal.FastSessionServices, org.hibernate.metadata.ClassMetadata, .CollectionMetadata, org.hibernate.metamodel.spi.MetamodelImplementor, org.hibernate.persister.collection.CollectionPersister, org.hibernate.persister.entity.EntityPersister, org.hibernate.proxy.EntityNotFoundDelegate, org.hibernate.query.spi.NamedQueryRepository, org.hibernate.service.spi.ServiceRegistryImplementor, org.hibernate.stat.spi.StatisticsImplementor, org.hibernate.type.Type, .TypeResolver

Deprecated

as a consequence of SessionFactoryImplementor and SessionFactory 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 javax.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 javax.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 void
close()

Implements org.hibernate.SessionFactory.close.

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

Implements org.hibernate.SessionFactory.containsFetchProfileDefinition.

Determine if this session factory contains a fetch profile definition registered under the given name.
public EntityManager
createEntityManager()

Implements javax.persistence.EntityManagerFactory.createEntityManager.

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

Implements javax.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 javax.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 javax.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<J>
public <T> List<RootGraphImplementor<? super T>>
public Map<String, ClassMetadata>
getAllClassMetadata()

Implements org.hibernate.SessionFactory.getAllClassMetadata.

Retrieve the ClassMetadata for all mapped entities.
public Map<K, V>
public CacheImplementor
getCache()

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

Deprecated as a consequence of CacheImplementor being deprecated.
Obtain direct access to the underlying cache regions.
public ClassMetadata
getClassMetadata(Class<T>
The entity class
entityClass
)

Implements org.hibernate.SessionFactory.getClassMetadata.

Retrieve the ClassMetadata associated with the given entity class.
public ClassMetadata
getClassMetadata(String
The entity class
entityName
)

Implements org.hibernate.SessionFactory.getClassMetadata.

Retrieve the ClassMetadata associated with the given entity class.
public CollectionMetadata
getCollectionMetadata(String
The collection role (in form [owning-entity-name].[collection-property-name]).
roleName
)

Implements org.hibernate.SessionFactory.getCollectionMetadata.

Get the CollectionMetadata associated with the named collection role.
public CollectionPersister
public Map<String, CollectionPersister>
public Set<String>
public CriteriaBuilder
getCriteriaBuilder()

Implements javax.persistence.EntityManagerFactory.getCriteriaBuilder.

Return an instance of CriteriaBuilder for the creation of CriteriaQuery objects.
public Session
getCurrentSession()

Implements org.hibernate.SessionFactory.getCurrentSession.

Deprecated as a consequence of Session being deprecated.
Obtains the current session.
public CurrentTenantIdentifierResolver
public CustomEntityDirtinessStrategy
public Set<E>
getDefinedFilterNames()

Implements org.hibernate.SessionFactory.getDefinedFilterNames.

Obtain a set of the names of all filters defined on this SessionFactory.
public SessionFactoryImplementor.DeserializationResolver<T extends SessionFactoryImplementor>
public Dialect
public EntityNotFoundDelegate
public EntityPersister
public Map<String, EntityPersister>
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.SessionFactory.getFilterDefinition.

Obtain the definition of a filter by name.
public IdentifierGenerator
getIdentifierGenerator(String rootEntityName)

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

Deprecated as a consequence of IdentifierGenerator being deprecated.
Get the identifier generator for the hierarchy
public IdentifierGeneratorFactory
getIdentifierGeneratorFactory()

Implements org.hibernate.engine.spi.Mapping.getIdentifierGeneratorFactory.

Allow access to the id generator factory, though this is only needed/allowed from configuration.
public String
public Type
public String[]
getImplementors(String className)

Overrides default org.hibernate.engine.spi.SessionFactoryImplementor.getImplementors.

Get the names of all persistent classes that implement/extend the given interface/class
public String
getImportedClassName(String name)

Overrides default org.hibernate.engine.spi.SessionFactoryImplementor.getImportedClassName.

Get a class name, using query language imports
public Interceptor
getInterceptor()

Implements org.hibernate.engine.spi.SessionFactoryImplementor.getInterceptor.

Get the factory scoped interceptor for this factory.
public JdbcServices
public MetamodelImplementor
public String
getName()

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

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

Implements javax.persistence.EntityManagerFactory.getPersistenceUnitUtil.

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

Implements javax.persistence.EntityManagerFactory.getProperties.

Get the properties and associated values that are in effect for the entity manager factory.
public QueryPlanCache
getQueryPlanCache()

Implements org.hibernate.engine.spi.SessionFactoryImplementor.getQueryPlanCache.

Access to the caches of HQL/JPQL and native query plans.
public Reference
getReference()

Implements javax.naming.Referenceable.getReference.

Retrieves the Reference of this object.
public Type
public ResultSetMappingDefinition
public String[]
getReturnAliases(String queryString)

Overrides default org.hibernate.engine.spi.SessionFactoryImplementor.getReturnAliases.

Get the return aliases of a query
public Type[]
getReturnTypes(String queryString)

Overrides default org.hibernate.engine.spi.SessionFactoryImplementor.getReturnTypes.

Get the return types of a query
public ServiceRegistryImplementor
getServiceRegistry()

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

Access to the ServiceRegistry for this SessionFactory.
public SessionFactoryOptions
getSessionFactoryOptions()

Implements org.hibernate.SessionFactory.getSessionFactoryOptions.

Get the special options used to build the factory.
public Settings
getSettings()

Implements org.hibernate.engine.spi.SessionFactoryImplementor.getSettings.

Deprecated as a consequence of Settings being deprecated.
public SQLExceptionConverter
getSQLExceptionConverter()

Overrides default org.hibernate.engine.spi.SessionFactoryImplementor.getSQLExceptionConverter.

Retrieves the SQLExceptionConverter in effect for this SessionFactory.
public SqlExceptionHelper
getSQLExceptionHelper()

Overrides default org.hibernate.engine.spi.SessionFactoryImplementor.getSQLExceptionHelper.

Retrieves the SqlExceptionHelper in effect for this SessionFactory.
public SQLFunctionRegistry
public SqlStringGenerationContext
public StatisticsImplementor
public StatisticsImplementor
public TypeHelper
public TypeResolver

Returns:

The type resolver
getTypeResolver
()

Implements org.hibernate.engine.spi.SessionFactoryImplementor.getTypeResolver.

Deprecated (since 5.3) No replacement, access to and handling of Types will be much different in 6.0
Retrieve the Type resolver associated with this factory.
public String
getUuid()

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

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

Implements org.hibernate.SessionFactory.isClosed.

Is this factory already closed?
public boolean
isOpen()

Implements javax.persistence.EntityManagerFactory.isOpen.

Indicates whether the factory is open.
public Iterable<EntityNameResolver>
public EntityPersister
public EntityPersister
public Session
openSession()

Implements org.hibernate.SessionFactory.openSession.

Deprecated as a consequence of Session being deprecated.
Open a Session.
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 Session
openTemporarySession()

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

Deprecated as a consequence of Session being deprecated.
Get a non-transactional "current" session (used by hibernate-envers)
public void
public void
public Type
public Type
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 javax.persistence.EntityManagerFactory.unwrap.

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