Class TestResultsHibernateDao
- java.lang.Object
-
- org.springframework.dao.support.DaoSupport
-
- org.springframework.orm.hibernate5.support.HibernateDaoSupport
-
- com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
-
- com.atlassian.bamboo.persistence3.BambooHibernateObjectDao<TestClassResult>
-
- com.atlassian.bamboo.resultsummary.tests.TestResultsHibernateDao
-
- All Implemented Interfaces:
BambooObjectDao<TestClassResult>
,TestResultsDao
,org.springframework.beans.factory.InitializingBean
public class TestResultsHibernateDao extends BambooHibernateObjectDao<TestClassResult> implements TestResultsDao
-
-
Constructor Summary
Constructors Constructor Description TestResultsHibernateDao(BambooTransactionHibernateTemplate transactionTemplate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
countTestClassResults()
Count all TestClassResultslong
countTestClassResults(@NotNull PlanKey planKey)
Count TestClassResults for a Plan@NotNull Collection<? extends TestClassResult>
findAll()
TestClassResult
findById(long testClassId)
Find a specific testClassResult by id@NotNull List<TestClassResult>
getTestClassResults(@NotNull PlanResultKey planResultKey)
Retrieves a list of all testClassResults for a BuildResultSummaryint
removeTestClassResultsByPlan(@NotNull PlanKey planKey)
Remove allTestClassResult
objects referenced byResultsSummary
objects identified by planKeylong
scrollTestClassResultsForExport(@NotNull Consumer<TestClassResult> consumer)
Scroll through and execute function for each of TestClassResults Objects passed to function are not fully initialized.-
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
-
-
-
-
Constructor Detail
-
TestResultsHibernateDao
public TestResultsHibernateDao(BambooTransactionHibernateTemplate transactionTemplate)
-
-
Method Detail
-
findById
public TestClassResult findById(long testClassId)
Description copied from interface:TestResultsDao
Find a specific testClassResult by id- Specified by:
findById
in interfaceTestResultsDao
- Parameters:
testClassId
- of the test you want to find- Returns:
- the testClassResult corresponding to the id provided.
-
findAll
@NotNull public @NotNull Collection<? extends TestClassResult> findAll()
- Specified by:
findAll
in interfaceTestResultsDao
-
countTestClassResults
public long countTestClassResults()
Description copied from interface:TestResultsDao
Count all TestClassResults- Specified by:
countTestClassResults
in interfaceTestResultsDao
- Returns:
- number of TestClassResults
-
countTestClassResults
public long countTestClassResults(@NotNull @NotNull PlanKey planKey)
Description copied from interface:TestResultsDao
Count TestClassResults for a Plan- Specified by:
countTestClassResults
in interfaceTestResultsDao
- Parameters:
planKey
- the Plan to count TestClassResults for- Returns:
- number of TestClassResults
-
scrollTestClassResultsForExport
public long scrollTestClassResultsForExport(@NotNull @NotNull Consumer<TestClassResult> consumer)
Description copied from interface:TestResultsDao
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.- Specified by:
scrollTestClassResultsForExport
in interfaceTestResultsDao
- Parameters:
consumer
- consumer to accept each of the TestClassResults- Returns:
- number of traversed rows
-
getTestClassResults
@NotNull public @NotNull List<TestClassResult> getTestClassResults(@NotNull @NotNull PlanResultKey planResultKey)
Description copied from interface:TestResultsDao
Retrieves a list of all testClassResults for a BuildResultSummary- Specified by:
getTestClassResults
in interfaceTestResultsDao
- Parameters:
planResultKey
- key of the BuildResultsSummary to get the tests class results for- Returns:
- a list of all testClassResults for the BuildResultSummary
-
removeTestClassResultsByPlan
public int removeTestClassResultsByPlan(@NotNull @NotNull PlanKey planKey)
Description copied from interface:TestResultsDao
Remove allTestClassResult
objects referenced byResultsSummary
objects identified by planKey- Specified by:
removeTestClassResultsByPlan
in interfaceTestResultsDao
- Parameters:
planKey
- plan identifier- Returns:
- number of removed objects
-
-