public interface RaceLookupSession extends OsidSession
This session defines methods for retrieving races. A Race
represents a statistic.
This lookup session defines several views:
| Modifier and Type | Method and Description |
|---|---|
boolean |
canLookupRaces()
Tests if this user can lookup races.
|
Polls |
getPolls()
Gets the
Polls associated with this session. |
Id |
getPollsId()
Gets the
Polls Id associated with this
session. |
Race |
getRace(Id raceId)
Gets the
Race specified by its Id. |
RaceList |
getRaces()
Gets all races.
|
RaceList |
getRacesByGenusType(Type raceGenusType)
Gets a
RaceList corresponding to the given race genus
Type which does not include races of types derived from
the specified Type. |
RaceList |
getRacesByIds(IdList raceIds)
Gets a
RaceList corresponding to the given
IdList. |
RaceList |
getRacesByParentGenusType(Type raceGenusType)
Gets a
RaceList corresponding to the given race genus
Type and include races of types derived from the
specified Type. |
RaceList |
getRacesByProvider(Id resourceId)
Gets a
RaceList from the given provider. |
RaceList |
getRacesByRecordType(Type raceRecordType)
Gets a
RaceList containing the given race record
Type. |
RaceList |
getRacesForBallot(Id ballotId)
Gets a
RaceList for the given Ballot. |
void |
useActiveRaceView()
Only active races are returned from methods in this session.
|
void |
useAnyStatusRaceView()
Borth active and inactive races are returned from methods in this
session.
|
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.
|
void |
useFederatedPollsView()
Federates the view for methods in this session.
|
void |
useIsolatedPollsView()
Isolates the view for methods in this session.
|
void |
usePlenaryRaceView()
A complete view of the
Race returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getPollsId()
Polls Id associated with this
session. Polls Id associated with this sessionmandatory - This method must be implemented. Polls getPolls() throws OperationFailedException, PermissionDeniedException
Polls associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canLookupRaces()
PERMISSION_DENIED. This is intended as a hint to an
application that may opt not to offer reading operations. false if lookup methods are not authorized,
true otherwisemandatory - This method must be implemented. void useComparativeRaceView()
mandatory - This method is must be implemented. void usePlenaryRaceView()
Race returns 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.mandatory - This method is must be implemented. void useFederatedPollsView()
mandatory - This method is must be implemented. void useIsolatedPollsView()
mandatory - This method is must be implemented. void useActiveRaceView()
mandatory - This method is must be implemented. void useAnyStatusRaceView()
mandatory - This method is must be implemented. Race getRace(Id raceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Race specified by its Id.
In plenary mode, the exact Id is found
or a NOT_FOUND results. Otherwise, the returned
Race may have a different Id than requested,
such as the case where a duplicate Id was assigned to a
Race and retained for compatibility.
In active mode, races are returned that are currently active. In any
status mode, active and inactive races are returned.raceId - the Id of the Race to
retrieve Race NotFoundException - no Race found with
the given Id NullArgumentException - raceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. RaceList getRacesByIds(IdList raceIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
RaceList corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
races specified in the Id list, in the order of the
list, including duplicates, or an error results if an Id
in 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.raceIds - the list of Ids to retrieve Race list NotFoundException - an Id was not foundNullArgumentException - raceIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. RaceList getRacesByGenusType(Type raceGenusType) throws OperationFailedException, PermissionDeniedException
RaceList corresponding to the given race genus
Type which does not include races of types derived from
the specified Type. 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.raceGenusType - a race genus type Race listNullArgumentException - raceGenusType is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. RaceList getRacesByParentGenusType(Type raceGenusType) throws OperationFailedException, PermissionDeniedException
RaceList corresponding to the given race genus
Type and include races of types derived from the
specified Type.
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.raceGenusType - a race genus type Race listNullArgumentException - raceGenusType is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. RaceList getRacesByRecordType(Type raceRecordType) throws OperationFailedException, PermissionDeniedException
RaceList containing the given race record
Type.
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.raceRecordType - a race record type Race listNullArgumentException - raceRecordType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. RaceList getRacesByProvider(Id resourceId) throws OperationFailedException, PermissionDeniedException
RaceList from the given provider.
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.resourceId - a resource Id Race listNullArgumentException - resourceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. RaceList getRacesForBallot(Id ballotId) throws OperationFailedException, PermissionDeniedException
RaceList for the given Ballot.
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.ballotId - a ballot Id Race listNullArgumentException - ballotId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. RaceList getRaces() throws OperationFailedException, PermissionDeniedException
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.