org.domain.rhims.manager
Class CaseManagerAction

java.lang.Object
  extended by org.domain.rhims.manager.CaseManagerAction
All Implemented Interfaces:
CaseManager

@Name(value="caseManager")
public class CaseManagerAction
extends java.lang.Object
implements CaseManager

This class provides an implementation of the CaseManager. It maintains a reference to the CaseDAO (and UserDAO) for persisting data. Its Seam name "caseManager"

Author:
Mitch Williams

Constructor Summary
CaseManagerAction()
           
 
Method Summary
 java.lang.String createCase(long patientID, long clinicianID)
          This method creates a new CaseFile between the Patient and Clinician that have the respective supplied ID numbers.
 java.lang.String createCase(Patient patient, Clinician clinician)
          This method creates a new CaseFile between the supplied Patient and Clinician.
 CaseFile getCase(Patient patient, Clinician clinician)
          This method retrieves the CaseFile for the supplied Patient, Clinician combo.
 java.util.List<CaseFile> getCases(Patient patient)
          Retrieves all of the cases associated with Patient patient
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CaseManagerAction

public CaseManagerAction()
Method Detail

createCase

public java.lang.String createCase(Patient patient,
                                   Clinician clinician)
Description copied from interface: CaseManager
This method creates a new CaseFile between the supplied Patient and Clinician.

Specified by:
createCase in interface CaseManager
Parameters:
patient - the Patient to use
clinician - the Clinician to use
Returns:
"success" if the case is created, "failure" if not.
See Also:
CaseManager.createCase(Patient, Clinician)

createCase

public java.lang.String createCase(long patientID,
                                   long clinicianID)
Description copied from interface: CaseManager
This method creates a new CaseFile between the Patient and Clinician that have the respective supplied ID numbers.

Specified by:
createCase in interface CaseManager
Parameters:
patientID - the ID of the patient to use
clinicianID - the ID of the clinician to use
Returns:
"success" if the case is created, "failure" if not.
See Also:
CaseManager.createCase(long, long)

getCase

public CaseFile getCase(Patient patient,
                        Clinician clinician)
Description copied from interface: CaseManager
This method retrieves the CaseFile for the supplied Patient, Clinician combo.

Specified by:
getCase in interface CaseManager
Parameters:
patient - the Patient to get the CaseFile for
clinician - the Clinician to get the CaseFile for
Returns:
the CaseFile if it is found, null otherwise
See Also:
CaseManager.getCase(Patient, Clinician)

getCases

public java.util.List<CaseFile> getCases(Patient patient)
Description copied from interface: CaseManager
Retrieves all of the cases associated with Patient patient

Specified by:
getCases in interface CaseManager
Parameters:
patient - Patient to get the cases for
Returns:
returns a list of CaseFiles as List
See Also:
CaseManager.getCases(Patient)