org.riotfamily.riot.hibernate.dao
Class HqlParentChildDao
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
org.riotfamily.riot.hibernate.dao.HqlParentChildDao
- All Implemented Interfaces:
- CutAndPasteEnabledDao, ParentChildDao, RiotDao, SortableDao, SwappableItemDao, InitializingBean
public class HqlParentChildDao
- extends HqlDao
- implements ParentChildDao, CutAndPasteEnabledDao
ParentChildDao implementation based on Hibernate.
Methods inherited from class org.riotfamily.riot.hibernate.dao.HqlDao |
buildMaxPositionHql, getEntityClass, getOrderBy, getSelect, getWhere, isPolymorph, isSetPositionOnSave, setEntityClass, setPolymorph, setPositionIfNeeded, setPositionProperty, setSelect, setSetPositionOnSave, setWhere, swapEntity |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HqlParentChildDao
public HqlParentChildDao(org.hibernate.SessionFactory sessionFactory)
getParentProperty
public String getParentProperty()
setParentProperty
public void setParentProperty(String parentProperty)
initDao
protected final void initDao()
throws Exception
- Overrides:
initDao
in class DaoSupport
- Throws:
Exception
initParentChildDao
protected void initParentChildDao()
throws Exception
- Throws:
Exception
getParent
public Object getParent(Object entity)
- Specified by:
getParent
in interface ParentChildDao
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 HqlDao
delete
public void delete(Object entity,
Object parent)
- Description copied from interface:
RiotDao
- Deletes the given entity.
- Specified by:
delete
in interface RiotDao
- Overrides:
delete
in class AbstractHibernateRiotDao
getWhereClause
protected String getWhereClause(Object parent,
ListParams params)
- Overrides:
getWhereClause
in class AbstractHqlDao
setQueryParameters
protected void setQueryParameters(org.hibernate.Query query,
Object parent,
ListParams params)
- Overrides:
setQueryParameters
in class AbstractHqlDao
addChild
public void addChild(Object entity,
Object parent)
- Description copied from interface:
CutAndPasteEnabledDao
- Adds the entity to a new parent.
- Specified by:
addChild
in interface CutAndPasteEnabledDao
removeChild
public void removeChild(Object entity,
Object parent)
- This method does nothing. Before the parentProperty was set to null here.
But since the only call is from the Clipboard's pasteCut method, which
calls this after the addChild is called, setting the parentProperty to
null won't have the desired effect.
- Specified by:
removeChild
in interface CutAndPasteEnabledDao