Class TestsHibernateDao
- java.lang.Object
-
- org.springframework.dao.support.DaoSupport
-
- org.springframework.orm.hibernate5.support.HibernateDaoSupport
-
- com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
-
- com.atlassian.bamboo.persistence3.BambooHibernateObjectDao<TestClass>
-
- com.atlassian.bamboo.resultsummary.tests.TestsHibernateDao
-
- All Implemented Interfaces:
BambooObjectDao<TestClass>
,TestsDao
,org.springframework.beans.factory.InitializingBean
public class TestsHibernateDao extends BambooHibernateObjectDao<TestClass> implements TestsDao
-
-
Constructor Summary
Constructors Constructor Description TestsHibernateDao()
-
Method Summary
All Methods Instance Methods Concrete 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 idcom.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 class com.atlassian.bamboo.persistence3.BambooHibernateObjectDao
convertSearchTermToLikeExpression, countAll, countWithRestriction, delete, deleteAll, executeCountQuery, findAll, findById, merge, save, saveAll
-
Methods inherited from class com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
getCacheAwareHibernateTemplate
-
Methods inherited from class org.springframework.orm.hibernate5.support.HibernateDaoSupport
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAll
-
-
-
-
Method Detail
-
findById
@Nullable public @Nullable TestClass findById(long testClassId)
Description copied from interface:TestsDao
Find a specific testClass by id
-
findAll
@NotNull public @NotNull Collection<? extends TestClass> findAll()
-
getTestClassesMapForPlan
public com.google.common.collect.Multimap<TestClass,TestCase> getTestClassesMapForPlan(Plan plan, long masterJobId, int cutoffBuildNumber)
Description copied from interface:TestsDao
Retrieve all test classes attached to a specific plan in a build later or equal to cutoffBuildNumber.- Specified by:
getTestClassesMapForPlan
in interfaceTestsDao
- Returns:
- a multimap representing relationship between TestClasses and TestCases.
-
scrollThroughTestClassesForPlan
@NotNull public @NotNull org.hibernate.ScrollableResults scrollThroughTestClassesForPlan(Plan plan)
Description copied from interface:TestsDao
Scroll through all test classes attached to a specific plan, alphabetically by test class name. Only forward scroll should be used.- Specified by:
scrollThroughTestClassesForPlan
in interfaceTestsDao
- Parameters:
plan
- the tests are attached to- Returns:
- a list of TestClass attached to a plan.
-
countTestClasses
public long countTestClasses()
Description copied from interface:TestsDao
Count all TestClass records- Specified by:
countTestClasses
in interfaceTestsDao
- Returns:
- number of TestClass records
-
scrollTestClassesForExport
public long scrollTestClassesForExport(@NotNull @NotNull Consumer<TestClass> consumer)
Description copied from interface:TestsDao
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.- Specified by:
scrollTestClassesForExport
in interfaceTestsDao
- Parameters:
consumer
- consumer to accept each of the TestClass records- Returns:
- number of traversed rows
-
-