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

java.lang.Object
  extended by org.squashtest.csp.tm.internal.repository.hibernate.HibernateDao<ENTITY_TYPE>
      extended by org.squashtest.csp.tm.internal.repository.hibernate.HibernateEntityDao<Issue>
          extended by org.squashtest.csp.tm.internal.repository.hibernate.HibernateIssueDao
All Implemented Interfaces:
EntityDao<Issue>, IssueDao

@Repository
public class HibernateIssueDao
extends HibernateEntityDao<Issue>
implements IssueDao


Field Summary
 
Fields inherited from class org.squashtest.csp.tm.internal.repository.hibernate.HibernateDao
entityType
 
Constructor Summary
HibernateIssueDao()
           
 
Method Summary
 Integer countIssuesfromIssueList(List<Long> issueListIds)
          Will count the total number of issues related to the given IssueList.
<X extends Bugged>
X
findBuggedEntity(Long entityId, Class<X> entityClass)
           
protected
<X extends Bugged>
List<IssueOwnership<Issue>>
findIssueOwnerOfClass(List<Long> issueIds, Class<X> concreteClass)
           
protected  List<Issue> findIssuesFromIssueList(List<Long> issueListIds, CollectionSorting sorter)
           
 List<IssueOwnership<Issue>> findIssuesWithOwner(Bugged entity, CollectionSorting sorter)
          Will recursively find a sorted/filtered list of Issues paired with their owning Bugged entity, from the given bugged entity and its related Bugged entities.
 
Methods inherited from class org.squashtest.csp.tm.internal.repository.hibernate.HibernateEntityDao
findAllByIdList, findById, flush, getIdPropertyName, persist, persist, remove
 
Methods inherited from class org.squashtest.csp.tm.internal.repository.hibernate.HibernateDao
currentSession, executeEntityNamedQuery, executeListNamedQuery, executeListNamedQuery, executeListNamedQuery, getEntity, persistEntity, 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.csp.tm.internal.repository.EntityDao
findAllByIdList, findById, flush, persist, persist, remove
 

Constructor Detail

HibernateIssueDao

public HibernateIssueDao()
Method Detail

findBuggedEntity

public <X extends Bugged> X findBuggedEntity(Long entityId,
                                             Class<X> entityClass)
Specified by:
findBuggedEntity in interface IssueDao

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.

findIssuesWithOwner

public List<IssueOwnership<Issue>> findIssuesWithOwner(Bugged entity,
                                                       CollectionSorting sorter)
Description copied from interface: IssueDao
Will recursively find a sorted/filtered list of Issues paired with their owning Bugged entity, from the given bugged entity and its related Bugged entities. The data will be sorted/filtered regardless of their owner.

Specified by:
findIssuesWithOwner in interface IssueDao
Parameters:
entity - the entity at the base of the bugged hierarchy
sorter - a CollectionSoring object that will tell who we must sort the data
Returns:
a non null but possibly empty list of IssueOwnership, that will pair each Issue with their Owner.

findIssuesFromIssueList

protected List<Issue> findIssuesFromIssueList(List<Long> issueListIds,
                                              CollectionSorting sorter)

findIssueOwnerOfClass

protected <X extends Bugged> List<IssueOwnership<Issue>> findIssueOwnerOfClass(List<Long> issueIds,
                                                                               Class<X> concreteClass)


Copyright © 2010-2012 Squashtest TM, Squashtest.org. All Rights Reserved.