NOTICKET: Javadoc Grammar Check
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 35s
Quality Check / Javadoc Check (pull_request) Successful in 32s

This commit is contained in:
Dominik Säume 2024-05-14 23:01:42 +02:00
parent 47da77d510
commit 7145f41be3
Signed by: SZUT-Dominik
GPG key ID: DACB4B96EB59ABA8
16 changed files with 132 additions and 132 deletions

View file

@ -11,7 +11,7 @@ import javafx.stage.Stage;
import java.io.IOException; import java.io.IOException;
/** /**
* The Applications Main Class, holding the {@link #main} Entrypoint. * The application main class, holding the {@link #main} entrypoint.
* *
* @author Bernd Heideman * @author Bernd Heideman
* @author Dominik Säume * @author Dominik Säume
@ -21,14 +21,14 @@ public class Main extends Application {
private Stage primaryStage; private Stage primaryStage;
/** /**
* The Main Entry Point. * The main entry point.
*/ */
public static void main(String[] args) { public static void main(String[] args) {
launch(args); launch(args);
} }
/** /**
* Implementation of the JavaFX start Hook. * Implementation of the JavaFX start hook.
*/ */
@Override @Override
public void start(Stage primaryStage) { public void start(Stage primaryStage) {
@ -37,7 +37,7 @@ public class Main extends Application {
} }
/** /**
* Executes the Main Application. * Executes the main application.
*/ */
private void executeMainApplication() { private void executeMainApplication() {
try { try {

View file

@ -7,7 +7,7 @@ import java.sql.DriverManager;
import java.sql.SQLException; import java.sql.SQLException;
/** /**
* The {@link DaoFactory} allows a safe connection to the Database. * The {@link DaoFactory} allows a safe connection to the database.
* *
* @author Bernd Heidemann * @author Bernd Heidemann
* @author Dominik Säume * @author Dominik Säume
@ -21,7 +21,7 @@ public class ConnectionBuilder {
private static Connection connection; private static Connection connection;
/** /**
* @return A Thread-safe {@link Connection} to the Database. * @return A thread-safe {@link Connection} to the database.
*/ */
synchronized public static Connection getConnection() { synchronized public static Connection getConnection() {
try { try {
@ -38,7 +38,7 @@ public class ConnectionBuilder {
} }
/** /**
* Closes the Connection to the Database. * Closes the connection to the database.
*/ */
synchronized public static void closeConnection() { synchronized public static void closeConnection() {
try { try {

View file

@ -4,48 +4,48 @@ import java.sql.SQLException;
import java.util.List; import java.util.List;
/** /**
* {@link Dao} is the Abbreviation of Data-Access-Object. * {@link Dao} is the abbreviation for Data-Access-Object.
* This Interface has the Basic Methods which are needed on any {@link Dao} to work as expected. * This interface has the Basic Methods that are needed on any {@link Dao} to work as expected.
* *
* @param <T> The Model for which that {@link Dao} is implemented. * @param <T> The model for which that {@link Dao} is implemented.
* @author Bernd Heidemann * @author Bernd Heidemann
* @author Dominik Säume * @author Dominik Säume
* @version 1.0 * @version 1.0
* @implSpec The Implementations should be added to the {@link DaoFactory}. * @implSpec The implementations should be added to the {@link DaoFactory}.
*/ */
public interface Dao<T> { public interface Dao<T> {
/** /**
* Create a Database Entry from a Model object. * Create a database entry from a model object.
* *
* @param t The Model-Instance. * @param t The model instance.
*/ */
void create(T t) throws SQLException; void create(T t) throws SQLException;
/** /**
* Read a Database Entry to a Model object. * Read a database entry to a model object.
* *
* @param id The ID of the Element in the Database. * @param id The ID of the element in the database.
* @return a Model-Instance of {@link T}. * @return a model instance of {@link T}.
*/ */
T read(int id) throws SQLException; T read(int id) throws SQLException;
/** /**
* @return All Database Entries as a {@link List} of Model-Instances. * @return All database entries as a {@link List} of model instances.
*/ */
List<T> readAll() throws SQLException; List<T> readAll() throws SQLException;
/** /**
* Update the Database according to the Values of the Model object. * Update the database according to the values of the model object.
* *
* @param t The Model-Instance. * @param t The model instance.
*/ */
void update(T t) throws SQLException; void update(T t) throws SQLException;
/** /**
* Delete a Database Entry. * Delete a database entry.
* *
* @param id The ID of the Element in the Database. * @param id The ID of the element in the database.
*/ */
void delete(int id) throws SQLException; void delete(int id) throws SQLException;
} }

View file

@ -6,7 +6,7 @@ import de.hitec.nhplus.patient.database.PatientDao;
import de.hitec.nhplus.treatment.database.TreatmentDao; import de.hitec.nhplus.treatment.database.TreatmentDao;
/** /**
* The {@link DaoFactory} is a Singleton({@link #getInstance}) which should be used to get {@link Dao}s. * The {@link DaoFactory} is a singleton({@link #getInstance}) that should be used to get {@link Dao}s.
* *
* @author Bernd Heidemann * @author Bernd Heidemann
* @author Dominik Säume * @author Dominik Säume
@ -17,13 +17,13 @@ public class DaoFactory {
private static DaoFactory instance; private static DaoFactory instance;
/** /**
* A Private Constructor according to the Singleton Pattern. * A private constructor according to the singleton pattern.
*/ */
private DaoFactory() { private DaoFactory() {
} }
/** /**
* @return The Singleton Instance of {@link DaoFactory}. * @return The singleton instance of {@link DaoFactory}.
*/ */
public static DaoFactory getInstance() { public static DaoFactory getInstance() {
if (DaoFactory.instance == null) { if (DaoFactory.instance == null) {
@ -33,7 +33,7 @@ public class DaoFactory {
} }
/** /**
* @return A new {@link TreatmentDao} Instance with a Database Connection. * @return A new {@link TreatmentDao} instance with a database connection.
* @see de.hitec.nhplus.treatment.Treatment Treatment * @see de.hitec.nhplus.treatment.Treatment Treatment
*/ */
public TreatmentDao createTreatmentDao() { public TreatmentDao createTreatmentDao() {
@ -41,7 +41,7 @@ public class DaoFactory {
} }
/** /**
* @return A new {@link PatientDao} Instance with a Database Connection. * @return A new {@link PatientDao} instance with a database connection.
* @see de.hitec.nhplus.patient.Patient Patient * @see de.hitec.nhplus.patient.Patient Patient
*/ */
public PatientDao createPatientDAO() { public PatientDao createPatientDAO() {
@ -49,7 +49,7 @@ public class DaoFactory {
} }
/** /**
* @return A new {@link NurseDao} Instance with a Database Connection. * @return A new {@link NurseDao} instance with a database connection.
* @see de.hitec.nhplus.nurse.Nurse Nurse * @see de.hitec.nhplus.nurse.Nurse Nurse
*/ */
public NurseDao createNurseDAO() { public NurseDao createNurseDAO() {
@ -57,7 +57,7 @@ public class DaoFactory {
} }
/** /**
* @return A new {@link MedicationDao} Instance with a Database Connection. * @return A new {@link MedicationDao} instance with a database connection.
* @see de.hitec.nhplus.medication.Medication Medication * @see de.hitec.nhplus.medication.Medication Medication
*/ */
public MedicationDao createMedicationDAO() { public MedicationDao createMedicationDAO() {

View file

@ -7,30 +7,30 @@ import java.sql.SQLException;
import java.util.List; import java.util.List;
/** /**
* The {@link DaoImp} is a Generic Base Implementation of the {@link Dao}, * The {@link DaoImp} is a generic base implementation of the {@link Dao},
* which should fit most use cases. * that should fit most use cases.
* *
* @param <T> The Model for which that {@link Dao} is implemented. * @param <T> The model for which that {@link Dao} is implemented.
* @author Bernd Heidemann * @author Bernd Heidemann
* @author Dominik Säume * @author Dominik Säume
* @version 1.0 * @version 1.0
* @implSpec The Implementations should be added to the {@link DaoFactory}. * @implSpec The implementations should be added to the {@link DaoFactory}.
*/ */
public abstract class DaoImp<T> implements Dao<T> { public abstract class DaoImp<T> implements Dao<T> {
protected final Connection connection; protected final Connection connection;
/** /**
* @param connection The Database {@link Connection} to use. * @param connection The database {@link Connection} to use.
* @implSpec The {@link Connection} should be Received from the {@link ConnectionBuilder}. * @implSpec The {@link Connection} should be received from the {@link ConnectionBuilder}.
*/ */
public DaoImp(Connection connection) { public DaoImp(Connection connection) {
this.connection = connection; this.connection = connection;
} }
/** /**
* Creates a new Database Entry from a Model object. * Creates a new database entry from a model object.
* *
* @param t The Model-Instance. * @param t The model instance.
*/ */
@Override @Override
public void create(T t) throws SQLException { public void create(T t) throws SQLException {
@ -38,10 +38,10 @@ public abstract class DaoImp<T> implements Dao<T> {
} }
/** /**
* Read a Database Entry to a Model object. * Read a database entry to a model object.
* *
* @param id The ID of the Element in the Database. * @param id The ID of the element in the database.
* @return the Model-Instance of type {@link T}, which was read. * @return the model instance of type {@link T}, which was read.
*/ */
@Override @Override
public T read(int id) throws SQLException { public T read(int id) throws SQLException {
@ -54,9 +54,9 @@ public abstract class DaoImp<T> implements Dao<T> {
} }
/** /**
* Read all Database Entries to a {@link List} of Model objects. * Read all database entries to a {@link List} of model objects.
* *
* @return a {@link List} of Type {@link T} holding all Database Entries as Model-Instances. * @return a {@link List} of type {@link T} holding all database entries as model instances.
*/ */
@Override @Override
public List<T> readAll() throws SQLException { public List<T> readAll() throws SQLException {
@ -64,9 +64,9 @@ public abstract class DaoImp<T> implements Dao<T> {
} }
/** /**
* Update the Database according to the Values of the Model object. * Update the database according to the values of the model object.
* *
* @param t The Model-Instance. * @param t The model instance.
*/ */
@Override @Override
public void update(T t) throws SQLException { public void update(T t) throws SQLException {
@ -74,9 +74,9 @@ public abstract class DaoImp<T> implements Dao<T> {
} }
/** /**
* Delete a Database Entry. * Delete a database entry.
* *
* @param id The ID of the Element in the Database. * @param id The ID of the element in the database.
*/ */
@Override @Override
public void delete(int id) throws SQLException { public void delete(int id) throws SQLException {
@ -84,51 +84,51 @@ public abstract class DaoImp<T> implements Dao<T> {
} }
/** /**
* @param result The {@link ResultSet} from execution of the Statement received from {@link #getReadByIDStatement}. * @param result The {@link ResultSet} from execution of the statement received from {@link #getReadByIDStatement}.
* @return The Model-Instance of Type {@link T}. * @return The model instance of type {@link T}.
* @implSpec This will be called in {@link #read}. * @implSpec This will be called in {@link #read}.
*/ */
protected abstract T getInstanceFromResultSet(ResultSet result) throws SQLException; protected abstract T getInstanceFromResultSet(ResultSet result) throws SQLException;
/** /**
* @param id The ID of the Database Entry to read. * @param id The ID of the database entry to read.
* @return A {@link PreparedStatement} to read a Specific Entry by its ID. * @return A {@link PreparedStatement} to read a specific entry by its ID.
* @implSpec This will be called in {@link #read}. * @implSpec This will be called in {@link #read}.
* The Output of the Execution will be used in {@link #getInstanceFromResultSet}. * The output of the execution will be used in {@link #getInstanceFromResultSet}.
*/ */
protected abstract PreparedStatement getReadByIDStatement(int id) throws SQLException; protected abstract PreparedStatement getReadByIDStatement(int id) throws SQLException;
/** /**
* @param result The {@link ResultSet} from execution of the Statement received from {@link #getReadAllStatement}. * @param result The {@link ResultSet} from execution of the statement received from {@link #getReadAllStatement}.
* @return A {@link List} of Type {@link T} Holding All Database Entries as Model-Instances. * @return A {@link List} of type {@link T} holding all database entries as model instances.
* @implSpec This will be called in {@link #readAll}. * @implSpec This will be called in {@link #readAll}.
*/ */
protected abstract List<T> getListFromResultSet(ResultSet result) throws SQLException; protected abstract List<T> getListFromResultSet(ResultSet result) throws SQLException;
/** /**
* @return A {@link PreparedStatement} to read all Entries of this Model. * @return A {@link PreparedStatement} to read all entries of this model.
* @implSpec This will be called in {@link #readAll}. * @implSpec This will be called in {@link #readAll}.
* The Output of the Execution will be used in {@link #getListFromResultSet}. * The output of the execution will be used in {@link #getListFromResultSet}.
*/ */
protected abstract PreparedStatement getReadAllStatement() throws SQLException; protected abstract PreparedStatement getReadAllStatement() throws SQLException;
/** /**
* @param t The Model-Instance of Type {@link T} for which an Entry should be created. * @param t The model instance of type {@link T} for which an entry should be created.
* @return a {@link PreparedStatement} which can be used to create a new Database Entry for the Model-Instance. * @return a {@link PreparedStatement} which can be used to create a new database entry for the model instance.
* @implSpec This will be called in {@link #create}. * @implSpec This will be called in {@link #create}.
*/ */
protected abstract PreparedStatement getCreateStatement(T t) throws SQLException; protected abstract PreparedStatement getCreateStatement(T t) throws SQLException;
/** /**
* @param t The Model-Instance of Type {@link T} for which the Entry should be updated. * @param t The model instance of type {@link T} for which the entry should be updated.
* @return a {@link PreparedStatement} which can be used to update the Database Entry for the Model-Instance. * @return a {@link PreparedStatement} which can be used to update the database entry for the model instance.
* @implSpec This will be called in {@link #update}. * @implSpec This will be called in {@link #update}.
*/ */
protected abstract PreparedStatement getUpdateStatement(T t) throws SQLException; protected abstract PreparedStatement getUpdateStatement(T t) throws SQLException;
/** /**
* @param id The ID of the Database Entry which should be Deleted. * @param id The ID of the database entry which should be deleted.
* @return a {@link PreparedStatement} which can be used to delete the Database Entry. * @return a {@link PreparedStatement} which can be used to delete the database entry.
* @implSpec This will be called in {@link #delete}. * @implSpec This will be called in {@link #delete}.
*/ */
protected abstract PreparedStatement getDeleteStatement(int id) throws SQLException; protected abstract PreparedStatement getDeleteStatement(int id) throws SQLException;

View file

@ -7,36 +7,36 @@ import java.sql.SQLException;
import java.util.Map; import java.util.Map;
/** /**
* A Fixture is a Class, which can be used to set up a specific set of Data. * A fixture is a class, which can be used to set up a specific set of data.
* *
* @param <T> The Model for which the {@link Fixture} is implemented. * @param <T> The model for which the {@link Fixture} is implemented.
* @author Dominik Säume * @author Dominik Säume
* @version 1.0 * @version 1.0
* @implSpec The Implementations should be added to the {@link Fixtures#main}. * @implSpec The implementations should be added to the {@link Fixtures#main}.
*/ */
public interface Fixture<T> { public interface Fixture<T> {
/** /**
* Drop all Dependent Tables. * Drop all dependent tables.
* *
* @param connection A Database {@link Connection}, which should be received from * @param connection A database {@link Connection}, which should be received from
* the {@link ConnectionBuilder#getConnection} * the {@link ConnectionBuilder#getConnection}
* @implSpec Use {@code IF EXISTS}, to ensure that it doesn't throw an {@link Exception}. * @implSpec Use {@code IF EXISTS}, to ensure that it doesn't throw an {@link Exception}.
*/ */
void dropTable(Connection connection) throws SQLException; void dropTable(Connection connection) throws SQLException;
/** /**
* Set up the Empty Tables with the Schema. * Set up the empty tables with the schema.
* *
* @param connection A Database {@link Connection}, which should be received from * @param connection A database {@link Connection}, which should be received from
* the {@link ConnectionBuilder#getConnection} * the {@link ConnectionBuilder#getConnection}
*/ */
void setupTable(Connection connection) throws SQLException; void setupTable(Connection connection) throws SQLException;
/** /**
* Loads all Model specific Data to the Database. * Loads all model specific data to the database.
* *
* @return A Map of Models with a {@link String} key, to be used by other {@link Fixture} * @return A map of models with a {@link String} key, to be used by other {@link Fixture}
* @implSpec The {@link de.hitec.nhplus.datastorage.Dao Dao} should be received * @implSpec The {@link de.hitec.nhplus.datastorage.Dao Dao} should be received
* from {@link de.hitec.nhplus.datastorage.DaoFactory DaoFactory}. * from {@link de.hitec.nhplus.datastorage.DaoFactory DaoFactory}.
*/ */

View file

@ -7,7 +7,7 @@ import java.sql.Connection;
import java.util.Map; import java.util.Map;
/** /**
* A Class, Implementing an Entrypoint({@link #main}), for loading a Specific set of Data. * A class, implementing an entrypoint({@link #main}), for loading a specific set of data.
* *
* @author Dominik Säume * @author Dominik Säume
* @version 1.0 * @version 1.0
@ -15,7 +15,7 @@ import java.util.Map;
public class Fixtures { public class Fixtures {
/** /**
* An Entrypoint, for loading a Specific set of Data. * An entrypoint, for loading a specific set of data.
* *
* @param args unused. * @param args unused.
*/ */

View file

@ -12,7 +12,7 @@ import java.io.IOException;
import java.util.Objects; import java.util.Objects;
/** /**
* Controller for the Main Window of the Application, which holds all Tabs. * Controller for the main window of the application, which holds all tabs.
* @author Bernd Heideman * @author Bernd Heideman
* @author Dominik Säume * @author Dominik Säume
*/ */
@ -37,7 +37,7 @@ public class MainWindowController {
private Tab medicationTab; private Tab medicationTab;
/** /**
* @implSpec Method which should be called from the Outside to Initalize the Controller * @implSpec Method that should be called from the outside to initialize the controller.
*/ */
@FXML @FXML
public void initialize() { public void initialize() {
@ -51,7 +51,7 @@ public class MainWindowController {
} }
/** /**
* Loads the Patient Page into its Tab. * Loads the patient page into its tab.
*/ */
private void loadPatientPage() { private void loadPatientPage() {
try { try {
@ -69,7 +69,7 @@ public class MainWindowController {
} }
/** /**
* Loads the Treatment Page into its Tab. * Loads the treatment page into its tab.
*/ */
private void loadTreatmentsPage() { private void loadTreatmentsPage() {
try { try {
@ -87,7 +87,7 @@ public class MainWindowController {
} }
/** /**
* Loads the Nurse Page into its Tab. * Loads the nurse page into its tab.
*/ */
private void loadNursePage() { private void loadNursePage() {
try { try {
@ -105,7 +105,7 @@ public class MainWindowController {
} }
/** /**
* Loads the Medication Page into its Tab. * Loads the medication page into its tab.
*/ */
private void loadMedicationPage() { private void loadMedicationPage() {
try { try {

View file

@ -3,7 +3,7 @@ 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. * A simple base model for a {@link Person} that can be extended.
* *
* @author Bernd Heideman * @author Bernd Heideman
* @author Dominik Säume * @author Dominik Säume

View file

@ -3,11 +3,11 @@ package de.hitec.nhplus.medication;
import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.SimpleStringProperty;
/** /**
* The Simple Model for an {@link Ingredient}. * The simple model for an {@link Ingredient}.
* *
* @author Dominik Säume * @author Dominik Säume
* @implSpec This isn't a Conventional Model, because it isn't directly Stored in the Database, * @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. * but it can be changed to do that, in the case that its complexity rises in the future.
*/ */
public class Ingredient { public class Ingredient {
private final SimpleStringProperty name; private final SimpleStringProperty name;

View file

@ -11,7 +11,7 @@ import java.util.StringJoiner;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
* The Model for a {@link Medication}. * The model for a {@link Medication}.
* *
* @author Dominik Säume * @author Dominik Säume
*/ */
@ -25,10 +25,10 @@ public class Medication {
private final SimpleIntegerProperty currentStock; private final SimpleIntegerProperty currentStock;
/** /**
* This Constructor allows to Instantiate a {@link Medication} Object, * This constructor allows instantiating a {@link Medication} object,
* before it is Stored in the Database, by omitting the {@link Medication#id ID} value. * 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 * @implSpec Instances created with this constructor can be directly passed to
* {@link de.hitec.nhplus.medication.database.MedicationDao#create MedicationDao.create}. * {@link de.hitec.nhplus.medication.database.MedicationDao#create MedicationDao.create}.
*/ */
public Medication( public Medication(
@ -48,7 +48,7 @@ public class Medication {
} }
/** /**
* This Constructor allows to Instantiate a {@link Medication} Object with all Existing Fields. * This constructor allows instantiating a {@link Medication} object with all existing fields.
*/ */
public Medication( public Medication(
int id, int id,

View file

@ -7,7 +7,7 @@ import javafx.beans.property.SimpleStringProperty;
import java.util.StringJoiner; import java.util.StringJoiner;
/** /**
* The Model for a {@link Nurse}. * The model for a {@link Nurse}.
* *
* @author Dominik Säume * @author Dominik Säume
*/ */
@ -16,10 +16,10 @@ public class Nurse extends Person {
private final SimpleStringProperty phoneNumber; private final SimpleStringProperty phoneNumber;
/** /**
* This Constructor allows to Instantiate a {@link Nurse} Object, * This constructor allows instantiating a {@link Nurse} object,
* before it is Stored in the Database, by omitting the {@link Nurse#id ID} value. * 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 * @implSpec Instances created with this constructor can be directly passed to
* {@link de.hitec.nhplus.nurse.database.NurseDao#create NurseDao.create}. * {@link de.hitec.nhplus.nurse.database.NurseDao#create NurseDao.create}.
*/ */
public Nurse( public Nurse(
@ -32,7 +32,7 @@ public class Nurse extends Person {
} }
/** /**
* This Constructor allows to Instantiate a {@link Nurse} Object with all Existing Fields. * This constructor allows instantiating a {@link Nurse} object with all existing fields.
*/ */
public Nurse( public Nurse(
int id, int id,

View file

@ -12,7 +12,7 @@ import java.util.List;
import java.util.StringJoiner; import java.util.StringJoiner;
/** /**
* The Model for a {@link Patient}. * The model for a {@link Patient}.
* *
* @author Bernd Heideman * @author Bernd Heideman
* @author Dominik Säume * @author Dominik Säume
@ -26,9 +26,9 @@ public class Patient extends Person {
private final List<Treatment> allTreatments = new ArrayList<>(); private final List<Treatment> allTreatments = new ArrayList<>();
/** /**
* This Constructor allows to Instantiate a {@link Patient} Object, * This constructor allows instantiating a {@link Patient} object,
* before it is Stored in the Database, by omitting the {@link Patient#id ID} value. * 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 * @implSpec Instances created with this constructor can be directly passed to
* {@link de.hitec.nhplus.patient.database.PatientDao#create PatientDao.create}. * {@link de.hitec.nhplus.patient.database.PatientDao#create PatientDao.create}.
*/ */
public Patient( public Patient(
@ -45,7 +45,7 @@ public class Patient extends Person {
} }
/** /**
* This Constructor allows to Instantiate a {@link Patient} Object with all Existing Fields. * This constructor allows instantiating a {@link Patient} object with all existing fields.
*/ */
public Patient( public Patient(
int id, int id,

View file

@ -11,7 +11,7 @@ import java.time.LocalTime;
import java.util.StringJoiner; import java.util.StringJoiner;
/** /**
* The Model for a {@link Treatment}. * The model for a {@link Treatment}.
* *
* @author Bernd Heideman * @author Bernd Heideman
* @author Dominik Säume * @author Dominik Säume
@ -26,10 +26,10 @@ public class Treatment {
private final SimpleStringProperty remarks; private final SimpleStringProperty remarks;
/** /**
* This Constructor allows to Instantiate a {@link Treatment} Object, * This constructor allows instantiating a {@link Treatment} object,
* before it is Stored in the Database, by omitting the {@link Treatment#id ID} value. * 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 * @implSpec Instances created with this constructor can be directly passed to
* {@link de.hitec.nhplus.treatment.database.TreatmentDao#create TreatmentDao.create}. * {@link de.hitec.nhplus.treatment.database.TreatmentDao#create TreatmentDao.create}.
*/ */
public Treatment( public Treatment(
@ -49,7 +49,7 @@ public class Treatment {
} }
/** /**
* This Constructor allows to Instantiate a {@link Treatment} Object with all Existing Fields. * This constructor allows instantiating a {@link Treatment} object with all existing fields.
*/ */
public Treatment( public Treatment(
int id, int id,

View file

@ -5,7 +5,7 @@ import java.time.LocalTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
/** /**
* A Utility Class, Holding Utility Methods for Date Conversion. * A utility class that holds utility methods for date conversion.
* @author Bernd Heideman * @author Bernd Heideman
*/ */
public class DateConverter { public class DateConverter {
@ -14,16 +14,16 @@ public class DateConverter {
private static final String TIME_FORMAT = "HH:mm"; private static final String TIME_FORMAT = "HH:mm";
/** /**
* @param date A Date-{@link String} in the Format: yyyy-MM-dd. * @param date A date {@link String} in the format: yyyy-MM-dd.
* @return The Converted Date-{@link String} as {@link LocalDate}. * @return The converted date {@link String} as {@link LocalDate}.
*/ */
public static LocalDate convertStringToLocalDate(String date) { public static LocalDate convertStringToLocalDate(String date) {
return LocalDate.parse(date, DateTimeFormatter.ofPattern(DATE_FORMAT)); return LocalDate.parse(date, DateTimeFormatter.ofPattern(DATE_FORMAT));
} }
/** /**
* @param time A Time-{@link String} in the Format: HH:mm. * @param time A time {@link String} in the format: HH:mm.
* @return The Converted Time-{@link String} as {@link LocalTime}. * @return The converted time {@link String} as {@link LocalTime}.
*/ */
public static LocalTime convertStringToLocalTime(String time) { public static LocalTime convertStringToLocalTime(String time) {
return LocalTime.parse(time, DateTimeFormatter.ofPattern(TIME_FORMAT)); return LocalTime.parse(time, DateTimeFormatter.ofPattern(TIME_FORMAT));
@ -31,7 +31,7 @@ public class DateConverter {
/** /**
* @param date A {@link LocalDate} which should be converted to a {@link String}. * @param date A {@link LocalDate} which should be converted to a {@link String}.
* @return The Converted {@link LocalDate} in the Format: yyy-MM-dd. * @return The converted {@link LocalDate} in the format: yyy-MM-dd.
*/ */
public static String convertLocalDateToString(LocalDate date) { public static String convertLocalDateToString(LocalDate date) {
return date.format(DateTimeFormatter.ofPattern(DATE_FORMAT)); return date.format(DateTimeFormatter.ofPattern(DATE_FORMAT));
@ -39,7 +39,7 @@ public class DateConverter {
/** /**
* @param time A {@link LocalTime} which should be converted to a {@link String}. * @param time A {@link LocalTime} which should be converted to a {@link String}.
* @return The Converted {@link LocalTime} in the Format: HH:mm. * @return The converted {@link LocalTime} in the format: HH:mm.
*/ */
public static String convertLocalTimeToString(LocalTime time) { public static String convertLocalTimeToString(LocalTime time) {
return time.format(DateTimeFormatter.ofPattern(TIME_FORMAT)); return time.format(DateTimeFormatter.ofPattern(TIME_FORMAT));

View file

@ -6,7 +6,7 @@ import java.time.LocalDate;
import java.time.LocalTime; import java.time.LocalTime;
/** /**
* A Utility CLass, For Validating all kind of Data. * A utility class for validating all kinds of data.
* *
* @author Dominik Säume * @author Dominik Säume
* @author Ole Kück * @author Ole Kück
@ -14,9 +14,9 @@ import java.time.LocalTime;
public class Validator { public class Validator {
/** /**
* Shows a Modal with a Specific Validation Error. * Shows a modal with a specific validation error.
* *
* @param type The Type for which a Validation Error should be shown as {@link String}. * @param type The type for which a validation error should be shown as {@link String}.
*/ */
public static void showValidationError(String type) { public static void showValidationError(String type) {
Alert alert = new Alert(Alert.AlertType.ERROR); Alert alert = new Alert(Alert.AlertType.ERROR);
@ -27,9 +27,9 @@ public class Validator {
} }
/** /**
* Validate that a {@link String} is a Valid Date. * Validate that a {@link String} is a valid date.
* *
* @param text The Date-{@link String} to Validate. * @param text The date {@link String} to validate.
*/ */
public static boolean isValidDate(String text) { public static boolean isValidDate(String text) {
if (text.isBlank()) { if (text.isBlank()) {
@ -44,9 +44,9 @@ public class Validator {
} }
/** /**
* Validate that a {@link LocalDate} is a Valid Date for Storage in the Database. * Validate that a {@link LocalDate} is a valid date for storage in the database.
* *
* @param date The {@link LocalDate} to Validate. * @param date The {@link LocalDate} to validate.
*/ */
public static boolean isValidDate(LocalDate date) { public static boolean isValidDate(LocalDate date) {
if (date == null) { if (date == null) {
@ -61,9 +61,9 @@ public class Validator {
} }
/** /**
* Validate that a {@link String} is a Valid Time. * Validate that a {@link String} is a valid time.
* *
* @param text The Time-{@link String} to Validate. * @param text The time {@link String} to validate.
*/ */
public static boolean isValidTime(String text) { public static boolean isValidTime(String text) {
if (text.isBlank()) { if (text.isBlank()) {
@ -78,10 +78,10 @@ public class Validator {
} }
/** /**
* Validate that two Time-{@link String}s are a Valid Time-Range. * Validate that two time {@link String}s are a valid time range.
* *
* @param start The starting Time-{@link String}. * @param start The starting time {@link String}.
* @param end The ending Time-{@link String}. * @param end The ending time {@link String}.
*/ */
public static boolean isValidTimeRange(String start, String end) { public static boolean isValidTimeRange(String start, String end) {
if ( if (
@ -96,54 +96,54 @@ public class Validator {
} }
/** /**
* Validate that a {@link String} is a Valid Description. * Validate that a {@link String} is a valid description.
* *
* @param text The {@link String} to Validate. * @param text The {@link String} to validate.
*/ */
public static boolean isValidDescription(String text) { public static boolean isValidDescription(String text) {
return !text.isBlank(); return !text.isBlank();
} }
/** /**
* Validate that a {@link String} is a Valid First-Name. * Validate that a {@link String} is a valid first name.
* *
* @param text The {@link String} to Validate. * @param text The {@link String} to validate.
*/ */
public static boolean isValidFirstName(String text) { public static boolean isValidFirstName(String text) {
return !text.isBlank(); return !text.isBlank();
} }
/** /**
* Validate that a {@link String} is a Valid Sur-Name. * Validate that a {@link String} is a valid surname.
* *
* @param text The {@link String} to Validate. * @param text The {@link String} to validate.
*/ */
public static boolean isValidSurName(String text) { public static boolean isValidSurName(String text) {
return !text.isBlank(); return !text.isBlank();
} }
/** /**
* Validate that a {@link String} is a Valid Phone-Number. * Validate that a {@link String} is a valid phone number.
* *
* @param text The {@link String} to Validate. * @param text The {@link String} to validate.
*/ */
public static boolean isValidPhoneNumber(String text) { public static boolean isValidPhoneNumber(String text) {
return !text.isBlank(); return !text.isBlank();
} }
/** /**
* Validate that a {@link String} is a Valid Care-Level. * Validate that a {@link String} is a valid care level.
* *
* @param text The {@link String} to Validate. * @param text The {@link String} to validate.
*/ */
public static boolean isValidCareLevel(String text) { public static boolean isValidCareLevel(String text) {
return !text.isBlank(); return !text.isBlank();
} }
/** /**
* Validate that a {@link String} is a Valid Room-Number. * Validate that a {@link String} is a valid room number.
* *
* @param text The {@link String} to Validate. * @param text The {@link String} to validate.
*/ */
public static boolean isValidRoomNumber(String text) { public static boolean isValidRoomNumber(String text) {
return !text.isBlank(); return !text.isBlank();