OSID Logo
OSID Specifications
voting package
Version 3.1.0
Interfaceosid.voting.Vote
Implementsosid.OsidRelationship
Used Byosid.voting.VoteList
osid.voting.VoteLookupSession
osid.voting.VotingSession
Description

A Vote is a relationship between a Candidate and a voter.

MethodgetCandidateId
Description

Gets the candidate Id.

Returnosid.id.Id a candidate Id
Compliancemandatory This method must be implemented.
MethodgetCandidate
Description

Gets the Candidate.

Returnosid.voting.Candidate the candidate
ErrorsOPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodgetVoterId
Description

Gets the resource Id of the voter.

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

Gets the resource of the voter.

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

Gets the agent Id of the voter.

Returnosid.id.Id the agent Id
Compliancemandatory This method must be implemented.
MethodgetVotingAgent
Description

Gets the agent of the voter.

Returnosid.authentication.Agent the agent
ErrorsOPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodgetVotes
Description

Gets the number of votes cast for this candidate.

Returninteger the number of votes cast
Compliancemandatory This method must be implemented.
MethodgetVoteRecord
Description

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

Parametersosid.type.TypevoteRecordType the type of the record to retrieve
Returnosid.voting.records.VoteRecord the vote record
ErrorsNULL_ARGUMENT voteRecordType is null
OPERATION_FAILED unable to complete request
UNSUPPORTED hasRecordType(voteRecordType) is false
Compliancemandatory This method must be implemented.