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 TypeMethodDescriptionlongCount all TestClass records@NotNull Collection<? extends TestClass>findAll()@Nullable TestClassfindById(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.longscrollTestClassesForExport(@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.ScrollableResultsScroll 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, saveAllMethods inherited from class com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
getCacheAwareHibernateTemplateMethods inherited from class org.springframework.orm.hibernate5.support.HibernateDaoSupport
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactoryMethods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDaoMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:TestsDaoFind a specific testClass by id -
findAll
-
getTestClassesMapForPlan
@NotNull public @NotNull Multimap<TestClass,TestCase> getTestClassesMapForPlan(Plan plan, long masterJobId, int cutoffBuildNumber) Description copied from interface:TestsDaoRetrieve all test classes attached to a specific plan in a build later or equal to cutoffBuildNumber.- Specified by:
getTestClassesMapForPlanin interfaceTestsDao- Returns:
- a multimap representing relationship between TestClasses and TestCases.
-
scrollThroughTestClassesForPlan
Description copied from interface:TestsDaoScroll through all test classes attached to a specific plan, alphabetically by test class name. Only forward scroll should be used.- Specified by:
scrollThroughTestClassesForPlanin 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:TestsDaoCount all TestClass records- Specified by:
countTestClassesin interfaceTestsDao- Returns:
- number of TestClass records
-
scrollTestClassesForExport
Description copied from interface:TestsDaoScroll 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:
scrollTestClassesForExportin interfaceTestsDao- Parameters:
consumer- consumer to accept each of the TestClass records- Returns:
- number of traversed rows
-