Interface SportEntityFactory
- All Known Implementing Classes:
SportEntityFactoryImpl
public interface SportEntityFactory
Defines methods implemented by classes used to build
Sport and Tournament instances.-
Method Summary
Modifier and TypeMethodDescriptionbuildCategory(Urn id, List<Locale> locales) Builds the associated category summarybuildCompetitor(Urn id, String qualifier, Integer division, Boolean isVirtual, SportEventCi parentSportEventCi, List<Locale> locales) Builds aCompetitorinstance associated with the providedUrnbuildCompetitorPlayerProfile(Urn id, List<Locale> locales, List<Urn> possibleAssociatedCompetitorIds, Map<Urn, Integer> associatedJerseyNumbers) buildSport(Urn sportId, List<Locale> locales) Builds aSportinstance with the provided databuildSportEvent(Urn id, Urn sportId, List<Locale> locales, boolean buildBasicEventImpl) Builds theSportEventderived class based on the provided databuildSportEvent(Urn id, List<Locale> locales, boolean buildBasicEventImpl) Builds theCompetitionderived class based on the provided databuildSportEvents(List<Urn> ids, List<Locale> locales) Builds a list ofCompetitionderived classes based on the provided databuildSportForCategory(Urn categoryId, List<Locale> locales) Builds the associated category sport summarybuildSports(List<Locale> locales) buildStreamCompetitors(List<Urn> competitorIds, SportEventCi parentSportEventCi, List<Locale> locales) Builds aListofCompetitorinstances Notice: aStreamWrapperExceptionis thrown if any problems are encountered
-
Method Details
-
buildSports
- Parameters:
locales- - aListof locales specifying the languages used in the returned instances- Returns:
- - a
Listwith the constructedSportinstances - Throws:
ObjectNotFoundException- if the sports list failed to build with the selectedLocales
-
buildSport
Builds aSportinstance with the provided data- Parameters:
sportId- - theUrnsport identifierlocales- - aListof locales specifying the languages used in the returned instance- Returns:
- - the constructed
Sportinstance - Throws:
ObjectNotFoundException- if the requested sport failed to build or was not found
-
buildCategory
Builds the associated category summary- Parameters:
id- the identifier of the categorylocales- locales in which the data is provided- Returns:
- a
CategorySummaryassociated with the current instance - Throws:
ObjectNotFoundException- if the category CI could not be found
-
buildSportForCategory
SportSummary buildSportForCategory(Urn categoryId, List<Locale> locales) throws ObjectNotFoundException Builds the associated category sport summary- Parameters:
categoryId- the identifier of the categorylocales- locales in which the data is provided- Returns:
- a
SportSummaryassociated with the current instance - Throws:
ObjectNotFoundException- if the category CI could not be found
-
buildSportEvent
SportEvent buildSportEvent(Urn id, List<Locale> locales, boolean buildBasicEventImpl) throws ObjectNotFoundException Builds theCompetitionderived class based on the provided data- Parameters:
id- - theUrnspecifying the identifier of the sport eventlocales- - aListof locales specifying the languages used in the returned instancebuildBasicEventImpl- - an indication if the basic event entity should be built if the mapping type is unknown- Returns:
- - the constructed object which is derived from the
Competition - Throws:
ObjectNotFoundException- if the requested sport event object could not be provided(failure built, api request errors,..)
-
buildSportEvent
SportEvent buildSportEvent(Urn id, Urn sportId, List<Locale> locales, boolean buildBasicEventImpl) throws ObjectNotFoundException Builds theSportEventderived class based on the provided data- Parameters:
id- - theUrnspecifying the identifier of the sport eventsportId- - theUrnspecifying the sport type of the eventlocales- - aListof locales specifying the languages used in the returned instancebuildBasicEventImpl- - an indication if the basic event entity should be built if the mapping type is unknown- Returns:
- - the constructed object
- Throws:
ObjectNotFoundException- if the requested sport event object could not be provided(failure built, api request errors,..)
-
buildSportEvents
List<Competition> buildSportEvents(List<Urn> ids, List<Locale> locales) throws ObjectNotFoundException Builds a list ofCompetitionderived classes based on the provided data- Parameters:
ids- - the list ofUrnspecifying the identifier of the sport events to be builtlocales- - aListof locales specifying the languages used in the returned instance- Returns:
- - the constructed objects
- Throws:
ObjectNotFoundException- if the requested sport event objects could not be provided(failure built, api request errors,..)
-
buildCompetitor
Competitor buildCompetitor(Urn id, String qualifier, Integer division, Boolean isVirtual, SportEventCi parentSportEventCi, List<Locale> locales) throws ObjectNotFoundException Builds aCompetitorinstance associated with the providedUrn- Parameters:
id- the competitor identifierqualifier- the competitor qualifier (if available) *division- the competitor division (if available)isVirtual- indication if the competitor is marked as virtualparentSportEventCi- the parentSportEventCithisCompetitorbelongs tolocales- theLocales in which the data should be available- Returns:
- the constructed object
- Throws:
ObjectNotFoundException- if the requested instance could not be provided
-
buildStreamCompetitors
List<Competitor> buildStreamCompetitors(List<Urn> competitorIds, SportEventCi parentSportEventCi, List<Locale> locales) Builds aListofCompetitorinstances Notice: aStreamWrapperExceptionis thrown if any problems are encountered- Parameters:
competitorIds- the ids representing the instances that should be builtparentSportEventCi- the parentSportEventCithisCompetitorbelongs tolocales- theLocales in which the data should be available- Returns:
- the constructed objects
-
buildPlayerProfile
PlayerProfile buildPlayerProfile(Urn id, List<Locale> locales, List<Urn> possibleAssociatedCompetitorIds) throws ObjectNotFoundException - Parameters:
id- the player identifierlocales- theLocales in which the data should be availablepossibleAssociatedCompetitorIds- a list of possible associated competitor ids (used to prefetch data)- Returns:
- the constructed object
- Throws:
ObjectNotFoundException- if the requested instance could not be provided
-
buildCompetitorPlayerProfile
CompetitorPlayer buildCompetitorPlayerProfile(Urn id, List<Locale> locales, List<Urn> possibleAssociatedCompetitorIds, Map<Urn, Integer> associatedJerseyNumbers) throws ObjectNotFoundException- Parameters:
id- the player identifierlocales- theLocales in which the data should be availablepossibleAssociatedCompetitorIds- a list of possible associated competitor ids (used to prefetch data)- Returns:
- the constructed object
- Throws:
ObjectNotFoundException- if the requested instance could not be provided
-