From 7145f41be3428e050b591156a87c5245ac14d654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20S=C3=A4ume?= Date: Tue, 14 May 2024 23:01:42 +0200 Subject: [PATCH] NOTICKET: Javadoc Grammar Check --- src/main/java/de/hitec/nhplus/Main.java | 8 +-- .../nhplus/datastorage/ConnectionBuilder.java | 6 +- .../java/de/hitec/nhplus/datastorage/Dao.java | 28 ++++---- .../hitec/nhplus/datastorage/DaoFactory.java | 14 ++-- .../de/hitec/nhplus/datastorage/DaoImp.java | 64 +++++++++---------- .../de/hitec/nhplus/fixtures/Fixture.java | 18 +++--- .../de/hitec/nhplus/fixtures/Fixtures.java | 4 +- .../nhplus/main/MainWindowController.java | 12 ++-- .../java/de/hitec/nhplus/main/Person.java | 2 +- .../hitec/nhplus/medication/Ingredient.java | 6 +- .../hitec/nhplus/medication/Medication.java | 10 +-- .../java/de/hitec/nhplus/nurse/Nurse.java | 10 +-- .../java/de/hitec/nhplus/patient/Patient.java | 10 +-- .../de/hitec/nhplus/treatment/Treatment.java | 10 +-- .../de/hitec/nhplus/utils/DateConverter.java | 14 ++-- .../java/de/hitec/nhplus/utils/Validator.java | 48 +++++++------- 16 files changed, 132 insertions(+), 132 deletions(-) diff --git a/src/main/java/de/hitec/nhplus/Main.java b/src/main/java/de/hitec/nhplus/Main.java index 8628324..5a35686 100644 --- a/src/main/java/de/hitec/nhplus/Main.java +++ b/src/main/java/de/hitec/nhplus/Main.java @@ -11,7 +11,7 @@ import javafx.stage.Stage; 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 Dominik Säume @@ -21,14 +21,14 @@ public class Main extends Application { private Stage primaryStage; /** - * The Main Entry Point. + * The main entry point. */ public static void main(String[] args) { launch(args); } /** - * Implementation of the JavaFX start Hook. + * Implementation of the JavaFX start hook. */ @Override 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() { try { diff --git a/src/main/java/de/hitec/nhplus/datastorage/ConnectionBuilder.java b/src/main/java/de/hitec/nhplus/datastorage/ConnectionBuilder.java index 3945a3c..02e22c7 100644 --- a/src/main/java/de/hitec/nhplus/datastorage/ConnectionBuilder.java +++ b/src/main/java/de/hitec/nhplus/datastorage/ConnectionBuilder.java @@ -7,7 +7,7 @@ import java.sql.DriverManager; 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 Dominik Säume @@ -21,7 +21,7 @@ public class ConnectionBuilder { 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() { 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() { try { diff --git a/src/main/java/de/hitec/nhplus/datastorage/Dao.java b/src/main/java/de/hitec/nhplus/datastorage/Dao.java index 2b855e5..1027953 100644 --- a/src/main/java/de/hitec/nhplus/datastorage/Dao.java +++ b/src/main/java/de/hitec/nhplus/datastorage/Dao.java @@ -4,48 +4,48 @@ import java.sql.SQLException; import java.util.List; /** - * {@link Dao} is the Abbreviation of Data-Access-Object. - * This Interface has the Basic Methods which are needed on any {@link Dao} to work as expected. + * {@link Dao} is the abbreviation for Data-Access-Object. + * This interface has the Basic Methods that are needed on any {@link Dao} to work as expected. * - * @param The Model for which that {@link Dao} is implemented. + * @param The model for which that {@link Dao} is implemented. * @author Bernd Heidemann * @author Dominik Säume * @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 { /** - * 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; /** - * 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. - * @return a Model-Instance of {@link T}. + * @param id The ID of the element in the database. + * @return a model instance of {@link T}. */ 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 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; /** - * 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; } diff --git a/src/main/java/de/hitec/nhplus/datastorage/DaoFactory.java b/src/main/java/de/hitec/nhplus/datastorage/DaoFactory.java index 7242a8a..55851a9 100644 --- a/src/main/java/de/hitec/nhplus/datastorage/DaoFactory.java +++ b/src/main/java/de/hitec/nhplus/datastorage/DaoFactory.java @@ -6,7 +6,7 @@ import de.hitec.nhplus.patient.database.PatientDao; 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 Dominik Säume @@ -17,13 +17,13 @@ public class DaoFactory { private static DaoFactory instance; /** - * A Private Constructor according to the Singleton Pattern. + * A private constructor according to the singleton pattern. */ private DaoFactory() { } /** - * @return The Singleton Instance of {@link DaoFactory}. + * @return The singleton instance of {@link DaoFactory}. */ public static DaoFactory getInstance() { 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 */ 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 */ 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 */ 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 */ public MedicationDao createMedicationDAO() { diff --git a/src/main/java/de/hitec/nhplus/datastorage/DaoImp.java b/src/main/java/de/hitec/nhplus/datastorage/DaoImp.java index 32a3b56..6344e18 100644 --- a/src/main/java/de/hitec/nhplus/datastorage/DaoImp.java +++ b/src/main/java/de/hitec/nhplus/datastorage/DaoImp.java @@ -7,30 +7,30 @@ import java.sql.SQLException; import java.util.List; /** - * The {@link DaoImp} is a Generic Base Implementation of the {@link Dao}, - * which should fit most use cases. + * The {@link DaoImp} is a generic base implementation of the {@link Dao}, + * that should fit most use cases. * - * @param The Model for which that {@link Dao} is implemented. + * @param The model for which that {@link Dao} is implemented. * @author Bernd Heidemann * @author Dominik Säume * @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 implements Dao { protected final Connection connection; /** - * @param connection The Database {@link Connection} to use. - * @implSpec The {@link Connection} should be Received from the {@link ConnectionBuilder}. + * @param connection The database {@link Connection} to use. + * @implSpec The {@link Connection} should be received from the {@link ConnectionBuilder}. */ public DaoImp(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 public void create(T t) throws SQLException { @@ -38,10 +38,10 @@ public abstract class DaoImp implements Dao { } /** - * 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. - * @return the Model-Instance of type {@link T}, which was read. + * @param id The ID of the element in the database. + * @return the model instance of type {@link T}, which was read. */ @Override public T read(int id) throws SQLException { @@ -54,9 +54,9 @@ public abstract class DaoImp implements Dao { } /** - * 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 public List readAll() throws SQLException { @@ -64,9 +64,9 @@ public abstract class DaoImp implements Dao { } /** - * 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 public void update(T t) throws SQLException { @@ -74,9 +74,9 @@ public abstract class DaoImp implements Dao { } /** - * 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 public void delete(int id) throws SQLException { @@ -84,51 +84,51 @@ public abstract class DaoImp implements Dao { } /** - * @param result The {@link ResultSet} from execution of the Statement received from {@link #getReadByIDStatement}. - * @return The Model-Instance of Type {@link T}. + * @param result The {@link ResultSet} from execution of the statement received from {@link #getReadByIDStatement}. + * @return The model instance of type {@link T}. * @implSpec This will be called in {@link #read}. */ protected abstract T getInstanceFromResultSet(ResultSet result) throws SQLException; /** - * @param id The ID of the Database Entry to read. - * @return A {@link PreparedStatement} to read a Specific Entry by its ID. + * @param id The ID of the database entry to read. + * @return A {@link PreparedStatement} to read a specific entry by its ID. * @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; /** - * @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. + * @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. * @implSpec This will be called in {@link #readAll}. */ protected abstract List 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}. - * 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; /** - * @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. + * @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. * @implSpec This will be called in {@link #create}. */ protected abstract PreparedStatement getCreateStatement(T t) throws SQLException; /** - * @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. + * @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. * @implSpec This will be called in {@link #update}. */ protected abstract PreparedStatement getUpdateStatement(T t) throws SQLException; /** - * @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. + * @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. * @implSpec This will be called in {@link #delete}. */ protected abstract PreparedStatement getDeleteStatement(int id) throws SQLException; diff --git a/src/main/java/de/hitec/nhplus/fixtures/Fixture.java b/src/main/java/de/hitec/nhplus/fixtures/Fixture.java index 4a2e03d..5c2fa84 100644 --- a/src/main/java/de/hitec/nhplus/fixtures/Fixture.java +++ b/src/main/java/de/hitec/nhplus/fixtures/Fixture.java @@ -7,36 +7,36 @@ import java.sql.SQLException; 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 The Model for which the {@link Fixture} is implemented. + * @param The model for which the {@link Fixture} is implemented. * @author Dominik Säume * @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 { /** - * 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} * @implSpec Use {@code IF EXISTS}, to ensure that it doesn't throw an {@link Exception}. */ 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} */ 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 * from {@link de.hitec.nhplus.datastorage.DaoFactory DaoFactory}. */ diff --git a/src/main/java/de/hitec/nhplus/fixtures/Fixtures.java b/src/main/java/de/hitec/nhplus/fixtures/Fixtures.java index d179ad5..faa0dab 100644 --- a/src/main/java/de/hitec/nhplus/fixtures/Fixtures.java +++ b/src/main/java/de/hitec/nhplus/fixtures/Fixtures.java @@ -7,7 +7,7 @@ import java.sql.Connection; 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 * @version 1.0 @@ -15,7 +15,7 @@ import java.util.Map; public class Fixtures { /** - * An Entrypoint, for loading a Specific set of Data. + * An entrypoint, for loading a specific set of data. * * @param args unused. */ diff --git a/src/main/java/de/hitec/nhplus/main/MainWindowController.java b/src/main/java/de/hitec/nhplus/main/MainWindowController.java index 92010b2..92312d7 100644 --- a/src/main/java/de/hitec/nhplus/main/MainWindowController.java +++ b/src/main/java/de/hitec/nhplus/main/MainWindowController.java @@ -12,7 +12,7 @@ import java.io.IOException; 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 Dominik Säume */ @@ -37,7 +37,7 @@ public class MainWindowController { 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 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() { 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() { 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() { 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() { try { diff --git a/src/main/java/de/hitec/nhplus/main/Person.java b/src/main/java/de/hitec/nhplus/main/Person.java index 5459e3c..3760094 100644 --- a/src/main/java/de/hitec/nhplus/main/Person.java +++ b/src/main/java/de/hitec/nhplus/main/Person.java @@ -3,7 +3,7 @@ package de.hitec.nhplus.main; 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 Dominik Säume diff --git a/src/main/java/de/hitec/nhplus/medication/Ingredient.java b/src/main/java/de/hitec/nhplus/medication/Ingredient.java index 5e12bd0..bbf2f36 100644 --- a/src/main/java/de/hitec/nhplus/medication/Ingredient.java +++ b/src/main/java/de/hitec/nhplus/medication/Ingredient.java @@ -3,11 +3,11 @@ package de.hitec.nhplus.medication; import javafx.beans.property.SimpleStringProperty; /** - * The Simple Model for an {@link Ingredient}. + * 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. + * @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 ed6fc33..6320e58 100644 --- a/src/main/java/de/hitec/nhplus/medication/Medication.java +++ b/src/main/java/de/hitec/nhplus/medication/Medication.java @@ -11,7 +11,7 @@ import java.util.StringJoiner; import java.util.stream.Collectors; /** - * The Model for a {@link Medication}. + * The model for a {@link Medication}. * * @author Dominik Säume */ @@ -25,10 +25,10 @@ public class Medication { 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. + * This constructor allows instantiating 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 + * @implSpec Instances created with this constructor can be directly passed to * {@link de.hitec.nhplus.medication.database.MedicationDao#create MedicationDao.create}. */ 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( int id, diff --git a/src/main/java/de/hitec/nhplus/nurse/Nurse.java b/src/main/java/de/hitec/nhplus/nurse/Nurse.java index de13ce3..aa1a194 100644 --- a/src/main/java/de/hitec/nhplus/nurse/Nurse.java +++ b/src/main/java/de/hitec/nhplus/nurse/Nurse.java @@ -7,7 +7,7 @@ import javafx.beans.property.SimpleStringProperty; import java.util.StringJoiner; /** - * The Model for a {@link Nurse}. + * The model for a {@link Nurse}. * * @author Dominik Säume */ @@ -16,10 +16,10 @@ public class Nurse extends Person { 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. + * This constructor allows instantiating 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 + * @implSpec Instances created with this constructor can be directly passed to * {@link de.hitec.nhplus.nurse.database.NurseDao#create NurseDao.create}. */ 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( int id, diff --git a/src/main/java/de/hitec/nhplus/patient/Patient.java b/src/main/java/de/hitec/nhplus/patient/Patient.java index 1d1fe2a..3bf61aa 100644 --- a/src/main/java/de/hitec/nhplus/patient/Patient.java +++ b/src/main/java/de/hitec/nhplus/patient/Patient.java @@ -12,7 +12,7 @@ import java.util.List; import java.util.StringJoiner; /** - * The Model for a {@link Patient}. + * The model for a {@link Patient}. * * @author Bernd Heideman * @author Dominik Säume @@ -26,9 +26,9 @@ public class Patient extends Person { 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 + * This constructor allows instantiating 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( @@ -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( int id, diff --git a/src/main/java/de/hitec/nhplus/treatment/Treatment.java b/src/main/java/de/hitec/nhplus/treatment/Treatment.java index c050f2b..6b39af4 100644 --- a/src/main/java/de/hitec/nhplus/treatment/Treatment.java +++ b/src/main/java/de/hitec/nhplus/treatment/Treatment.java @@ -11,7 +11,7 @@ import java.time.LocalTime; import java.util.StringJoiner; /** - * The Model for a {@link Treatment}. + * The model for a {@link Treatment}. * * @author Bernd Heideman * @author Dominik Säume @@ -26,10 +26,10 @@ public class Treatment { private final SimpleStringProperty 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. + * This constructor allows instantiating 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 + * @implSpec Instances created with this constructor can be directly passed to * {@link de.hitec.nhplus.treatment.database.TreatmentDao#create TreatmentDao.create}. */ 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( int id, diff --git a/src/main/java/de/hitec/nhplus/utils/DateConverter.java b/src/main/java/de/hitec/nhplus/utils/DateConverter.java index 1cd155e..0ee543a 100644 --- a/src/main/java/de/hitec/nhplus/utils/DateConverter.java +++ b/src/main/java/de/hitec/nhplus/utils/DateConverter.java @@ -5,7 +5,7 @@ import java.time.LocalTime; 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 */ public class DateConverter { @@ -14,16 +14,16 @@ public class DateConverter { private static final String TIME_FORMAT = "HH:mm"; /** - * @param date A Date-{@link String} in the Format: yyyy-MM-dd. - * @return The Converted Date-{@link String} as {@link LocalDate}. + * @param date A date {@link String} in the format: yyyy-MM-dd. + * @return The converted date {@link String} as {@link LocalDate}. */ public static LocalDate convertStringToLocalDate(String date) { return LocalDate.parse(date, DateTimeFormatter.ofPattern(DATE_FORMAT)); } /** - * @param time A Time-{@link String} in the Format: HH:mm. - * @return The Converted Time-{@link String} as {@link LocalTime}. + * @param time A time {@link String} in the format: HH:mm. + * @return The converted time {@link String} as {@link LocalTime}. */ public static LocalTime convertStringToLocalTime(String time) { 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}. - * @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) { 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}. - * @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) { return time.format(DateTimeFormatter.ofPattern(TIME_FORMAT)); diff --git a/src/main/java/de/hitec/nhplus/utils/Validator.java b/src/main/java/de/hitec/nhplus/utils/Validator.java index b9ad160..7931700 100644 --- a/src/main/java/de/hitec/nhplus/utils/Validator.java +++ b/src/main/java/de/hitec/nhplus/utils/Validator.java @@ -6,7 +6,7 @@ import java.time.LocalDate; 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 Ole Kück @@ -14,9 +14,9 @@ import java.time.LocalTime; 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) { 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) { 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) { 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) { 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 end The ending Time-{@link String}. + * @param start The starting time {@link String}. + * @param end The ending time {@link String}. */ public static boolean isValidTimeRange(String start, String end) { 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) { 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) { 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) { 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) { 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) { 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) { return !text.isBlank();