@Repository public class HibernateAutomatedTestDao extends Object implements AutomatedTestDao
| Constructor and Description |
|---|
HibernateAutomatedTestDao() |
| Modifier and Type | Method and Description |
|---|---|
long |
countReferences(long testId)
returns how many test cases and/or executions reference an AutomatedTest (given its id)
|
List<org.squashtest.tm.domain.testautomation.AutomatedTest> |
findAllByExtender(Collection<org.squashtest.tm.domain.testautomation.AutomatedExecutionExtender> extenders)
Same than
AutomatedTestDao.findAllByExtenderIds(List), but with the extenders themselves instead of their ids. |
List<org.squashtest.tm.domain.testautomation.AutomatedTest> |
findAllByExtenderIds(List<Long> extenderIds)
warning : return unique automated tests ( ie result.size() <= argument.size() )
|
org.squashtest.tm.domain.testautomation.AutomatedTest |
findByExample(org.squashtest.tm.domain.testautomation.AutomatedTest example)
Given a detached (or even attached)
AutomatedTest example, will fetch a AutomatedTest
having the same characteristics. |
org.squashtest.tm.domain.testautomation.AutomatedTest |
findById(Long testId) |
List<org.squashtest.tm.domain.testautomation.AutomatedTest> |
findByTestCases(Collection<Long> testCaseIds) |
org.squashtest.tm.domain.testautomation.AutomatedTest |
persistOrAttach(org.squashtest.tm.domain.testautomation.AutomatedTest newTest)
Will persist this test if really new, or return the persisted instance
if this test already exists.
|
void |
pruneOrphans()
Will look for AutomatedTests that aren't referenced by anything and will remove them from the repository
|
void |
removeIfUnused(org.squashtest.tm.domain.testautomation.AutomatedTest test)
Will remove the test from the database, if and only if no TestCase nor AutomatedExecutionExtender
still refer to it.
|
public org.squashtest.tm.domain.testautomation.AutomatedTest persistOrAttach(org.squashtest.tm.domain.testautomation.AutomatedTest newTest)
AutomatedTestDaopersistOrAttach in interface AutomatedTestDaopublic void removeIfUnused(org.squashtest.tm.domain.testautomation.AutomatedTest test)
AutomatedTestDaoremoveIfUnused in interface AutomatedTestDaopublic void pruneOrphans()
AutomatedTestDaopruneOrphans in interface AutomatedTestDaopublic long countReferences(long testId)
AutomatedTestDaocountReferences in interface AutomatedTestDaopublic org.squashtest.tm.domain.testautomation.AutomatedTest findById(Long testId)
findById in interface AutomatedTestDaopublic List<org.squashtest.tm.domain.testautomation.AutomatedTest> findByTestCases(Collection<Long> testCaseIds)
findByTestCases in interface AutomatedTestDaopublic org.squashtest.tm.domain.testautomation.AutomatedTest findByExample(org.squashtest.tm.domain.testautomation.AutomatedTest example)
AutomatedTestDaoGiven a detached (or even attached) AutomatedTest example, will fetch a AutomatedTest
having the same characteristics. Null attributes will be discarded before the comparison.
findByExample in interface AutomatedTestDaopublic List<org.squashtest.tm.domain.testautomation.AutomatedTest> findAllByExtenderIds(List<Long> extenderIds)
AutomatedTestDaofindAllByExtenderIds in interface AutomatedTestDaopublic List<org.squashtest.tm.domain.testautomation.AutomatedTest> findAllByExtender(Collection<org.squashtest.tm.domain.testautomation.AutomatedExecutionExtender> extenders)
AutomatedTestDaoAutomatedTestDao.findAllByExtenderIds(List), but with the extenders themselves instead of their ids.findAllByExtender in interface AutomatedTestDaoCopyright © 2010–2017 Henix, henix.fr. All rights reserved.