SoccerMatch.java 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  1. package objects;
  2. import java.math.BigDecimal;
  3. import java.time.LocalDateTime;
  4. import objects.bets.Bet;
  5. public class SoccerMatch {
  6. private LocalDateTime gameDate;
  7. private Team homeTeam;
  8. private Team awayTeam;
  9. private int matchId;
  10. private int homeScore; // Actual Result home
  11. private int awayScore; // Actual Result away
  12. private String season;
  13. private boolean countryPrio;
  14. private String homeTeamName;
  15. private String awayTeamName;
  16. private float odds1;
  17. private float oddsX;
  18. private float odds2;
  19. private BigDecimal goalsHome;
  20. private BigDecimal goalsAway;
  21. private BigDecimal goalsDiff;
  22. private float avgScoreHome;
  23. private float avgScoreAway;
  24. private float avgConcededHome;
  25. private float avgConcededAway;
  26. private String leagueName;
  27. private String countryName;
  28. private String homeWin;
  29. private String draw;
  30. private String awayWin;
  31. private Float scoringScore;
  32. private Float ownOdds;
  33. private Float givenOdds;
  34. private Float percentageToBet;
  35. private boolean addToBetSlip;
  36. private Float betAmount;
  37. private float roundedDiff;
  38. private float drawPercentage;
  39. private String analysisValue;
  40. private Bet bet;
  41. public SoccerMatch() {
  42. }
  43. public void setMatchData(SoccerMatch match) {
  44. this.matchId = match.getMatchId();
  45. this.homeTeam = match.getHomeTeam();
  46. this.awayTeam = match.getAwayTeam();
  47. this.odds1 = match.getOdds1();
  48. this.oddsX = match.getOddsX();
  49. this.odds2 = match.getOdds2();
  50. this.homeScore = match.getHomeScore();
  51. this.awayScore = match.getAwayScore();
  52. this.gameDate = match.getGameDate();
  53. this.season = match.getSeason();
  54. this.homeTeamName = homeTeam.getTeamName();
  55. this.awayTeamName = awayTeam.getTeamName();
  56. }
  57. public SoccerMatch(int id, Team homeTeam, Team awayTeam, float odds1, float oddsX, float odds2, int homeScore,
  58. int awayScore,
  59. LocalDateTime gameDate, String season) {
  60. this.matchId = id;
  61. this.homeTeam = homeTeam;
  62. this.awayTeam = awayTeam;
  63. this.odds1 = odds1;
  64. this.oddsX = oddsX;
  65. this.odds2 = odds2;
  66. this.homeScore = homeScore;
  67. this.awayScore = awayScore;
  68. this.gameDate = gameDate;
  69. this.season = season;
  70. this.homeTeamName = homeTeam.getTeamName();
  71. this.awayTeamName = awayTeam.getTeamName();
  72. }
  73. public Team getHomeTeam() {
  74. return homeTeam;
  75. }
  76. public Team getAwayTeam() {
  77. return awayTeam;
  78. }
  79. public int getMatchId() {
  80. return matchId;
  81. }
  82. public int getHomeScore() {
  83. return homeScore;
  84. }
  85. public int getAwayScore() {
  86. return awayScore;
  87. }
  88. public float getOdds1() {
  89. return odds1;
  90. }
  91. public float getOddsX() {
  92. return oddsX;
  93. }
  94. public float getOdds2() {
  95. return odds2;
  96. }
  97. public BigDecimal getGoalsHome() {
  98. return goalsHome;
  99. }
  100. public void setGoalsHome(BigDecimal goalsHome) {
  101. this.goalsHome = goalsHome;
  102. }
  103. public BigDecimal getGoalsAway() {
  104. return goalsAway;
  105. }
  106. public void setGoalsAway(BigDecimal goalsAway) {
  107. this.goalsAway = goalsAway;
  108. }
  109. public BigDecimal getGoalsDiff() {
  110. return goalsDiff;
  111. }
  112. public void setGoalsDiff(BigDecimal goalsDiff) {
  113. this.goalsDiff = goalsDiff;
  114. }
  115. public float getAvgScoreHome() {
  116. return avgScoreHome;
  117. }
  118. public void setAvgScoreHome(float avgScoreHome) {
  119. this.avgScoreHome = avgScoreHome;
  120. }
  121. public float getAvgScoreAway() {
  122. return avgScoreAway;
  123. }
  124. public void setAvgScoreAway(float avgScoreAway) {
  125. this.avgScoreAway = avgScoreAway;
  126. }
  127. public float getAvgConcededHome() {
  128. return avgConcededHome;
  129. }
  130. public void setAvgConcededHome(float avgConcedeHome) {
  131. this.avgConcededHome = avgConcedeHome;
  132. }
  133. public float getAvgConcededAway() {
  134. return avgConcededAway;
  135. }
  136. public void setAvgConcededAway(float avgConcedeAway) {
  137. this.avgConcededAway = avgConcedeAway;
  138. }
  139. public void setHomeTeam(Team homeTeam) {
  140. this.homeTeam = homeTeam;
  141. }
  142. public void setAwayTeam(Team awayTeam) {
  143. this.awayTeam = awayTeam;
  144. }
  145. public void setMatchId(int matchId) {
  146. this.matchId = matchId;
  147. }
  148. public void setHomeScore(int homeScore) {
  149. this.homeScore = homeScore;
  150. }
  151. public void setAwayScore(int awayScore) {
  152. this.awayScore = awayScore;
  153. }
  154. public void setOdds1(float odds1) {
  155. this.odds1 = odds1;
  156. }
  157. public void setOddsX(float oddsX) {
  158. this.oddsX = oddsX;
  159. }
  160. public void setOdds2(float odds2) {
  161. this.odds2 = odds2;
  162. }
  163. public LocalDateTime getGameDate() {
  164. return gameDate;
  165. }
  166. public void setGameDate(LocalDateTime gameDate) {
  167. this.gameDate = gameDate;
  168. }
  169. public String getSeason() {
  170. return season;
  171. }
  172. public void setSeason(String season) {
  173. this.season = season;
  174. }
  175. public boolean isCountryPrio() {
  176. return countryPrio;
  177. }
  178. public String getHomeTeamName() {
  179. return homeTeamName;
  180. }
  181. public void setHomeTeamName(String homeTeamName) {
  182. this.homeTeamName = homeTeamName;
  183. }
  184. public String getAwayTeamName() {
  185. return awayTeamName;
  186. }
  187. public void setAwayTeamName(String awayTeamName) {
  188. this.awayTeamName = awayTeamName;
  189. }
  190. public void setCountryPrio(boolean countryPrio) {
  191. this.countryPrio = countryPrio;
  192. }
  193. public String getLeagueName() {
  194. return leagueName;
  195. }
  196. public void setLeagueName(String leagueName) {
  197. this.leagueName = leagueName;
  198. }
  199. public String getCountryName() {
  200. return countryName;
  201. }
  202. public void setCountryName(String countryName) {
  203. this.countryName = countryName;
  204. }
  205. public String getHomeWin() {
  206. return homeWin;
  207. }
  208. public void setHomeWin(String homeWin) {
  209. this.homeWin = homeWin;
  210. }
  211. public String getDraw() {
  212. return draw;
  213. }
  214. public void setDraw(String draw) {
  215. this.draw = draw;
  216. }
  217. public String getAwayWin() {
  218. return awayWin;
  219. }
  220. public void setAwayWin(String awayWin) {
  221. this.awayWin = awayWin;
  222. }
  223. public Float getScoringScore() {
  224. return scoringScore;
  225. }
  226. public void setScoringScore(Float scoringScore) {
  227. this.scoringScore = scoringScore;
  228. }
  229. public Float getOwnOdds() {
  230. return ownOdds;
  231. }
  232. public void setOwnOdds(Float ownOddsPerdiction) {
  233. this.ownOdds = ownOddsPerdiction;
  234. }
  235. public Float getGivenOdds() {
  236. return givenOdds;
  237. }
  238. public void setGivenOdds(Float givenOdds) {
  239. this.givenOdds = givenOdds;
  240. }
  241. public Float getPercentageToBet() {
  242. return percentageToBet;
  243. }
  244. public void setPercentageToBet(Float percentageToBet) {
  245. this.percentageToBet = percentageToBet;
  246. }
  247. public boolean isAddToBetSlip() {
  248. return addToBetSlip;
  249. }
  250. public void setAddToBetSlip(boolean addToBetSlip) {
  251. this.addToBetSlip = addToBetSlip;
  252. }
  253. public void setBetAmount(Float value) {
  254. betAmount = value;
  255. }
  256. public Float getBetAmount() {
  257. return betAmount;
  258. }
  259. public void setRoundedDiff(float roundedDiff) {
  260. this.roundedDiff = roundedDiff;
  261. }
  262. public float getRoundedDiff() {
  263. return roundedDiff;
  264. }
  265. public void setDrawPercetage(float drawPercentage) {
  266. this.drawPercentage = drawPercentage;
  267. }
  268. public float getDrawPercent() {
  269. return this.drawPercentage;
  270. }
  271. public String getAnalysisValue() {
  272. return analysisValue;
  273. }
  274. public void setAnalysisValue(int analysisValue) {
  275. this.analysisValue = analysisValue == 0 ? "No Bet" : String.valueOf(analysisValue);
  276. }
  277. public int getAnalysisValueInt() {
  278. Integer intValue;
  279. try {
  280. intValue = Integer.valueOf(getAnalysisValue());
  281. } catch (NumberFormatException e) {
  282. intValue = 0;
  283. }
  284. return intValue;
  285. }
  286. public Bet getPreviousBet() {
  287. return bet;
  288. }
  289. public void setPreviousBet(Bet bet) {
  290. this.bet = bet;
  291. }
  292. }