Interface TestsDao
-
- All Superinterfaces:
BambooObjectDao<TestClass>
- All Known Implementing Classes:
TestsHibernateDao
public interface TestsDao extends BambooObjectDao<TestClass>
Dao for retrieving and manipulating Test Objects (e.g TestClass, TestCase)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
countTestClasses()
Count all TestClass records@NotNull Collection<? extends TestClass>
findAll()
@Nullable TestClass
findById(long testClassId)
Find a specific testClass by id@NotNull com.google.common.collect.Multimap<TestClass,TestCase>
getTestClassesMapForPlan(Plan plan, long masterJobId, int cutoffBuildNumber)
Retrieve all test classes attached to a specific plan in a build later or equal to cutoffBuildNumber.long
scrollTestClassesForExport(@NotNull Consumer<TestClass> consumer)
Scroll through and execute function for each of TestClass records Objects passed to function are not fully initialized.@NotNull org.hibernate.ScrollableResults
scrollThroughTestClassesForPlan(Plan plan)
Scroll through all test classes attached to a specific plan, alphabetically by test class name.-
Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAll
-
-
-
-
Method Detail
-
findById
@Nullable @Nullable TestClass findById(long testClassId)
Find a specific testClass by id- Parameters:
testClassId
- of the test class you want to find- Returns:
- the testClass corresponding to the id provided.
-
findAll
@NotNull @NotNull Collection<? extends TestClass> findAll()
-
getTestClassesMapForPlan
@NotNull @NotNull com.google.common.collect.Multimap<TestClass,TestCase> getTestClassesMapForPlan(Plan plan, long masterJobId, int cutoffBuildNumber)
Retrieve all test classes attached to a specific plan in a build later or equal to cutoffBuildNumber.- Returns:
- a multimap representing relationship between TestClasses and TestCases.
-
scrollThroughTestClassesForPlan
@NotNull @NotNull org.hibernate.ScrollableResults scrollThroughTestClassesForPlan(Plan plan)
Scroll through all test classes attached to a specific plan, alphabetically by test class name. Only forward scroll should be used.- Parameters:
plan
- the tests are attached to- Returns:
- a list of TestClass attached to a plan.
-
countTestClasses
long countTestClasses()
Count all TestClass records- Returns:
- number of TestClass records
-
scrollTestClassesForExport
long scrollTestClassesForExport(@NotNull @NotNull Consumer<TestClass> consumer)
Scroll through and execute function for each of TestClass records Objects passed to function are not fully initialized. Collections are empty and related objects have only id set.- Parameters:
consumer
- consumer to accept each of the TestClass records- Returns:
- number of traversed rows
-
-