#7 locked boolean zu Treatment addiert und initialisiert
Some checks failed
Quality Check / Linting Check (push) Successful in 12s
Quality Check / Javadoc Check (push) Failing after 13s

This commit is contained in:
Dorian Nemec 2024-05-16 15:49:48 +02:00
parent 84df7a7abb
commit 01e07be6e2

View file

@ -3,6 +3,7 @@ package de.hitec.nhplus.treatment;
import de.hitec.nhplus.nurse.Nurse; import de.hitec.nhplus.nurse.Nurse;
import de.hitec.nhplus.patient.Patient; import de.hitec.nhplus.patient.Patient;
import de.hitec.nhplus.utils.DateConverter; import de.hitec.nhplus.utils.DateConverter;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleIntegerProperty; import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleObjectProperty; import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.SimpleStringProperty;
@ -26,6 +27,7 @@ public class Treatment {
private final SimpleObjectProperty<LocalTime> end; private final SimpleObjectProperty<LocalTime> end;
private final SimpleStringProperty description; private final SimpleStringProperty description;
private final SimpleStringProperty remarks; private final SimpleStringProperty remarks;
private final SimpleBooleanProperty locked;
/** /**
* This constructor allows instantiating a {@link Treatment} object, * This constructor allows instantiating a {@link Treatment} object,
@ -50,6 +52,7 @@ public class Treatment {
this.end = new SimpleObjectProperty<>(end); this.end = new SimpleObjectProperty<>(end);
this.description = new SimpleStringProperty(description); this.description = new SimpleStringProperty(description);
this.remarks = new SimpleStringProperty(remarks); this.remarks = new SimpleStringProperty(remarks);
this.locked = new SimpleBooleanProperty(false);
} }
/** /**
@ -63,7 +66,8 @@ public class Treatment {
LocalTime begin, LocalTime begin,
LocalTime end, LocalTime end,
String description, String description,
String remarks String remarks,
boolean isLocked
) { ) {
this.id = new SimpleIntegerProperty(id); this.id = new SimpleIntegerProperty(id);
this.patient = new SimpleObjectProperty<>(patient); this.patient = new SimpleObjectProperty<>(patient);
@ -73,6 +77,19 @@ public class Treatment {
this.end = new SimpleObjectProperty<>(end); this.end = new SimpleObjectProperty<>(end);
this.description = new SimpleStringProperty(description); this.description = new SimpleStringProperty(description);
this.remarks = new SimpleStringProperty(remarks); this.remarks = new SimpleStringProperty(remarks);
this.locked = new SimpleBooleanProperty(isLocked);
}
public boolean isLocked() {
return locked.get();
}
public SimpleBooleanProperty lockedProperty() {
return locked;
}
public void setLocked(boolean locked) {
this.locked.set(locked);
} }
public int getId() { public int getId() {