NOTICKET: Add Javadoc for All Model Classes
Signed-off-by: Dominik Säume <Dominik.Saeume@hmmh.de>
This commit is contained in:
parent
5cbdd1205d
commit
47da77d510
5 changed files with 86 additions and 4 deletions
|
@ -2,6 +2,13 @@ package de.hitec.nhplus.medication;
|
|||
|
||||
import javafx.beans.property.SimpleStringProperty;
|
||||
|
||||
/**
|
||||
* The Simple Model for an {@link Ingredient}.
|
||||
*
|
||||
* @author Dominik Säume
|
||||
* @implSpec This isn't a Conventional Model, because it isn't directly Stored in the Database,
|
||||
* but it can be changed to do that, in the case that its Complexity rises in the Future.
|
||||
*/
|
||||
public class Ingredient {
|
||||
private final SimpleStringProperty name;
|
||||
|
||||
|
|
|
@ -10,6 +10,11 @@ import java.util.List;
|
|||
import java.util.StringJoiner;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* The Model for a {@link Medication}.
|
||||
*
|
||||
* @author Dominik Säume
|
||||
*/
|
||||
public class Medication {
|
||||
private SimpleIntegerProperty id;
|
||||
private final SimpleStringProperty name;
|
||||
|
@ -19,6 +24,13 @@ public class Medication {
|
|||
private final SimpleStringProperty administrationMethod;
|
||||
private final SimpleIntegerProperty currentStock;
|
||||
|
||||
/**
|
||||
* This Constructor allows to Instantiate a {@link Medication} Object,
|
||||
* before it is Stored in the Database, by omitting the {@link Medication#id ID} value.
|
||||
*
|
||||
* @implSpec Instances Created with this Constructor can be directly passed to
|
||||
* {@link de.hitec.nhplus.medication.database.MedicationDao#create MedicationDao.create}.
|
||||
*/
|
||||
public Medication(
|
||||
String name,
|
||||
String manufacturer,
|
||||
|
@ -35,6 +47,9 @@ public class Medication {
|
|||
this.currentStock = new SimpleIntegerProperty(currentStock);
|
||||
}
|
||||
|
||||
/**
|
||||
* This Constructor allows to Instantiate a {@link Medication} Object with all Existing Fields.
|
||||
*/
|
||||
public Medication(
|
||||
int id,
|
||||
String name,
|
||||
|
|
|
@ -6,10 +6,22 @@ import javafx.beans.property.SimpleStringProperty;
|
|||
|
||||
import java.util.StringJoiner;
|
||||
|
||||
/**
|
||||
* The Model for a {@link Nurse}.
|
||||
*
|
||||
* @author Dominik Säume
|
||||
*/
|
||||
public class Nurse extends Person {
|
||||
private SimpleIntegerProperty id;
|
||||
private final SimpleStringProperty phoneNumber;
|
||||
|
||||
/**
|
||||
* This Constructor allows to Instantiate a {@link Nurse} Object,
|
||||
* before it is Stored in the Database, by omitting the {@link Nurse#id ID} value.
|
||||
*
|
||||
* @implSpec Instances Created with this Constructor can be directly passed to
|
||||
* {@link de.hitec.nhplus.nurse.database.NurseDao#create NurseDao.create}.
|
||||
*/
|
||||
public Nurse(
|
||||
String firstName,
|
||||
String surName,
|
||||
|
@ -19,6 +31,9 @@ public class Nurse extends Person {
|
|||
this.phoneNumber = new SimpleStringProperty(phoneNumber);
|
||||
}
|
||||
|
||||
/**
|
||||
* This Constructor allows to Instantiate a {@link Nurse} Object with all Existing Fields.
|
||||
*/
|
||||
public Nurse(
|
||||
int id,
|
||||
String firstName,
|
||||
|
|
|
@ -11,6 +11,13 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.StringJoiner;
|
||||
|
||||
/**
|
||||
* The Model for a {@link Patient}.
|
||||
*
|
||||
* @author Bernd Heideman
|
||||
* @author Dominik Säume
|
||||
* @author Armin Ribic
|
||||
*/
|
||||
public class Patient extends Person {
|
||||
private SimpleIntegerProperty id;
|
||||
private final SimpleStringProperty dateOfBirth;
|
||||
|
@ -18,6 +25,12 @@ public class Patient extends Person {
|
|||
private final SimpleStringProperty roomNumber;
|
||||
private final List<Treatment> allTreatments = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* This Constructor allows to Instantiate a {@link Patient} Object,
|
||||
* before it is Stored in the Database, by omitting the {@link Patient#id ID} value.
|
||||
* @implSpec Instances Created with this Constructor can be directly passed to
|
||||
* {@link de.hitec.nhplus.patient.database.PatientDao#create PatientDao.create}.
|
||||
*/
|
||||
public Patient(
|
||||
String firstName,
|
||||
String surName,
|
||||
|
@ -31,6 +44,9 @@ public class Patient extends Person {
|
|||
this.roomNumber = new SimpleStringProperty(roomNumber);
|
||||
}
|
||||
|
||||
/**
|
||||
* This Constructor allows to Instantiate a {@link Patient} Object with all Existing Fields.
|
||||
*/
|
||||
public Patient(
|
||||
int id,
|
||||
String firstName,
|
||||
|
|
|
@ -10,6 +10,12 @@ import java.time.LocalDate;
|
|||
import java.time.LocalTime;
|
||||
import java.util.StringJoiner;
|
||||
|
||||
/**
|
||||
* The Model for a {@link Treatment}.
|
||||
*
|
||||
* @author Bernd Heideman
|
||||
* @author Dominik Säume
|
||||
*/
|
||||
public class Treatment {
|
||||
private SimpleIntegerProperty id;
|
||||
private final SimpleObjectProperty<Patient> patient;
|
||||
|
@ -19,8 +25,21 @@ public class Treatment {
|
|||
private final SimpleStringProperty description;
|
||||
private final SimpleStringProperty remarks;
|
||||
|
||||
public Treatment(Patient patient, LocalDate date, LocalTime begin,
|
||||
LocalTime end, String description, String remarks) {
|
||||
/**
|
||||
* This Constructor allows to Instantiate a {@link Treatment} Object,
|
||||
* before it is Stored in the Database, by omitting the {@link Treatment#id ID} value.
|
||||
*
|
||||
* @implSpec Instances Created with this Constructor can be directly passed to
|
||||
* {@link de.hitec.nhplus.treatment.database.TreatmentDao#create TreatmentDao.create}.
|
||||
*/
|
||||
public Treatment(
|
||||
Patient patient,
|
||||
LocalDate date,
|
||||
LocalTime begin,
|
||||
LocalTime end,
|
||||
String description,
|
||||
String remarks
|
||||
) {
|
||||
this.patient = new SimpleObjectProperty<>(patient);
|
||||
this.date = new SimpleObjectProperty<>(date);
|
||||
this.begin = new SimpleObjectProperty<>(begin);
|
||||
|
@ -29,8 +48,18 @@ public class Treatment {
|
|||
this.remarks = new SimpleStringProperty(remarks);
|
||||
}
|
||||
|
||||
public Treatment(int id, Patient patient, LocalDate date, LocalTime begin,
|
||||
LocalTime end, String description, String remarks) {
|
||||
/**
|
||||
* This Constructor allows to Instantiate a {@link Treatment} Object with all Existing Fields.
|
||||
*/
|
||||
public Treatment(
|
||||
int id,
|
||||
Patient patient,
|
||||
LocalDate date,
|
||||
LocalTime begin,
|
||||
LocalTime end,
|
||||
String description,
|
||||
String remarks
|
||||
) {
|
||||
this.id = new SimpleIntegerProperty(id);
|
||||
this.patient = new SimpleObjectProperty<>(patient);
|
||||
this.date = new SimpleObjectProperty<>(date);
|
||||
|
|
Loading…
Reference in a new issue