java.lang.Object
com.sportradar.unifiedodds.sdk.internal.caching.impl.ci.DrawCiImpl
All Implemented Interfaces:
CacheItem, DrawCi, SportEventCi, ExportableCacheItem

public class DrawCiImpl extends Object implements DrawCi, ExportableCacheItem
A draw cache item implementation
  • Method Details

    • getId

      public Urn getId()
      Returns the Urn representing id of the related entity
      Specified by:
      getId in interface CacheItem
      Returns:
      the Urn representing id of the related entity
    • getScheduled

      public Date getScheduled()
      Returns the Date specifying when the sport event associated with the current instance was scheduled
      Specified by:
      getScheduled in interface SportEventCi
      Returns:
      if available, the Date specifying when the sport event associated with the current instance was scheduled; otherwise null;
    • getStatus

      public DrawStatus getStatus()
      Returns the status of the draw
      Specified by:
      getStatus in interface DrawCi
      Returns:
      the status of the draw
    • getResults

      public List<DrawResultCi> getResults(List<Locale> locales)
      Returns a list of draw results
      Specified by:
      getResults in interface DrawCi
      Parameters:
      locales - a List specifying the required languages
      Returns:
      a list of draw results
    • getLotteryId

      public Urn getLotteryId()
      Returns the associated lottery id
      Specified by:
      getLotteryId in interface DrawCi
      Returns:
      the associated lottery id
    • getDisplayId

      public Integer getDisplayId()
      Returns the display id
      Specified by:
      getDisplayId in interface DrawCi
      Returns:
      the display id
    • getScheduledEnd

      public Date getScheduledEnd()
      Returns the Date specifying when the sport event associated with the current instance was scheduled to end
      Specified by:
      getScheduledEnd in interface SportEventCi
      Returns:
      if available, the Date specifying when the sport event associated with the current instance was scheduled to end; otherwise null;
    • getScheduledRaw

      public Date getScheduledRaw()
      Returns the Date specifying when the sport event associated with the current instance was scheduled (no api request is invoked)
      Specified by:
      getScheduledRaw in interface SportEventCi
      Returns:
      if available, the Date specifying when the sport event associated with the current instance was scheduled; otherwise null;
    • getScheduledEndRaw

      public Date getScheduledEndRaw()
      Returns the Date specifying when the sport event associated with the current instance was scheduled to end (no api request is invoked)
      Specified by:
      getScheduledEndRaw in interface SportEventCi
      Returns:
      if available, the Date specifying when the sport event associated with the current instance was scheduled to end; otherwise null;
    • isStartTimeTbd

      public Optional<Boolean> isStartTimeTbd()
      Returns the Boolean specifying if the start time to be determined is set for the current instance
      Specified by:
      isStartTimeTbd in interface SportEventCi
      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 SportEventCi
      Returns:
      if available, the Urn specifying the replacement sport event for the current instance
    • getNames

      public Map<Locale,String> getNames(List<Locale> locales)
      Returns the Map containing translated names of the item
      Specified by:
      getNames in interface CacheItem
      Parameters:
      locales - a List specifying the required languages
      Returns:
      the Map containing translated names of the item
    • hasTranslationsLoadedFor

      public boolean hasTranslationsLoadedFor(List<Locale> localeList)
      Determines whether the current instance has translations for the specified languages
      Specified by:
      hasTranslationsLoadedFor in interface CacheItem
      Parameters:
      localeList - a List specifying the required languages
      Returns:
      true if the current instance contains data in the required locals, otherwise false.
    • merge

      public <T> void merge(T endpointData, Locale dataLocale)
      Merges the new provided data into the cache item
      Specified by:
      merge in interface CacheItem
      Type Parameters:
      T - the type in which the data is provided
      Parameters:
      endpointData - the data to be merged
      dataLocale - the locale in which the data is provided
    • export

      public ExportableCi export()
      Description copied from interface: ExportableCacheItem
      Export item's properties
      Specified by:
      export in interface ExportableCacheItem
      Returns:
      An ExportableCi instance containing all relevant properties