ch.elca.el4j.tests.services.persistence.generic.dao
Class DummyDao<T>

java.lang.Object
  extended by ch.elca.el4j.tests.services.persistence.generic.dao.DummyDao<T>
All Implemented Interfaces:
GenericDao<T>
Direct Known Subclasses:
Dao1, Dao2

public class DummyDao<T>
extends Object
implements GenericDao<T>

Just has all empty methods of the generic dao interface (for testing convenience)

Author:
pos
File-location:
DummyDao
Last check-in date:
2009-08-04 14:25:40 +0200 (Di, 04. Aug 2009) by swismer for revision 3874

Field Summary
private  Class<T> m_persistentClass
           
 
Constructor Summary
DummyDao()
           
 
Method Summary
 void delete(Collection<T> entities)
           
 List<T> findByQuery(QueryObject q)
           
 int findCountByQuery(QueryObject query)
           
 List<T> getAll()
           
 Class<T> getPersistentClass()
           
 T refresh(T entity)
           
 T reload(T entity)
           
 T saveOrUpdate(T entity)
           
 void setPersistentClass(Class<T> c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_persistentClass

private Class<T> m_persistentClass
Constructor Detail

DummyDao

public DummyDao()
Method Detail

delete

public void delete(Collection<T> entities)
            throws OptimisticLockingFailureException,
                   DataAccessException
Specified by:
delete in interface GenericDao<T>
Throws:
OptimisticLockingFailureException
DataAccessException

findByQuery

public List<T> findByQuery(QueryObject q)
                    throws DataAccessException
Specified by:
findByQuery in interface GenericDao<T>
Throws:
DataAccessException

findCountByQuery

public int findCountByQuery(QueryObject query)
                     throws DataAccessException
Specified by:
findCountByQuery in interface GenericDao<T>
Throws:
DataAccessException

getAll

public List<T> getAll()
               throws DataAccessException
Throws:
DataAccessException

getPersistentClass

public Class<T> getPersistentClass()
Specified by:
getPersistentClass in interface GenericDao<T>

setPersistentClass

public void setPersistentClass(Class<T> c)
Specified by:
setPersistentClass in interface GenericDao<T>

refresh

public T refresh(T entity)
          throws DataAccessException,
                 DataRetrievalFailureException
Specified by:
refresh in interface GenericDao<T>
Throws:
DataAccessException
DataRetrievalFailureException

saveOrUpdate

public T saveOrUpdate(T entity)
               throws DataAccessException,
                      DataIntegrityViolationException,
                      OptimisticLockingFailureException
Specified by:
saveOrUpdate in interface GenericDao<T>
Throws:
DataAccessException
DataIntegrityViolationException
OptimisticLockingFailureException

reload

public T reload(T entity)
         throws DataAccessException,
                DataRetrievalFailureException
Specified by:
reload in interface GenericDao<T>
Throws:
DataAccessException
DataRetrievalFailureException


Copyright © 2005-2011 ELCA. All Rights Reserved.