NOTICKET: add de.hitec.nhplus.main and de.hitec.nhplus.fixtures Javadoc
This commit is contained in:
parent
dd66194223
commit
5cbdd1205d
6 changed files with 46 additions and 1 deletions
|
@ -5,6 +5,7 @@ import de.hitec.nhplus.datastorage.DaoFactory;
|
|||
import de.hitec.nhplus.medication.Ingredient;
|
||||
import de.hitec.nhplus.medication.Medication;
|
||||
import de.hitec.nhplus.medication.database.MedicationDao;
|
||||
import de.hitec.nhplus.treatment.Treatment;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
@ -12,7 +13,10 @@ import java.sql.Connection;
|
|||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
/**
|
||||
* {@link Fixture} for {@link Medication}.
|
||||
* @author Dominik Säume
|
||||
*/
|
||||
public class MedicationFixture implements Fixture<Medication> {
|
||||
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";
|
||||
|
|
|
@ -4,6 +4,7 @@ import de.hitec.nhplus.Main;
|
|||
import de.hitec.nhplus.datastorage.DaoFactory;
|
||||
import de.hitec.nhplus.nurse.Nurse;
|
||||
import de.hitec.nhplus.nurse.database.NurseDao;
|
||||
import de.hitec.nhplus.treatment.Treatment;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
@ -11,6 +12,10 @@ import java.sql.Connection;
|
|||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* {@link Fixture} for {@link Nurse}.
|
||||
* @author Dominik Säume
|
||||
*/
|
||||
public class NurseFixture implements Fixture<Nurse> {
|
||||
@Override
|
||||
public void dropTable(Connection connection) throws SQLException {
|
||||
|
|
|
@ -4,6 +4,7 @@ import de.hitec.nhplus.Main;
|
|||
import de.hitec.nhplus.datastorage.DaoFactory;
|
||||
import de.hitec.nhplus.patient.Patient;
|
||||
import de.hitec.nhplus.patient.database.PatientDao;
|
||||
import de.hitec.nhplus.treatment.Treatment;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
@ -13,6 +14,10 @@ import java.util.*;
|
|||
|
||||
import static de.hitec.nhplus.utils.DateConverter.convertStringToLocalDate;
|
||||
|
||||
/**
|
||||
* {@link Fixture} for {@link Patient}.
|
||||
* @author Dominik Säume
|
||||
*/
|
||||
public class PatientFixture implements Fixture<Patient> {
|
||||
@Override
|
||||
public void dropTable(Connection connection) throws SQLException {
|
||||
|
|
|
@ -15,6 +15,11 @@ import java.util.*;
|
|||
import static de.hitec.nhplus.utils.DateConverter.convertStringToLocalDate;
|
||||
import static de.hitec.nhplus.utils.DateConverter.convertStringToLocalTime;
|
||||
|
||||
|
||||
/**
|
||||
* {@link Fixture} for {@link Treatment}.
|
||||
* @author Dominik Säume
|
||||
*/
|
||||
public class TreatmentFixture implements Fixture<Treatment> {
|
||||
private final Map<String, Patient> patientsByName;
|
||||
|
||||
|
|
|
@ -11,6 +11,11 @@ import javafx.scene.layout.BorderPane;
|
|||
import java.io.IOException;
|
||||
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 {
|
||||
@FXML
|
||||
private TabPane mainTabPane;
|
||||
|
@ -31,6 +36,9 @@ public class MainWindowController {
|
|||
@FXML
|
||||
private Tab medicationTab;
|
||||
|
||||
/**
|
||||
* @implSpec Method which should be called from the Outside to Initalize the Controller
|
||||
*/
|
||||
@FXML
|
||||
public void initialize() {
|
||||
loadPatientPage();
|
||||
|
@ -42,6 +50,9 @@ public class MainWindowController {
|
|||
medicationTab.setOnSelectionChanged(event -> loadMedicationPage());
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the Patient Page into its Tab.
|
||||
*/
|
||||
private void loadPatientPage() {
|
||||
try {
|
||||
BorderPane patientsPane = FXMLLoader.load(
|
||||
|
@ -57,6 +68,9 @@ public class MainWindowController {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the Treatment Page into its Tab.
|
||||
*/
|
||||
private void loadTreatmentsPage() {
|
||||
try {
|
||||
BorderPane treatmentsPane = FXMLLoader.load(
|
||||
|
@ -72,6 +86,9 @@ public class MainWindowController {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the Nurse Page into its Tab.
|
||||
*/
|
||||
private void loadNursePage() {
|
||||
try {
|
||||
BorderPane nursePane = FXMLLoader.load(
|
||||
|
@ -87,6 +104,9 @@ public class MainWindowController {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the Medication Page into its Tab.
|
||||
*/
|
||||
private void loadMedicationPage() {
|
||||
try {
|
||||
BorderPane medicationPane = FXMLLoader.load(
|
||||
|
|
|
@ -2,6 +2,12 @@ package de.hitec.nhplus.main;
|
|||
|
||||
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 {
|
||||
private final SimpleStringProperty firstName;
|
||||
private final SimpleStringProperty surName;
|
||||
|
|
Loading…
Reference in a new issue