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

All Known Implementing Classes:
HibernateTestAutomationServerDao

public interface TestAutomationServerDao


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.
 

Method Detail

persist

void persist(org.squashtest.tm.domain.testautomation.TestAutomationServer server)
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.

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

uniquePersist

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. 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.

Parameters:
server -
Returns:
a persistent version of that server.

findById

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

findByExample

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

Returns:
a TestAutomation server 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.

findAllHostedProjects

List<org.squashtest.tm.domain.testautomation.TestAutomationProject> findAllHostedProjects(long serverId)
return all the projects that the given server hosts.

Parameters:
serverId -
Returns:


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