OSID Logo
OSID Specifications
voting package
Version 3.0.0
Release Candidate Preview
Interfaceosid.voting.RaceSearchSession
Implementsosid.voting.RaceQuerySession
Description

This session provides methods for searching among races. The search query is constructed using the RaceQuery.

getRacesByQuery() is the basic search method and returns a list of races. A more advanced search may be performed with getRacesBySearch(). It accepts a RaceSearch in addition to the query for the purpose of specifying additional options affecting the entire search, such as ordering. getRacesBySearch() returns a RaceSearchResults that can be used to access the resulting RaceList or be used to perform a search within the result set through RaceSearch.

This session defines views that offer differing behaviors for searching.

  • federated polls view: searches include races in polls of which this polls is an ancestor in the polls hierarchy
  • isolated polls view: searches are restricted to races in this polls only
MethodgetRaceSearch
Description

Gets a race search.

Returnosid.voting.RaceSearchthe race search
CompliancemandatoryThis method must be implemented.
MethodgetRaceSearchOrder
Description

Gets a race search order. The RaceSearchOrder is supplied to a RaceSearch to specify the ordering of results.

Returnosid.voting.RaceSearchOrderthe race search order
CompliancemandatoryThis method must be implemented.
MethodgetRacesBySearch
Description

Gets the search results matching the given search query using the given search.

Parametersosid.voting.RaceQueryraceQuerythe race query
osid.voting.RaceSearchraceSearchthe race search
Returnosid.voting.RaceSearchResultsthe returned race search results
ErrorsNULL_ARGUMENT raceQuery or raceSearch is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED raceQuery or raceSearch is not of this service
CompliancemandatoryThis method must be implemented.
MethodgetRaceQueryFromInspector
Description

Gets a race query from an inspector. The inspector is available from a RaceSearchResults.

Parametersosid.voting.RaceQueryInspectorraceQueryInspectora race query inspector
Returnosid.voting.RaceQuerythe race query
ErrorsNULL_ARGUMENT raceQueryInspector is null
UNSUPPORTED raceQueryInspector is not of this service
CompliancemandatoryThis method must be implemented.