瀏覽代碼

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

testBranch
Nils Dittberner 10 年之前
父節點
當前提交
9b31050a01
共有 2 個文件被更改,包括 33 次插入18 次删除
  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 查看文件

@@ -48,7 +48,9 @@ public class DBHandler {
"`LetzterBearbeiter`," +
"`Ersteller`)" +
"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 INSERT_FALL = "INSERT INTO `fall`" +
"(`Aufnahmedatum`," +
@@ -260,6 +262,7 @@ public class DBHandler {
station.setBezeichnung(rs.getString("bezeichnung"));
station.setBezeichnungLang(rs.getString("bezeichnunglang"));
station.setStationstyp(rs.getInt("stationstyp"));
station.setAbteilung(rs.getString("abteilung"));

return station;
}


+ 29
- 17
src/main/java/de/uniluebeck/mi/projmi6/model/Station.java 查看文件

@@ -10,57 +10,69 @@ public class Station {
private SimpleStringProperty bezeichnung = new SimpleStringProperty(this, "bezeichnung");
private SimpleStringProperty bezeichnungLang = new SimpleStringProperty(this, "bezeichnungLang");
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) {
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) {
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) {
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) {
this.stationstyp.set(stationstyp);
}

public SimpleIntegerProperty stationstypProperty() {
return stationstyp;
}

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


Loading…
取消
儲存