org.riotfamily.pages.riot.dao
Class SiteRiotDao

java.lang.Object
  extended by org.riotfamily.riot.dao.support.RiotDaoAdapter
      extended by org.riotfamily.pages.riot.dao.SiteRiotDao
All Implemented Interfaces:
CutAndPasteEnabledDao, RiotDao, SwappableItemDao, InitializingBean

public class SiteRiotDao
extends RiotDaoAdapter
implements SwappableItemDao, CutAndPasteEnabledDao, InitializingBean

Since:
6.5
Author:
Felix Gnass [fgnass at neteye dot de]

Constructor Summary
SiteRiotDao()
           
 
Method Summary
 void addChild(Object entity, Object parent)
          Adds the entity to a new parent.
 void afterPropertiesSet()
           
 void delete(Object entity, Object parent)
          Always throws an InvalidDataAccessApiUsageException.
 Class<?> getEntityClass()
          Returns the class that is accessed by the DAO.
 String getObjectId(Object entity)
          Always returns null.
 Collection<?> list(Object parent, ListParams params)
          Always returns Collections.EMPTY_LIST.
 Object load(String id)
          Always throws an InvalidDataAccessApiUsageException.
 Object merge(Object entity)
          Returns the given entity.
 void removeChild(Object entity, Object parent)
          Removes the entity from the given parent.
 void save(Object entity, Object parent)
          Always throws an InvalidDataAccessApiUsageException.
 void setPageDao(PageDao pageDao)
           
 void swapEntity(Object entity, Object parent, ListParams params, int swapWith)
           
 void update(Object entity)
          Does nothing.
 
Methods inherited from class org.riotfamily.riot.dao.support.RiotDaoAdapter
getListSize
 
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
getListSize
 
Methods inherited from interface org.riotfamily.riot.dao.RiotDao
getListSize
 

Constructor Detail

SiteRiotDao

public SiteRiotDao()
Method Detail

setPageDao

public void setPageDao(PageDao pageDao)

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception

getEntityClass

public Class<?> getEntityClass()
Description copied from interface: RiotDao
Returns the class that is accessed by the DAO.

Specified by:
getEntityClass in interface RiotDao
Overrides:
getEntityClass in class RiotDaoAdapter

list

public Collection<?> list(Object parent,
                          ListParams params)
                   throws DataAccessException
Description copied from class: RiotDaoAdapter
Always returns Collections.EMPTY_LIST.

Specified by:
list in interface RiotDao
Overrides:
list in class RiotDaoAdapter
Throws:
DataAccessException

save

public void save(Object entity,
                 Object parent)
          throws DataAccessException
Description copied from class: RiotDaoAdapter
Always throws an InvalidDataAccessApiUsageException.

Specified by:
save in interface RiotDao
Overrides:
save in class RiotDaoAdapter
Throws:
DataAccessException

merge

public Object merge(Object entity)
             throws DataAccessException
Description copied from class: RiotDaoAdapter
Returns the given entity.

Specified by:
merge in interface RiotDao
Overrides:
merge in class RiotDaoAdapter
Throws:
DataAccessException

update

public void update(Object entity)
            throws DataAccessException
Description copied from class: RiotDaoAdapter
Does nothing.

Specified by:
update in interface RiotDao
Overrides:
update in class RiotDaoAdapter
Throws:
DataAccessException

delete

public void delete(Object entity,
                   Object parent)
            throws DataAccessException
Description copied from class: RiotDaoAdapter
Always throws an InvalidDataAccessApiUsageException.

Specified by:
delete in interface RiotDao
Overrides:
delete in class RiotDaoAdapter
Throws:
DataAccessException

getObjectId

public String getObjectId(Object entity)
Description copied from class: RiotDaoAdapter
Always returns null.

Specified by:
getObjectId in interface RiotDao
Overrides:
getObjectId in class RiotDaoAdapter

load

public Object load(String id)
            throws DataAccessException
Description copied from class: RiotDaoAdapter
Always throws an InvalidDataAccessApiUsageException.

Specified by:
load in interface RiotDao
Overrides:
load in class RiotDaoAdapter
Throws:
DataAccessException

swapEntity

public void swapEntity(Object entity,
                       Object parent,
                       ListParams params,
                       int swapWith)
Specified by:
swapEntity in interface SwappableItemDao

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

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