public class DatabaseModel
extends java.lang.Object
Constructor and Description |
---|
DatabaseModel()
constructor
|
Modifier and Type | Method and Description |
---|---|
int |
addCode(Code code)
Adds a new Code element to the database
|
int |
addCodeType(CodeType codeType)
Adds a new CodeType element to the database
|
int |
addMedicalHistory(MedicalHistory medHistory)
Adds a new MedicalHistory element to the database
|
int |
addPatient(Patient patient)
Adds a new Patient element to the database
|
int |
addUser(User user)
Adds a new User element to the database
|
java.util.List<Code> |
getFilteredCode(Code code)
returns a list of matches Codes. don't found any matches, return null.
|
java.util.List<CodeType> |
getFilteredCodeType(CodeType codeType)
returns a list of matches CodeTypes. don't found any matches, return null.
|
java.util.List<Faktura> |
getFilteredFaktura(Faktura faktura)
returns a list of matching Faktura. don't found any matches, return null.
|
java.util.List<MedicalHistory> |
getFilteredMedicalHistory(MedicalHistory medHistory)
returns a list of matching Medical Histories. don't found any matches, return null.
|
java.util.List<Patient> |
getFilteredPatient(Patient patient)
returns a list of matching Patient. don't found any matches, return null.
|
java.util.List<User> |
getFilteredUser(User user)
returns a list of matches user. don't found any matches, return null.
|
int |
removeCode(Code code)
Remove the given Code from the database
|
int |
removeCodeType(CodeType codeType)
Remove the given CodeType from the database
|
int |
removeMedicalHistory(MedicalHistory medHistory)
Remove the given MedicalHistory from the database
|
int |
removePatient(Patient patient)
Remove the given Patient from the database
|
int |
removeUser(User user)
Remove the given User from the database
|
int |
updateCode(Code code)
Updates the given model into the Database
|
int |
updateCodeType(CodeType codeType)
Updates the given model into the Database
|
int |
updateMedicalHistory(MedicalHistory medHistory)
Updates the given model into the Database
|
int |
updatePatient(Patient patient)
Updates the given model into the Database
|
int |
updateUser(User user)
Updates the given model into the Database
|
public java.util.List<Code> getFilteredCode(Code code)
user
- filtered Code; by null return all Codespublic java.util.List<CodeType> getFilteredCodeType(CodeType codeType)
user
- filtered Codetype; by null return all Codetypespublic java.util.List<Faktura> getFilteredFaktura(Faktura faktura)
user
- filtered Faktura; by null return all Fakturenpublic java.util.List<MedicalHistory> getFilteredMedicalHistory(MedicalHistory medHistory)
user
- filtered Med History; by null return all Med Historypublic java.util.List<Patient> getFilteredPatient(Patient patient)
user
- filtered Patient; by null return all Patientpublic java.util.List<User> getFilteredUser(User user)
user
- filtered user; by null return all userspublic int addCode(Code code)
code
- public int addCodeType(CodeType codeType)
CodeType
- public int addMedicalHistory(MedicalHistory medHistory)
MedicalHistory
- public int addPatient(Patient patient)
Patient
- public int addUser(User user)
User
- public int removeCode(Code code)
code
- model which should be removedpublic int removeCodeType(CodeType codeType)
CodeType
- model which should be removedpublic int removeMedicalHistory(MedicalHistory medHistory)
MedicalHistory
- model which should be removedpublic int removePatient(Patient patient)
Patient
- model which should be removedpublic int removeUser(User user)
User
- model which should be removedpublic int updateCode(Code code)
code
- the new modelpublic int updateCodeType(CodeType codeType)
codeType
- the new modelpublic int updateMedicalHistory(MedicalHistory medHistory)
medHistory
- the new modelpublic int updatePatient(Patient patient)
patient
- the new modelpublic int updateUser(User user)
user
- the new model