Only update result if api football match is finished
This commit is contained in:
@@ -2,10 +2,18 @@ package de.jeyp91;
|
||||
|
||||
public abstract class BaseMatch {
|
||||
|
||||
public static final Integer COMPARISON_IDENTICAL = 0;
|
||||
public static final Integer COMPARISON_DIFFERENT = 1;
|
||||
public static final Integer COMPARISON_DIFFERENT_DATETIME = 2;
|
||||
public static final Integer COMPARISON_DIFFERENT_RESULT = 3;
|
||||
public static final Integer STATUS_NOTSTARTED = 0;
|
||||
public static final Integer STATUS_STARTED = 1;
|
||||
public static final Integer STATUS_PROVISIONAL_RESULT_AVAILABLE = 2;
|
||||
public static final Integer STATUS_FINISHED = 3;
|
||||
public static final Integer STATUS_NOT_EVALUATED = 4;
|
||||
|
||||
public enum COMPARISON {
|
||||
IDENTICAL,
|
||||
DIFFERENT,
|
||||
DIFFERENT_DATETIME,
|
||||
DIFFERENT_RESULT
|
||||
}
|
||||
|
||||
protected Integer teamIdHome;
|
||||
protected Integer teamIdGuest;
|
||||
@@ -19,8 +27,8 @@ public abstract class BaseMatch {
|
||||
protected Integer goalsPenaltyGuest = null;
|
||||
protected Integer matchday = null;
|
||||
protected String matchDatetime = null;
|
||||
|
||||
protected Integer updateStatus = COMPARISON_IDENTICAL;
|
||||
protected Integer status = null;
|
||||
protected COMPARISON updateStatus = COMPARISON.IDENTICAL;
|
||||
|
||||
public Integer getMatchday() {
|
||||
return this.matchday;
|
||||
@@ -70,9 +78,17 @@ public abstract class BaseMatch {
|
||||
return this.teamNameGuest;
|
||||
}
|
||||
|
||||
public void setUpdateStatus(Integer newStatus) { this.updateStatus = newStatus; }
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getUpdateStatus() {
|
||||
public Integer getStatus() {
|
||||
return this.status;
|
||||
}
|
||||
|
||||
public void setUpdateStatus(COMPARISON newStatus) { this.updateStatus = newStatus; }
|
||||
|
||||
public COMPARISON getUpdateStatus() {
|
||||
return this.updateStatus;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user