NOTICKET: Fix Javadoc Generation
Signed-off-by: Dominik Säume <Dominik.Saeume@hmmh.de>
This commit is contained in:
parent
f5dc9c3343
commit
9de598ef67
11 changed files with 109 additions and 43 deletions
|
@ -15,9 +15,7 @@ jobs:
|
|||
- name: "Checkout"
|
||||
uses: "https://git.euph.dev/actions/checkout@v3"
|
||||
- name: "javadoc"
|
||||
run: |
|
||||
mvn package
|
||||
mvn javadoc:javadoc -f pom.xml
|
||||
run: mvn package javadoc:javadoc -f pom.xml
|
||||
- name: "Deploy Javadoc"
|
||||
env:
|
||||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
||||
|
|
|
@ -5,13 +5,23 @@ on:
|
|||
- pull_request
|
||||
|
||||
jobs:
|
||||
qs:
|
||||
name: "Qualty Check"
|
||||
linting:
|
||||
name: "Linting Check"
|
||||
runs-on: "ubuntu-latest"
|
||||
container:
|
||||
image: "git.euph.dev/actions/runner-java-21:latest"
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: "https://git.euph.dev/actions/checkout@v3"
|
||||
- name: "CHECK"
|
||||
run: mvn checkstyle:check -e
|
||||
- name: "Checkstyle Linting"
|
||||
run: mvn checkstyle:check -e
|
||||
javadoc:
|
||||
name: "Javadoc Check"
|
||||
runs-on: "ubuntu-latest"
|
||||
container:
|
||||
image: "git.euph.dev/actions/runner-java-21:latest"
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: "https://git.euph.dev/actions/checkout@v3"
|
||||
- name: "Generate Javadoc"
|
||||
run: mvn package javadoc:javadoc -f pom.xml
|
BIN
.mvn/wrapper/maven-wrapper.jar
vendored
BIN
.mvn/wrapper/maven-wrapper.jar
vendored
Binary file not shown.
2
.mvn/wrapper/maven-wrapper.properties
vendored
2
.mvn/wrapper/maven-wrapper.properties
vendored
|
@ -1,2 +0,0 @@
|
|||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.zip
|
||||
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
|
15
pom.xml
15
pom.xml
|
@ -21,12 +21,12 @@
|
|||
<dependency>
|
||||
<groupId>org.openjfx</groupId>
|
||||
<artifactId>javafx-controls</artifactId>
|
||||
<version>20.0.1</version>
|
||||
<version>21.0.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjfx</groupId>
|
||||
<artifactId>javafx-fxml</artifactId>
|
||||
<version>20.0.1</version>
|
||||
<version>21.0.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.controlsfx</groupId>
|
||||
|
@ -112,11 +112,20 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.6.0</version>
|
||||
<version>3.6.3</version>
|
||||
<configuration>
|
||||
<source>21</source>
|
||||
<release>21</release>
|
||||
<author>true</author>
|
||||
<doclint>all,-missing</doclint>
|
||||
<reportOutputDirectory>${project.basedir}</reportOutputDirectory>
|
||||
<sourcepath>src/main/java</sourcepath>
|
||||
<destDir>javadoc_build</destDir>
|
||||
<tags>
|
||||
<tag>
|
||||
<name>implSpec</name>
|
||||
</tag>
|
||||
</tags>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
|
|
@ -10,6 +10,7 @@ import java.sql.SQLException;
|
|||
* The {@link DaoFactory} allows a safe connection to the Database.
|
||||
*
|
||||
* @author Bernd Heidemann
|
||||
* @author Dominik Säume
|
||||
* @version 1.0
|
||||
*/
|
||||
public class ConnectionBuilder {
|
||||
|
@ -20,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 {
|
||||
|
|
|
@ -5,44 +5,46 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* {@link Dao} is the Abbreviation of Data-Access-Object.
|
||||
* This Interface has the Basic Methods which are needed on any DAO to work as expected.
|
||||
* This Interface has the Basic Methods which are needed on any {@link Dao} to work as expected.
|
||||
*
|
||||
* @param <T> The Model for which that DAO is implemented
|
||||
* @param <T> 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<T> {
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @param id of the Element in the Database
|
||||
* @param id The ID of the Element in the Database.
|
||||
*/
|
||||
T read(int id) throws SQLException;
|
||||
|
||||
/**
|
||||
* Read all Database Entries to a {@link List} of Model objects.
|
||||
* @return All Database Entries as a {@link List} of Model instances
|
||||
*/
|
||||
List<T> readAll() throws SQLException;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @param id of the Element in the Database.
|
||||
* @param id The ID of the Element in the Database.
|
||||
*/
|
||||
void delete(int id) throws SQLException;
|
||||
}
|
||||
|
|
|
@ -6,9 +6,10 @@ import de.hitec.nhplus.patient.database.PatientDao;
|
|||
import de.hitec.nhplus.treatment.database.TreatmentDao;
|
||||
|
||||
/**
|
||||
* The {@link DaoFactory} is a Singleton({@link DaoFactory#getInstance}) which should be used to get {@link Dao}s.
|
||||
* The {@link DaoFactory} is a Singleton({@link #getInstance}) which should be used to get {@link Dao}s.
|
||||
*
|
||||
* @author Bernd Heidemann
|
||||
* @author Dominik Säume
|
||||
* @version 1.0
|
||||
*/
|
||||
public class DaoFactory {
|
||||
|
@ -22,7 +23,7 @@ public class DaoFactory {
|
|||
}
|
||||
|
||||
/**
|
||||
* @return {@link DaoFactory}, the Singleton Instance
|
||||
* @return The Singleton Instance.
|
||||
*/
|
||||
public static DaoFactory getInstance() {
|
||||
if (DaoFactory.instance == null) {
|
||||
|
@ -32,28 +33,32 @@ public class DaoFactory {
|
|||
}
|
||||
|
||||
/**
|
||||
* @return a {@link TreatmentDao}
|
||||
* @return A new {@link TreatmentDao} Instance with a Database Connection.
|
||||
* @see de.hitec.nhplus.treatment.Treatment Treatment
|
||||
*/
|
||||
public TreatmentDao createTreatmentDao() {
|
||||
return new TreatmentDao(ConnectionBuilder.getConnection());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a {@link PatientDao}
|
||||
* @return A new {@link PatientDao} Instance with a Database Connection.
|
||||
* @see de.hitec.nhplus.patient.Patient Patient
|
||||
*/
|
||||
public PatientDao createPatientDAO() {
|
||||
return new PatientDao(ConnectionBuilder.getConnection());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a {@link NurseDao}
|
||||
* @return A new {@link NurseDao} Instance with a Database Connection.
|
||||
* @see de.hitec.nhplus.nurse.Nurse Nurse
|
||||
*/
|
||||
public NurseDao createNurseDAO() {
|
||||
return new NurseDao(ConnectionBuilder.getConnection());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a {@link MedicationDao}
|
||||
* @return A new {@link MedicationDao} Instance with a Database Connection.
|
||||
* @see de.hitec.nhplus.medication.Medication Medication
|
||||
*/
|
||||
public MedicationDao createMedicationDAO() {
|
||||
return new MedicationDao(ConnectionBuilder.getConnection());
|
||||
|
|
|
@ -10,16 +10,18 @@ import java.util.List;
|
|||
* The {@link DaoImp} is a Generic Base Implementation of the {@link Dao},
|
||||
* which should fit most use cases.
|
||||
*
|
||||
* @param <T> The Model for which that DAO is implemented
|
||||
* @param <T> 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<T> implements Dao<T> {
|
||||
protected final Connection connection;
|
||||
|
||||
/**
|
||||
* @param connection a Database Connection, which should be gotten from {@link ConnectionBuilder}
|
||||
* @param connection The Database Connection to use
|
||||
* @implSpec The Connection should be Received from the {@link ConnectionBuilder}.
|
||||
*/
|
||||
public DaoImp(Connection connection) {
|
||||
this.connection = connection;
|
||||
|
@ -28,7 +30,7 @@ public abstract class DaoImp<T> implements Dao<T> {
|
|||
/**
|
||||
* 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,7 +40,7 @@ public abstract class DaoImp<T> implements Dao<T> {
|
|||
/**
|
||||
* Read a Database Entry to a Model object.
|
||||
*
|
||||
* @param id of the Element in the Database
|
||||
* @param id The ID of the Element in the Database.
|
||||
*/
|
||||
@Override
|
||||
public T read(int id) throws SQLException {
|
||||
|
@ -61,7 +63,7 @@ public abstract class DaoImp<T> implements Dao<T> {
|
|||
/**
|
||||
* 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 {
|
||||
|
@ -71,7 +73,7 @@ public abstract class DaoImp<T> implements Dao<T> {
|
|||
/**
|
||||
* Delete a Database Entry.
|
||||
*
|
||||
* @param 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 {
|
||||
|
|
|
@ -1,12 +1,44 @@
|
|||
package de.hitec.nhplus.fixtures;
|
||||
|
||||
import de.hitec.nhplus.datastorage.ConnectionBuilder;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Map;
|
||||
|
||||
public interface Fixture<T>
|
||||
{
|
||||
/**
|
||||
* 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.
|
||||
* @author Dominik Säume
|
||||
* @version 1.0
|
||||
* @implSpec The Implementations should be added to the {@link Fixtures#main}.
|
||||
*/
|
||||
public interface Fixture<T> {
|
||||
|
||||
/**
|
||||
* Drop all Dependent Tables.
|
||||
*
|
||||
* @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.
|
||||
*
|
||||
* @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.
|
||||
*
|
||||
* @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}.
|
||||
*/
|
||||
Map<String, T> load() throws SQLException;
|
||||
}
|
||||
|
|
|
@ -6,14 +6,23 @@ import de.hitec.nhplus.patient.Patient;
|
|||
import java.sql.Connection;
|
||||
import java.util.Map;
|
||||
|
||||
public class Fixtures
|
||||
{
|
||||
public static void main(String[] args)
|
||||
{
|
||||
/**
|
||||
* A Class, Implementing an Entrypoint({@link #main}), for loading a Specific set of Data.
|
||||
*
|
||||
* @author Dominik Säume
|
||||
* @version 1.0
|
||||
*/
|
||||
public class Fixtures {
|
||||
|
||||
/**
|
||||
* An Entrypoint, for loading a Specific set of Data.
|
||||
*
|
||||
* @param args unused.
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
Connection connection = ConnectionBuilder.getConnection();
|
||||
|
||||
try
|
||||
{
|
||||
try {
|
||||
PatientFixture patientFixture = new PatientFixture();
|
||||
patientFixture.dropTable(connection);
|
||||
patientFixture.setupTable(connection);
|
||||
|
@ -34,7 +43,7 @@ public class Fixtures
|
|||
medicationFixture.setupTable(connection);
|
||||
medicationFixture.load();
|
||||
|
||||
} catch (Exception exception){
|
||||
} catch (Exception exception) {
|
||||
System.out.println(exception.getMessage());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue