org.squashtest.tm.service.internal.repository
Interface AutomatedTestDao

All Known Implementing Classes:
HibernateAutomatedTestDao

public interface AutomatedTestDao


Method Summary
 List<org.squashtest.tm.domain.testautomation.AutomatedTest> findAllByExtender(Collection<org.squashtest.tm.domain.testautomation.AutomatedExecutionExtender> extenders)
          Same than 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)
           
 void persist(org.squashtest.tm.domain.testautomation.AutomatedTest newTest)
          Will persist a new AutomatedTest.
 org.squashtest.tm.domain.testautomation.AutomatedTest uniquePersist(org.squashtest.tm.domain.testautomation.AutomatedTest newTest)
          Will persist a TestAutomationTest if really new, or return the existing instance if not.
 

Method Detail

persist

void persist(org.squashtest.tm.domain.testautomation.AutomatedTest newTest)
Will persist a new AutomatedTest. Note : each server must have different characteristics, more exactly each combination of attributes is unique. Therefore if the object to be persisted already exists in the database an exception will be raised instead.

Parameters:
newTest -
Throws:
NonUniqueEntityException - if the given server happen to exist already.

uniquePersist

org.squashtest.tm.domain.testautomation.AutomatedTest uniquePersist(org.squashtest.tm.domain.testautomation.AutomatedTest newTest)
Will persist a TestAutomationTest if really new, or return the existing instance if not. An instance exists if : In all cases it returns the persisted project : this returned instance should replace the one supplied as argument in the client code.

Parameters:
newTest -
Returns:
a persistent version of that test.

findById

org.squashtest.tm.domain.testautomation.AutomatedTest findById(Long testId)
Parameters:
id -
Returns:

findByExample

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. Null attributes will be discarded before the comparison.

Returns:
a TestAutomation test if one was found, null if none was found.
Throws:
NonUniqueEntityException - if more than one match. Causes are either a not restrictive enough example... or a bug.

findAllByExtenderIds

List<org.squashtest.tm.domain.testautomation.AutomatedTest> findAllByExtenderIds(List<Long> extenderIds)
warning : return unique automated tests ( ie result.size() <= argument.size() )

Parameters:
extenderIds -
Returns:

findAllByExtender

List<org.squashtest.tm.domain.testautomation.AutomatedTest> findAllByExtender(Collection<org.squashtest.tm.domain.testautomation.AutomatedExecutionExtender> extenders)
Same than findAllByExtenderIds(List), but with the extenders themselves instead of their ids.

Parameters:
extenders -
Returns:


Copyright © 2010-2013 Henix, henix.fr. All Rights Reserved.