org.riotfamily.riot.dao.support
Class RiotDaoAdapter

java.lang.Object
  extended by org.riotfamily.riot.dao.support.RiotDaoAdapter
All Implemented Interfaces:
RiotDao
Direct Known Subclasses:
InMemoryRiotDao, SiteRiotDao, StaticRiotDao, StaticRiotUserDao

public class RiotDaoAdapter
extends Object
implements RiotDao

Since:
6.4
Author:
flx

Constructor Summary
RiotDaoAdapter()
           
 
Method Summary
 void delete(Object entity, Object parent)
          Always throws an InvalidDataAccessApiUsageException.
 Class<?> getEntityClass()
          Returns the class that is accessed by the DAO.
 int getListSize(Object parent, ListParams params)
          Always returns -1.
 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 save(Object entity, Object parent)
          Always throws an InvalidDataAccessApiUsageException.
 void update(Object entity)
          Does nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RiotDaoAdapter

public RiotDaoAdapter()
Method Detail

getEntityClass

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

Specified by:
getEntityClass in interface RiotDao

getListSize

public int getListSize(Object parent,
                       ListParams params)
                throws DataAccessException
Always returns -1.

Specified by:
getListSize in interface RiotDao
Throws:
DataAccessException

getObjectId

public String getObjectId(Object entity)
Always returns null.

Specified by:
getObjectId in interface RiotDao

list

public Collection<?> list(Object parent,
                          ListParams params)
                   throws DataAccessException
Always returns Collections.EMPTY_LIST.

Specified by:
list in interface RiotDao
Throws:
DataAccessException

load

public Object load(String id)
            throws DataAccessException
Always throws an InvalidDataAccessApiUsageException.

Specified by:
load in interface RiotDao
Throws:
DataAccessException

save

public void save(Object entity,
                 Object parent)
          throws DataAccessException
Always throws an InvalidDataAccessApiUsageException.

Specified by:
save in interface RiotDao
Throws:
DataAccessException

merge

public Object merge(Object entity)
             throws DataAccessException
Returns the given entity.

Specified by:
merge in interface RiotDao
Throws:
DataAccessException

update

public void update(Object entity)
            throws DataAccessException
Does nothing.

Specified by:
update in interface RiotDao
Throws:
DataAccessException

delete

public void delete(Object entity,
                   Object parent)
            throws DataAccessException
Always throws an InvalidDataAccessApiUsageException.

Specified by:
delete in interface RiotDao
Throws:
DataAccessException