ch.elca.el4j.services.persistence.hibernate.dao
Interface ConvenienceGenericHibernateDao<T,ID extends Serializable>
- Type Parameters:
T - the domain object typeID - the id of the domain object to find
- All Superinterfaces:
- ConvenienceGenericDao<T,ID>, GenericDao<T>
- All Known Implementing Classes:
- GenericHibernateDao
public interface ConvenienceGenericHibernateDao<T,ID extends Serializable>
- extends ConvenienceGenericDao<T,ID>
This interface extends ConvenienceGenericDao with query methods using
DetachedCriterias.
- Author:
- Stefan Wismer (SWI)
saveOrUpdateAndFlush
T saveOrUpdateAndFlush(T entity)
throws DataAccessException,
DataIntegrityViolationException,
OptimisticLockingFailureException
- Parameters:
entity - The domain object to save or update
- Returns:
- The saved or updated object
- Throws:
DataAccessException
DataIntegrityViolationException
OptimisticLockingFailureException
findByCriteria
List<T> findByCriteria(DetachedCriteria hibernateCriteria)
throws DataAccessException
- Parameters:
hibernateCriteria - the criteria that the result has to fulfill
- Returns:
- all object that fulfill the criteria
- Throws:
DataAccessException- See Also:
HibernateTemplate.findByCriteria(DetachedCriteria)
findByCriteria
List<T> findByCriteria(DetachedCriteria hibernateCriteria,
int firstResult,
int maxResults)
throws DataAccessException
- Parameters:
hibernateCriteria - the criteria that the result has to fulfillfirstResult - the index of the first result to returnmaxResults - the maximum number of results to return
- Returns:
- the specified subset of object that fulfill
the criteria
- Throws:
DataAccessException- See Also:
HibernateTemplate.findByCriteria(DetachedCriteria, int, int)
findCountByCriteria
int findCountByCriteria(DetachedCriteria hibernateCriteria)
throws DataAccessException
- Parameters:
hibernateCriteria - the criteria that the result has to fulfill
- Returns:
- the number of objects that fulfill
the criteria
- Throws:
DataAccessException- See Also:
ConvenienceHibernateTemplate.findCountByCriteria(DetachedCriteria)
getConvenienceHibernateTemplate
ConvenienceHibernateTemplate getConvenienceHibernateTemplate()
- Returns:
- the convenience Hibernate template
getDefaultOrder
Order[] getDefaultOrder()
- Returns:
- the default
Order to order the results
setDefaultOrder
void setDefaultOrder(Order... defaultOrder)
- Parameters:
defaultOrder - the default Order to order the results
Copyright © 2005-2008 ELCA. All Rights Reserved.