org.controlhaus.hibernate
Interface HibernateControl

All Known Implementing Classes:
HibernateControlImpl

public interface HibernateControl

Since:
Oct 29, 2004
Author:
Dan Diephouse

Nested Class Summary
static interface HibernateControl.HibernateInstance
           
 
Method Summary
 void closeSession()
          Close the session for the current Thread.
 java.lang.String getConfigurationLocation()
          Override this method to provide logic on how to get the Hibernate configuration file.
 java.lang.String getHibernateInstance()
          The instance of hibernate that you want this control to use.
 net.sf.hibernate.Session getSession()
          Return the session that is currently associated with this Thread.
 net.sf.hibernate.SessionFactory getSessionFactory()
          Get the Hibernate SessionFactory.
 

Method Detail

getSessionFactory

net.sf.hibernate.SessionFactory getSessionFactory()
Get the Hibernate SessionFactory.

Returns:

getSession

net.sf.hibernate.Session getSession()
                                    throws net.sf.hibernate.HibernateException
Return the session that is currently associated with this Thread.

Returns:
Throws:
net.sf.hibernate.HibernateException

closeSession

void closeSession()
                  throws net.sf.hibernate.HibernateException
Close the session for the current Thread.

Throws:
net.sf.hibernate.HibernateException

getConfigurationLocation

java.lang.String getConfigurationLocation()
Override this method to provide logic on how to get the Hibernate configuration file. This can be a file or a resource on the classpath.

Returns:

getHibernateInstance

java.lang.String getHibernateInstance()
The instance of hibernate that you want this control to use. This will be "default" unless you use the HibernateInstance annotation to override it.

Returns:


Copyright © 2004 Controlhaus. All Rights Reserved.