com.atlassian.bamboo.resultsummary.tests
Class TestsHibernateDao

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate.support.HibernateDaoSupport
          extended by com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
              extended by com.atlassian.bamboo.persistence3.BambooHibernateObjectDao<TestClass>
                  extended by com.atlassian.bamboo.resultsummary.tests.TestsHibernateDao
All Implemented Interfaces:
BambooObjectDao<TestClass>, TestsDao, org.springframework.beans.factory.InitializingBean

public class TestsHibernateDao
extends BambooHibernateObjectDao<TestClass>
implements TestsDao


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
TestsHibernateDao()
           
 
Method Summary
 long countTestClasses()
          Count all TestClass records
 java.util.Collection<? extends TestClass> findAll()
           
 TestClass findById(long testClassId)
          Find a specific testClass by id
 java.util.List<TestClass> getTestClassesForPlan(Plan plan)
          Retrieve all test classes attached to a specific plan
 long scrollTestClassesForExport(com.google.common.base.Function<TestClass,java.lang.Void> function)
          Scroll through and execute function for each of TestClass records Objects passed to function are not fully initialized.
 
Methods inherited from class com.atlassian.bamboo.persistence3.BambooHibernateObjectDao
delete, deleteAll, execute, executeCountQuery, executeFind, executeReturnLong, findAll, findById, save, saveAll
 
Methods inherited from class com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
getCacheAwareHibernateTemplate
 
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, 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
delete, deleteAll, executeReturnLong, findAll, findById, save, saveAll
 

Constructor Detail

TestsHibernateDao

public TestsHibernateDao()
Method Detail

findById

@Nullable
public 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 java.util.Collection<? extends TestClass> findAll()
Specified by:
findAll in interface TestsDao

getTestClassesForPlan

@NotNull
public java.util.List<TestClass> getTestClassesForPlan(Plan plan)
Retrieve all test classes attached to a specific plan

Specified by:
getTestClassesForPlan 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
                                       com.google.common.base.Function<TestClass,java.lang.Void> function)
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:
function - function to be executed on each of the TestClass records
Returns:
number of traversed rows


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.