Add show table update, add matches list creator

This commit is contained in:
2020-10-31 20:26:47 +01:00
parent 57baee27bd
commit 3a5df3cae6
17 changed files with 195 additions and 32 deletions

View File

@@ -199,6 +199,10 @@ public class TLWMatch extends BaseMatch{
return this.groupId;
}
public Integer getShowTable() {
return this.showTable;
}
public String getFormulaHome() {
String formula = "'D'";
if(this.teamIdHome != null) {
@@ -270,9 +274,15 @@ public class TLWMatch extends BaseMatch{
this.matchDatetime = matchDateTime;
}
public void setShowTable(Boolean showTable) {
this.showTable = showTable ? 0 : 1;
}
public void updateMatch(APIFootballMatch apiFootballMatch) {
this.teamIdHome = TeamIDMatcher.getTippligaIdFromApiFootballId(apiFootballMatch.getTeamIdHome());
this.teamIdGuest = TeamIDMatcher.getTippligaIdFromApiFootballId(apiFootballMatch.getTeamIdGuest());
this.teamNameHome = apiFootballMatch.getTeamNameHome();
this.teamNameGuest = apiFootballMatch.getTeamNameGuest();
this.goalsHome = apiFootballMatch.getGoalsHome();
this.goalsGuest = apiFootballMatch.getGoalsGuest();
this.matchDatetime = apiFootballMatch.getMatchDateTime().replace("T", " ").substring(0, 19);