org.squashtest.tm.service.internal.repository.hibernate
Class HibernateAutomatedTestDao

java.lang.Object
  extended by org.squashtest.tm.service.internal.repository.hibernate.HibernateAutomatedTestDao
All Implemented Interfaces:
AutomatedTestDao

@Repository
public class HibernateAutomatedTestDao
extends Object
implements AutomatedTestDao


Constructor Summary
HibernateAutomatedTestDao()
           
 
Method Summary
 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)
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateAutomatedTestDao

public HibernateAutomatedTestDao()
Method Detail

persist

public void persist(org.squashtest.tm.domain.testautomation.AutomatedTest newTest)
Description copied from interface: AutomatedTestDao
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.

Specified by:
persist in interface AutomatedTestDao

uniquePersist

public org.squashtest.tm.domain.testautomation.AutomatedTest uniquePersist(org.squashtest.tm.domain.testautomation.AutomatedTest newTest)
Description copied from interface: AutomatedTestDao
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.

Specified by:
uniquePersist in interface AutomatedTestDao
Returns:
a persistent version of that test.

findById

public org.squashtest.tm.domain.testautomation.AutomatedTest findById(Long testId)
Specified by:
findById in interface AutomatedTestDao
Returns:

findByExample

public org.squashtest.tm.domain.testautomation.AutomatedTest findByExample(org.squashtest.tm.domain.testautomation.AutomatedTest example)
Description copied from interface: AutomatedTestDao

Given a detached (or even attached) AutomatedTest example, will fetch a AutomatedTest having the same characteristics. Null attributes will be discarded before the comparison.

Specified by:
findByExample in interface AutomatedTestDao
Returns:
a TestAutomation test if one was found, null if none was found.

findAllByExtenderIds

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

Specified by:
findAllByExtenderIds in interface AutomatedTestDao
Returns:

findAllByExtender

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

Specified by:
findAllByExtender in interface AutomatedTestDao
Returns:


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