diff --git a/src/main/java/de/uniluebeck/mi/projmi6/db/DBHandler.java b/src/main/java/de/uniluebeck/mi/projmi6/db/DBHandler.java index fd2c2f7..789570a 100644 --- a/src/main/java/de/uniluebeck/mi/projmi6/db/DBHandler.java +++ b/src/main/java/de/uniluebeck/mi/projmi6/db/DBHandler.java @@ -154,6 +154,7 @@ public class DBHandler { "`LetzterBearbeiter`," + "`FallID`) " + "VALUES (?, ?, ?, ?, ?, ?, ?, ?)"; + private static final String DELETE_STATHIST = "DELETE FROM `stationshistorie` WHERE `StatHistID` =?"; /** * Gibt alle {@link Patient} aus der DB zurueck. @@ -371,6 +372,12 @@ public class DBHandler { } } + public static void delStationsHistorie(StationsHistorie hist) throws SQLException { + PreparedStatement statement = MySqlConnectionFactory.getConnection().prepareStatement(DELETE_STATHIST); + statement.setInt(1, hist.getStatHistID()); + statement.execute(); + } + private static StationsHistorie getStationsHistorie(ResultSet rs) throws SQLException { StationsHistorie hist = new StationsHistorie();