Class Match

java.lang.Object
com.ubs.backend.classes.database.Match

@Entity public class Match extends Object
Dataclass to store all Results with their answer, tag, upvotes, downvotes and usages
Since:
17.07.2021
Author:
Marc Andri Fuchs
  • Field Details

    • matchID

      private long matchID
      The ID in the Database
      Since:
      17.07.2021
    • tag

      private Tag tag
      The Tag which is matched with the Word
      Since:
      17.07.2021
    • word

      private String word
      The Word which was matched with the Tag
      Since:
      17.07.2021
    • upvote

      private int upvote
      The amount of upvotes this Match has
      Since:
      17.07.2021
    • downvote

      private int downvote
      The amount of downvotes this Match has
      Since:
      17.07.2021
  • Constructor Details

    • Match

      public Match()
      No-args constructor
      Since:
      17.07.2021
    • Match

      public Match(Tag tag, String word, int upvote, int downvote)
      All-args constructor
      Parameters:
      tag - the Tag which was matched
      word - the Word which was matched
      upvote - the amount of Upvotes this Match has
      downvote - the amount of Downvotes this Match has
      Since:
      17.07.2021
    • Match

      public Match(Tag tag, String word)
      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

      public Tag getTag()
      Returns:
      the tag of this match
      Since:
      17.07.2021
    • setTag

      public void setTag(Tag tag)
      Parameters:
      tag - the new Tag for this match
      Since:
      17.07.2021
    • getWord

      public String getWord()
      Returns:
      the Word of this Match
      Since:
      17.07.2021
    • setWord

      public void setWord(String word)
      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

      public String toString()
      Overrides:
      toString in class Object