diff --git a/src/main/java/de/hitec/nhplus/medication/Ingredient.java b/src/main/java/de/hitec/nhplus/medication/Ingredient.java index 626e3c0..5e12bd0 100644 --- a/src/main/java/de/hitec/nhplus/medication/Ingredient.java +++ b/src/main/java/de/hitec/nhplus/medication/Ingredient.java @@ -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; diff --git a/src/main/java/de/hitec/nhplus/medication/Medication.java b/src/main/java/de/hitec/nhplus/medication/Medication.java index f27a312..ed6fc33 100644 --- a/src/main/java/de/hitec/nhplus/medication/Medication.java +++ b/src/main/java/de/hitec/nhplus/medication/Medication.java @@ -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, diff --git a/src/main/java/de/hitec/nhplus/nurse/Nurse.java b/src/main/java/de/hitec/nhplus/nurse/Nurse.java index 18e87f1..de13ce3 100644 --- a/src/main/java/de/hitec/nhplus/nurse/Nurse.java +++ b/src/main/java/de/hitec/nhplus/nurse/Nurse.java @@ -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, diff --git a/src/main/java/de/hitec/nhplus/patient/Patient.java b/src/main/java/de/hitec/nhplus/patient/Patient.java index c7c72ee..1d1fe2a 100644 --- a/src/main/java/de/hitec/nhplus/patient/Patient.java +++ b/src/main/java/de/hitec/nhplus/patient/Patient.java @@ -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 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, diff --git a/src/main/java/de/hitec/nhplus/treatment/Treatment.java b/src/main/java/de/hitec/nhplus/treatment/Treatment.java index 4551560..c050f2b 100644 --- a/src/main/java/de/hitec/nhplus/treatment/Treatment.java +++ b/src/main/java/de/hitec/nhplus/treatment/Treatment.java @@ -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; @@ -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);