OSID Logo
OSID Specifications
voting package
Version 3.0.0
Release Candidate Preview
Interfaceosid.voting.CandidateQuery
Implementsosid.OsidRelationshipQuery
Description

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

MethodmatchRaceId
Description

Sets the race Id for this query.

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

Clears the race Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsRaceQuery
Description

Tests if a RaceQuery is available for querying candidates.

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

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

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

Clears the race terms.

CompliancemandatoryThis method must be implemented.
MethodmatchResourceId
Description

Sets the resource Id for this query.

Parametersosid.id.IdresourceIda resource Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT resourceId is null
CompliancemandatoryThis method must be implemented.
MethodclearResourceIdTerms
Description

Clears the resource Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsResourceQuery
Description

Tests if a ResourceQuery is available for querying candidates.

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

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

Returnosid.resource.ResourceQuerythe resource query
ErrorsUNIMPLEMENTED supportsResourceQuery() is false
ComplianceoptionalThis method must be implemented if supportsResourceQuery() is true.
MethodclearResourceTerms
Description

Clears the resource terms.

CompliancemandatoryThis method must be implemented.
MethodmatchVoteId
Description

Sets the vote Id for this query.

Parametersosid.id.IdvoteIdthe vote Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT voteId is null
CompliancemandatoryThis method must be implemented.
MethodclearVoteIdTerms
Description

Clears the vote Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsVoteQuery
Description

Tests if a VoteQuery is available.

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

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

Returnosid.voting.VoteQuerythe vote query
ErrorsUNIMPLEMENTED supportsVoteQuery() is false
ComplianceoptionalThis method must be implemented if supportsVoteQuery() is true.
MethodmatchAnyVote
Description

Matches candidates with any vote.

Parametersbooleanmatch true to match any vote, false to match candidates with no votes
CompliancemandatoryThis method must be implemented.
MethodclearVoteTerms
Description

Clears the vote terms.

CompliancemandatoryThis method must be implemented.
MethodmatchPollsId
Description

Sets the polls Id for this query.

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 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 terms.

CompliancemandatoryThis method must be implemented.
MethodgetCandidateQueryRecord
Description

Gets the candidate query record corresponding to the given Candidate record Type. Multiple retrievals produce a nested OR term.

Parametersosid.type.TypecandidateRecordTypea candidate record type
Returnosid.voting.records.CandidateQueryRecordthe candidate query record
ErrorsNULL_ARGUMENT candidateRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTED hasRecordType(candidateRecordType) is false
CompliancemandatoryThis method must be implemented.