org.squashtest.tm.service.internal.repository.hibernate
Class HibernateEntityDao<ENTITY_TYPE>

java.lang.Object
  extended by org.squashtest.tm.service.internal.repository.hibernate.HibernateDao<ENTITY_TYPE>
      extended by org.squashtest.tm.service.internal.repository.hibernate.HibernateEntityDao<ENTITY_TYPE>
All Implemented Interfaces:
EntityDao<ENTITY_TYPE>, GenericDao<ENTITY_TYPE>
Direct Known Subclasses:
HibernateAttachmentContentDao, HibernateAttachmentDao, HibernateAttachmentListDao, HibernateBugTrackerBindingDao, HibernateBugTrackerDao, HibernateCampaignDao, HibernateCampaignFolderDao, HibernateCampaignLibraryNodeDao, HibernateCampaignTestPlanItemDao, HibernateCustomCustomFieldBindingDao, HibernateCustomCustomFieldDao, HibernateDatasetDao, HibernateExecutionDao, HibernateExecutionStepDao, HibernateIssueDao, HibernateItemTestPlanDao, HibernateIterationDao, HibernateLibraryDao, HibernatePartyDao, HibernateProjectDao, HibernateProjectFilterDao, HibernateRequirementDao, HibernateRequirementFolderDao, HibernateRequirementLibraryNodeDao, HibernateRequirementVersionCoverageDao, HibernateTeamDao, HibernateTestCaseDao, HibernateTestCaseFolderDao, HibernateTestCaseLibraryNodeDao, HibernateTestStepDao, HibernateTestSuiteDao, HibernateUserDao, HibernateUsersGroupDao

public class HibernateEntityDao<ENTITY_TYPE>
extends HibernateDao<ENTITY_TYPE>
implements EntityDao<ENTITY_TYPE>


Field Summary
 
Fields inherited from class org.squashtest.tm.service.internal.repository.hibernate.HibernateDao
entityType
 
Constructor Summary
HibernateEntityDao()
           
 
Method Summary
protected  List<ENTITY_TYPE> collectFromMapList(org.hibernate.Criteria crit)
           
protected
<X> List<X>
collectFromMapList(List<X> hibernateResult, String alias)
           
protected  Set<ENTITY_TYPE> collectFromMapListToSet(org.hibernate.Criteria crit)
           
protected  Set<ENTITY_TYPE> collectFromMapListToSet(org.hibernate.Criteria crit, String alias)
           
 List<ENTITY_TYPE> findAll()
           
 List<ENTITY_TYPE> findAllByIds(Collection<Long> ids)
           
 ENTITY_TYPE findById(long id)
           
protected  List<Long> findDescendantIds(List<Long> params, String sql)
           
protected  List<ENTITY_TYPE> findSorted(org.squashtest.tm.core.foundation.collection.PagingAndSorting pagingAndSorting)
          Same as findSorted(PagingAndSorting, Class, String) using the current entity type and its class name as an alias.
protected  List<ENTITY_TYPE> findSorted(org.squashtest.tm.core.foundation.collection.PagingAndSorting pagingAndSorting, Class<ENTITY_TYPE> classe, String alias)
           
 String getIdPropertyName()
           
 
Methods inherited from class org.squashtest.tm.service.internal.repository.hibernate.HibernateDao
clearFromCache, clearFromCache, currentSession, executeEntityNamedQuery, executeEntityNamedQuery, executeEntityNamedQuery, executeListNamedQuery, executeListNamedQuery, executeListNamedQuery, executeListNamedQuery, executeUpdateListQuery, flush, getEntity, persist, persist, persistEntity, remove, removeAll, removeEntity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.squashtest.tm.service.internal.repository.GenericDao
clearFromCache, clearFromCache, flush, persist, persist, remove, removeAll
 

Constructor Detail

HibernateEntityDao

public HibernateEntityDao()
Method Detail

findById

public final ENTITY_TYPE findById(long id)
Specified by:
findById in interface EntityDao<ENTITY_TYPE>

findAll

public List<ENTITY_TYPE> findAll()
Specified by:
findAll in interface EntityDao<ENTITY_TYPE>
Returns:
a list of all entities found in the database with no restriction

findAllByIds

public List<ENTITY_TYPE> findAllByIds(Collection<Long> ids)
Specified by:
findAllByIds in interface EntityDao<ENTITY_TYPE>

getIdPropertyName

public String getIdPropertyName()

findDescendantIds

protected List<Long> findDescendantIds(List<Long> params,
                                       String sql)

findSorted

protected final List<ENTITY_TYPE> findSorted(org.squashtest.tm.core.foundation.collection.PagingAndSorting pagingAndSorting,
                                             Class<ENTITY_TYPE> classe,
                                             String alias)

findSorted

protected final List<ENTITY_TYPE> findSorted(org.squashtest.tm.core.foundation.collection.PagingAndSorting pagingAndSorting)
Same as findSorted(PagingAndSorting, Class, String) using the current entity type and its class name as an alias.

Parameters:
pagingAndSorting -
Returns:

collectFromMapList

protected <X> List<X> collectFromMapList(List<X> hibernateResult,
                                         String alias)

collectFromMapList

protected List<ENTITY_TYPE> collectFromMapList(org.hibernate.Criteria crit)

collectFromMapListToSet

protected Set<ENTITY_TYPE> collectFromMapListToSet(org.hibernate.Criteria crit,
                                                   String alias)

collectFromMapListToSet

protected Set<ENTITY_TYPE> collectFromMapListToSet(org.hibernate.Criteria crit)


Copyright © 2010-2013 Henix, henix.fr. All Rights Reserved.