NOTICKET: add de.hitec.nhplus.main and de.hitec.nhplus.fixtures Javadoc
All checks were successful
Quality Check / Linting Check (push) Successful in 17s
Quality Check / Linting Check (pull_request) Successful in 22s
Quality Check / Javadoc Check (push) Successful in 34s
Quality Check / Javadoc Check (pull_request) Successful in 33s

This commit is contained in:
Dominik Säume 2024-05-14 12:59:08 +02:00
parent dd66194223
commit 5cbdd1205d
Signed by: SZUT-Dominik
GPG key ID: 67D15BB250B41E7C
6 changed files with 46 additions and 1 deletions

View file

@ -5,6 +5,7 @@ import de.hitec.nhplus.datastorage.DaoFactory;
import de.hitec.nhplus.medication.Ingredient; import de.hitec.nhplus.medication.Ingredient;
import de.hitec.nhplus.medication.Medication; import de.hitec.nhplus.medication.Medication;
import de.hitec.nhplus.medication.database.MedicationDao; import de.hitec.nhplus.medication.database.MedicationDao;
import de.hitec.nhplus.treatment.Treatment;
import java.io.InputStream; import java.io.InputStream;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
@ -12,7 +13,10 @@ import java.sql.Connection;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.*; import java.util.*;
/**
* {@link Fixture} for {@link Medication}.
* @author Dominik Säume
*/
public class MedicationFixture implements Fixture<Medication> { public class MedicationFixture implements Fixture<Medication> {
private static final String SCHEMA = "/de/hitec/nhplus/medication/database/Medication.sql"; private static final String SCHEMA = "/de/hitec/nhplus/medication/database/Medication.sql";
private static final String INGREDIENT_SCHEMA = "/de/hitec/nhplus/medication/database/Medication_Ingredient.sql"; private static final String INGREDIENT_SCHEMA = "/de/hitec/nhplus/medication/database/Medication_Ingredient.sql";

View file

@ -4,6 +4,7 @@ import de.hitec.nhplus.Main;
import de.hitec.nhplus.datastorage.DaoFactory; import de.hitec.nhplus.datastorage.DaoFactory;
import de.hitec.nhplus.nurse.Nurse; import de.hitec.nhplus.nurse.Nurse;
import de.hitec.nhplus.nurse.database.NurseDao; import de.hitec.nhplus.nurse.database.NurseDao;
import de.hitec.nhplus.treatment.Treatment;
import java.io.InputStream; import java.io.InputStream;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
@ -11,6 +12,10 @@ import java.sql.Connection;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.*; import java.util.*;
/**
* {@link Fixture} for {@link Nurse}.
* @author Dominik Säume
*/
public class NurseFixture implements Fixture<Nurse> { public class NurseFixture implements Fixture<Nurse> {
@Override @Override
public void dropTable(Connection connection) throws SQLException { public void dropTable(Connection connection) throws SQLException {

View file

@ -4,6 +4,7 @@ import de.hitec.nhplus.Main;
import de.hitec.nhplus.datastorage.DaoFactory; import de.hitec.nhplus.datastorage.DaoFactory;
import de.hitec.nhplus.patient.Patient; import de.hitec.nhplus.patient.Patient;
import de.hitec.nhplus.patient.database.PatientDao; import de.hitec.nhplus.patient.database.PatientDao;
import de.hitec.nhplus.treatment.Treatment;
import java.io.InputStream; import java.io.InputStream;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
@ -13,6 +14,10 @@ import java.util.*;
import static de.hitec.nhplus.utils.DateConverter.convertStringToLocalDate; import static de.hitec.nhplus.utils.DateConverter.convertStringToLocalDate;
/**
* {@link Fixture} for {@link Patient}.
* @author Dominik Säume
*/
public class PatientFixture implements Fixture<Patient> { public class PatientFixture implements Fixture<Patient> {
@Override @Override
public void dropTable(Connection connection) throws SQLException { public void dropTable(Connection connection) throws SQLException {

View file

@ -15,6 +15,11 @@ import java.util.*;
import static de.hitec.nhplus.utils.DateConverter.convertStringToLocalDate; import static de.hitec.nhplus.utils.DateConverter.convertStringToLocalDate;
import static de.hitec.nhplus.utils.DateConverter.convertStringToLocalTime; import static de.hitec.nhplus.utils.DateConverter.convertStringToLocalTime;
/**
* {@link Fixture} for {@link Treatment}.
* @author Dominik Säume
*/
public class TreatmentFixture implements Fixture<Treatment> { public class TreatmentFixture implements Fixture<Treatment> {
private final Map<String, Patient> patientsByName; private final Map<String, Patient> patientsByName;

View file

@ -11,6 +11,11 @@ import javafx.scene.layout.BorderPane;
import java.io.IOException; import java.io.IOException;
import java.util.Objects; import java.util.Objects;
/**
* Controller for the Main Window of the Application, which holds all Tabs.
* @author Bernd Heideman
* @author Dominik Säume
*/
public class MainWindowController { public class MainWindowController {
@FXML @FXML
private TabPane mainTabPane; private TabPane mainTabPane;
@ -31,6 +36,9 @@ public class MainWindowController {
@FXML @FXML
private Tab medicationTab; private Tab medicationTab;
/**
* @implSpec Method which should be called from the Outside to Initalize the Controller
*/
@FXML @FXML
public void initialize() { public void initialize() {
loadPatientPage(); loadPatientPage();
@ -42,6 +50,9 @@ public class MainWindowController {
medicationTab.setOnSelectionChanged(event -> loadMedicationPage()); medicationTab.setOnSelectionChanged(event -> loadMedicationPage());
} }
/**
* Loads the Patient Page into its Tab.
*/
private void loadPatientPage() { private void loadPatientPage() {
try { try {
BorderPane patientsPane = FXMLLoader.load( BorderPane patientsPane = FXMLLoader.load(
@ -57,6 +68,9 @@ public class MainWindowController {
} }
} }
/**
* Loads the Treatment Page into its Tab.
*/
private void loadTreatmentsPage() { private void loadTreatmentsPage() {
try { try {
BorderPane treatmentsPane = FXMLLoader.load( BorderPane treatmentsPane = FXMLLoader.load(
@ -72,6 +86,9 @@ public class MainWindowController {
} }
} }
/**
* Loads the Nurse Page into its Tab.
*/
private void loadNursePage() { private void loadNursePage() {
try { try {
BorderPane nursePane = FXMLLoader.load( BorderPane nursePane = FXMLLoader.load(
@ -87,6 +104,9 @@ public class MainWindowController {
} }
} }
/**
* Loads the Medication Page into its Tab.
*/
private void loadMedicationPage() { private void loadMedicationPage() {
try { try {
BorderPane medicationPane = FXMLLoader.load( BorderPane medicationPane = FXMLLoader.load(

View file

@ -2,6 +2,12 @@ package de.hitec.nhplus.main;
import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.SimpleStringProperty;
/**
* A Simple Base Model for {@link Person} which can be Extended.
*
* @author Bernd Heideman
* @author Dominik Säume
*/
public abstract class Person { public abstract class Person {
private final SimpleStringProperty firstName; private final SimpleStringProperty firstName;
private final SimpleStringProperty surName; private final SimpleStringProperty surName;