org.hibernate.engine.spi
Interface SessionFactoryImplementor

All Superinterfaces:
Mapping, Referenceable, Serializable, SessionFactory
All Known Implementing Classes:
SessionFactoryImpl

public interface SessionFactoryImplementor
extends Mapping, SessionFactory

Defines the internal contract between the SessionFactory and other parts of Hibernate such as implementors of Type.

See Also:
SessionFactory, SessionFactoryImpl

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.hibernate.SessionFactory
SessionFactory.SessionFactoryOptions
 
Method Summary
 void addObserver(SessionFactoryObserver observer)
           
 Map getAllSecondLevelCacheRegions()
          Get a map of all the second level cache regions currently maintained in this session factory.
 CollectionPersister getCollectionPersister(String role)
          Get the persister object for a collection role.
 Set<String> getCollectionRolesByEntityParticipant(String entityName)
          Retrieves a set of all the collection roles in which the given entity is a participant, as either an index or an element.
 ConnectionProvider getConnectionProvider()
          Get the connection provider
 CurrentTenantIdentifierResolver getCurrentTenantIdentifierResolver()
           
 CustomEntityDirtinessStrategy getCustomEntityDirtinessStrategy()
           
 Dialect getDialect()
          Get the SQL dialect.
 EntityNotFoundDelegate getEntityNotFoundDelegate()
           
 EntityPersister getEntityPersister(String entityName)
          Get the persister for the named entity
 FetchProfile getFetchProfile(String name)
          Retrieve fetch profile by name.
 IdentifierGenerator getIdentifierGenerator(String rootEntityName)
          Get the identifier generator for the hierarchy
 String[] getImplementors(String className)
          Get the names of all persistent classes that implement/extend the given interface/class
 String getImportedClassName(String name)
          Get a class name, using query language imports
 Interceptor getInterceptor()
          Get the factory scoped interceptor for this factory.
 JdbcServices getJdbcServices()
          Get the JdbcServices.
 NamedQueryDefinition getNamedQuery(String queryName)
           
 NamedSQLQueryDefinition getNamedSQLQuery(String queryName)
           
 Region getNaturalIdCacheRegion(String regionName)
          Get a named naturalId cache region
 Properties getProperties()
          Get a copy of the Properties used to configure this session factory.
 QueryCache getQueryCache()
          Get the default query cache
 QueryCache getQueryCache(String regionName)
          Get a particular named query cache, or the default cache
 QueryPlanCache getQueryPlanCache()
           
 ResultSetMappingDefinition getResultSetMapping(String name)
           
 String[] getReturnAliases(String queryString)
          Get the return aliases of a query
 Type[] getReturnTypes(String queryString)
          Get the return types of a query
 Region getSecondLevelCacheRegion(String regionName)
          Get a named second-level cache region
 ServiceRegistryImplementor getServiceRegistry()
           
 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 getStatisticsImplementor()
          Statistics SPI
 TypeResolver getTypeResolver()
          Retrieve the Type resolver associated with this factory.
 UpdateTimestampsCache getUpdateTimestampsCache()
          Get the cache of table update timestamps
 Session openTemporarySession()
          Get a nontransactional "current" session for Hibernate EntityManager
 SessionBuilderImplementor withOptions()
          Obtain a Session builder.
 
Methods inherited from interface org.hibernate.engine.spi.Mapping
getIdentifierGeneratorFactory, getIdentifierPropertyName, getIdentifierType, getReferencedPropertyType
 
Methods inherited from interface org.hibernate.SessionFactory
close, containsFetchProfileDefinition, evict, evict, evictCollection, evictCollection, evictEntity, evictEntity, evictQueries, evictQueries, getAllClassMetadata, getAllCollectionMetadata, getCache, getClassMetadata, getClassMetadata, getCollectionMetadata, getCurrentSession, getDefinedFilterNames, getFilterDefinition, getSessionFactoryOptions, getStatistics, getTypeHelper, isClosed, openSession, openStatelessSession, openStatelessSession, withStatelessOptions
 
Methods inherited from interface javax.naming.Referenceable
getReference
 

Method Detail

withOptions

SessionBuilderImplementor withOptions()
Description copied from interface: SessionFactory
Obtain a Session builder.

Specified by:
withOptions in interface SessionFactory
Returns:
The session builder

getTypeResolver

TypeResolver getTypeResolver()
Retrieve the Type resolver associated with this factory.

Returns:
The type resolver

getProperties

Properties getProperties()
Get a copy of the Properties used to configure this session factory.

Returns:
The properties.

getEntityPersister

EntityPersister getEntityPersister(String entityName)
                                   throws MappingException
Get the persister for the named entity

Parameters:
entityName - The name of the entity for which to retrieve the persister.
Returns:
The persister
Throws:
MappingException - Indicates persister could not be found with that name.

getCollectionPersister

CollectionPersister getCollectionPersister(String role)
                                           throws MappingException
Get the persister object for a collection role.

Parameters:
role - The role (name) of the collection for which to retrieve the persister.
Returns:
The persister
Throws:
MappingException - Indicates persister could not be found with that role.

getJdbcServices

JdbcServices getJdbcServices()
Get the JdbcServices.

Returns:
the JdbcServices

getDialect

Dialect getDialect()
Get the SQL dialect.

Shorthand for getJdbcServices().getDialect()

Returns:
The dialect

getInterceptor

Interceptor getInterceptor()
Get the factory scoped interceptor for this factory.

Returns:
The factory scope interceptor, or null if none.

getQueryPlanCache

QueryPlanCache getQueryPlanCache()

getReturnTypes

Type[] getReturnTypes(String queryString)
                      throws HibernateException
Get the return types of a query

Throws:
HibernateException

getReturnAliases

String[] getReturnAliases(String queryString)
                          throws HibernateException
Get the return aliases of a query

Throws:
HibernateException

getConnectionProvider

ConnectionProvider getConnectionProvider()
Get the connection provider


getImplementors

String[] getImplementors(String className)
                         throws MappingException
Get the names of all persistent classes that implement/extend the given interface/class

Throws:
MappingException

getImportedClassName

String getImportedClassName(String name)
Get a class name, using query language imports


getQueryCache

QueryCache getQueryCache()
Get the default query cache


getQueryCache

QueryCache getQueryCache(String regionName)
                         throws HibernateException
Get a particular named query cache, or the default cache

Parameters:
regionName - the name of the cache region, or null for the default query cache
Returns:
the existing cache, or a newly created cache if none by that region name
Throws:
HibernateException

getUpdateTimestampsCache

UpdateTimestampsCache getUpdateTimestampsCache()
Get the cache of table update timestamps


getStatisticsImplementor

StatisticsImplementor getStatisticsImplementor()
Statistics SPI


getNamedQuery

NamedQueryDefinition getNamedQuery(String queryName)

getNamedSQLQuery

NamedSQLQueryDefinition getNamedSQLQuery(String queryName)

getResultSetMapping

ResultSetMappingDefinition getResultSetMapping(String name)

getIdentifierGenerator

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


getSecondLevelCacheRegion

Region getSecondLevelCacheRegion(String regionName)
Get a named second-level cache region

Parameters:
regionName - The name of the region to retrieve.
Returns:
The region

getNaturalIdCacheRegion

Region getNaturalIdCacheRegion(String regionName)
Get a named naturalId cache region

Parameters:
regionName - The name of the region to retrieve.
Returns:
The region

getAllSecondLevelCacheRegions

Map getAllSecondLevelCacheRegions()
Get a map of all the second level cache regions currently maintained in this session factory. The map is structured with the region name as the key and the Region instances as the values.

Returns:
The map of regions

getSQLExceptionConverter

SQLExceptionConverter getSQLExceptionConverter()
Retrieves the SQLExceptionConverter in effect for this SessionFactory.

Returns:
The SQLExceptionConverter for this SessionFactory.

getSQLExceptionHelper

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

Returns:
The SqlExceptionHelper for this SessionFactory.

getSettings

Settings getSettings()

openTemporarySession

Session openTemporarySession()
                             throws HibernateException
Get a nontransactional "current" session for Hibernate EntityManager

Throws:
HibernateException

getCollectionRolesByEntityParticipant

Set<String> getCollectionRolesByEntityParticipant(String entityName)
Retrieves a set of all the collection roles in which the given entity is a participant, as either an index or an element.

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

EntityNotFoundDelegate getEntityNotFoundDelegate()

getSqlFunctionRegistry

SQLFunctionRegistry getSqlFunctionRegistry()

getFetchProfile

FetchProfile getFetchProfile(String name)
Retrieve fetch profile by name.

Parameters:
name - The name of the profile to retrieve.
Returns:
The profile definition

getServiceRegistry

ServiceRegistryImplementor getServiceRegistry()

addObserver

void addObserver(SessionFactoryObserver observer)

getCustomEntityDirtinessStrategy

CustomEntityDirtinessStrategy getCustomEntityDirtinessStrategy()

getCurrentTenantIdentifierResolver

CurrentTenantIdentifierResolver getCurrentTenantIdentifierResolver()


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.