com.atlassian.bamboo.resultsummary.tests
Interface TestResultsDao

All Superinterfaces:
BambooObjectDao<TestClassResult>
All Known Implementing Classes:
TestResultsHibernateDao

public interface TestResultsDao
extends BambooObjectDao<TestClassResult>

Dao for retrieving and manipulating Test Results (e.g TestClassResult, TestCaseResult)


Method Summary
 long countTestClassResults()
          Count all TestClassResults
 long countTestClassResults(PlanKey planKey)
          Count TestClassResults for a Plan
 java.util.Collection<? extends TestClassResult> findAll()
           
 TestClassResult findById(long testClassResultId)
          Find a specific testClassResult by id
 java.util.List<TestClassResult> getTestClassResults(PlanResultKey planResultKey)
          Retrieves a list of all testClassResults for a BuildResultSummary
 int removeTestClassResultsByPlan(PlanKey planKey)
          Remove all TestClassResult objects referenced by ResultsSummary objects identified by planKey
 int removeTestClassResultsByResult(long buildResultSummaryId)
          Efficiently removes TestClassResult objects referenced by ResultsSummary object
 long scrollTestClassResultsForExport(com.google.common.base.Function<TestClassResult,java.lang.Void> function)
          Scroll through and execute function for each of TestClassResults Objects passed to function are not fully initialized.
 
Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
delete, deleteAll, executeReturnLong, findAll, findById, save, saveAll
 

Method Detail

findById

TestClassResult findById(long testClassResultId)
Find a specific testClassResult by id

Parameters:
testClassResultId - of the test you want to find
Returns:
the testClassResult corresponding to the id provided.

findAll

@NotNull
java.util.Collection<? extends TestClassResult> findAll()

countTestClassResults

long countTestClassResults()
Count all TestClassResults

Returns:
number of TestClassResults

countTestClassResults

long countTestClassResults(@NotNull
                           PlanKey planKey)
Count TestClassResults for a Plan

Parameters:
planKey - the Plan to count TestClassResults for
Returns:
number of TestClassResults

scrollTestClassResultsForExport

long scrollTestClassResultsForExport(@NotNull
                                     com.google.common.base.Function<TestClassResult,java.lang.Void> function)
Scroll through and execute function for each of TestClassResults Objects passed to function are not fully initialized. Collections are empty and related objects have only id set.

Parameters:
function - function to be executed on each of the TestClassResults
Returns:
number of traversed rows

getTestClassResults

@NotNull
java.util.List<TestClassResult> getTestClassResults(@NotNull
                                                            PlanResultKey planResultKey)
Retrieves a list of all testClassResults for a BuildResultSummary

Parameters:
planResultKey - key of the BuildResultsSummary to get the tests class results for
Returns:
a list of all testClassResults for the BuildResultSummary

removeTestClassResultsByPlan

int removeTestClassResultsByPlan(@NotNull
                                 PlanKey planKey)
Remove all TestClassResult objects referenced by ResultsSummary objects identified by planKey

Parameters:
planKey - plan identifier
Returns:
number of removed objects

removeTestClassResultsByResult

int removeTestClassResultsByResult(long buildResultSummaryId)
Efficiently removes TestClassResult objects referenced by ResultsSummary object

Parameters:
buildResultSummaryId -
Returns:
number of removed objects


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.