OSID Logo
OSID Specifications
voting package
Version 3.1.0
Interfaceosid.voting.Candidate
Implementsosid.OsidRelationship
Used Byosid.voting.CandidateAdminSession
osid.voting.CandidateList
osid.voting.CandidateLookupSession
osid.voting.RaceResult
osid.voting.Vote
Description

A Candidate represents a voting option in a race. A Candidate is a relationship between a Resource and a Race.

MethodgetRaceId
Description

Gets the race Id of the candidate.

Returnosid.id.Id the candidate Id
Compliancemandatory This method must be implemented.
MethodgetRace
Description

Gets the race of the candidate.

Returnosid.voting.Race the race
ErrorsOPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodgetResourceId
Description

Gets the resource Id related to the candidate.

Returnosid.id.Id the resource Id
Compliancemandatory This method must be implemented.
MethodgetResource
Description

Gets the resource related to the candidate.

Returnosid.resource.Resource the resource
ErrorsOPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodgetCandidateRecord
Description

Gets the candidate record corresponding to the given Candidate record Type. This method is used to retrieve an object implementing the requested record. The candidateRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(candidateRecordType) is true.

Parametersosid.type.TypecandidateRecordType the candidate record type
Returnosid.voting.records.CandidateRecord the candidate record
ErrorsNULL_ARGUMENT candidateRecordType is null
OPERATION_FAILED unable to complete request
UNSUPPORTED hasRecordType(candidateRecordType) is false
Compliancemandatory This method must be implemented.