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

All Known Implementing Classes:
HibernateTestAutomationProjectDao

public interface TestAutomationProjectDao


Method Summary
 org.squashtest.tm.domain.testautomation.TestAutomationProject findByExample(org.squashtest.tm.domain.testautomation.TestAutomationProject example)
          Given a detached (or even attached) TestAutomationProject example, will fetch a TestAutomationProject having the same characteristics.
 org.squashtest.tm.domain.testautomation.TestAutomationProject findById(Long projectId)
           
 void persist(org.squashtest.tm.domain.testautomation.TestAutomationProject newProject)
          Will persist a new TestAutomationProject.
 org.squashtest.tm.domain.testautomation.TestAutomationProject uniquePersist(org.squashtest.tm.domain.testautomation.TestAutomationProject newProject)
          Will persist a TestAutomationProject if really new, or return the existing instance if not.
 

Method Detail

persist

void persist(org.squashtest.tm.domain.testautomation.TestAutomationProject newProject)
Will persist a new TestAutomationProject. 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:
newProject -
Throws:
NonUniqueEntityException - if the given server happen to exist already.

uniquePersist

org.squashtest.tm.domain.testautomation.TestAutomationProject uniquePersist(org.squashtest.tm.domain.testautomation.TestAutomationProject newProject)
Will persist a TestAutomationProject 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:
newProject -
Returns:
a persistent version of that project.

findById

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

findByExample

org.squashtest.tm.domain.testautomation.TestAutomationProject findByExample(org.squashtest.tm.domain.testautomation.TestAutomationProject example)

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

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


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