org.synyx.hades.dao.orm
Class AbstractExtendedGenericJpaDao<T,PK extends java.io.Serializable>

java.lang.Object
  extended by org.synyx.hades.dao.orm.GenericDaoSupport<T>
      extended by org.synyx.hades.dao.orm.GenericJpaDao<T,PK>
          extended by org.synyx.hades.dao.orm.AbstractExtendedGenericJpaDao<T,PK>
All Implemented Interfaces:
ExtendedGenericDao<T,PK>, GenericDao<T,PK>
Direct Known Subclasses:
GenericEclipseLinkJpaDao, GenericHibernateJpaDao

public abstract class AbstractExtendedGenericJpaDao<T,PK extends java.io.Serializable>
extends GenericJpaDao<T,PK>
implements ExtendedGenericDao<T,PK>

Base class for implementations of ExtendedGenericDao that simply routes varargs parameterized methods to the Collection based ones.

Author:
Oliver Gierke

Nested Class Summary
 
Nested classes/interfaces inherited from class org.synyx.hades.dao.orm.GenericDaoSupport
GenericDaoSupport.IsNewStrategy, GenericDaoSupport.PersistableIsNewStrategy, GenericDaoSupport.ReflectiveIsNewStrategy
 
Constructor Summary
AbstractExtendedGenericJpaDao()
           
 
Method Summary
 void deleteByExample(T... examples)
          Deletes all entities mathing the given examples.
 Page<T> readByExample(Pageable pageable, T... examples)
          Allows pageable access to all entities matching the given examples.
 java.util.List<T> readByExample(Sort sort, T... examples)
          Returns all entites matching the given criteria sorted by the given sort options.
 java.util.List<T> readByExample(T... examples)
          Returns all entities matching the given examples.
 
Methods inherited from class org.synyx.hades.dao.orm.GenericJpaDao
count, create, delete, delete, deleteAll, exists, flush, readAll, readAll, readAll, readByPrimaryKey, readPage, save, save, saveAndFlush
 
Methods inherited from class org.synyx.hades.dao.orm.GenericDaoSupport
assertEntityManagerClass, createIsNewStrategy, getCountQueryString, getDeleteAllQueryString, getDomainClass, getEntityManager, getIsNewStrategy, getReadAllQuery, getReadAllQueryString, setDomainClass, setEntityManager, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.synyx.hades.dao.ExtendedGenericDao
deleteByExample, readByExample, readByExample, readByExample
 
Methods inherited from interface org.synyx.hades.dao.GenericDao
count, delete, delete, deleteAll, exists, flush, readAll, readAll, readAll, readByPrimaryKey, save, save, saveAndFlush
 

Constructor Detail

AbstractExtendedGenericJpaDao

public AbstractExtendedGenericJpaDao()
Method Detail

deleteByExample

public void deleteByExample(T... examples)
Description copied from interface: ExtendedGenericDao
Deletes all entities mathing the given examples.

Specified by:
deleteByExample in interface ExtendedGenericDao<T,PK extends java.io.Serializable>

readByExample

public java.util.List<T> readByExample(T... examples)
Description copied from interface: ExtendedGenericDao
Returns all entities matching the given examples. If you provide more than one example their restrictions will be OR concatenated. If you provide no example at all or null, the call returns the same entities as GenericDao#readAll().

Specified by:
readByExample in interface ExtendedGenericDao<T,PK extends java.io.Serializable>
Returns:
all objects meeting the criterias expressed by the given examples

readByExample

public java.util.List<T> readByExample(Sort sort,
                                       T... examples)
Description copied from interface: ExtendedGenericDao
Returns all entites matching the given criteria sorted by the given sort options.

Specified by:
readByExample in interface ExtendedGenericDao<T,PK extends java.io.Serializable>
Returns:
all entites matching the given criteria sorted by the given sort options
See Also:
ExtendedGenericDao.readByExample(Object...)

readByExample

public Page<T> readByExample(Pageable pageable,
                             T... examples)
Description copied from interface: ExtendedGenericDao
Allows pageable access to all entities matching the given examples. If you provide null for the pageable, the call is identical to ExtendedGenericDao#readByExample(T...).

Specified by:
readByExample in interface ExtendedGenericDao<T,PK extends java.io.Serializable>
Returns:
the page of objects meeting the example's criterias


Copyright © 2009-2010 Synyx GmbH & Co. KG. All Rights Reserved.