org.domain.rhims.dao
Interface CaseDAO

All Known Implementing Classes:
CaseDAOMySQL

public interface CaseDAO

The CaseDAO is responsible for interacting with the persistence of the case files that hold the relationship between Patients and Clinicians. It is a component of the Persistance layer of the application. It contains a method to save a new CaseFile, along with a method to retrieve a CaseFile between a given Patient and Clinician, and a method to retrieve a List of all the CaseFiles for a given Patient.

Author:
Mitch Williams

Method Summary
 java.lang.String createCase(CaseFile newCase)
          Save a new CaseFile.
 CaseFile getCase(Patient patient, Clinician clinician)
          Retrieve the CaseFile between the supplied patient and clinician.
 java.util.List<CaseFile> getCases(Patient patient)
          Retrieve all the CaseFiles that contain the supplied Patient
 

Method Detail

createCase

java.lang.String createCase(CaseFile newCase)
Save a new CaseFile.

Parameters:
newCase - the CaseFile to persist
Returns:
"success" if persists succeeds

getCase

CaseFile getCase(Patient patient,
                 Clinician clinician)
Retrieve the CaseFile between the supplied patient and clinician.

Parameters:
patient - the Patient in the requested case
clinician - the Clinician in the requested case
Returns:
The CaseFile if it is found, null otherwise

getCases

java.util.List<CaseFile> getCases(Patient patient)
Retrieve all the CaseFiles that contain the supplied Patient

Parameters:
patient - the Patient to get the CaseFiles for
Returns:
a List of CaseFiles if any are found