org.squashtest.tm.internal.test
Class StubRequirementDao

java.lang.Object
  extended by org.squashtest.tm.internal.test.StubRequirementDao
All Implemented Interfaces:
EntityDao<org.squashtest.tm.domain.requirement.Requirement>, GenericDao<org.squashtest.tm.domain.requirement.Requirement>, RequirementDao

public class StubRequirementDao
extends Object
implements RequirementDao

Author:
Gregory Fouquet

Constructor Summary
StubRequirementDao()
           
 
Method Summary
 void clearFromCache(Collection<ENTITY> entities)
           
 void clearFromCache(ENTITY entity)
           
 List<org.squashtest.tm.domain.requirement.Requirement> findAll()
           
 List<org.squashtest.tm.domain.requirement.Requirement> findAllByIdListOrderedByName(List<Long> requirementsIds)
           
 List<org.squashtest.tm.domain.requirement.Requirement> findAllByIds(Collection<Long> requirementsIds)
           
 List<org.squashtest.tm.domain.requirement.RequirementLibraryNode> findAllBySearchCriteria(org.squashtest.tm.domain.requirement.RequirementSearchCriteria criteria)
           
 List<org.squashtest.tm.domain.requirement.RequirementLibraryNode> findAllBySearchCriteriaOrderByProject(org.squashtest.tm.domain.requirement.RequirementSearchCriteria criteria)
           
 List<Object[]> findAllParentsOf(List<Long> requirementIds)
          Given a list of requirementIds, returns the corresponding list of [parent, requirement].
 List<Long> findAllRequirementsIdsByLibrary(long libraryId)
          Will find all Requirements ids contained in library (not only root ones)
 org.squashtest.tm.domain.requirement.Requirement findByContent(org.squashtest.tm.domain.requirement.Requirement childRequirement)
          returns a requirement that contains the given child requirement
 ENTITY findById(long id)
           
 List<org.squashtest.tm.domain.requirement.Requirement> findChildrenRequirements(long requirementId)
           
 List<org.squashtest.tm.domain.requirement.RequirementCriticality> findDistinctRequirementsCriticalities(List<Long> requirementsIds)
          returns the list of distinct requirementCriticalities found for all requirementsIds
 List<org.squashtest.tm.domain.requirement.RequirementCriticality> findDistinctRequirementsCriticalitiesVerifiedByTestCases(Set<Long> testCasesIds)
          Returns collection of distinct requirements criticalities verified by any of the given verifiers.
 List<String> findNamesInFolderStartingWith(long folderId, String nameStart)
           
 List<String> findNamesInLibraryStartingWith(long libraryId, String nameStart)
           
 List<org.squashtest.tm.domain.requirement.ExportRequirementData> findRequirementToExportFromLibrary(List<Long> folderIds)
           
 List<org.squashtest.tm.domain.requirement.ExportRequirementData> findRequirementToExportFromNodes(List<Long> folderIds)
           
 List<org.squashtest.tm.domain.requirement.RequirementVersion> findVersions(Long requirementId)
          returns the list of all requirement versions
 List<org.squashtest.tm.domain.requirement.RequirementVersion> findVersionsForAll(List<Long> requirementIds)
          returns the list of all requirement versions for all the specified requirements
 void flush()
           
 void persist(ENTITY transientEntity)
           
 void persist(List<ENTITY> transientEntities)
           
 void remove(ENTITY entity)
           
 void removeAll(List<ENTITY> entities)
           
 
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
findById
 
Methods inherited from interface org.squashtest.tm.service.internal.repository.GenericDao
clearFromCache, clearFromCache, flush, persist, persist, remove, removeAll
 

Constructor Detail

StubRequirementDao

public StubRequirementDao()
Method Detail

findAllByIds

public List<org.squashtest.tm.domain.requirement.Requirement> findAllByIds(Collection<Long> requirementsIds)
Specified by:
findAllByIds in interface EntityDao<org.squashtest.tm.domain.requirement.Requirement>
See Also:
EntityDao.findAllByIds(java.util.Collection)

findNamesInFolderStartingWith

public List<String> findNamesInFolderStartingWith(long folderId,
                                                  String nameStart)
See Also:
org.squashtest.tm.service.internal.repository.RequirementDao#findNamesInFolderStartingWith(long, java.lang.String)

findNamesInLibraryStartingWith

public List<String> findNamesInLibraryStartingWith(long libraryId,
                                                   String nameStart)
See Also:
org.squashtest.tm.service.internal.repository.RequirementDao#findNamesInLibraryStartingWith(long, java.lang.String)

findAllBySearchCriteria

public List<org.squashtest.tm.domain.requirement.RequirementLibraryNode> findAllBySearchCriteria(org.squashtest.tm.domain.requirement.RequirementSearchCriteria criteria)
Specified by:
findAllBySearchCriteria in interface RequirementDao
See Also:
RequirementDao.findAllBySearchCriteria(org.squashtest.tm.domain.requirement.RequirementSearchCriteria)

findAllBySearchCriteriaOrderByProject

public List<org.squashtest.tm.domain.requirement.RequirementLibraryNode> findAllBySearchCriteriaOrderByProject(org.squashtest.tm.domain.requirement.RequirementSearchCriteria criteria)
Specified by:
findAllBySearchCriteriaOrderByProject in interface RequirementDao
See Also:
RequirementDao.findAllBySearchCriteriaOrderByProject(org.squashtest.tm.domain.requirement.RequirementSearchCriteria)

findRequirementToExportFromNodes

public List<org.squashtest.tm.domain.requirement.ExportRequirementData> findRequirementToExportFromNodes(List<Long> folderIds)
Specified by:
findRequirementToExportFromNodes in interface RequirementDao
See Also:
org.squashtest.tm.service.internal.repository.RequirementDao#findRequirementToExportFromFolder(java.util.List)

findRequirementToExportFromLibrary

public List<org.squashtest.tm.domain.requirement.ExportRequirementData> findRequirementToExportFromLibrary(List<Long> folderIds)
Specified by:
findRequirementToExportFromLibrary in interface RequirementDao
See Also:
RequirementDao.findRequirementToExportFromLibrary(java.util.List)

findDistinctRequirementsCriticalitiesVerifiedByTestCases

public List<org.squashtest.tm.domain.requirement.RequirementCriticality> findDistinctRequirementsCriticalitiesVerifiedByTestCases(Set<Long> testCasesIds)
Description copied from interface: RequirementDao
Returns collection of distinct requirements criticalities verified by any of the given verifiers.

Specified by:
findDistinctRequirementsCriticalitiesVerifiedByTestCases in interface RequirementDao
Returns:
unsorted collection of distinct requirements criticalities verified by any of the given verifiers.
See Also:
org.squashtest.tm.service.internal.repository.RequirementDao#findDistinctRequirementsCriticalitiesVerifiedByTestCases(java.util.List)

findDistinctRequirementsCriticalities

public List<org.squashtest.tm.domain.requirement.RequirementCriticality> findDistinctRequirementsCriticalities(List<Long> requirementsIds)
Description copied from interface: RequirementDao
returns the list of distinct requirementCriticalities found for all requirementsIds

Specified by:
findDistinctRequirementsCriticalities in interface RequirementDao
Returns:
See Also:
RequirementDao.findDistinctRequirementsCriticalities(java.util.List)

findVersions

public List<org.squashtest.tm.domain.requirement.RequirementVersion> findVersions(Long requirementId)
Description copied from interface: RequirementDao
returns the list of all requirement versions

Specified by:
findVersions in interface RequirementDao
Returns:
See Also:
RequirementDao.findVersions(Long)

findVersionsForAll

public List<org.squashtest.tm.domain.requirement.RequirementVersion> findVersionsForAll(List<Long> requirementIds)
Description copied from interface: RequirementDao
returns the list of all requirement versions for all the specified requirements

Specified by:
findVersionsForAll in interface RequirementDao
Parameters:
requirementIds - the lists of requirement ids
Returns:

findAll

public List<org.squashtest.tm.domain.requirement.Requirement> findAll()
Specified by:
findAll in interface EntityDao<org.squashtest.tm.domain.requirement.Requirement>

findAllByIdListOrderedByName

public List<org.squashtest.tm.domain.requirement.Requirement> findAllByIdListOrderedByName(List<Long> requirementsIds)

findAllRequirementsIdsByLibrary

public List<Long> findAllRequirementsIdsByLibrary(long libraryId)
Description copied from interface: RequirementDao
Will find all Requirements ids contained in library (not only root ones)

Specified by:
findAllRequirementsIdsByLibrary in interface RequirementDao
Returns:

findChildrenRequirements

public List<org.squashtest.tm.domain.requirement.Requirement> findChildrenRequirements(long requirementId)
Specified by:
findChildrenRequirements in interface RequirementDao

findByContent

public org.squashtest.tm.domain.requirement.Requirement findByContent(org.squashtest.tm.domain.requirement.Requirement childRequirement)
Description copied from interface: RequirementDao
returns a requirement that contains the given child requirement

Specified by:
findByContent in interface RequirementDao

findAllParentsOf

public List<Object[]> findAllParentsOf(List<Long> requirementIds)
Description copied from interface: RequirementDao
Given a list of requirementIds, returns the corresponding list of [parent, requirement]. the 'parent' is of type NodeContainer<Requirement>.

Specified by:
findAllParentsOf in interface RequirementDao
Returns:
what I just said.

findById

public ENTITY findById(long id)
Specified by:
findById in interface EntityDao<ENTITY>
See Also:
EntityDao.findById(long)

persist

public void persist(ENTITY transientEntity)
Specified by:
persist in interface GenericDao<ENTITY>
See Also:
GenericDao.persist(java.lang.Object)

remove

public void remove(ENTITY entity)
Specified by:
remove in interface GenericDao<ENTITY>
See Also:
GenericDao.remove(java.lang.Object)

flush

public void flush()
Specified by:
flush in interface GenericDao<ENTITY>
See Also:
GenericDao.flush()

persist

public void persist(List<ENTITY> transientEntities)
Specified by:
persist in interface GenericDao<ENTITY>
See Also:
GenericDao.persist(List)

clearFromCache

public void clearFromCache(ENTITY entity)
Specified by:
clearFromCache in interface GenericDao<ENTITY>

clearFromCache

public void clearFromCache(Collection<ENTITY> entities)
Specified by:
clearFromCache in interface GenericDao<ENTITY>

removeAll

public void removeAll(List<ENTITY> entities)
Specified by:
removeAll in interface GenericDao<ENTITY>


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