org.riotfamily.riot.hibernate.dao
Class AbstractHqlDao

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate3.support.HibernateDaoSupport
          extended by org.riotfamily.riot.hibernate.dao.AbstractHibernateRiotDao
              extended by org.riotfamily.riot.hibernate.dao.AbstractHqlDao
All Implemented Interfaces:
RiotDao, SortableDao, InitializingBean
Direct Known Subclasses:
HqlDao

public abstract class AbstractHqlDao
extends AbstractHibernateRiotDao
implements SortableDao

RiotDao implementation based on Hibernate.


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
AbstractHqlDao(org.hibernate.SessionFactory sessionFactory)
           
 
Method Summary
protected  String buildCountHql(Object parent, ListParams params)
          Builds a HQL query string to retrieve the total number of items.
protected  String buildHql(Object parent, ListParams params)
          Builds a HQL query string to retrieve a list of items.
protected  String getFilterWhereClause(ListParams params)
           
protected  String getFrom(ListParams params)
           
 int getListSize(Object parent, ListParams params)
          Returns the total number of items.
protected  String getOrderBy(ListParams params)
           
protected  String getSearchWhereClause(ListParams params)
           
protected  String getSelect()
           
protected  String getWhere()
           
protected  String getWhereClause(Object parent, ListParams params)
           
protected  boolean isPolymorph()
           
protected  boolean isPrefixSearch()
           
protected  boolean isSuffixSearch()
           
protected  List<?> listInternal(Object parent, ListParams params)
          Returns a list of items.
protected  void setFilterParameters(org.hibernate.Query query, ListParams params)
           
protected  void setQueryParameters(org.hibernate.Query query, Object parent, ListParams params)
           
 
Methods inherited from class org.riotfamily.riot.hibernate.dao.AbstractHibernateRiotDao
delete, getObjectId, list, load, merge, save, update
 
Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.riotfamily.riot.dao.RiotDao
getEntityClass
 

Constructor Detail

AbstractHqlDao

public AbstractHqlDao(org.hibernate.SessionFactory sessionFactory)
Method Detail

isPolymorph

protected boolean isPolymorph()

getSelect

protected String getSelect()

getFrom

protected String getFrom(ListParams params)

getWhere

protected String getWhere()

isPrefixSearch

protected boolean isPrefixSearch()

isSuffixSearch

protected boolean isSuffixSearch()

listInternal

protected final List<?> listInternal(Object parent,
                                     ListParams params)
Returns a list of items.

Overrides:
listInternal in class AbstractHibernateRiotDao

getListSize

public final int getListSize(Object parent,
                             ListParams params)
Returns the total number of items.

Specified by:
getListSize in interface RiotDao
Overrides:
getListSize in class AbstractHibernateRiotDao

setQueryParameters

protected void setQueryParameters(org.hibernate.Query query,
                                  Object parent,
                                  ListParams params)

buildCountHql

protected final String buildCountHql(Object parent,
                                     ListParams params)
Builds a HQL query string to retrieve the total number of items.


buildHql

protected final String buildHql(Object parent,
                                ListParams params)
Builds a HQL query string to retrieve a list of items.


getWhereClause

protected String getWhereClause(Object parent,
                                ListParams params)

getFilterWhereClause

protected String getFilterWhereClause(ListParams params)

setFilterParameters

protected void setFilterParameters(org.hibernate.Query query,
                                   ListParams params)

getSearchWhereClause

protected String getSearchWhereClause(ListParams params)

getOrderBy

protected String getOrderBy(ListParams params)