Package com.ubs.backend.classes.database
Class Match
java.lang.Object
com.ubs.backend.classes.database.Match
Dataclass to store all Results with their answer, tag, upvotes, downvotes and usages
- Since:
- 17.07.2021
- Author:
- Marc Andri Fuchs
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintlonggetTag()intgetWord()voidsetDownvote(int downvote)voidsetMatchID(int id)voidvoidsetUpvote(int upvote)voidtoString()
-
Field Details
-
matchID
private long matchIDThe ID in the Database- Since:
- 17.07.2021
-
tag
The Tag which is matched with the Word- Since:
- 17.07.2021
-
word
The Word which was matched with the Tag- Since:
- 17.07.2021
-
upvote
private int upvoteThe amount of upvotes this Match has- Since:
- 17.07.2021
-
downvote
private int downvoteThe amount of downvotes this Match has- Since:
- 17.07.2021
-
-
Constructor Details
-
Match
public Match()No-args constructor- Since:
- 17.07.2021
-
Match
All-args constructor- Parameters:
tag- the Tag which was matchedword- the Word which was matchedupvote- the amount of Upvotes this Match hasdownvote- the amount of Downvotes this Match has- Since:
- 17.07.2021
-
Match
- Parameters:
tag-word-- Since:
- 21.07.2021
-
-
Method Details
-
getMatchID
public long getMatchID()- Returns:
- the ID of this match
- Since:
- 17.07.2021
-
setMatchID
public void setMatchID(int id)- Parameters:
id- the new ID for the Match- Since:
- 17.07.2021
-
getTag
- Returns:
- the tag of this match
- Since:
- 17.07.2021
-
setTag
- Parameters:
tag- the new Tag for this match- Since:
- 17.07.2021
-
getWord
- Returns:
- the Word of this Match
- Since:
- 17.07.2021
-
setWord
- Parameters:
word- the new Word for the this Match- Since:
- 17.07.2021
-
getUpvote
public int getUpvote()- Returns:
- the amount of Upvotes this Match received
- Since:
- 17.07.2021
-
setUpvote
public void setUpvote(int upvote)- Parameters:
upvote- the new amount of Upvotes for this Match- Since:
- 17.07.2021
-
getDownvote
public int getDownvote()- Returns:
- the amount of Downvotes this Match received
- Since:
- 17.07.2021
-
setDownvote
public void setDownvote(int downvote)- Parameters:
downvote- the new amount of Downvotes for this Match- Since:
- 17.07.2021
-
toString
-