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

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

@Repository
public class HibernateTestAutomationServerDao
extends Object
implements TestAutomationServerDao


Constructor Summary
HibernateTestAutomationServerDao()
           
 
Method Summary
 List<org.squashtest.tm.domain.testautomation.TestAutomationProject> findAllHostedProjects(long serverId)
          return all the projects that the given server hosts.
 org.squashtest.tm.domain.testautomation.TestAutomationServer findByExample(org.squashtest.tm.domain.testautomation.TestAutomationServer example)
          Given a detached (or even attached) TestAutomationServer example, will fetch a TestAutomationServer having the same characteristics.
 org.squashtest.tm.domain.testautomation.TestAutomationServer findById(Long id)
           
 void persist(org.squashtest.tm.domain.testautomation.TestAutomationServer server)
          Will persist a new TestAutomationServer.
 org.squashtest.tm.domain.testautomation.TestAutomationServer uniquePersist(org.squashtest.tm.domain.testautomation.TestAutomationServer server)
          Will persist a TestAutomationServer 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

HibernateTestAutomationServerDao

public HibernateTestAutomationServerDao()
Method Detail

persist

public void persist(org.squashtest.tm.domain.testautomation.TestAutomationServer server)
Description copied from interface: TestAutomationServerDao
Will persist a new TestAutomationServer. 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 TestAutomationServerDao

uniquePersist

public org.squashtest.tm.domain.testautomation.TestAutomationServer uniquePersist(org.squashtest.tm.domain.testautomation.TestAutomationServer server)
Description copied from interface: TestAutomationServerDao
Will persist a TestAutomationServer if really new, or return the existing instance if not. An instance exists if : In all cases it returns the persisted server : this returned instance should replace the one supplied as argument in the client code.

Specified by:
uniquePersist in interface TestAutomationServerDao
Returns:
a persistent version of that server.

findById

public org.squashtest.tm.domain.testautomation.TestAutomationServer findById(Long id)
Specified by:
findById in interface TestAutomationServerDao
Returns:

findByExample

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

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

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

findAllHostedProjects

public List<org.squashtest.tm.domain.testautomation.TestAutomationProject> findAllHostedProjects(long serverId)
Description copied from interface: TestAutomationServerDao
return all the projects that the given server hosts.

Specified by:
findAllHostedProjects in interface TestAutomationServerDao
Returns:


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