站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 3.2.4 正式版 API 英文文档

SessionFactoryImplementor (Hibernate API Documentation) - Hibernate 3.2.4 正式版 API 英文文档


org.hibernate.engine
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.

Author:
Gavin King
See Also:
SessionFactory, SessionFactoryImpl

Method Summary
 Map getAllSecondLevelCacheRegions()
           
 CollectionPersister getCollectionPersister(String role)
          Get the persister object for a collection role
 Set 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
 Dialect getDialect()
          Get the SQL Dialect
 EntityNotFoundDelegate getEntityNotFoundDelegate()
           
 EntityPersister getEntityPersister(String entityName)
          Get the persister for the named entity
 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()
           
 NamedQueryDefinition getNamedQuery(String queryName)
           
 NamedSQLQueryDefinition getNamedSQLQuery(String queryName)
           
 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
 Cache getSecondLevelCacheRegion(String regionName)
          Get a named second-level cache region
 Settings getSettings()
           
 SQLExceptionConverter getSQLExceptionConverter()
          Retrieves the SQLExceptionConverter in effect for this SessionFactory.
 SQLFunctionRegistry getSqlFunctionRegistry()
           
 StatisticsImplementor getStatisticsImplementor()
          Statistics SPI
 TransactionManager getTransactionManager()
          Get the JTA transaction manager
 UpdateTimestampsCache getUpdateTimestampsCache()
          Get the cache of table update timestamps
 Session openSession(Connection connection, boolean flushBeforeCompletionEnabled, boolean autoCloseSessionEnabled, ConnectionReleaseMode connectionReleaseMode)
          Open a session conforming to the given parameters.
 Session openTemporarySession()
          Get a nontransactional "current" session for Hibernate EntityManager
 
Methods inherited from interface org.hibernate.engine.Mapping
getIdentifierPropertyName, getIdentifierType, getReferencedPropertyType
 
Methods inherited from interface org.hibernate.SessionFactory
close, evict, evict, evictCollection, evictCollection, evictEntity, evictEntity, evictQueries, evictQueries, getAllClassMetadata, getAllCollectionMetadata, getClassMetadata, getClassMetadata, getCollectionMetadata, getCurrentSession, getDefinedFilterNames, getFilterDefinition, getStatistics, isClosed, openSession, openSession, openSession, openSession, openStatelessSession, openStatelessSession
 
Methods inherited from interface javax.naming.Referenceable
getReference
 

Method Detail

getEntityPersister

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

Throws:
MappingException

getCollectionPersister

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

Throws:
MappingException

getDialect

public Dialect getDialect()
Get the SQL Dialect


getInterceptor

public Interceptor getInterceptor()

getQueryPlanCache

public QueryPlanCache getQueryPlanCache()

getReturnTypes

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

Throws:
HibernateException

getReturnAliases

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

Throws:
HibernateException

getConnectionProvider

public ConnectionProvider getConnectionProvider()
Get the connection provider


getImplementors

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

Throws:
MappingException

getImportedClassName

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


getTransactionManager

public TransactionManager getTransactionManager()
Get the JTA transaction manager


getQueryCache

public QueryCache getQueryCache()
Get the default query cache


getQueryCache

public 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

public UpdateTimestampsCache getUpdateTimestampsCache()
Get the cache of table update timestamps


getStatisticsImplementor

public StatisticsImplementor getStatisticsImplementor()
Statistics SPI


getNamedQuery

public NamedQueryDefinition getNamedQuery(String queryName)

getNamedSQLQuery

public NamedSQLQueryDefinition getNamedSQLQuery(String queryName)

getResultSetMapping

public ResultSetMappingDefinition getResultSetMapping(String name)

getIdentifierGenerator

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


getSecondLevelCacheRegion

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


getAllSecondLevelCacheRegions

public Map getAllSecondLevelCacheRegions()

getSQLExceptionConverter

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

Returns:
The SQLExceptionConverter for this SessionFactory.

getSettings

public Settings getSettings()

openTemporarySession

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

Throws:
HibernateException

openSession

public Session openSession(Connection connection,
                           boolean flushBeforeCompletionEnabled,
                           boolean autoCloseSessionEnabled,
                           ConnectionReleaseMode connectionReleaseMode)
                    throws HibernateException
Open a session conforming to the given parameters. Used mainly by JTASessionContext for current session processing.

Parameters:
connection - The external jdbc connection to use, if one (i.e., optional).
flushBeforeCompletionEnabled - Should the session be auto-flushed prior to transaction completion?
autoCloseSessionEnabled - Should the session be auto-closed after transaction completion?
connectionReleaseMode - The release mode for managed jdbc connections.
Returns:
An appropriate session.
Throws:
HibernateException

getCollectionRolesByEntityParticipant

public Set 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

public EntityNotFoundDelegate getEntityNotFoundDelegate()

getSqlFunctionRegistry

public SQLFunctionRegistry getSqlFunctionRegistry()