Interface RaceLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods for retrieving races. A Race
represents a statistic.
This lookup session defines several views:
- comparative view: elements may be silently omitted or re-ordered
- plenary view: provides a complete result set or is an error condition
- federated polls view: includes races in polls which are children of this polls in the polls hierarchy
- isolated polls view: restricts lookups to this polls only
- active race view: active races are returned from methods in this session
- any status race view: active and inactive races are returned from methods in this session
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can lookup races.getPolls()Gets thePollsassociated with this session.Gets thePollsIdassociated with this session.Gets theRacespecified by itsId.getRaces()Gets all races.getRacesByGenusType(Type raceGenusType) Gets aRaceListcorresponding to the given race genusTypewhich does not include races of types derived from the specifiedType.getRacesByIds(IdList raceIds) Gets aRaceListcorresponding to the givenIdList.getRacesByParentGenusType(Type raceGenusType) Gets aRaceListcorresponding to the given race genusTypeand include races of types derived from the specifiedType.getRacesByRecordType(Type raceRecordType) Gets aRaceListcontaining the given race recordType.getRacesForBallot(Id ballotId) Gets aRaceListfor the givenBallot.voidOnly active races are returned from methods in this session.voidBorth active and inactive races are returned from methods in this session.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theRacereturns is desired.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getPollsId
Id getPollsId()Gets thePollsIdassociated with this session.- Returns:
- the
Polls Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getPolls
Gets thePollsassociated with this session.- Returns:
- the polls
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupRaces
boolean canLookupRaces()Tests if this user can lookup races. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer reading operations.- Returns:
falseif lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeRaceView
void useComparativeRaceView()The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.- Compliance:
mandatory- This method is must be implemented.
-
usePlenaryRaceView
void usePlenaryRaceView()A complete view of theRacereturns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.- Compliance:
mandatory- This method is must be implemented.
-
useFederatedPollsView
void useFederatedPollsView()Federates the view for methods in this session. A federated view will include races in polls which are children of this polls in the polls hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedPollsView
void useIsolatedPollsView()Isolates the view for methods in this session. An isolated view restricts retrievals to this polls only.- Compliance:
mandatory- This method is must be implemented.
-
useActiveRaceView
void useActiveRaceView()Only active races are returned from methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useAnyStatusRaceView
void useAnyStatusRaceView()Borth active and inactive races are returned from methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
getRace
Race getRace(Id raceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theRacespecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedRacemay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aRaceand retained for compatibility. In active mode, races are returned that are currently active. In any status mode, active and inactive races are returned.- Parameters:
raceId- theIdof theRaceto retrieve- Returns:
- the returned
Race - Throws:
NotFoundException- noRacefound with the givenIdNullArgumentException-raceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRacesByIds
RaceList getRacesByIds(IdList raceIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aRaceListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the races specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessible races may be omitted from the list and may present the elements in any order including returning a unique set. In active mode, races are returned that are currently active. In any status mode, active and inactive races are returned.- Parameters:
raceIds- the list ofIdsto retrieve- Returns:
- the returned
Race list - Throws:
NotFoundException- anIdwas not foundNullArgumentException-raceIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRacesByGenusType
RaceList getRacesByGenusType(Type raceGenusType) throws OperationFailedException, PermissionDeniedException Gets aRaceListcorresponding to the given race genusTypewhich does not include races of types derived from the specifiedType. In plenary mode, the returned list contains all known races or an error results. Otherwise, the returned list may contain only those races that are accessible through this session.- Parameters:
raceGenusType- a race genus type- Returns:
- the returned
Racelist - Throws:
NullArgumentException-raceGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRacesByParentGenusType
RaceList getRacesByParentGenusType(Type raceGenusType) throws OperationFailedException, PermissionDeniedException Gets aRaceListcorresponding to the given race genusTypeand include races of types derived from the specifiedType. In plenary mode, the returned list contains all known races or an error results. Otherwise, the returned list may contain only those races that are accessible through this session. In active mode, races are returned that are currently active. In any status mode, active and inactive races are returned.- Parameters:
raceGenusType- a race genus type- Returns:
- the returned
Racelist - Throws:
NullArgumentException-raceGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRacesByRecordType
RaceList getRacesByRecordType(Type raceRecordType) throws OperationFailedException, PermissionDeniedException Gets aRaceListcontaining the given race recordType. In plenary mode, the returned list contains all known races or an error results. Otherwise, the returned list may contain only those races that are accessible through this session. In active mode, races are returned that are currently active. In any status mode, active and inactive races are returned.- Parameters:
raceRecordType- a race record type- Returns:
- the returned
Racelist - Throws:
NullArgumentException-raceRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRacesForBallot
Gets aRaceListfor the givenBallot. In plenary mode, the returned list contains all known races or an error results. Otherwise, the returned list may contain only those races that are accessible through this session. In active mode, races are returned that are currently active. In any status mode, active and inactive races are returned.- Parameters:
ballotId- a ballotId- Returns:
- the returned
Racelist - Throws:
NullArgumentException-ballotIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRaces
Gets all races. In plenary mode, the returned list contains all known races or an error results. Otherwise, the returned list may contain only those races that are accessible through this session. In active mode, races are returned that are currently active. In any status mode, active and inactive races are returned.- Returns:
- a list of races
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-