org.squashtest.tm.service.internal.repository
Interface CustomTestCaseDao

All Superinterfaces:
EntityDao<org.squashtest.tm.domain.testcase.TestCase>, GenericDao<org.squashtest.tm.domain.testcase.TestCase>
All Known Subinterfaces:
TestCaseDao
All Known Implementing Classes:
HibernateTestCaseDao

public interface CustomTestCaseDao
extends EntityDao<org.squashtest.tm.domain.testcase.TestCase>

Author:
Gregory Fouquet

Method Summary
 long countByVerifiedRequirementVersion(long verifiedId)
           
 List<org.squashtest.tm.domain.testcase.TestCaseLibraryNode> findAllByNameContaining(String tokenInName, boolean groupByProject)
          Finds all TestCaseLibraryNode which name contains the given token.
 List<org.squashtest.tm.domain.testcase.TestCase> findAllByRequirement(org.squashtest.tm.domain.requirement.RequirementSearchCriteria criteria, boolean isProjectOrdered)
          Returns the test cases associated with at least a requirement that meets the criteria
 List<org.squashtest.tm.domain.testcase.TestCase> findAllByVerifiedRequirementVersion(long verifiedId, org.squashtest.tm.core.foundation.collection.PagingAndSorting sorting)
          Returns paged and sorted collection of test cases verifying the requirement version of given id.
 List<org.squashtest.tm.domain.testcase.TestCase> findAllCallingTestCases(long calleeId)
          return all test cases having at least one call test step referencing the given test case.
 List<org.squashtest.tm.domain.testcase.TestCase> findAllCallingTestCases(long testCaseId, org.squashtest.tm.core.foundation.collection.PagingAndSorting sorting)
          returns the test cases having at least one call test step referencing the given test case.
 List<org.squashtest.tm.domain.execution.Execution> findAllExecutionByTestCase(Long tcId)
          Returns all the execution associated to this test-case
 List<org.squashtest.tm.domain.testcase.TestCase> findAllLinkedToIteration(List<Long> nodeIds)
          Return all test-cases that are linked to an iteration-test-plan-item
 List<org.squashtest.tm.domain.testcase.TestStep> findAllStepsByIdFiltered(long testCaseId, org.squashtest.tm.core.foundation.collection.Paging filter)
           
 List<Long> findAllTestCaseIdsByNodeIds(Collection<Long> nodeIds)
           
 List<Long> findAllTestCasesIdsByLibrary(long libraryId)
          Return all test case ids contained by the library of the given id.
 List<Long> findAllTestCasesIdsCalledByTestCases(List<Long> testCasesIds)
          Finds all the ids of the test cases called by a given list of test cases.
 List<Long> findAllTestCasesIdsCallingTestCases(List<Long> testCasesIds)
           
 org.squashtest.tm.domain.testcase.TestCase findAndInit(Long testCaseId)
           
 List<org.squashtest.tm.domain.testcase.TestCaseLibraryNode> findBySearchCriteria(org.squashtest.tm.domain.testcase.TestCaseSearchCriteria criteria)
           
 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.
 org.squashtest.tm.domain.testcase.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<org.squashtest.tm.domain.testcase.ExportTestCaseData> findTestCaseToExportFromLibrary(List<Long> projectIds)
           
 List<org.squashtest.tm.domain.testcase.ExportTestCaseData> findTestCaseToExportFromNodes(List<Long> nodesIds)
           
 List<org.squashtest.tm.domain.testcase.TestCase> findUnsortedAllByVerifiedRequirementVersion(long requirementId)
          Returns unsorted collection of test cases verifying the requirement version of given id.
 void persistTestCaseAndSteps(org.squashtest.tm.domain.testcase.TestCase testCase)
          That method exists because hibernate doesn't quite respect the cascade persist for a set of test case and steps
 void safePersist(org.squashtest.tm.domain.testcase.TestCase testCase)
          if the transient test case has steps, will invoke persistTestCaseAndSteps(TestCase) else, will just save it.
 
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
 

Method Detail

persistTestCaseAndSteps

void persistTestCaseAndSteps(org.squashtest.tm.domain.testcase.TestCase testCase)
That method exists because hibernate doesn't quite respect the cascade persist for a set of test case and steps

Parameters:
testCase -

safePersist

void safePersist(org.squashtest.tm.domain.testcase.TestCase testCase)
if the transient test case has steps, will invoke persistTestCaseAndSteps(TestCase) else, will just save it.


findAndInit

org.squashtest.tm.domain.testcase.TestCase findAndInit(Long testCaseId)

findAllByNameContaining

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

Parameters:
tokenInName -
groupByProject -
Returns:

findAllTestCaseIdsByNodeIds

List<Long> findAllTestCaseIdsByNodeIds(Collection<Long> nodeIds)

findTestCaseByTestStepId

org.squashtest.tm.domain.testcase.TestCase findTestCaseByTestStepId(long testStepId)
This method returns the test step's associated TestCase

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

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.

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:

findAllTestCasesIdsCallingTestCases

List<Long> findAllTestCasesIdsCallingTestCases(List<Long> testCasesIds)

findAllCallingTestCases

List<org.squashtest.tm.domain.testcase.TestCase> findAllCallingTestCases(long testCaseId,
                                                                         org.squashtest.tm.core.foundation.collection.PagingAndSorting sorting)
returns 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.

findAllCallingTestCases

List<org.squashtest.tm.domain.testcase.TestCase> findAllCallingTestCases(long calleeId)
return all test cases having at least one call test step referencing the given test case.

Parameters:
calleeId - the id of the called test case
Returns:
the test cases calling the test case matching the given id param.

findAllByRequirement

List<org.squashtest.tm.domain.testcase.TestCase> findAllByRequirement(org.squashtest.tm.domain.requirement.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 org.squashtest.tm.service.testcase.CallStepManagerService#getTestCaseCallTree(Long).

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

findAllByVerifiedRequirementVersion

List<org.squashtest.tm.domain.testcase.TestCase> findAllByVerifiedRequirementVersion(long verifiedId,
                                                                                     org.squashtest.tm.core.foundation.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:

findUnsortedAllByVerifiedRequirementVersion

List<org.squashtest.tm.domain.testcase.TestCase> findUnsortedAllByVerifiedRequirementVersion(long requirementId)
Returns unsorted collection of test cases verifying the requirement version of given id.

Parameters:
requirementId -
Returns:

findBySearchCriteria

List<org.squashtest.tm.domain.testcase.TestCaseLibraryNode> findBySearchCriteria(org.squashtest.tm.domain.testcase.TestCaseSearchCriteria criteria)

findAllExecutionByTestCase

List<org.squashtest.tm.domain.execution.Execution> findAllExecutionByTestCase(Long tcId)
Returns all the execution associated to this test-case

Parameters:
tcId -
Returns:

findTestCaseToExportFromLibrary

List<org.squashtest.tm.domain.testcase.ExportTestCaseData> findTestCaseToExportFromLibrary(List<Long> projectIds)

findTestCaseToExportFromNodes

List<org.squashtest.tm.domain.testcase.ExportTestCaseData> findTestCaseToExportFromNodes(List<Long> nodesIds)

findAllTestCasesIdsByLibrary

List<Long> findAllTestCasesIdsByLibrary(long libraryId)
Return all test case ids contained by the library of the given id. Not only root ones

Parameters:
libraryId -
Returns:

findAllLinkedToIteration

List<org.squashtest.tm.domain.testcase.TestCase> findAllLinkedToIteration(List<Long> nodeIds)
Return all test-cases that are linked to an iteration-test-plan-item

Parameters:
nodeIds -
Returns:

findAllStepsByIdFiltered

List<org.squashtest.tm.domain.testcase.TestStep> findAllStepsByIdFiltered(long testCaseId,
                                                                          org.squashtest.tm.core.foundation.collection.Paging filter)


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