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
-
Field Summary
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
Count all TestClass records@NotNull Collection<? extends TestClass>
findAll()
@Nullable TestClass
findById
(long testClassId) Find a specific testClass by idgetTestClassesMapForPlan
(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
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 org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
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
-
Constructor Details
-
TestsHibernateDao
public TestsHibernateDao()
-
-
Method Details
-
findById
Description copied from interface:TestsDao
Find a specific testClass by id -
findAll
-
getTestClassesMapForPlan
@NotNull public @NotNull 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
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
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
-