Browse Source

Station bekommt jetzt auch die Abteilung (String) mit uebergeben.

testBranch
Nils Dittberner 10 years ago
parent
commit
9b31050a01
2 changed files with 33 additions and 18 deletions
  1. +4
    -1
      src/main/java/de/uniluebeck/mi/projmi6/db/DBHandler.java
  2. +29
    -17
      src/main/java/de/uniluebeck/mi/projmi6/model/Station.java

+ 4
- 1
src/main/java/de/uniluebeck/mi/projmi6/db/DBHandler.java View File

@@ -48,7 +48,9 @@ public class DBHandler {
"`LetzterBearbeiter`," + "`LetzterBearbeiter`," +
"`Ersteller`)" + "`Ersteller`)" +
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
private static final String SELECT_ALL_STATIONEN = "SELECT * FROM `stammstation`";
private static final String SELECT_ALL_STATIONEN = "SELECT *,r.abteilung AS abteilung" +
"FROM stammstation s " +
"INNER JOIN relfachrichtungstation r ON s.station = r.station";
private static final String SELECT_FAELLE_BY_PATID = "SELECT * FROM `fall` WHERE `patientid` = ?"; private static final String SELECT_FAELLE_BY_PATID = "SELECT * FROM `fall` WHERE `patientid` = ?";
private static final String INSERT_FALL = "INSERT INTO `fall`" + private static final String INSERT_FALL = "INSERT INTO `fall`" +
"(`Aufnahmedatum`," + "(`Aufnahmedatum`," +
@@ -260,6 +262,7 @@ public class DBHandler {
station.setBezeichnung(rs.getString("bezeichnung")); station.setBezeichnung(rs.getString("bezeichnung"));
station.setBezeichnungLang(rs.getString("bezeichnunglang")); station.setBezeichnungLang(rs.getString("bezeichnunglang"));
station.setStationstyp(rs.getInt("stationstyp")); station.setStationstyp(rs.getInt("stationstyp"));
station.setAbteilung(rs.getString("abteilung"));


return station; return station;
} }


+ 29
- 17
src/main/java/de/uniluebeck/mi/projmi6/model/Station.java View File

@@ -10,57 +10,69 @@ public class Station {
private SimpleStringProperty bezeichnung = new SimpleStringProperty(this, "bezeichnung"); private SimpleStringProperty bezeichnung = new SimpleStringProperty(this, "bezeichnung");
private SimpleStringProperty bezeichnungLang = new SimpleStringProperty(this, "bezeichnungLang"); private SimpleStringProperty bezeichnungLang = new SimpleStringProperty(this, "bezeichnungLang");
private SimpleStringProperty station = new SimpleStringProperty(this, "station"); private SimpleStringProperty station = new SimpleStringProperty(this, "station");
private SimpleIntegerProperty stationstyp = new SimpleIntegerProperty( this, "stationstyp");
private SimpleIntegerProperty stationstyp = new SimpleIntegerProperty(this, "stationstyp");
private SimpleStringProperty abteilung = new SimpleStringProperty(this, "abteilung");


public String getAbteilung() {
return abteilung.get();
}


public String getBezeichnung() {
return bezeichnung.get();
public void setAbteilung(String abteilung) {
this.abteilung.set(abteilung);
} }


public SimpleStringProperty bezeichnungProperty() {
return bezeichnung;
public SimpleStringProperty abteilungProperty() {
return abteilung;
}

public String getBezeichnung() {
return bezeichnung.get();
} }


public void setBezeichnung(String bezeichnung) { public void setBezeichnung(String bezeichnung) {
this.bezeichnung.set(bezeichnung); this.bezeichnung.set(bezeichnung);
} }


public String getBezeichnungLang() {
return bezeichnungLang.get();
public SimpleStringProperty bezeichnungProperty() {
return bezeichnung;
} }


public SimpleStringProperty bezeichnungLangProperty() {
return bezeichnungLang;
public String getBezeichnungLang() {
return bezeichnungLang.get();
} }


public void setBezeichnungLang(String bezeichnungLang) { public void setBezeichnungLang(String bezeichnungLang) {
this.bezeichnungLang.set(bezeichnungLang); this.bezeichnungLang.set(bezeichnungLang);
} }


public String getStation() {
return station.get();
public SimpleStringProperty bezeichnungLangProperty() {
return bezeichnungLang;
} }


public SimpleStringProperty stationProperty() {
return station;
public String getStation() {
return station.get();
} }


public void setStation(String station) { public void setStation(String station) {
this.station.set(station); this.station.set(station);
} }


public int getStationstyp() {
return stationstyp.get();
public SimpleStringProperty stationProperty() {
return station;
} }


public SimpleIntegerProperty stationstypProperty() {
return stationstyp;
public int getStationstyp() {
return stationstyp.get();
} }


public void setStationstyp(int stationstyp) { public void setStationstyp(int stationstyp) {
this.stationstyp.set(stationstyp); this.stationstyp.set(stationstyp);
} }


public SimpleIntegerProperty stationstypProperty() {
return stationstyp;
}

@Override @Override
public String toString() { public String toString() {
return getBezeichnung(); return getBezeichnung();


Loading…
Cancel
Save