org.domain.rhims.dao
Class CaseDAOMySQL

java.lang.Object
  extended by org.domain.rhims.dao.CaseDAOMySQL
All Implemented Interfaces:
CaseDAO

@Name(value="caseDAO")
public class CaseDAOMySQL
extends java.lang.Object
implements CaseDAO

This EJB provides a MySQL specific implementation of the CaseDAO. Its Seam name is "caseDAO".

Author:
Mitch Williams

Constructor Summary
CaseDAOMySQL()
           
 
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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CaseDAOMySQL

public CaseDAOMySQL()
Method Detail

createCase

public java.lang.String createCase(CaseFile newCase)
Description copied from interface: CaseDAO
Save a new CaseFile.

Specified by:
createCase in interface CaseDAO
Parameters:
newCase - the CaseFile to persist
Returns:
"success" if persists succeeds
See Also:
CaseDAO.createCase(CaseFile)

getCase

public CaseFile getCase(Patient patient,
                        Clinician clinician)
Description copied from interface: CaseDAO
Retrieve the CaseFile between the supplied patient and clinician.

Specified by:
getCase in interface CaseDAO
Parameters:
patient - the Patient in the requested case
clinician - the Clinician in the requested case
Returns:
The CaseFile if it is found, null otherwise
See Also:
CaseDAO.getCase(Patient, Clinician)

getCases

public java.util.List<CaseFile> getCases(Patient patient)
Description copied from interface: CaseDAO
Retrieve all the CaseFiles that contain the supplied Patient

Specified by:
getCases in interface CaseDAO
Parameters:
patient - the Patient to get the CaseFiles for
Returns:
a List of CaseFiles if any are found
See Also:
CaseDAO.getCases(Patient)