Class CompleteRoundCiImpl

java.lang.Object
com.sportradar.unifiedodds.sdk.internal.caching.ci.CompleteRoundCiImpl
All Implemented Interfaces:
CompleteRoundCi, RoundCi

public class CompleteRoundCiImpl extends Object implements CompleteRoundCi
A round representation used by caching components. The cache item exists as a whole object, there is no support for partial loading
  • Constructor Details

    • CompleteRoundCiImpl

      public CompleteRoundCiImpl(com.sportradar.uf.sportsapi.datamodel.SapiMatchRound round, Locale locale)
      Initializes a new instance of the CompleteRoundCiImpl class
      Parameters:
      round - - SapiMatchRound containing information about the round
      locale - - Locale specifying the language of the round
    • CompleteRoundCiImpl

      public CompleteRoundCiImpl(ExportableCompleteRoundCi exportable)
  • Method Details

    • merge

      public void merge(com.sportradar.uf.sportsapi.datamodel.SapiMatchRound round, Locale locale)
      Merges the information from the provided SapiMatchRound into the current instance
      Specified by:
      merge in interface CompleteRoundCi
      Parameters:
      round - - SapiMatchRound containing information about the round
      locale - - Locale specifying the language of the round
    • getType

      public String getType()
      Returns the type of the round
      Specified by:
      getType in interface RoundCi
      Returns:
      - the type of the round
    • getGroup

      public String getGroup()
      Returns the name of the group associated with the current round
      Specified by:
      getGroup in interface RoundCi
      Returns:
      - the name of the group associated with the current round
    • getGroupId

      public Urn getGroupId()
      Returns the id of the group associated with the current round
      Specified by:
      getGroupId in interface RoundCi
      Returns:
      - the id of the group associated with the current round
    • getOtherMatchId

      public String getOtherMatchId()
      Returns the id of the other match
      Specified by:
      getOtherMatchId in interface RoundCi
      Returns:
      - the id of the other match
    • getNumber

      public Integer getNumber()
      Returns a value specifying the round number or a null reference if round number is not defined
      Specified by:
      getNumber in interface RoundCi
      Returns:
      - a value specifying the round number or a null reference if round number is not defined
    • getCupRoundMatches

      public Integer getCupRoundMatches()
      Returns a value specifying the number of matches in the current cup round or a null reference if number of matches is not applicable to current instance
      Specified by:
      getCupRoundMatches in interface RoundCi
      Returns:
      - a value specifying the number of matches in the current cup round or a null reference if number of matches is not applicable to current instance
    • getCupRoundMatchNumber

      public Integer getCupRoundMatchNumber()
      Returns a value specifying the number of the match in the current cup round or a null reference if match number is not applicable to current instance
      Specified by:
      getCupRoundMatchNumber in interface RoundCi
      Returns:
      - a value specifying the number of the match in the current cup round or a null reference if match number is not applicable to current instance
    • getBetradarId

      public Integer getBetradarId()
      Returns the betradar identifier
      Specified by:
      getBetradarId in interface RoundCi
      Returns:
      - the betradar identifier; or null if unavailable
    • getName

      public String getName(Locale locale)
      Returns the name for specific locale
      Specified by:
      getName in interface RoundCi
      Parameters:
      locale - - Locale specifying the language of the returned nationality
      Returns:
      - Return the name if exists, or null
    • getPhaseOrGroupLongName

      public String getPhaseOrGroupLongName(Locale locale)
      Returns the name or group long name for the specified locale
      Specified by:
      getPhaseOrGroupLongName in interface RoundCi
      Parameters:
      locale - Locale specifying the language of the value
      Returns:
      the name or group long name if exists, or null
    • getPhase

      public String getPhase()
      Returns the phase of the round
      Specified by:
      getPhase in interface RoundCi
      Returns:
      the phase of the round
    • getBetradarName

      public String getBetradarName()
      Returns the betradar name
      Specified by:
      getBetradarName in interface RoundCi
      Returns:
      the betradar name
    • hasTranslationsFor

      public boolean hasTranslationsFor(List<Locale> locales)
      Checks if the associated cache item contains all the provided Locales
      Specified by:
      hasTranslationsFor in interface CompleteRoundCi
      Parameters:
      locales - the Locales that should be checked
      Returns:
      true if all the provided Locales are cached, otherwise false
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • export

      public ExportableCompleteRoundCi export()