Class TestsHibernateDao

java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate5.support.HibernateDaoSupport
All Implemented Interfaces:
BambooObjectDao<TestClass>, TestsDao, org.springframework.beans.factory.InitializingBean

public class TestsHibernateDao extends BambooHibernateObjectDao<TestClass> implements TestsDao
  • Constructor Details

    • TestsHibernateDao

      public TestsHibernateDao()
  • Method Details

    • findById

      @Nullable public @Nullable TestClass findById(long testClassId)
      Description copied from interface: TestsDao
      Find a specific testClass by id
      Specified by:
      findById in interface TestsDao
      Parameters:
      testClassId - of the test class you want to find
      Returns:
      the testClass corresponding to the id provided.
    • findAll

      @NotNull public @NotNull Collection<? extends TestClass> findAll()
      Specified by:
      findAll in interface TestsDao
    • 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 interface TestsDao
      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 interface TestsDao
      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 interface TestsDao
      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 interface TestsDao
      Parameters:
      consumer - consumer to accept each of the TestClass records
      Returns:
      number of traversed rows