org.picocontainer.persistence.hibernate
Class ConfigurableSessionFactory

java.lang.Object
  extended by org.picocontainer.persistence.hibernate.ConfigurableSessionFactory
All Implemented Interfaces:
Serializable, Referenceable, org.hibernate.SessionFactory, org.picocontainer.Disposable

public final class ConfigurableSessionFactory
extends Object
implements org.hibernate.SessionFactory, org.picocontainer.Disposable

Session factory implementation that uses a delegate session factory created from configuration.

Author:
Jose Peleteiro, Mauro Talevi
See Also:
Serialized Form

Constructor Summary
ConfigurableSessionFactory(org.hibernate.cfg.Configuration configuration)
           
 
Method Summary
 void close()
          
 void dispose()
          Clears the session factory when the container is disposed.
 void evict(Class persistentClass)
          
 void evict(Class persistentClass, Serializable id)
          
 void evictCollection(String roleName)
          
 void evictCollection(String roleName, Serializable id)
          
 void evictEntity(String entityName)
          
 void evictEntity(String entityName, Serializable id)
          
 void evictQueries()
          
 void evictQueries(String cacheRegion)
          
 Map getAllClassMetadata()
          
 Map getAllCollectionMetadata()
          
 org.hibernate.metadata.ClassMetadata getClassMetadata(Class persistentClass)
          
 org.hibernate.metadata.ClassMetadata getClassMetadata(String entityName)
          
 org.hibernate.metadata.CollectionMetadata getCollectionMetadata(String roleName)
          
 org.hibernate.classic.Session getCurrentSession()
          
 Set getDefinedFilterNames()
          
 org.hibernate.SessionFactory getDelegate()
           
 org.hibernate.engine.FilterDefinition getFilterDefinition(String filterName)
          
 Reference getReference()
          
 org.hibernate.stat.Statistics getStatistics()
          
 boolean isClosed()
          
 org.hibernate.classic.Session openSession()
          
 org.hibernate.classic.Session openSession(Connection connection)
          
 org.hibernate.classic.Session openSession(Connection connection, org.hibernate.Interceptor interceptor)
          
 org.hibernate.classic.Session openSession(org.hibernate.Interceptor interceptor)
          
 org.hibernate.StatelessSession openStatelessSession()
          
 org.hibernate.StatelessSession openStatelessSession(Connection connection)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurableSessionFactory

public ConfigurableSessionFactory(org.hibernate.cfg.Configuration configuration)
Method Detail

getDelegate

public org.hibernate.SessionFactory getDelegate()

close

public void close()

Specified by:
close in interface org.hibernate.SessionFactory

evict

public void evict(Class persistentClass)

Specified by:
evict in interface org.hibernate.SessionFactory

evict

public void evict(Class persistentClass,
                  Serializable id)

Specified by:
evict in interface org.hibernate.SessionFactory

evictCollection

public void evictCollection(String roleName)

Specified by:
evictCollection in interface org.hibernate.SessionFactory

evictCollection

public void evictCollection(String roleName,
                            Serializable id)

Specified by:
evictCollection in interface org.hibernate.SessionFactory

evictEntity

public void evictEntity(String entityName)

Specified by:
evictEntity in interface org.hibernate.SessionFactory

evictEntity

public void evictEntity(String entityName,
                        Serializable id)

Specified by:
evictEntity in interface org.hibernate.SessionFactory

evictQueries

public void evictQueries()

Specified by:
evictQueries in interface org.hibernate.SessionFactory

evictQueries

public void evictQueries(String cacheRegion)

Specified by:
evictQueries in interface org.hibernate.SessionFactory

getAllClassMetadata

public Map getAllClassMetadata()

Specified by:
getAllClassMetadata in interface org.hibernate.SessionFactory

getAllCollectionMetadata

public Map getAllCollectionMetadata()

Specified by:
getAllCollectionMetadata in interface org.hibernate.SessionFactory

getClassMetadata

public org.hibernate.metadata.ClassMetadata getClassMetadata(Class persistentClass)

Specified by:
getClassMetadata in interface org.hibernate.SessionFactory

getClassMetadata

public org.hibernate.metadata.ClassMetadata getClassMetadata(String entityName)

Specified by:
getClassMetadata in interface org.hibernate.SessionFactory

getCollectionMetadata

public org.hibernate.metadata.CollectionMetadata getCollectionMetadata(String roleName)

Specified by:
getCollectionMetadata in interface org.hibernate.SessionFactory

getCurrentSession

public org.hibernate.classic.Session getCurrentSession()

Specified by:
getCurrentSession in interface org.hibernate.SessionFactory

getDefinedFilterNames

public Set getDefinedFilterNames()

Specified by:
getDefinedFilterNames in interface org.hibernate.SessionFactory

getFilterDefinition

public org.hibernate.engine.FilterDefinition getFilterDefinition(String filterName)
                                                          throws org.hibernate.HibernateException

Specified by:
getFilterDefinition in interface org.hibernate.SessionFactory
Throws:
org.hibernate.HibernateException

getReference

public Reference getReference()
                       throws NamingException

Specified by:
getReference in interface Referenceable
Throws:
NamingException

getStatistics

public org.hibernate.stat.Statistics getStatistics()

Specified by:
getStatistics in interface org.hibernate.SessionFactory

isClosed

public boolean isClosed()

Specified by:
isClosed in interface org.hibernate.SessionFactory

openSession

public org.hibernate.classic.Session openSession()

Specified by:
openSession in interface org.hibernate.SessionFactory

openSession

public org.hibernate.classic.Session openSession(Connection connection)

Specified by:
openSession in interface org.hibernate.SessionFactory

openSession

public org.hibernate.classic.Session openSession(Connection connection,
                                                 org.hibernate.Interceptor interceptor)

Specified by:
openSession in interface org.hibernate.SessionFactory

openSession

public org.hibernate.classic.Session openSession(org.hibernate.Interceptor interceptor)

Specified by:
openSession in interface org.hibernate.SessionFactory

openStatelessSession

public org.hibernate.StatelessSession openStatelessSession()

Specified by:
openStatelessSession in interface org.hibernate.SessionFactory

openStatelessSession

public org.hibernate.StatelessSession openStatelessSession(Connection connection)

Specified by:
openStatelessSession in interface org.hibernate.SessionFactory

dispose

public void dispose()
Clears the session factory when the container is disposed.

Specified by:
dispose in interface org.picocontainer.Disposable


Copyright © 2008. All Rights Reserved.