OSID Logo
OSID Specifications
voting rules package
Version 3.0.0
Release Candidate Preview
Interfaceosid.voting.rules.RaceConstrainerQuery
Implementsosid.OsidConstrainerQuery
Description

This is the query for searching race constrainers. Each method match specifies a AND term while multiple invocations of the same method produce a nested OR.

MethodmatchRuledRaceId
Description

Matches mapped to a race.

Parametersosid.id.IdraceIdthe race Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT raceId is null
CompliancemandatoryThis method must be implemented.
MethodclearRuledRaceIdTerms
Description

Clears the race Id query terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsRuledRaceQuery
Description

Tests if a RaceQuery is available.

Returnboolean true if a race query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetRuledRaceQuery
Description

Gets the query for a race. Multiple retrievals produce a nested OR term.

Returnosid.voting.RaceQuerythe race query
ErrorsUNIMPLEMENTED supportsRuledRaceQuery() is false
ComplianceoptionalThis method must be implemented if supportsRuledRaceQuery() is true.
MethodmatchAnyRuledRace
Description

Matches constrainers mapped to any race.

Parametersbooleanmatch true for constrainers mapped to any race, false to match constrainers mapped to no races
CompliancemandatoryThis method must be implemented.
MethodclearRuledRaceTerms
Description

Clears the race query terms.

CompliancemandatoryThis method must be implemented.
MethodmatchPollsId
Description

Matches constrainers mapped to the polls.

Parametersosid.id.IdpollsIdthe polls Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT pollsId is null
CompliancemandatoryThis method must be implemented.
MethodclearPollsIdTerms
Description

Clears the polls Id query terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsPollsQuery
Description

Tests if a PollsQuery is available.

Returnboolean true if a polls query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetPollsQuery
Description

Gets the query for a polls. Multiple retrievals produce a nested OR term.

Returnosid.voting.PollsQuerythe polls query
ErrorsUNIMPLEMENTED supportsPollsQuery() is false
ComplianceoptionalThis method must be implemented if supportsPollsQuery() is true.
MethodclearPollsTerms
Description

Clears the polls query terms.

CompliancemandatoryThis method must be implemented.
MethodgetRaceConstrainerQueryRecord
Description

Gets the race constrainer query record corresponding to the given RaceConstrainer record Type. Multiple record retrievals produce a nested OR term.

Parametersosid.type.TyperaceConstrainerRecordTypea race constrainer record type
Returnosid.voting.rules.records.RaceConstrainerQueryRecordthe race constrainer query record
ErrorsNULL_ARGUMENT raceConstrainerRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTED hasRecordType(raceConstrainerRecordType) is false
CompliancemandatoryThis method must be implemented.