Modifier and Type | Class and Description |
---|---|
static class |
Bet.Companion
Companion object that implements static methods to generate the model using a
JSONObject.
|
Modifier and Type | Field and Description |
---|---|
static Bet.Companion |
Companion
Companion object that implements static methods to generate the model using a
JSONObject.
|
Constructor and Description |
---|
Bet(int id,
int userId,
User user,
int matchId,
Match match,
int homeScore,
int awayScore,
int points)
Model class that models a Bet
|
Modifier and Type | Method and Description |
---|---|
int |
component1()
:
|
int |
component2()
:
|
User |
component3()
:
|
int |
component4()
:
|
Match |
component5()
:
|
int |
component6()
:
|
int |
component7()
:
|
int |
component8()
:
|
Bet |
copy(int id,
int userId,
User user,
int matchId,
Match match,
int homeScore,
int awayScore,
int points)
Model class that models a Bet
|
boolean |
equals(java.lang.Object p) |
int |
getAwayScore()
:
|
int |
getHomeScore()
:
|
int |
getId()
:
|
Match |
getMatch()
:
|
int |
getMatchId()
:
|
int |
getPoints()
:
|
User |
getUser()
:
|
int |
getUserId()
:
|
int |
hashCode() |
org.json.JSONObject |
toJson()
Converts the model object into a JSON object
|
java.lang.String |
toString() |
public static Bet.Companion Companion
Companion object that implements static methods to generate the model using a JSONObject.
public Bet(int id, int userId, User user, int matchId, Match match, int homeScore, int awayScore, int points)
Model class that models a Bet
id
- : The database ID of the betuserId
- : The ID of the user that bet this betuser
- : The user that bet this betmatchId
- : The ID of the match this bet was bet formatch
- : The match that this bet was bet forhomeScore
- : The score bet on the home teamawayScore
- : The score bet on the away teampoints
- : The amount of points scored for this betid
- : The database ID of the betuserId
- : The ID of the user that bet this betuser
- : The user that bet this betmatchId
- : The ID of the match this bet was bet formatch
- : The match that this bet was bet forhomeScore
- : The score bet on the home teamawayScore
- : The score bet on the away teampoints
- : The amount of points scored for this betpublic org.json.JSONObject toJson()
Converts the model object into a JSON object
public int getId()
:
The database ID of the bet
public int getUserId()
:
The ID of the user that bet this bet
public User getUser()
:
The user that bet this bet
public int getMatchId()
:
The ID of the match this bet was bet for
public Match getMatch()
:
The match that this bet was bet for
public int getHomeScore()
:
The score bet on the home team
public int getAwayScore()
:
The score bet on the away team
public int getPoints()
:
The amount of points scored for this bet
public int component1()
:
The database ID of the bet
public int component2()
:
The ID of the user that bet this bet
public User component3()
:
The user that bet this bet
public int component4()
:
The ID of the match this bet was bet for
public Match component5()
:
The match that this bet was bet for
public int component6()
:
The score bet on the home team
public int component7()
:
The score bet on the away team
public int component8()
:
The amount of points scored for this bet
public Bet copy(int id, int userId, User user, int matchId, Match match, int homeScore, int awayScore, int points)
Model class that models a Bet
id
- : The database ID of the betuserId
- : The ID of the user that bet this betuser
- : The user that bet this betmatchId
- : The ID of the match this bet was bet formatch
- : The match that this bet was bet forhomeScore
- : The score bet on the home teamawayScore
- : The score bet on the away teampoints
- : The amount of points scored for this betpublic java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object p)