org.nanocontainer.persistence.hibernate.classic
Class SessionFactoryDelegator

java.lang.Object
  extended by org.nanocontainer.persistence.hibernate.classic.SessionFactoryDelegator
All Implemented Interfaces:
Serializable, Referenceable, net.sf.hibernate.SessionFactory

public class SessionFactoryDelegator
extends Object
implements net.sf.hibernate.SessionFactory

delegates everything to session factory obtained from confiuration. this class is necessary because component adapters are really ugly when it comes to scripting

Version:
$Revision: 2043 $
Author:
Konstantin Pribluda
See Also:
Serialized Form

Constructor Summary
SessionFactoryDelegator(net.sf.hibernate.cfg.Configuration configuration)
           
 
Method Summary
 void close()
           
 void evict(Class persistentClass)
           
 void evict(Class persistentClass, Serializable id)
           
 void evictCollection(String roleName)
           
 void evictCollection(String roleName, Serializable id)
           
 void evictQueries()
           
 void evictQueries(String cacheRegion)
           
 Map getAllClassMetadata()
           
 Map getAllCollectionMetadata()
           
 net.sf.hibernate.metadata.ClassMetadata getClassMetadata(Class persistentClass)
           
 net.sf.hibernate.metadata.CollectionMetadata getCollectionMetadata(String roleName)
           
 Reference getReference()
           
 net.sf.hibernate.exception.SQLExceptionConverter getSQLExceptionConverter()
           
 net.sf.hibernate.Databinder openDatabinder()
           
 net.sf.hibernate.Session openSession()
           
 net.sf.hibernate.Session openSession(Connection connection)
           
 net.sf.hibernate.Session openSession(Connection connection, net.sf.hibernate.Interceptor interceptor)
           
 net.sf.hibernate.Session openSession(net.sf.hibernate.Interceptor interceptor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionFactoryDelegator

public SessionFactoryDelegator(net.sf.hibernate.cfg.Configuration configuration)
Method Detail

openSession

public net.sf.hibernate.Session openSession(Connection connection)
Specified by:
openSession in interface net.sf.hibernate.SessionFactory

openSession

public net.sf.hibernate.Session openSession(net.sf.hibernate.Interceptor interceptor)
                                     throws net.sf.hibernate.HibernateException
Specified by:
openSession in interface net.sf.hibernate.SessionFactory
Throws:
net.sf.hibernate.HibernateException

openSession

public net.sf.hibernate.Session openSession(Connection connection,
                                            net.sf.hibernate.Interceptor interceptor)
Specified by:
openSession in interface net.sf.hibernate.SessionFactory

openSession

public net.sf.hibernate.Session openSession()
                                     throws net.sf.hibernate.HibernateException
Specified by:
openSession in interface net.sf.hibernate.SessionFactory
Throws:
net.sf.hibernate.HibernateException

openDatabinder

public net.sf.hibernate.Databinder openDatabinder()
                                           throws net.sf.hibernate.HibernateException
Specified by:
openDatabinder in interface net.sf.hibernate.SessionFactory
Throws:
net.sf.hibernate.HibernateException

getClassMetadata

public net.sf.hibernate.metadata.ClassMetadata getClassMetadata(Class persistentClass)
                                                         throws net.sf.hibernate.HibernateException
Specified by:
getClassMetadata in interface net.sf.hibernate.SessionFactory
Throws:
net.sf.hibernate.HibernateException

getCollectionMetadata

public net.sf.hibernate.metadata.CollectionMetadata getCollectionMetadata(String roleName)
                                                                   throws net.sf.hibernate.HibernateException
Specified by:
getCollectionMetadata in interface net.sf.hibernate.SessionFactory
Throws:
net.sf.hibernate.HibernateException

getAllClassMetadata

public Map getAllClassMetadata()
                        throws net.sf.hibernate.HibernateException
Specified by:
getAllClassMetadata in interface net.sf.hibernate.SessionFactory
Throws:
net.sf.hibernate.HibernateException

getAllCollectionMetadata

public Map getAllCollectionMetadata()
                             throws net.sf.hibernate.HibernateException
Specified by:
getAllCollectionMetadata in interface net.sf.hibernate.SessionFactory
Throws:
net.sf.hibernate.HibernateException

close

public void close()
           throws net.sf.hibernate.HibernateException
Specified by:
close in interface net.sf.hibernate.SessionFactory
Throws:
net.sf.hibernate.HibernateException

evict

public void evict(Class persistentClass)
           throws net.sf.hibernate.HibernateException
Specified by:
evict in interface net.sf.hibernate.SessionFactory
Throws:
net.sf.hibernate.HibernateException

evict

public void evict(Class persistentClass,
                  Serializable id)
           throws net.sf.hibernate.HibernateException
Specified by:
evict in interface net.sf.hibernate.SessionFactory
Throws:
net.sf.hibernate.HibernateException

evictCollection

public void evictCollection(String roleName)
                     throws net.sf.hibernate.HibernateException
Specified by:
evictCollection in interface net.sf.hibernate.SessionFactory
Throws:
net.sf.hibernate.HibernateException

evictCollection

public void evictCollection(String roleName,
                            Serializable id)
                     throws net.sf.hibernate.HibernateException
Specified by:
evictCollection in interface net.sf.hibernate.SessionFactory
Throws:
net.sf.hibernate.HibernateException

evictQueries

public void evictQueries()
                  throws net.sf.hibernate.HibernateException
Specified by:
evictQueries in interface net.sf.hibernate.SessionFactory
Throws:
net.sf.hibernate.HibernateException

evictQueries

public void evictQueries(String cacheRegion)
                  throws net.sf.hibernate.HibernateException
Specified by:
evictQueries in interface net.sf.hibernate.SessionFactory
Throws:
net.sf.hibernate.HibernateException

getReference

public Reference getReference()
                       throws NamingException
Specified by:
getReference in interface Referenceable
Throws:
NamingException

getSQLExceptionConverter

public net.sf.hibernate.exception.SQLExceptionConverter getSQLExceptionConverter()
Specified by:
getSQLExceptionConverter in interface net.sf.hibernate.SessionFactory


Copyright 2003-2003-2006 Codehaus. All Rights Reserved.