org.squashtest.tm.service.internal.repository.hibernate
Class HibernateCampaignDao

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<org.squashtest.tm.domain.campaign.Campaign>
          extended by org.squashtest.tm.service.internal.repository.hibernate.HibernateCampaignDao
All Implemented Interfaces:
CampaignDao, EntityDao<org.squashtest.tm.domain.campaign.Campaign>, GenericDao<org.squashtest.tm.domain.campaign.Campaign>

@Repository
public class HibernateCampaignDao
extends HibernateEntityDao<org.squashtest.tm.domain.campaign.Campaign>
implements CampaignDao


Field Summary
 
Fields inherited from class org.squashtest.tm.service.internal.repository.hibernate.HibernateDao
entityType
 
Constructor Summary
HibernateCampaignDao()
           
 
Method Summary
 long countFilteredTestPlanById(long campaignId, org.squashtest.tm.core.foundation.collection.ColumnFiltering filtering)
           
 long countRunningOrDoneExecutions(long campaignId)
           
 long countTestPlanById(long campaignId)
           
 List<org.squashtest.tm.domain.campaign.CampaignLibraryNode> findAllByNameContaining(String tokenInName, boolean groupByProject)
          Finds all CampaignLibraryNode which name contains the given token.
 List<org.squashtest.tm.domain.execution.Execution> findAllExecutionsByCampaignId(Long campaignId)
          find all the campaign's iterations, and return all iteration's executions regardless of the campaign test-plan
 List<String> findAllNamesInCampaign(long campaignId)
           
 List<org.squashtest.tm.domain.campaign.CampaignTestPlanItem> findAllTestPlanByIdFiltered(long campaignId, org.squashtest.tm.core.foundation.collection.PagingAndSorting filter)
           
 org.squashtest.tm.domain.campaign.Campaign findByIdWithInitializedIterations(long campaignId)
           
 org.squashtest.tm.domain.campaign.TestPlanStatistics findCampaignStatistics(long campaignId)
           
 List<IndexedCampaignTestPlanItem> findFilteredIndexedTestPlan(long campaignId, org.squashtest.tm.core.foundation.collection.PagingAndMultiSorting sorting, org.squashtest.tm.core.foundation.collection.ColumnFiltering filtering)
           
 List<IndexedCampaignTestPlanItem> findIndexedTestPlan(long campaignId, org.squashtest.tm.core.foundation.collection.PagingAndMultiSorting sorting)
          Returns the paged list of [index, CampaignTestPlanItem] wrapped in an IndexedIterationTestPlanItem
 List<IndexedCampaignTestPlanItem> findIndexedTestPlan(long campaignId, org.squashtest.tm.core.foundation.collection.PagingAndSorting sorting)
          Returns the paged list of [index, CampaignTestPlanItem] wrapped in an IndexedIterationTestPlanItem
 List<String> findNamesInCampaignStartingWith(long campaignId, String nameStart)
           
 List<String> findNamesInFolderStartingWith(long folderId, String nameStart)
           
 List<String> findNamesInLibraryStartingWith(long libraryId, String nameStart)
           
 List<org.squashtest.tm.domain.campaign.CampaignTestPlanItem> findTestPlan(long campaignId, org.squashtest.tm.core.foundation.collection.PagingAndMultiSorting sorting)
           
 
Methods inherited from class org.squashtest.tm.service.internal.repository.hibernate.HibernateEntityDao
collectFromMapList, collectFromMapList, collectFromMapListToSet, collectFromMapListToSet, findAll, findAllByIds, findById, findDescendantIds, findSorted, findSorted, 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.EntityDao
findAll, findAllByIds, findById
 
Methods inherited from interface org.squashtest.tm.service.internal.repository.GenericDao
clearFromCache, clearFromCache, flush, persist, persist, remove, removeAll
 

Constructor Detail

HibernateCampaignDao

public HibernateCampaignDao()
Method Detail

findByIdWithInitializedIterations

public org.squashtest.tm.domain.campaign.Campaign findByIdWithInitializedIterations(long campaignId)
Specified by:
findByIdWithInitializedIterations in interface CampaignDao

findAllTestPlanByIdFiltered

public List<org.squashtest.tm.domain.campaign.CampaignTestPlanItem> findAllTestPlanByIdFiltered(long campaignId,
                                                                                                org.squashtest.tm.core.foundation.collection.PagingAndSorting filter)
Specified by:
findAllTestPlanByIdFiltered in interface CampaignDao

findTestPlan

public List<org.squashtest.tm.domain.campaign.CampaignTestPlanItem> findTestPlan(long campaignId,
                                                                                 org.squashtest.tm.core.foundation.collection.PagingAndMultiSorting sorting)
Specified by:
findTestPlan in interface CampaignDao

findIndexedTestPlan

public List<IndexedCampaignTestPlanItem> findIndexedTestPlan(long campaignId,
                                                             org.squashtest.tm.core.foundation.collection.PagingAndMultiSorting sorting)
Description copied from interface: CampaignDao
Returns the paged list of [index, CampaignTestPlanItem] wrapped in an IndexedIterationTestPlanItem

Specified by:
findIndexedTestPlan in interface CampaignDao
Returns:

findIndexedTestPlan

public List<IndexedCampaignTestPlanItem> findIndexedTestPlan(long campaignId,
                                                             org.squashtest.tm.core.foundation.collection.PagingAndSorting sorting)
Description copied from interface: CampaignDao
Returns the paged list of [index, CampaignTestPlanItem] wrapped in an IndexedIterationTestPlanItem

Specified by:
findIndexedTestPlan in interface CampaignDao
Returns:

countFilteredTestPlanById

public long countFilteredTestPlanById(long campaignId,
                                      org.squashtest.tm.core.foundation.collection.ColumnFiltering filtering)
Specified by:
countFilteredTestPlanById in interface CampaignDao

countTestPlanById

public long countTestPlanById(long campaignId)
Specified by:
countTestPlanById in interface CampaignDao

findNamesInFolderStartingWith

public List<String> findNamesInFolderStartingWith(long folderId,
                                                  String nameStart)
Specified by:
findNamesInFolderStartingWith in interface CampaignDao

findNamesInCampaignStartingWith

public List<String> findNamesInCampaignStartingWith(long campaignId,
                                                    String nameStart)
Specified by:
findNamesInCampaignStartingWith in interface CampaignDao

findAllNamesInCampaign

public List<String> findAllNamesInCampaign(long campaignId)
Specified by:
findAllNamesInCampaign in interface CampaignDao

findNamesInLibraryStartingWith

public List<String> findNamesInLibraryStartingWith(long libraryId,
                                                   String nameStart)
Specified by:
findNamesInLibraryStartingWith in interface CampaignDao

findAllByNameContaining

public List<org.squashtest.tm.domain.campaign.CampaignLibraryNode> findAllByNameContaining(String tokenInName,
                                                                                           boolean groupByProject)
Description copied from interface: CampaignDao
Finds all CampaignLibraryNode which name contains the given token.

Specified by:
findAllByNameContaining in interface CampaignDao
Returns:

findAllExecutionsByCampaignId

public List<org.squashtest.tm.domain.execution.Execution> findAllExecutionsByCampaignId(Long campaignId)
Description copied from interface: CampaignDao
find all the campaign's iterations, and return all iteration's executions regardless of the campaign test-plan

Specified by:
findAllExecutionsByCampaignId in interface CampaignDao
Returns:
list of executions of all iterations

findCampaignStatistics

public org.squashtest.tm.domain.campaign.TestPlanStatistics findCampaignStatistics(long campaignId)
Specified by:
findCampaignStatistics in interface CampaignDao
Parameters:
campaignId - the id of the concerned campaign
Returns:
the computed TestPlanStatistics out of each test-plan-item of each campaign's iteration

countRunningOrDoneExecutions

public long countRunningOrDoneExecutions(long campaignId)
Specified by:
countRunningOrDoneExecutions in interface CampaignDao

findFilteredIndexedTestPlan

public List<IndexedCampaignTestPlanItem> findFilteredIndexedTestPlan(long campaignId,
                                                                     org.squashtest.tm.core.foundation.collection.PagingAndMultiSorting sorting,
                                                                     org.squashtest.tm.core.foundation.collection.ColumnFiltering filtering)
Specified by:
findFilteredIndexedTestPlan in interface CampaignDao


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