public interface Vote extends OsidRelationship
A Vote
is a relationship between a Candidate
and a voter.
Modifier and Type | Method and Description |
---|---|
Candidate |
getCandidate()
Gets the
Candidate. |
Id |
getCandidateId()
Gets the candidate
Id. |
Resource |
getVoter()
Gets the resource of the voter.
|
VoteRecord |
getVoteRecord(Type voteRecordType)
Gets the vote record corresponding to the given
Vote
record Type. |
Id |
getVoterId()
Gets the resource
Id of the voter. |
long |
getVotes()
Gets the number of votes cast for this candidate.
|
Agent |
getVotingAgent()
Gets the agent of the voter.
|
Id |
getVotingAgentId()
Gets the agent
Id of the voter. |
getEndReason, getEndReasonId, hasEndReason
getDescription, getDisplayName, getGenusType, isOfGenusType
getId, isCurrent
getRecordTypes, hasRecordType
getProperties, getPropertiesByRecordType
getEndDate, getStartDate, isEffective
Id getCandidateId()
Id.
Id
mandatory
- This method must be implemented. Candidate getCandidate() throws OperationFailedException
Candidate.
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. Id getVoterId()
Id
of the voter. Id
mandatory
- This method must be implemented. Resource getVoter() throws OperationFailedException
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. Id getVotingAgentId()
Id
of the voter. Id
mandatory
- This method must be implemented. Agent getVotingAgent() throws OperationFailedException
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. long getVotes()
mandatory
- This method must be implemented. VoteRecord getVoteRecord(Type voteRecordType) throws OperationFailedException
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
.voteRecordType
- the type of the record to retrieveNullArgumentException
- voteRecordType
is null
OperationFailedException
- unable to complete requestUnsupportedException
-
hasRecordType(voteRecordType)
is false
mandatory
- This method must be implemented.