org.riotfamily.riot.hibernate.support
Class HibernateSupport

java.lang.Object
  extended by org.riotfamily.riot.hibernate.support.HibernateSupport
Direct Known Subclasses:
DistinctAutoCompleterModel, HibernateHelper, HqlAutoCompleterModel, HqlOptionsModel

public class HibernateSupport
extends Object

Base class for implementing DAOs based on plain Hibernate3 API. Hibernate 3.0.1 introduced a feature called "contextual Sessions", where Hibernate itself manages one current Session per transaction. http://static.springframework.org/spring/docs/2.0.x/reference/orm.html#orm-hibernate-straight

Author:
Felix Gnass [fgnass at neteye dot de]

Constructor Summary
HibernateSupport()
           
 
Method Summary
protected  org.hibernate.Criteria createCriteria(Class<?> clazz)
           
protected  org.hibernate.Query createFilter(Object object, String hql)
           
protected  org.hibernate.Query createQuery(String hql)
           
protected  org.hibernate.Session getSession()
           
 org.hibernate.SessionFactory getSessionFactory()
           
 void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateSupport

public HibernateSupport()
Method Detail

setSessionFactory

public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)

getSessionFactory

public org.hibernate.SessionFactory getSessionFactory()

getSession

protected org.hibernate.Session getSession()

createCriteria

protected org.hibernate.Criteria createCriteria(Class<?> clazz)

createQuery

protected org.hibernate.Query createQuery(String hql)

createFilter

protected org.hibernate.Query createFilter(Object object,
                                           String hql)