diff --git a/src/de/steamwar/sql/EventFight.java b/src/de/steamwar/sql/EventFight.java index 48faf81..7214d12 100644 --- a/src/de/steamwar/sql/EventFight.java +++ b/src/de/steamwar/sql/EventFight.java @@ -46,8 +46,8 @@ public class EventFight { private static final Statement setResult = table.update(Table.PRIMARY, "Ergebnis"); private static final Statement setFight = table.update(Table.PRIMARY, "Fight"); private static final SelectStatement byEvent = table.selectFields("eventID"); - private static final Statement update = table.update(Table.PRIMARY, "startTime", "spielModus", "map", "teamBlue", "teamRed", "kampfleiter"); - private static final Statement create = table.insertFields(true, "eventID", "startTime", "spielModus", "map", "teamBlue", "teamRed", "spectatePort"); + private static final Statement update = table.update(Table.PRIMARY, "startTime", "spielModus", "map", "teamBlue", "teamRed", "spectatePort"); + private static final Statement create = table.insertFields(true, "eventID", "startTime", "spielModus", "map", "teamBlue", "teamRed", "spectatePort", "kampfleiter"); private static final Statement delete = table.delete(Table.PRIMARY); private static final Queue fights = new PriorityQueue<>(); @@ -56,8 +56,8 @@ public class EventFight { return byId.select(fightID); } - public static EventFight create(int eventID, Timestamp startTime, String spielModus, String map, int teamBlue, int teamRed, int kampfleiter) { - return EventFight.get(create.insertGetKey(eventID, startTime, spielModus, map, teamBlue, teamRed, kampfleiter)); + public static EventFight create(int eventID, Timestamp startTime, String spielModus, String map, int teamBlue, int teamRed, Integer spectatePort) { + return EventFight.get(create.insertGetKey(eventID, startTime, spielModus, map, teamBlue, teamRed, spectatePort, 0)); } public static List getFromEvent(int eventID) { diff --git a/src/de/steamwar/sql/Referee.java b/src/de/steamwar/sql/Referee.java index 013eea1..8cd7e75 100644 --- a/src/de/steamwar/sql/Referee.java +++ b/src/de/steamwar/sql/Referee.java @@ -32,7 +32,7 @@ import java.util.stream.Collectors; public class Referee { private static final Table table = new Table<>(Referee.class); - private static final SelectStatement byEvent = table.select("eventID"); + private static final SelectStatement byEvent = table.selectFields("eventID"); private static final Statement insert = table.insertAll(); private static final Statement delete = table.delete("eventReferee");