Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.hibernate.impl
Class SessionFactoryImpl  view SessionFactoryImpl download SessionFactoryImpl.java

java.lang.Object
  extended byorg.hibernate.impl.SessionFactoryImpl
All Implemented Interfaces:
org.hibernate.engine.Mapping, javax.naming.Referenceable, java.io.Serializable, org.hibernate.SessionFactory, org.hibernate.engine.SessionFactoryImplementor

public final class SessionFactoryImpl
extends java.lang.Object
implements org.hibernate.SessionFactory, org.hibernate.engine.SessionFactoryImplementor

Concrete implementation of the SessionFactory interface. Has the following responsibilites

This class must appear immutable to clients, even if it does all kinds of caching and pooling under the covers. It is crucial that the class is not only thread safe, but also highly concurrent. Synchronization must be used extremely sparingly.


Field Summary
private  java.util.Map allCacheRegions
           
private  java.util.Map classMetadata
           
private  java.util.Map collectionMetadata
           
private  java.util.Map collectionPersisters
           
private  java.util.Map collectionRolesByEntityParticipant
           
private  org.hibernate.context.CurrentSessionContext currentSessionContext
           
private  org.hibernate.proxy.EntityNotFoundDelegate entityNotFoundDelegate
           
private  java.util.Map entityPersisters
           
private  org.hibernate.event.EventListeners eventListeners
           
private  java.util.Map filters
           
private  java.util.Map identifierGenerators
           
private  java.util.Map imports
           
private  org.hibernate.Interceptor interceptor
           
private  boolean isClosed
           
private static org.apache.commons.logging.Log log
           
private  java.lang.String name
           
private  java.util.Map namedQueries
           
private  java.util.Map namedSqlQueries
           
private  java.util.Properties properties
           
private  org.hibernate.cache.QueryCache queryCache
           
private  java.util.Map queryCaches
           
private  org.hibernate.engine.query.QueryPlanCache queryPlanCache
           
private  org.hibernate.tool.hbm2ddl.SchemaExport schemaExport
           
private  org.hibernate.cfg.Settings settings
           
private  java.util.Map sqlResultSetMappings
           
private  org.hibernate.stat.StatisticsImpl statistics
           
private  javax.transaction.TransactionManager transactionManager
           
private  org.hibernate.cache.UpdateTimestampsCache updateTimestampsCache
           
private  java.lang.String uuid
           
private static org.hibernate.id.IdentifierGenerator UUID_GENERATOR
           
 
Constructor Summary
SessionFactoryImpl(org.hibernate.cfg.Configuration cfg, org.hibernate.engine.Mapping mapping, org.hibernate.cfg.Settings settings, org.hibernate.event.EventListeners listeners)
           
 
Method Summary
private  org.hibernate.context.CurrentSessionContext buildCurrentSessionContext()
           
private  java.util.Map checkNamedQueries()
           
 void close()
          Closes the session factory, releasing all held resources.
(package private) static SessionFactoryImpl deserialize(java.io.ObjectInputStream ois)
           
 void evict(java.lang.Class persistentClass)
          Evict all entries from the second-level cache.
 void evict(java.lang.Class persistentClass, java.io.Serializable id)
          Evict an entry from the second-level cache.
 void evictCollection(java.lang.String roleName)
          Evict all entries from the second-level cache.
 void evictCollection(java.lang.String roleName, java.io.Serializable id)
          Evict an entry from the second-level cache.
 void evictEntity(java.lang.String entityName)
          Evict all entries from the second-level cache.
 void evictEntity(java.lang.String entityName, java.io.Serializable id)
          Evict an entry from the second-level cache.
 void evictQueries()
          Evict any query result sets cached in the default query cache region.
 void evictQueries(java.lang.String cacheRegion)
          Evict any query result sets cached in the named query cache region.
 java.util.Map getAllClassMetadata()
          Get all ClassMetadata as a Map from entityname String to metadata object
 java.util.Map getAllCollectionMetadata()
          Get all CollectionMetadata as a Map from role name to metadata object
 java.util.Map getAllSecondLevelCacheRegions()
           
 org.hibernate.jdbc.BatcherFactory getBatcherFactory()
           
 org.hibernate.metadata.ClassMetadata getClassMetadata(java.lang.Class persistentClass)
          Get the ClassMetadata associated with the given entity class
 org.hibernate.metadata.ClassMetadata getClassMetadata(java.lang.String entityName)
          Get the ClassMetadata associated with the given entity name
 org.hibernate.metadata.CollectionMetadata getCollectionMetadata(java.lang.String roleName)
          Get the CollectionMetadata associated with the named collection role
 org.hibernate.persister.collection.CollectionPersister getCollectionPersister(java.lang.String role)
          Get the persister object for a collection role
 java.util.Set getCollectionRolesByEntityParticipant(java.lang.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.
 org.hibernate.connection.ConnectionProvider getConnectionProvider()
          Get the connection provider
 org.hibernate.classic.Session getCurrentSession()
          Obtains the current session.
 java.util.Set getDefinedFilterNames()
          Obtain a set of the names of all filters defined on this SessionFactory.
 org.hibernate.dialect.Dialect getDialect()
          Get the SQL Dialect
 org.hibernate.proxy.EntityNotFoundDelegate getEntityNotFoundDelegate()
           
 org.hibernate.persister.entity.EntityPersister getEntityPersister(java.lang.String entityName)
          Get the persister for the named entity
 org.hibernate.event.EventListeners getEventListeners()
           
 org.hibernate.engine.FilterDefinition getFilterDefinition(java.lang.String filterName)
          Obtain the definition of a filter by name.
 org.hibernate.id.IdentifierGenerator getIdentifierGenerator(java.lang.String rootEntityName)
          Get the identifier generator for the hierarchy
 java.lang.String getIdentifierPropertyName(java.lang.String className)
           
 org.hibernate.type.Type getIdentifierType(java.lang.String className)
           
 java.lang.String[] getImplementors(java.lang.String className)
          Return the names of all persistent (mapped) classes that extend or implement the given class or interface, accounting for implicit/explicit polymorphism settings and excluding mapped subclasses/joined-subclasses of other classes in the result.
 java.lang.String getImportedClassName(java.lang.String className)
          Get a class name, using query language imports
 org.hibernate.Interceptor getInterceptor()
           
 org.hibernate.engine.NamedQueryDefinition getNamedQuery(java.lang.String queryName)
           
 org.hibernate.engine.NamedSQLQueryDefinition getNamedSQLQuery(java.lang.String queryName)
           
 org.hibernate.cache.QueryCache getQueryCache()
          Get the default query cache
 org.hibernate.cache.QueryCache getQueryCache(java.lang.String cacheRegion)
          Get a particular named query cache, or the default cache
 org.hibernate.engine.query.QueryPlanCache getQueryPlanCache()
           
 javax.naming.Reference getReference()
           
 org.hibernate.type.Type getReferencedPropertyType(java.lang.String className, java.lang.String propertyName)
           
 org.hibernate.engine.ResultSetMappingDefinition getResultSetMapping(java.lang.String resultSetName)
           
 java.lang.String[] getReturnAliases(java.lang.String queryString)
          Get the return aliases of a query
 org.hibernate.type.Type[] getReturnTypes(java.lang.String queryString)
          Get the return types of a query
 org.hibernate.cache.Cache getSecondLevelCacheRegion(java.lang.String regionName)
          Get a named second-level cache region
 org.hibernate.cfg.Settings getSettings()
           
 org.hibernate.exception.SQLExceptionConverter getSQLExceptionConverter()
          Retrieves the SQLExceptionConverter in effect for this SessionFactory.
 org.hibernate.stat.Statistics getStatistics()
          Get the statistics for this session factory
 org.hibernate.stat.StatisticsImplementor getStatisticsImplementor()
          Statistics SPI
 org.hibernate.transaction.TransactionFactory getTransactionFactory()
           
 javax.transaction.TransactionManager getTransactionManager()
          Get the JTA transaction manager
 org.hibernate.cache.UpdateTimestampsCache getUpdateTimestampsCache()
          Get the cache of table update timestamps
 boolean isClosed()
          Was this SessionFactory already closed?
 org.hibernate.classic.Session openSession()
          Create database connection and open a Session on it.
 org.hibernate.classic.Session openSession(java.sql.Connection connection)
          Open a Session on the given connection.
 org.hibernate.classic.Session openSession(java.sql.Connection connection, boolean flushBeforeCompletionEnabled, boolean autoCloseSessionEnabled, org.hibernate.ConnectionReleaseMode connectionReleaseMode)
          Open a session conforming to the given parameters.
private  SessionImpl openSession(java.sql.Connection connection, boolean autoClose, long timestamp, org.hibernate.Interceptor sessionLocalInterceptor)
           
 org.hibernate.classic.Session openSession(java.sql.Connection connection, org.hibernate.Interceptor sessionLocalInterceptor)
          Open a Session on the given connection, specifying an interceptor.
 org.hibernate.classic.Session openSession(org.hibernate.Interceptor sessionLocalInterceptor)
          Create database connection and open a Session on it, specifying an interceptor.
 org.hibernate.StatelessSession openStatelessSession()
          Get a new stateless session.
 org.hibernate.StatelessSession openStatelessSession(java.sql.Connection connection)
          Get a new stateless session for the given JDBC connection.
 org.hibernate.classic.Session openTemporarySession()
          Get a nontransactional "current" session for Hibernate EntityManager
private  void readObject(java.io.ObjectInputStream in)
           
private  java.lang.Object readResolve()
           
(package private)  void serialize(java.io.ObjectOutputStream oos)
          Custom serialization hook used during Session serialization.
private  void writeObject(java.io.ObjectOutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

private final java.lang.String name

uuid

private final java.lang.String uuid

entityPersisters

private final transient java.util.Map entityPersisters

classMetadata

private final transient java.util.Map classMetadata

collectionPersisters

private final transient java.util.Map collectionPersisters

collectionMetadata

private final transient java.util.Map collectionMetadata

collectionRolesByEntityParticipant

private final transient java.util.Map collectionRolesByEntityParticipant

identifierGenerators

private final transient java.util.Map identifierGenerators

namedQueries

private final transient java.util.Map namedQueries

namedSqlQueries

private final transient java.util.Map namedSqlQueries

sqlResultSetMappings

private final transient java.util.Map sqlResultSetMappings

filters

private final transient java.util.Map filters

imports

private final transient java.util.Map imports

interceptor

private final transient org.hibernate.Interceptor interceptor

settings

private final transient org.hibernate.cfg.Settings settings

properties

private final transient java.util.Properties properties

schemaExport

private transient org.hibernate.tool.hbm2ddl.SchemaExport schemaExport

transactionManager

private final transient javax.transaction.TransactionManager transactionManager

queryCache

private final transient org.hibernate.cache.QueryCache queryCache

updateTimestampsCache

private final transient org.hibernate.cache.UpdateTimestampsCache updateTimestampsCache

queryCaches

private final transient java.util.Map queryCaches

allCacheRegions

private final transient java.util.Map allCacheRegions

statistics

private final transient org.hibernate.stat.StatisticsImpl statistics

eventListeners

private final transient org.hibernate.event.EventListeners eventListeners

currentSessionContext

private final transient org.hibernate.context.CurrentSessionContext currentSessionContext

entityNotFoundDelegate

private final transient org.hibernate.proxy.EntityNotFoundDelegate entityNotFoundDelegate

queryPlanCache

private final org.hibernate.engine.query.QueryPlanCache queryPlanCache

isClosed

private transient boolean isClosed

UUID_GENERATOR

private static final org.hibernate.id.IdentifierGenerator UUID_GENERATOR

log

private static final org.apache.commons.logging.Log log
Constructor Detail

SessionFactoryImpl

public SessionFactoryImpl(org.hibernate.cfg.Configuration cfg,
                          org.hibernate.engine.Mapping mapping,
                          org.hibernate.cfg.Settings settings,
                          org.hibernate.event.EventListeners listeners)
                   throws org.hibernate.HibernateException
Method Detail

getQueryPlanCache

public org.hibernate.engine.query.QueryPlanCache getQueryPlanCache()
Specified by:
getQueryPlanCache in interface org.hibernate.engine.SessionFactoryImplementor

checkNamedQueries

private java.util.Map checkNamedQueries()
                                 throws org.hibernate.HibernateException

openStatelessSession

public org.hibernate.StatelessSession openStatelessSession()
Description copied from interface: org.hibernate.SessionFactory
Get a new stateless session.

Specified by:
openStatelessSession in interface org.hibernate.SessionFactory

openStatelessSession

public org.hibernate.StatelessSession openStatelessSession(java.sql.Connection connection)
Description copied from interface: org.hibernate.SessionFactory
Get a new stateless session for the given JDBC connection.

Specified by:
openStatelessSession in interface org.hibernate.SessionFactory

openSession

private SessionImpl openSession(java.sql.Connection connection,
                                boolean autoClose,
                                long timestamp,
                                org.hibernate.Interceptor sessionLocalInterceptor)

openSession

public org.hibernate.classic.Session openSession(java.sql.Connection connection,
                                                 org.hibernate.Interceptor sessionLocalInterceptor)
Description copied from interface: org.hibernate.SessionFactory
Open a Session on the given connection, specifying an interceptor.

Note that the second-level cache will be disabled if you supply a JDBC connection. Hibernate will not be able to track any statements you might have executed in the same transaction. Consider implementing your own ConnectionProvider.

Specified by:
openSession in interface org.hibernate.SessionFactory

openSession

public org.hibernate.classic.Session openSession(org.hibernate.Interceptor sessionLocalInterceptor)
                                          throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.SessionFactory
Create database connection and open a Session on it, specifying an interceptor.

Specified by:
openSession in interface org.hibernate.SessionFactory

openSession

public org.hibernate.classic.Session openSession(java.sql.Connection connection)
Description copied from interface: org.hibernate.SessionFactory
Open a Session on the given connection.

Note that the second-level cache will be disabled if you supply a JDBC connection. Hibernate will not be able to track any statements you might have executed in the same transaction. Consider implementing your own ConnectionProvider.

Specified by:
openSession in interface org.hibernate.SessionFactory

openSession

public org.hibernate.classic.Session openSession()
                                          throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.SessionFactory
Create database connection and open a Session on it.

Specified by:
openSession in interface org.hibernate.SessionFactory

openTemporarySession

public org.hibernate.classic.Session openTemporarySession()
                                                   throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.engine.SessionFactoryImplementor
Get a nontransactional "current" session for Hibernate EntityManager

Specified by:
openTemporarySession in interface org.hibernate.engine.SessionFactoryImplementor

openSession

public org.hibernate.classic.Session openSession(java.sql.Connection connection,
                                                 boolean flushBeforeCompletionEnabled,
                                                 boolean autoCloseSessionEnabled,
                                                 org.hibernate.ConnectionReleaseMode connectionReleaseMode)
                                          throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.engine.SessionFactoryImplementor
Open a session conforming to the given parameters. Used mainly by org.hibernate.context.JTASessionContext for current session processing.

Specified by:
openSession in interface org.hibernate.engine.SessionFactoryImplementor

getCurrentSession

public org.hibernate.classic.Session getCurrentSession()
                                                throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.SessionFactory
Obtains the current session. The definition of what exactly "current" means controlled by the org.hibernate.context.CurrentSessionContext impl configured for use.

Note that for backwards compatibility, if a org.hibernate.context.CurrentSessionContext is not configured but a JTA org.hibernate.transaction.TransactionManagerLookup is configured this will default to the org.hibernate.context.JTASessionContext impl.

Specified by:
getCurrentSession in interface org.hibernate.SessionFactory

getEntityPersister

public org.hibernate.persister.entity.EntityPersister getEntityPersister(java.lang.String entityName)
                                                                  throws org.hibernate.MappingException
Description copied from interface: org.hibernate.engine.SessionFactoryImplementor
Get the persister for the named entity

Specified by:
getEntityPersister in interface org.hibernate.engine.SessionFactoryImplementor

getCollectionPersister

public org.hibernate.persister.collection.CollectionPersister getCollectionPersister(java.lang.String role)
                                                                              throws org.hibernate.MappingException
Description copied from interface: org.hibernate.engine.SessionFactoryImplementor
Get the persister object for a collection role

Specified by:
getCollectionPersister in interface org.hibernate.engine.SessionFactoryImplementor

getSettings

public org.hibernate.cfg.Settings getSettings()
Specified by:
getSettings in interface org.hibernate.engine.SessionFactoryImplementor

getDialect

public org.hibernate.dialect.Dialect getDialect()
Description copied from interface: org.hibernate.engine.SessionFactoryImplementor
Get the SQL Dialect

Specified by:
getDialect in interface org.hibernate.engine.SessionFactoryImplementor

getInterceptor

public org.hibernate.Interceptor getInterceptor()
Specified by:
getInterceptor in interface org.hibernate.engine.SessionFactoryImplementor

getTransactionFactory

public org.hibernate.transaction.TransactionFactory getTransactionFactory()

getTransactionManager

public javax.transaction.TransactionManager getTransactionManager()
Description copied from interface: org.hibernate.engine.SessionFactoryImplementor
Get the JTA transaction manager

Specified by:
getTransactionManager in interface org.hibernate.engine.SessionFactoryImplementor

getSQLExceptionConverter

public org.hibernate.exception.SQLExceptionConverter getSQLExceptionConverter()
Description copied from interface: org.hibernate.engine.SessionFactoryImplementor
Retrieves the SQLExceptionConverter in effect for this SessionFactory.

Specified by:
getSQLExceptionConverter in interface org.hibernate.engine.SessionFactoryImplementor

getCollectionRolesByEntityParticipant

public java.util.Set getCollectionRolesByEntityParticipant(java.lang.String entityName)
Description copied from interface: org.hibernate.engine.SessionFactoryImplementor
Retrieves a set of all the collection roles in which the given entity is a participant, as either an index or an element.

Specified by:
getCollectionRolesByEntityParticipant in interface org.hibernate.engine.SessionFactoryImplementor

getReference

public javax.naming.Reference getReference()
                                    throws javax.naming.NamingException
Specified by:
getReference in interface javax.naming.Referenceable

readResolve

private java.lang.Object readResolve()
                              throws java.io.ObjectStreamException

getNamedQuery

public org.hibernate.engine.NamedQueryDefinition getNamedQuery(java.lang.String queryName)
Specified by:
getNamedQuery in interface org.hibernate.engine.SessionFactoryImplementor

getNamedSQLQuery

public org.hibernate.engine.NamedSQLQueryDefinition getNamedSQLQuery(java.lang.String queryName)
Specified by:
getNamedSQLQuery in interface org.hibernate.engine.SessionFactoryImplementor

getResultSetMapping

public org.hibernate.engine.ResultSetMappingDefinition getResultSetMapping(java.lang.String resultSetName)
Specified by:
getResultSetMapping in interface org.hibernate.engine.SessionFactoryImplementor

getIdentifierType

public org.hibernate.type.Type getIdentifierType(java.lang.String className)
                                          throws org.hibernate.MappingException
Specified by:
getIdentifierType in interface org.hibernate.engine.Mapping

getIdentifierPropertyName

public java.lang.String getIdentifierPropertyName(java.lang.String className)
                                           throws org.hibernate.MappingException
Specified by:
getIdentifierPropertyName in interface org.hibernate.engine.Mapping

readObject

private final void readObject(java.io.ObjectInputStream in)
                       throws java.io.IOException,
                              java.lang.ClassNotFoundException

writeObject

private final void writeObject(java.io.ObjectOutputStream out)
                        throws java.io.IOException

getReturnTypes

public org.hibernate.type.Type[] getReturnTypes(java.lang.String queryString)
                                         throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.engine.SessionFactoryImplementor
Get the return types of a query

Specified by:
getReturnTypes in interface org.hibernate.engine.SessionFactoryImplementor

getReturnAliases

public java.lang.String[] getReturnAliases(java.lang.String queryString)
                                    throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.engine.SessionFactoryImplementor
Get the return aliases of a query

Specified by:
getReturnAliases in interface org.hibernate.engine.SessionFactoryImplementor

getClassMetadata

public org.hibernate.metadata.ClassMetadata getClassMetadata(java.lang.Class persistentClass)
                                                      throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.SessionFactory
Get the ClassMetadata associated with the given entity class

Specified by:
getClassMetadata in interface org.hibernate.SessionFactory

getCollectionMetadata

public org.hibernate.metadata.CollectionMetadata getCollectionMetadata(java.lang.String roleName)
                                                                throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.SessionFactory
Get the CollectionMetadata associated with the named collection role

Specified by:
getCollectionMetadata in interface org.hibernate.SessionFactory

getClassMetadata

public org.hibernate.metadata.ClassMetadata getClassMetadata(java.lang.String entityName)
                                                      throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.SessionFactory
Get the ClassMetadata associated with the given entity name

Specified by:
getClassMetadata in interface org.hibernate.SessionFactory

getImplementors

public java.lang.String[] getImplementors(java.lang.String className)
                                   throws org.hibernate.MappingException
Return the names of all persistent (mapped) classes that extend or implement the given class or interface, accounting for implicit/explicit polymorphism settings and excluding mapped subclasses/joined-subclasses of other classes in the result.

Specified by:
getImplementors in interface org.hibernate.engine.SessionFactoryImplementor

getImportedClassName

public java.lang.String getImportedClassName(java.lang.String className)
Description copied from interface: org.hibernate.engine.SessionFactoryImplementor
Get a class name, using query language imports

Specified by:
getImportedClassName in interface org.hibernate.engine.SessionFactoryImplementor

getAllClassMetadata

public java.util.Map getAllClassMetadata()
                                  throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.SessionFactory
Get all ClassMetadata as a Map from entityname String to metadata object

Specified by:
getAllClassMetadata in interface org.hibernate.SessionFactory

getAllCollectionMetadata

public java.util.Map getAllCollectionMetadata()
                                       throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.SessionFactory
Get all CollectionMetadata as a Map from role name to metadata object

Specified by:
getAllCollectionMetadata in interface org.hibernate.SessionFactory

close

public void close()
           throws org.hibernate.HibernateException
Closes the session factory, releasing all held resources.
  1. cleans up used cache regions and "stops" the cache provider.
  2. close the JDBC connection
  3. remove the JNDI binding
Note: Be aware that the sessionfactory instance still can be a "heavy" object memory wise after close() has been called. Thus it is important to not keep referencing the instance to let the garbage collector release the memory.

Specified by:
close in interface org.hibernate.SessionFactory

evictEntity

public void evictEntity(java.lang.String entityName,
                        java.io.Serializable id)
                 throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.SessionFactory
Evict an entry from the second-level cache. This method occurs outside of any transaction; it performs an immediate "hard" remove, so does not respect any transaction isolation semantics of the usage strategy. Use with care.

Specified by:
evictEntity in interface org.hibernate.SessionFactory

evictEntity

public void evictEntity(java.lang.String entityName)
                 throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.SessionFactory
Evict all entries from the second-level cache. This method occurs outside of any transaction; it performs an immediate "hard" remove, so does not respect any transaction isolation semantics of the usage strategy. Use with care.

Specified by:
evictEntity in interface org.hibernate.SessionFactory

evict

public void evict(java.lang.Class persistentClass,
                  java.io.Serializable id)
           throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.SessionFactory
Evict an entry from the second-level cache. This method occurs outside of any transaction; it performs an immediate "hard" remove, so does not respect any transaction isolation semantics of the usage strategy. Use with care.

Specified by:
evict in interface org.hibernate.SessionFactory

evict

public void evict(java.lang.Class persistentClass)
           throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.SessionFactory
Evict all entries from the second-level cache. This method occurs outside of any transaction; it performs an immediate "hard" remove, so does not respect any transaction isolation semantics of the usage strategy. Use with care.

Specified by:
evict in interface org.hibernate.SessionFactory

evictCollection

public void evictCollection(java.lang.String roleName,
                            java.io.Serializable id)
                     throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.SessionFactory
Evict an entry from the second-level cache. This method occurs outside of any transaction; it performs an immediate "hard" remove, so does not respect any transaction isolation semantics of the usage strategy. Use with care.

Specified by:
evictCollection in interface org.hibernate.SessionFactory

evictCollection

public void evictCollection(java.lang.String roleName)
                     throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.SessionFactory
Evict all entries from the second-level cache. This method occurs outside of any transaction; it performs an immediate "hard" remove, so does not respect any transaction isolation semantics of the usage strategy. Use with care.

Specified by:
evictCollection in interface org.hibernate.SessionFactory

getReferencedPropertyType

public org.hibernate.type.Type getReferencedPropertyType(java.lang.String className,
                                                         java.lang.String propertyName)
                                                  throws org.hibernate.MappingException
Specified by:
getReferencedPropertyType in interface org.hibernate.engine.Mapping

getConnectionProvider

public org.hibernate.connection.ConnectionProvider getConnectionProvider()
Description copied from interface: org.hibernate.engine.SessionFactoryImplementor
Get the connection provider

Specified by:
getConnectionProvider in interface org.hibernate.engine.SessionFactoryImplementor

getUpdateTimestampsCache

public org.hibernate.cache.UpdateTimestampsCache getUpdateTimestampsCache()
Description copied from interface: org.hibernate.engine.SessionFactoryImplementor
Get the cache of table update timestamps

Specified by:
getUpdateTimestampsCache in interface org.hibernate.engine.SessionFactoryImplementor

getQueryCache

public org.hibernate.cache.QueryCache getQueryCache()
Description copied from interface: org.hibernate.engine.SessionFactoryImplementor
Get the default query cache

Specified by:
getQueryCache in interface org.hibernate.engine.SessionFactoryImplementor

getQueryCache

public org.hibernate.cache.QueryCache getQueryCache(java.lang.String cacheRegion)
                                             throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.engine.SessionFactoryImplementor
Get a particular named query cache, or the default cache

Specified by:
getQueryCache in interface org.hibernate.engine.SessionFactoryImplementor

getSecondLevelCacheRegion

public org.hibernate.cache.Cache getSecondLevelCacheRegion(java.lang.String regionName)
Description copied from interface: org.hibernate.engine.SessionFactoryImplementor
Get a named second-level cache region

Specified by:
getSecondLevelCacheRegion in interface org.hibernate.engine.SessionFactoryImplementor

getAllSecondLevelCacheRegions

public java.util.Map getAllSecondLevelCacheRegions()
Specified by:
getAllSecondLevelCacheRegions in interface org.hibernate.engine.SessionFactoryImplementor

isClosed

public boolean isClosed()
Description copied from interface: org.hibernate.SessionFactory
Was this SessionFactory already closed?

Specified by:
isClosed in interface org.hibernate.SessionFactory

getStatistics

public org.hibernate.stat.Statistics getStatistics()
Description copied from interface: org.hibernate.SessionFactory
Get the statistics for this session factory

Specified by:
getStatistics in interface org.hibernate.SessionFactory

getStatisticsImplementor

public org.hibernate.stat.StatisticsImplementor getStatisticsImplementor()
Description copied from interface: org.hibernate.engine.SessionFactoryImplementor
Statistics SPI

Specified by:
getStatisticsImplementor in interface org.hibernate.engine.SessionFactoryImplementor

evictQueries

public void evictQueries()
                  throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.SessionFactory
Evict any query result sets cached in the default query cache region.

Specified by:
evictQueries in interface org.hibernate.SessionFactory

evictQueries

public void evictQueries(java.lang.String cacheRegion)
                  throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.SessionFactory
Evict any query result sets cached in the named query cache region.

Specified by:
evictQueries in interface org.hibernate.SessionFactory

getFilterDefinition

public org.hibernate.engine.FilterDefinition getFilterDefinition(java.lang.String filterName)
                                                          throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.SessionFactory
Obtain the definition of a filter by name.

Specified by:
getFilterDefinition in interface org.hibernate.SessionFactory

getDefinedFilterNames

public java.util.Set getDefinedFilterNames()
Description copied from interface: org.hibernate.SessionFactory
Obtain a set of the names of all filters defined on this SessionFactory.

Specified by:
getDefinedFilterNames in interface org.hibernate.SessionFactory

getBatcherFactory

public org.hibernate.jdbc.BatcherFactory getBatcherFactory()

getIdentifierGenerator

public org.hibernate.id.IdentifierGenerator getIdentifierGenerator(java.lang.String rootEntityName)
Description copied from interface: org.hibernate.engine.SessionFactoryImplementor
Get the identifier generator for the hierarchy

Specified by:
getIdentifierGenerator in interface org.hibernate.engine.SessionFactoryImplementor

buildCurrentSessionContext

private org.hibernate.context.CurrentSessionContext buildCurrentSessionContext()

getEventListeners

public org.hibernate.event.EventListeners getEventListeners()

getEntityNotFoundDelegate

public org.hibernate.proxy.EntityNotFoundDelegate getEntityNotFoundDelegate()
Specified by:
getEntityNotFoundDelegate in interface org.hibernate.engine.SessionFactoryImplementor

serialize

void serialize(java.io.ObjectOutputStream oos)
         throws java.io.IOException
Custom serialization hook used during Session serialization.


deserialize

static SessionFactoryImpl deserialize(java.io.ObjectInputStream ois)
                               throws java.io.IOException,
                                      java.lang.ClassNotFoundException