java.lang.Object
com.sportradar.unifiedodds.sdk.internal.impl.entities.TournamentImpl
All Implemented Interfaces:
LongTermEvent, SportEvent, Tournament, PreloadableEntity

public class TournamentImpl extends Object implements Tournament, PreloadableEntity
Represents a sport tournament
  • Constructor Details

    • TournamentImpl

      public TournamentImpl(Urn id, Urn sportId, List<Locale> locales, SportEventCache sportEventCache, SportEntityFactory sportEntityFactory, ExceptionHandlingStrategy exceptionHandlingStrategy)
      Initializes a new TournamentImpl instance
      Parameters:
      id - an Urn uniquely identifying the tournament associated with the current instance
      sportId - an Urn identifying the sport to which the tournament belongs
      locales - a List of all languages for this instance
      sportEventCache - the cache used to retrieve additional sport event data
      sportEntityFactory - a SportEntityFactory instance used to construct Competition instances
      exceptionHandlingStrategy - the desired exception handling strategy
  • Method Details

    • getName

      public String getName(Locale locale)
      Returns the name of the current long term event translated to the specified language
      Specified by:
      getName in interface SportEvent
      Parameters:
      locale - - a Locale specifying in which language the name should be returned
      Returns:
      - the name of the current long term event translated to the specified language
    • getScheduledTime

      public Date getScheduledTime()
      Returns the Date specifying when the sport event associated with the current instance was scheduled
      Specified by:
      getScheduledTime in interface SportEvent
      Returns:
      - a Date instance specifying when the sport event associated with the current instance was scheduled
    • getScheduledEndTime

      public Date getScheduledEndTime()
      Returns the Date specifying when the sport event associated with the current instance was scheduled to end
      Specified by:
      getScheduledEndTime in interface SportEvent
      Returns:
      - a Date instance specifying when the sport event associated with the current instance was scheduled to end
    • isStartTimeTbd

      public Boolean isStartTimeTbd()
      Returns the Boolean specifying if the start time to be determined is set for the current instance
      Specified by:
      isStartTimeTbd in interface SportEvent
      Returns:
      if available, the Boolean specifying if the start time to be determined is set for the current instance
    • getReplacedBy

      public Urn getReplacedBy()
      Returns the Urn specifying the replacement sport event for the current instance
      Specified by:
      getReplacedBy in interface SportEvent
      Returns:
      if available, the Urn specifying the replacement sport event for the current instance
    • getCategory

      public CategorySummary getCategory()
      Returns a CategorySummary representing the category associated with the current instance
      Specified by:
      getCategory in interface Tournament
      Returns:
      - a CategorySummary representing the category associated with the current instance
    • getCurrentSeason

      public CurrentSeasonInfo getCurrentSeason()
      Returns a CurrentSeasonInfo which contains data about the season in which the current instance tournament is happening
      Specified by:
      getCurrentSeason in interface Tournament
      Returns:
      - a CurrentSeasonInfo which provides data about the season in which the current instance tournament is happening
    • getSport

      public SportSummary getSport()
      Returns a SportSummary instance representing the sport associated with the current instance
      Specified by:
      getSport in interface LongTermEvent
      Returns:
      a SportSummary instance representing the sport associated with the current instance
    • getTournamentCoverage

      public TournamentCoverage getTournamentCoverage()
      Returns a TournamentCoverage instance which describes the associated tournament coverage information
      Specified by:
      getTournamentCoverage in interface LongTermEvent
      Returns:
      a TournamentCoverage instance describing the tournament coverage information
    • getSportId

      public Urn getSportId()
      Returns the associated sport identifier (This method its overridden because the superclass SportEvent does not contain the sportId in all cases)
      Specified by:
      getSportId in interface SportEvent
      Returns:
      the unique sport identifier to which this event is associated
    • getSeasons

      public List<Season> getSeasons()
      Returns a list of associated tournament seasons
      Specified by:
      getSeasons in interface Tournament
      Returns:
      a list of associated tournament seasons
    • isExhibitionGames

      public Boolean isExhibitionGames()
      Returns the Boolean specifying if the tournament is exhibition game
      Specified by:
      isExhibitionGames in interface Tournament
      Returns:
      if available, the Boolean specifying if the tournament is exhibition game
    • getSchedule

      public List<Competition> getSchedule()
      Returns a List of events that belong to the associated tournament
      Specified by:
      getSchedule in interface Tournament
      Returns:
      - a List of events that belong to the associated tournament
    • toString

      public String toString()
      Returns a String describing the current Tournament instance
      Overrides:
      toString in class Object
      Returns:
      - a String describing the current Tournament instance
    • ensureSummaryIsFetchedForLanguages

      public void ensureSummaryIsFetchedForLanguages(List<Locale> languages, RequestOptions requestOptions)
      Specified by:
      ensureSummaryIsFetchedForLanguages in interface PreloadableEntity
    • getId

      public Urn getId()
      Returns an Urn uniquely identifying the tournament associated with the current instance
      Specified by:
      getId in interface SportEvent
      Returns:
      - an Urn uniquely identifying the tournament associated with the current instance