From d93b846c1f827e2586450496e01d8e46960b4011 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Fri, 15 Mar 2024 22:38:53 +0100 Subject: [PATCH] Add new Referee Stuff --- src/de/steamwar/sql/EventFight.java | 8 ++++---- src/de/steamwar/sql/Referee.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) 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");