org.riotfamily.riot.hibernate.dao
Class HqlCollectionDao
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.HqlCollectionDao
- All Implemented Interfaces:
- CutAndPasteEnabledDao, ParentChildDao, RiotDao, SortableDao, InitializingBean
- Direct Known Subclasses:
- HqlIndexedListDao, HqlSortedCollectionDao
public class HqlCollectionDao
- extends AbstractHibernateRiotDao
- implements SortableDao, ParentChildDao, CutAndPasteEnabledDao
RiotDao implementation that loads a bean and returns one of the
bean's properties as (filtered) collection.
Constructor Summary |
HqlCollectionDao(org.hibernate.SessionFactory sessionFactory)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HqlCollectionDao
public HqlCollectionDao(org.hibernate.SessionFactory sessionFactory)
setEntityClass
public void setEntityClass(Class<?> entityClass)
getEntityClass
public Class<?> getEntityClass()
- Description copied from interface:
RiotDao
- Returns the class that is accessed by the DAO.
- Specified by:
getEntityClass
in interface RiotDao
setPolymorph
public void setPolymorph(boolean polymorph)
setWhere
public void setWhere(String string)
setParentClass
public void setParentClass(Class<?> parentClass)
setCollectionProperty
public void setCollectionProperty(String property)
setParentProperty
public void setParentProperty(String parentProperty)
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 AbstractHibernateRiotDao
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
getCollection
protected Collection<Object> getCollection(Object parent)
buildQueryString
protected void buildQueryString(StringBuffer hql,
ListParams params)
listInternal
protected List<?> listInternal(Object parent,
ListParams params)
- Overrides:
listInternal
in class AbstractHibernateRiotDao
getListSize
public int getListSize(Object parent,
ListParams params)
- Description copied from interface:
RiotDao
- Returns the total number of entities.
- Specified by:
getListSize
in interface RiotDao
- Overrides:
getListSize
in class AbstractHibernateRiotDao
getOrderBy
protected String getOrderBy(ListParams params)
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)
- Description copied from interface:
CutAndPasteEnabledDao
- Removes the entity from the given parent.
- Specified by:
removeChild
in interface CutAndPasteEnabledDao