idi.diplom.linda.logic
Class PatientLogic

java.lang.Object
  extended by idi.diplom.linda.logic.PatientLogic

public class PatientLogic
extends java.lang.Object


Constructor Summary
PatientLogic()
           
 
Method Summary
 Patient[] getAllPatients()
          Returns an array of all patients saved in the database
 Patient getPatient(int lifeshirtId)
          Retrieves a patient based on the lifeshirtId
 void savePatient(Patient p)
          Saves a patient in the database
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatientLogic

public PatientLogic()
Method Detail

savePatient

public void savePatient(Patient p)
                 throws DatabaseException,
                        GeneralException
Saves a patient in the database

Parameters:
patient - to be saved
Throws:
DatabaseException
GeneralException

getAllPatients

public Patient[] getAllPatients()
                         throws DatabaseException,
                                GeneralException
Returns an array of all patients saved in the database

Returns:
patientArray with all saved patients
Throws:
DatabaseException
GeneralException

getPatient

public Patient getPatient(int lifeshirtId)
                   throws DatabaseException,
                          GeneralException
Retrieves a patient based on the lifeshirtId

Parameters:
int - lifeshirtId
Returns:
patient with specified lifeshirtId
Throws:
DatabaseException
GeneralException