Class TestResultsHibernateDao
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate5.support.HibernateDaoSupport
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
-
Field Summary
Fields inherited from class org.springframework.dao.support.DaoSupport
logger -
Constructor Summary
ConstructorsConstructorDescriptionTestResultsHibernateDao(BambooTransactionHibernateTemplate transactionTemplate) -
Method Summary
Modifier and TypeMethodDescriptionlongCount all TestClassResultslongcountTestClassResults(@NotNull PlanKey planKey) Count TestClassResults for a Plan@NotNull Collection<? extends TestClassResult> findAll()findById(long testClassId) Find a specific testClassResult by id@NotNull List<TestClassResult> getTestClassResults(@NotNull PlanResultKey planResultKey) Retrieves a list of all testClassResults for a BuildResultSummaryintremoveTestClassResultsByPlan(@NotNull PlanKey planKey) Remove allTestClassResultobjects referenced byResultsSummaryobjects identified by planKeylongscrollTestClassResultsForExport(@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, findAll, findById, merge, save, saveAllMethods 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, initDao
-
Constructor Details
-
TestResultsHibernateDao
-
-
Method Details
-
findById
Description copied from interface:TestResultsDaoFind a specific testClassResult by id- Specified by:
findByIdin interfaceTestResultsDao- Parameters:
testClassId- of the test you want to find- Returns:
- the testClassResult corresponding to the id provided.
-
findAll
- Specified by:
findAllin interfaceTestResultsDao
-
countTestClassResults
public long countTestClassResults()Description copied from interface:TestResultsDaoCount all TestClassResults- Specified by:
countTestClassResultsin interfaceTestResultsDao- Returns:
- number of TestClassResults
-
countTestClassResults
Description copied from interface:TestResultsDaoCount TestClassResults for a Plan- Specified by:
countTestClassResultsin interfaceTestResultsDao- Parameters:
planKey- the Plan to count TestClassResults for- Returns:
- number of TestClassResults
-
scrollTestClassResultsForExport
Description copied from interface:TestResultsDaoScroll 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:
scrollTestClassResultsForExportin 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:TestResultsDaoRetrieves a list of all testClassResults for a BuildResultSummary- Specified by:
getTestClassResultsin interfaceTestResultsDao- Parameters:
planResultKey- key of the BuildResultsSummary to get the tests class results for- Returns:
- a list of all testClassResults for the BuildResultSummary
-
removeTestClassResultsByPlan
Description copied from interface:TestResultsDaoRemove allTestClassResultobjects referenced byResultsSummaryobjects identified by planKey- Specified by:
removeTestClassResultsByPlanin interfaceTestResultsDao- Parameters:
planKey- plan identifier- Returns:
- number of removed objects
-