org.squashtest.csp.tm.internal.repository
Interface TestCaseDao

All Superinterfaces:
EntityDao<TestCase>
All Known Implementing Classes:
HibernateTestCaseDao

public interface TestCaseDao
extends EntityDao<TestCase>


Method Summary
 long countByVerifiedRequirementVersion(long verifiedId)
           
 long countCallingTestSteps(long testCaseId)
          Counts the calling test steps of a test case
 List<TestCase> findAllByIdList(List<Long> testCaseIds)
           
 List<TestCase> findAllByIdListNonOrdered(List<Long> testCaseIds)
           
 List<TestCaseLibraryNode> findAllByNameContaining(String tokenInName, boolean groupByProject)
          Finds all TestCaseLibraryNode which name contains the given token.
 List<TestCase> findAllByRequirement(RequirementSearchCriteria criteria, boolean isProjectOrdered)
          Returns the test cases associated with at least a requirement that meets the criteria
 List<TestCase> findAllByVerifiedRequirementVersion(long verifiedId, org.squashtest.csp.core.infrastructure.collection.PagingAndSorting sorting)
          Returns paged and sorted collection of test cases verifying the requirement version of given id.
 List<TestCase> findAllCallingTestCases(long testCaseId, CollectionSorting sorting)
          returns the ids of all the test cases having at least one call test step referencing the given test case.
 List<TestStep> findAllStepsByIdFiltered(long testCaseId, CollectionFilter filter)
           
 List<Long> findAllTestCasesIdsCalledByTestCase(long testCaseId)
          Finds all the ids of the test cases called by a given test case.
 List<Long> findAllTestCasesIdsCalledByTestCases(List<Long> testCasesIds)
          Finds all the ids of the test cases called by a given list of test cases.
 TestCase findAndInit(Long testCaseId)
           
 TestCase findByIdWithInitializedSteps(long testCaseId)
           
 List<Long> findCalledTestCaseOfCallSteps(List<Long> testStepsIds)
          Returns the test cases ids first called by the call steps found in the list of given test steps ids.
 List<Long> findDistinctTestCasesIdsCalledByTestCase(Long testCaseId)
           
 List<String> findNamesInFolderStartingWith(long folderId, String nameStart)
           
 List<String> findNamesInLibraryStartingWith(long libraryId, String nameStart)
           
 TestCase findTestCaseByTestStepId(long testStepId)
          This method returns the test step's associated TestCase
 List<Long> findTestCasesHavingCaller(Collection<Long> testCasesIds)
          Given a list of test case ids, returns a sublist of the test case ids.
 List<Object[]> findTestCasesHavingCallerDetails(Collection<Long> testCaseIds)
          Given a list of test case ids, returns a list of the following structure : - caller id (null if no match), - caller name (null if no match), - called id, - called name Note that only first-level callers will be included if found, additional invokations will be needed to fetch all the hierarchy.
 List<ActionTestStep> getTestCaseSteps(Long testCaseId)
           
 
Methods inherited from interface org.squashtest.csp.tm.internal.repository.EntityDao
findById, flush, persist, persist, remove
 

Method Detail

findAndInit

TestCase findAndInit(Long testCaseId)

getTestCaseSteps

List<ActionTestStep> getTestCaseSteps(Long testCaseId)

findAllByIdList

List<TestCase> findAllByIdList(List<Long> testCaseIds)
Specified by:
findAllByIdList in interface EntityDao<TestCase>

findAllByIdListNonOrdered

List<TestCase> findAllByIdListNonOrdered(List<Long> testCaseIds)

findNamesInFolderStartingWith

List<String> findNamesInFolderStartingWith(long folderId,
                                           String nameStart)

findNamesInLibraryStartingWith

List<String> findNamesInLibraryStartingWith(long libraryId,
                                            String nameStart)

findByIdWithInitializedSteps

TestCase findByIdWithInitializedSteps(long testCaseId)

findAllStepsByIdFiltered

List<TestStep> findAllStepsByIdFiltered(long testCaseId,
                                        CollectionFilter filter)

findAllByNameContaining

List<TestCaseLibraryNode> findAllByNameContaining(String tokenInName,
                                                  boolean groupByProject)
Finds all TestCaseLibraryNode which name contains the given token.

Parameters:
tokenInName -
groupByProject -
Returns:

findTestCaseByTestStepId

TestCase findTestCaseByTestStepId(long testStepId)
This method returns the test step's associated TestCase

Parameters:
testStepId - the test step id
Returns:
the associated test Case

countCallingTestSteps

long countCallingTestSteps(long testCaseId)
Counts the calling test steps of a test case

Parameters:
testCaseId -
Returns:

findTestCasesHavingCaller

List<Long> findTestCasesHavingCaller(Collection<Long> testCasesIds)
Given a list of test case ids, returns a sublist of the test case ids. An id will be included in the output list if at least one test case calls the given test case.

Parameters:
testCaseIds - the list of test case ids under inquiry.
Returns:
a sublist of the input list, with test cases never called filtered out.

findTestCasesHavingCallerDetails

List<Object[]> findTestCasesHavingCallerDetails(Collection<Long> testCaseIds)
Given a list of test case ids, returns a list of the following structure : - caller id (null if no match), - caller name (null if no match), - called id, - called name Note that only first-level callers will be included if found, additional invokations will be needed to fetch all the hierarchy.

Parameters:
testCaseIds - the list of test case ids under inquiry.
Returns:
a structure described just like above.

findAllTestCasesIdsCalledByTestCase

List<Long> findAllTestCasesIdsCalledByTestCase(long testCaseId)
Finds all the ids of the test cases called by a given test case.

Parameters:
testCaseId -
Returns:

findDistinctTestCasesIdsCalledByTestCase

List<Long> findDistinctTestCasesIdsCalledByTestCase(Long testCaseId)

findAllTestCasesIdsCalledByTestCases

List<Long> findAllTestCasesIdsCalledByTestCases(List<Long> testCasesIds)
Finds all the ids of the test cases called by a given list of test cases.

Parameters:
testCaseId -
Returns:

findAllCallingTestCases

List<TestCase> findAllCallingTestCases(long testCaseId,
                                       CollectionSorting sorting)
returns the ids of all the test cases having at least one call test step referencing the given test case.

Parameters:
testCaseId - the id of the test case.
sorting - the sorting attributes and the like.
Returns:
the list of test cases having at least one call step calling the input test case.

findAllByRequirement

List<TestCase> findAllByRequirement(RequirementSearchCriteria criteria,
                                    boolean isProjectOrdered)
Returns the test cases associated with at least a requirement that meets the criteria

Parameters:
criteria - the requirement search criteria
isProjectOrdered - if set to true, the list of test case is ordered by project
Returns:
the list of test case (order by project if specified)

findCalledTestCaseOfCallSteps

List<Long> findCalledTestCaseOfCallSteps(List<Long> testStepsIds)
Returns the test cases ids first called by the call steps found in the list of given test steps ids. Note: only first level called test case are returned. To get the whole test case tree you should use CallStepManagerService.getTestCaseCallTree(Long).

Parameters:
testStepsIds -
Returns:
the list of test case ids called by test steps

findAllByVerifiedRequirementVersion

List<TestCase> findAllByVerifiedRequirementVersion(long verifiedId,
                                                   org.squashtest.csp.core.infrastructure.collection.PagingAndSorting sorting)
Returns paged and sorted collection of test cases verifying the requirement version of given id.

Parameters:
verifierId -
sorting -
Returns:

countByVerifiedRequirementVersion

long countByVerifiedRequirementVersion(long verifiedId)
Parameters:
id -
Returns:


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