public class SportEntityFactoryImpl extends Object implements SportEntityFactory
Competition and Tournament instances| Constructor and Description | 
|---|
SportEntityFactoryImpl(SportsDataCache sportsDataCache,
                      SportEventCache sportEventCache,
                      ProfileCache profileCache,
                      SportEventStatusFactory sportEventStatusFactory,
                      MappingTypeProvider mappingTypeProvider,
                      SdkInternalConfiguration oddsFeedConfiguration)
Initializes a new instance of the  
SportEntityFactoryImpl | 
| Modifier and Type | Method and Description | 
|---|---|
CategorySummary | 
buildCategory(Urn id,
             List<Locale> locales)
Builds the associated category summary 
 | 
Competitor | 
buildCompetitor(Urn id,
               String qualifier,
               Integer division,
               Boolean isVirtual,
               SportEventCi parentSportEventCi,
               List<Locale> locales)
Builds a  
Competitor instance associated with the provided Urn | 
CompetitorPlayer | 
buildCompetitorPlayerProfile(Urn id,
                            List<Locale> locales,
                            List<Urn> possibleAssociatedCompetitorIds,
                            Map<Urn,Integer> associatedJerseyNumbers)  | 
PlayerProfile | 
buildPlayerProfile(Urn id,
                  List<Locale> locales,
                  List<Urn> possibleAssociatedCompetitorIds)  | 
Sport | 
buildSport(Urn sportId,
          List<Locale> locales)
Builds a  
Sport instance with the provided data | 
SportEvent | 
buildSportEvent(Urn id,
               List<Locale> locales,
               boolean buildBasicEventImpl)
Builds the  
Competition derived class based on the provided data | 
SportEvent | 
buildSportEvent(Urn id,
               Urn sportId,
               List<Locale> locales,
               boolean buildBasicEventImpl)
Builds the  
SportEvent derived class based on the provided data | 
List<Competition> | 
buildSportEvents(List<Urn> ids,
                List<Locale> locales)
Builds a list of  
Competition derived classes based on the provided data | 
SportSummary | 
buildSportForCategory(Urn categoryId,
                     List<Locale> locales)
Builds the associated category sport summary 
 | 
List<Sport> | 
buildSports(List<Locale> locales)
 | 
List<Competitor> | 
buildStreamCompetitors(List<Urn> competitorIds,
                      SportEventCi parentSportEventCi,
                      List<Locale> locales)
Builds a  
List of Competitor instances
 Notice: a StreamWrapperException is thrown if any problems are encountered | 
@Inject public SportEntityFactoryImpl(SportsDataCache sportsDataCache, SportEventCache sportEventCache, ProfileCache profileCache, SportEventStatusFactory sportEventStatusFactory, MappingTypeProvider mappingTypeProvider, SdkInternalConfiguration oddsFeedConfiguration)
SportEntityFactoryImplsportsDataCache - a SportsDataCache instance used to retrieve sport related infosportEventCache - a SportEventCache instance used to retrieve sport eventsprofileCache - a ProfileCache instance used to retrieve player/competitor profilessportEventStatusFactory - a SportEventStatusFactory instance used to build sport event status entitiesmappingTypeProvider - a MappingTypeProvider instance used to identify proper entity mapping typesoddsFeedConfiguration - the associated feed configurationpublic List<Sport> buildSports(List<Locale> locales) throws ObjectNotFoundException
buildSports in interface SportEntityFactorylocales - - a List of locales specifying the languages used in the returned instancesList with the constructed Sport instancesObjectNotFoundException - if the sports list failed to build with the selected Localespublic Sport buildSport(Urn sportId, List<Locale> locales) throws ObjectNotFoundException
Sport instance with the provided databuildSport in interface SportEntityFactorysportId - - the Urn sport identifierlocales - - a List of locales specifying the languages used in the returned instanceSport instanceObjectNotFoundException - if the requested sport failed to build or was not foundpublic CategorySummary buildCategory(Urn id, List<Locale> locales) throws ObjectNotFoundException
buildCategory in interface SportEntityFactoryid - the identifier of the categorylocales - locales in which the data is providedCategorySummary associated with the current instanceObjectNotFoundException - if the category CI could not be foundpublic SportSummary buildSportForCategory(Urn categoryId, List<Locale> locales) throws ObjectNotFoundException
buildSportForCategory in interface SportEntityFactorycategoryId - the identifier of the categorylocales - locales in which the data is providedSportSummary associated with the current instanceObjectNotFoundException - if the category CI could not be foundpublic SportEvent buildSportEvent(Urn id, List<Locale> locales, boolean buildBasicEventImpl) throws ObjectNotFoundException
Competition derived class based on the provided databuildSportEvent in interface SportEntityFactoryid - - the Urn specifying the identifier of the sport eventlocales - - a List of locales specifying the languages used in the returned instancebuildBasicEventImpl - - an indication if the basic event entity should be built if the mapping type is unknownCompetitionObjectNotFoundException - if the requested sport event object could not be provided(failure built, api request errors,..)public SportEvent buildSportEvent(Urn id, Urn sportId, List<Locale> locales, boolean buildBasicEventImpl) throws ObjectNotFoundException
SportEvent derived class based on the provided databuildSportEvent in interface SportEntityFactoryid - - the Urn specifying the identifier of the sport eventsportId - - the Urn specifying the sport type of the eventlocales - - a List of locales specifying the languages used in the returned instancebuildBasicEventImpl - - an indication if the basic event entity should be built if the mapping type is unknownObjectNotFoundException - if the requested sport event object could not be provided(failure built, api request errors,..)public List<Competition> buildSportEvents(List<Urn> ids, List<Locale> locales) throws ObjectNotFoundException
Competition derived classes based on the provided databuildSportEvents in interface SportEntityFactoryids - - the list of Urn specifying the identifier of the sport events to be builtlocales - - a List of locales specifying the languages used in the returned instanceObjectNotFoundException - if the requested sport event objects could not be provided(failure built, api request errors,..)public Competitor buildCompetitor(Urn id, String qualifier, Integer division, Boolean isVirtual, SportEventCi parentSportEventCi, List<Locale> locales) throws ObjectNotFoundException
Competitor instance associated with the provided UrnbuildCompetitor in interface SportEntityFactoryid - the competitor identifierqualifier - the competitor qualifier (if available)division - the competitor division (if available)isVirtual - parentSportEventCi - the parent SportEventCi this Competitor belongs tolocales - the Locales in which the data should be availableObjectNotFoundException - if the requested instance could not be providedpublic List<Competitor> buildStreamCompetitors(List<Urn> competitorIds, SportEventCi parentSportEventCi, List<Locale> locales)
List of Competitor instances
 Notice: a StreamWrapperException is thrown if any problems are encounteredbuildStreamCompetitors in interface SportEntityFactorycompetitorIds - the ids representing the instances that should be builtparentSportEventCi - the parent SportEventCi this Competitor belongs tolocales - the Locales in which the data should be availablepublic PlayerProfile buildPlayerProfile(Urn id, List<Locale> locales, List<Urn> possibleAssociatedCompetitorIds)
buildPlayerProfile in interface SportEntityFactoryid - the player identifierlocales - the Locales in which the data should be availablepossibleAssociatedCompetitorIds - a list of possible associated competitor ids (used to prefetch data)public CompetitorPlayer buildCompetitorPlayerProfile(Urn id, List<Locale> locales, List<Urn> possibleAssociatedCompetitorIds, Map<Urn,Integer> associatedJerseyNumbers)
buildCompetitorPlayerProfile in interface SportEntityFactoryid - the player identifierlocales - the Locales in which the data should be availablepossibleAssociatedCompetitorIds - a list of possible associated competitor ids (used to prefetch data)Copyright © 2016–2025. All rights reserved.