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

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.bugtracker.Issue>
          extended by org.squashtest.tm.service.internal.repository.hibernate.HibernateIssueDao
All Implemented Interfaces:
EntityDao<org.squashtest.tm.domain.bugtracker.Issue>, GenericDao<org.squashtest.tm.domain.bugtracker.Issue>, IssueDao

@Repository
public class HibernateIssueDao
extends HibernateEntityDao<org.squashtest.tm.domain.bugtracker.Issue>
implements IssueDao


Field Summary
 
Fields inherited from class org.squashtest.tm.service.internal.repository.hibernate.HibernateDao
entityType
 
Constructor Summary
HibernateIssueDao()
           
 
Method Summary
 Integer countIssuesfromExecutionAndExecutionSteps(List<Long> executionsIds, List<Long> executionStepsIds)
          Will count all Issues from the given executions and execution-steps concerned by the active bug-tracker for each execution/execution-step's project.
 Integer countIssuesfromExecutionSteps(List<Long> executionStepsIds)
          Self explanatory
 Integer countIssuesfromIssueList(Collection<Long> issueListIds, Long bugTrackerId)
          Will count the total number of issues related to the given IssueList, for the given bugtracker
 Integer countIssuesfromIssueList(List<Long> issueListIds)
          Will count the total number of issues related to the given IssueList.
 List<org.squashtest.tm.domain.bugtracker.Issue> findAllForIteration(Long id)
          Will find all issues declared in the iteration of the given id.
 List<org.squashtest.tm.domain.bugtracker.Issue> findAllForTestSuite(Long id)
          Will find all issues declared in the test suite of the given id.
 org.squashtest.tm.domain.bugtracker.IssueDetector findIssueDetectorByIssue(long id)
          Will return the Execution or the ExecutionStep that holds the Issue of the given id.
protected
<X extends org.squashtest.tm.domain.bugtracker.IssueDetector>
List<org.squashtest.tm.domain.bugtracker.IssueOwnership<org.squashtest.tm.domain.bugtracker.Issue>>
findIssueOwnerOfClass(List<Long> issueIds, Class<X> concreteClass)
           
 List<Object[]> findSortedIssuesFromExecutionAndExecutionSteps(List<Long> executionsIds, List<Long> executionStepsIds, org.squashtest.tm.core.foundation.collection.PagingAndSorting sorter)
          Will find all issues belonging to the executions/executionSteps of the given ids, and, return a list of Object[] that have the following structure : [IssueList.id, Issue.remoteIssueId , Issue.bugtracker.id]

The issues are also filtered over the bug-tracker parameter: only issues linked to the bug-tracker active for the given execution/executionSteps's project's bug-tracker are retained.
 List<Object[]> findSortedIssuesFromIssuesLists(Collection<Long> issueListIds, org.squashtest.tm.core.foundation.collection.PagingAndSorting sorter, Long bugtrackerId)
          Will find all issues belonging to the issue-lists of the given ids, and, return a list of Object[] that have the following structure : [IssueList.id, Issue.remoteIssueId, Issue.id]

The issues are also filtered over the bug-tracker parameter: only issues linked to the bug-tracker of the given id are retained.
 org.squashtest.tm.domain.testcase.TestCase findTestCaseRelatedToIssue(long id)
           
 
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

HibernateIssueDao

public HibernateIssueDao()
Method Detail

countIssuesfromIssueList

public Integer countIssuesfromIssueList(List<Long> issueListIds)
Description copied from interface: IssueDao
Will count the total number of issues related to the given IssueList.

Specified by:
countIssuesfromIssueList in interface IssueDao
Parameters:
issueListIds - the id of the issue lists.
Returns:
how many issues they hold.
See Also:
IssueDao.countIssuesfromIssueList(java.util.List)

countIssuesfromIssueList

public Integer countIssuesfromIssueList(Collection<Long> issueListIds,
                                        Long bugTrackerId)
Description copied from interface: IssueDao
Will count the total number of issues related to the given IssueList, for the given bugtracker

Specified by:
countIssuesfromIssueList in interface IssueDao
Parameters:
issueListIds - the id of the issue lists.
bugTrackerId - the id of the bug-tracker we are filtering on
Returns:
how many issues they hold.
See Also:
IssueDao.countIssuesfromIssueList(java.util.Collection, java.lang.Long)

findSortedIssuesFromIssuesLists

public List<Object[]> findSortedIssuesFromIssuesLists(Collection<Long> issueListIds,
                                                      org.squashtest.tm.core.foundation.collection.PagingAndSorting sorter,
                                                      Long bugtrackerId)
Description copied from interface: IssueDao
Will find all issues belonging to the issue-lists of the given ids, and, return a list of Object[] that have the following structure : [IssueList.id, Issue.remoteIssueId, Issue.id]

The issues are also filtered over the bug-tracker parameter: only issues linked to the bug-tracker of the given id are retained.

Specified by:
findSortedIssuesFromIssuesLists in interface IssueDao
sorter - : will sort and filter the result set
Returns:
non-null but possibly empty list of Object[] which have the following structure [IssueList.id, Issue.remoteIssueId, Issue.id]
See Also:
IssueDao#findSortedIssuesFromIssuesLists(List, PagingAndSorting, Long)

findIssueOwnerOfClass

protected <X extends org.squashtest.tm.domain.bugtracker.IssueDetector> List<org.squashtest.tm.domain.bugtracker.IssueOwnership<org.squashtest.tm.domain.bugtracker.Issue>> findIssueOwnerOfClass(List<Long> issueIds,
                                                                                                                                                                                                  Class<X> concreteClass)

findSortedIssuesFromExecutionAndExecutionSteps

public List<Object[]> findSortedIssuesFromExecutionAndExecutionSteps(List<Long> executionsIds,
                                                                     List<Long> executionStepsIds,
                                                                     org.squashtest.tm.core.foundation.collection.PagingAndSorting sorter)
Description copied from interface: IssueDao
Will find all issues belonging to the executions/executionSteps of the given ids, and, return a list of Object[] that have the following structure : [IssueList.id, Issue.remoteIssueId , Issue.bugtracker.id]

The issues are also filtered over the bug-tracker parameter: only issues linked to the bug-tracker active for the given execution/executionSteps's project's bug-tracker are retained.

Specified by:
findSortedIssuesFromExecutionAndExecutionSteps in interface IssueDao
Parameters:
executionsIds - : ids of executions we will extract Issues from
executionStepsIds - : ids of executionSteps we will extract Issues from
sorter - : holds the sort parameters for the query
Returns:
non-null but possibly empty list of Object[] which have the following structure [IssueList.id, Issue.remoteIssueId , Issue.bugtracker.id]
See Also:
IssueDao#findSortedIssuesFromExecutionAndExecutionSteps(List, List, PagingAndSorting)

countIssuesfromExecutionAndExecutionSteps

public Integer countIssuesfromExecutionAndExecutionSteps(List<Long> executionsIds,
                                                         List<Long> executionStepsIds)
Description copied from interface: IssueDao
Will count all Issues from the given executions and execution-steps concerned by the active bug-tracker for each execution/execution-step's project.

Specified by:
countIssuesfromExecutionAndExecutionSteps in interface IssueDao
Returns:
the number of Issues detected by the given execution / execution Steps

countIssuesfromExecutionSteps

public Integer countIssuesfromExecutionSteps(List<Long> executionStepsIds)
Description copied from interface: IssueDao
Self explanatory

Specified by:
countIssuesfromExecutionSteps in interface IssueDao
Returns:

findAllForIteration

public List<org.squashtest.tm.domain.bugtracker.Issue> findAllForIteration(Long id)
Description copied from interface: IssueDao
Will find all issues declared in the iteration of the given id.

Specified by:
findAllForIteration in interface IssueDao
Parameters:
id - : the id of the concerned Iteration
Returns:
the list of the iteration's Issues

findAllForTestSuite

public List<org.squashtest.tm.domain.bugtracker.Issue> findAllForTestSuite(Long id)
Description copied from interface: IssueDao
Will find all issues declared in the test suite of the given id.

Specified by:
findAllForTestSuite in interface IssueDao
Parameters:
id - : the id of the concerned TestSuite
Returns:
the list of the suite's Issues

findIssueDetectorByIssue

public org.squashtest.tm.domain.bugtracker.IssueDetector findIssueDetectorByIssue(long id)
Description copied from interface: IssueDao
Will return the Execution or the ExecutionStep that holds the Issue of the given id.

Specified by:
findIssueDetectorByIssue in interface IssueDao
Parameters:
id - : the id of the Issue we want the owner of.
Returns:
the found IssueDetector or null.

findTestCaseRelatedToIssue

public org.squashtest.tm.domain.testcase.TestCase findTestCaseRelatedToIssue(long id)
Specified by:
findTestCaseRelatedToIssue in interface IssueDao


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