org.riotfamily.riot.hibernate.dao
Class HqlDao
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate3.support.HibernateDaoSupport
org.riotfamily.riot.hibernate.dao.AbstractHibernateRiotDao
org.riotfamily.riot.hibernate.dao.AbstractHqlDao
org.riotfamily.riot.hibernate.dao.HqlDao
- All Implemented Interfaces:
- RiotDao, SortableDao, SwappableItemDao, InitializingBean
- Direct Known Subclasses:
- HibernateUserDao, HqlParentChildDao
public class HqlDao
- extends AbstractHqlDao
- implements SwappableItemDao
RiotDao implementation based on Hibernate.
Constructor Summary |
HqlDao(org.hibernate.SessionFactory sessionFactory)
|
Methods inherited from class org.riotfamily.riot.hibernate.dao.AbstractHqlDao |
buildCountHql, buildHql, getFilterWhereClause, getFrom, getListSize, getSearchWhereClause, getWhereClause, isPrefixSearch, isSuffixSearch, listInternal, setFilterParameters, setQueryParameters |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HqlDao
public HqlDao(org.hibernate.SessionFactory sessionFactory)
getEntityClass
public Class<?> getEntityClass()
- Description copied from interface:
RiotDao
- Returns the class that is accessed by the DAO.
- Specified by:
getEntityClass
in interface RiotDao
setEntityClass
public void setEntityClass(Class<?> entityClass)
isPolymorph
protected boolean isPolymorph()
- Overrides:
isPolymorph
in class AbstractHqlDao
setPolymorph
public void setPolymorph(boolean polymorph)
getSelect
protected String getSelect()
- Overrides:
getSelect
in class AbstractHqlDao
setSelect
public void setSelect(String select)
getWhere
public String getWhere()
- Overrides:
getWhere
in class AbstractHqlDao
setWhere
public void setWhere(String where)
setPositionProperty
public void setPositionProperty(String positionProperty)
setSetPositionOnSave
public void setSetPositionOnSave(boolean setPositionOnSave)
isSetPositionOnSave
protected boolean isSetPositionOnSave()
buildMaxPositionHql
protected String buildMaxPositionHql(Object parent)
- Builds a HQL query string to retrieve the maximal position property value
setPositionIfNeeded
protected void setPositionIfNeeded(Object entity,
Object parent)
getOrderBy
protected String getOrderBy(ListParams params)
- Overrides:
getOrderBy
in class AbstractHqlDao
save
public void save(Object entity,
Object parent)
- Description copied from interface:
RiotDao
- Saves the given entity.
- Specified by:
save
in interface RiotDao
- Overrides:
save
in class AbstractHibernateRiotDao
swapEntity
public void swapEntity(Object item,
Object parent,
ListParams params,
int swapWith)
- Specified by:
swapEntity
in interface SwappableItemDao