com.hack23.cia.model.impl.sweden
Class Ballot

Package class diagram package Ballot
java.lang.Object
  extended by com.hack23.cia.model.impl.common.BaseEntity
      extended by com.hack23.cia.model.impl.sweden.Ballot
All Implemented Interfaces:
Data, Event, ModelObject, PersistedModelObject, Resource, BallotData, ParliamentEvent, ParliamentImportedData, ParliamentMappedData, Serializable

@Entity
public class Ballot
extends BaseEntity
implements BallotData, ParliamentEvent

The Class Ballot.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.hack23.cia.model.api.sweden.ParliamentImportedData
ParliamentImportedData.ImportStatus
 
Field Summary
 
Fields inherited from interface com.hack23.cia.model.api.sweden.BallotData
TOTAL_VOTES
 
Constructor Summary
Ballot()
           
 
Method Summary
 void addPartyBallotResultData(PartyBallotResultData partyBallotResult)
          Adds the party ballot result data.
 void addVoteData(VoteData vote)
          Adds the vote data.
 boolean dataCanBeUpdated()
          Data can be updated.
 boolean generatesParliamentMetaData()
          Generates parliament meta data.
protected  TypeContext getApplicationTypeContext()
          Gets the application group specification.
 BallotResult getBallotResult()
          Gets the ballot result.
 BallotResultData getBallotResultData()
          Gets the ballot result data.
 BaseBallotResultData getBaseBallotResultData()
          Gets the base ballot result data.
 CommitteeReport getCommiteeReport()
          Gets the commitee report.
 CommitteeReportData getCommiteeReportData()
          Gets the commitee report data.
 Date getDatum()
          Gets the datum.
 String getDescription()
          Gets the description.
 Long getId()
          Gets the id.
 Date getImportedDate()
          Gets the imported date.
 ParliamentImportedData.ImportStatus getImportStatus()
          Gets the import status.
 String getOverviewHref()
          Gets the overview href.
 ParliamentMetaData getParliamentMetaData()
          Gets the parliament meta data.
 List<PartyBallotResult> getPartyBallotResult()
          Gets the party ballot result.
 PartyBallotResult getPartyBallotResult(String party)
          Gets the party ballot result.
 ResourceType getResourceType()
          Gets the resource type.
 Long getVersion()
          Gets the version.
 Vote getVoteForParliamentMember(ParliamentMemberData parliamentMember)
          Gets the vote for parliament member.
 String getVoteResultsHref()
          Gets the vote results href.
 List<Vote> getVotes()
          Gets the votes.
 List<VoteData> getVotesData()
          Gets the votes data.
 boolean isRebelVote(Vote vote)
          Checks if is rebel vote.
 boolean isWinningPosition(VotePosition position)
          Checks if is winning position.
 void setBallotResult(BallotResult ballotResult)
          Sets the ballot result.
 void setBallotResultData(BallotResultData ballotResult)
          Sets the ballot result data.
 void setCommiteeReport(CommitteeReport commiteeReport)
          Sets the commitee report.
 void setCommiteeReportData(CommitteeReportData commiteeReport)
          Sets the commitee report data.
 void setDatum(Date datum)
          Sets the datum.
 void setDescription(String description)
          Sets the description.
 void setId(Long id)
          Sets the id.
 void setImportedDate(Date importedDate)
          Sets the imported date.
 void setImportStatus(ParliamentImportedData.ImportStatus importStatus)
          Sets the import status.
 void setOverviewHref(String overviewHref)
          Sets the overview href.
 void setPartyBallotResult(List<PartyBallotResult> partyBallotResult)
          Sets the party ballot result.
 void setResourceType(ResourceType resourceType)
          Sets the resource type.
 void setVersion(Long version)
          Sets the version.
 void setVoteResultsHref(String voteResultsHref)
          Sets the vote results href.
 void setVotes(List<Vote> votes)
          Sets the votes.
 
Methods inherited from class com.hack23.cia.model.impl.common.BaseEntity
equals, getTypeContext, hashCode, isNew
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.hack23.cia.model.api.common.PersistedModelObject
getTypeContext, isNew
 

Constructor Detail

Ballot

public Ballot()
Method Detail

addPartyBallotResultData

public void addPartyBallotResultData(PartyBallotResultData partyBallotResult)
Description copied from interface: BallotData
Adds the party ballot result data.

Specified by:
addPartyBallotResultData in interface BallotData
Parameters:
partyBallotResult - the party ballot result

addVoteData

public void addVoteData(VoteData vote)
Description copied from interface: BallotData
Adds the vote data.

Specified by:
addVoteData in interface BallotData
Parameters:
vote - the vote

dataCanBeUpdated

public boolean dataCanBeUpdated()
Description copied from interface: ParliamentImportedData
Data can be updated.

Specified by:
dataCanBeUpdated in interface ParliamentImportedData
Returns:
true, if successful

generatesParliamentMetaData

public boolean generatesParliamentMetaData()
Description copied from interface: ParliamentImportedData
Generates parliament meta data.

Specified by:
generatesParliamentMetaData in interface ParliamentImportedData
Returns:
true, if successful

getBallotResult

public BallotResult getBallotResult()
Gets the ballot result.

Returns:
the ballot result

getBallotResultData

public BallotResultData getBallotResultData()
Description copied from interface: BallotData
Gets the ballot result data.

Specified by:
getBallotResultData in interface BallotData
Returns:
the ballot result data

getBaseBallotResultData

public BaseBallotResultData getBaseBallotResultData()
Description copied from interface: BallotData
Gets the base ballot result data.

Specified by:
getBaseBallotResultData in interface BallotData
Returns:
the base ballot result data

getCommiteeReport

public CommitteeReport getCommiteeReport()
Gets the commitee report.

Returns:
the commitee report

getCommiteeReportData

public CommitteeReportData getCommiteeReportData()
Description copied from interface: BallotData
Gets the commitee report data.

Specified by:
getCommiteeReportData in interface BallotData
Returns:
the commitee report data

getDatum

public Date getDatum()
Description copied from interface: BallotData
Gets the datum.

Specified by:
getDatum in interface BallotData
Returns:
the datum

getDescription

public String getDescription()
Description copied from interface: BallotData
Gets the description.

Specified by:
getDescription in interface BallotData
Returns:
the description

getId

public Long getId()
Description copied from class: BaseEntity
Gets the id.

Specified by:
getId in interface PersistedModelObject
Specified by:
getId in class BaseEntity
Returns:
the id

getImportedDate

public Date getImportedDate()
Description copied from interface: ParliamentImportedData
Gets the imported date.

Specified by:
getImportedDate in interface ParliamentImportedData
Returns:
the imported date

getImportStatus

public ParliamentImportedData.ImportStatus getImportStatus()
Description copied from interface: ParliamentImportedData
Gets the import status.

Specified by:
getImportStatus in interface ParliamentImportedData
Returns:
the import status

getOverviewHref

public String getOverviewHref()
Description copied from interface: BallotData
Gets the overview href.

Specified by:
getOverviewHref in interface BallotData
Returns:
the overview href

getParliamentMetaData

public ParliamentMetaData getParliamentMetaData()
Description copied from interface: ParliamentImportedData
Gets the parliament meta data.

Specified by:
getParliamentMetaData in interface ParliamentImportedData
Returns:
the parliament meta data

getPartyBallotResult

public List<PartyBallotResult> getPartyBallotResult()
Gets the party ballot result.

Returns:
the party ballot result

getPartyBallotResult

public PartyBallotResult getPartyBallotResult(String party)
Description copied from interface: BallotData
Gets the party ballot result.

Specified by:
getPartyBallotResult in interface BallotData
Parameters:
party - the short code
Returns:
the party ballot result

getResourceType

public ResourceType getResourceType()
Description copied from interface: Resource
Gets the resource type.

Specified by:
getResourceType in interface Resource
Returns:
the resource type

getVersion

public Long getVersion()
Description copied from class: BaseEntity
Gets the version.

Specified by:
getVersion in interface PersistedModelObject
Specified by:
getVersion in class BaseEntity
Returns:
the version

getVoteForParliamentMember

public Vote getVoteForParliamentMember(ParliamentMemberData parliamentMember)
Description copied from interface: BallotData
Gets the vote for parliament member.

Specified by:
getVoteForParliamentMember in interface BallotData
Parameters:
parliamentMember - the parliament member
Returns:
the vote for parliament member

getVoteResultsHref

public String getVoteResultsHref()
Description copied from interface: BallotData
Gets the vote results href.

Specified by:
getVoteResultsHref in interface BallotData
Returns:
the vote results href

getVotes

public List<Vote> getVotes()
Gets the votes.

Returns:
the votes

getVotesData

public List<VoteData> getVotesData()
Description copied from interface: BallotData
Gets the votes data.

Specified by:
getVotesData in interface BallotData
Returns:
the votes data

isRebelVote

public boolean isRebelVote(Vote vote)
Checks if is rebel vote.

Parameters:
vote - the vote
Returns:
true, if is rebel vote

isWinningPosition

public boolean isWinningPosition(VotePosition position)
Checks if is winning position.

Parameters:
position - the position
Returns:
true, if is winning position

setBallotResult

public void setBallotResult(BallotResult ballotResult)
Sets the ballot result.

Parameters:
ballotResult - the new ballot result

setBallotResultData

public void setBallotResultData(BallotResultData ballotResult)
Description copied from interface: BallotData
Sets the ballot result data.

Specified by:
setBallotResultData in interface BallotData
Parameters:
ballotResult - the new ballot result data

setCommiteeReport

public void setCommiteeReport(CommitteeReport commiteeReport)
Sets the commitee report.

Parameters:
commiteeReport - the new commitee report

setCommiteeReportData

public void setCommiteeReportData(CommitteeReportData commiteeReport)
Description copied from interface: BallotData
Sets the commitee report data.

Specified by:
setCommiteeReportData in interface BallotData
Parameters:
commiteeReport - the new commitee report data

setDatum

public void setDatum(Date datum)
Description copied from interface: BallotData
Sets the datum.

Specified by:
setDatum in interface BallotData
Parameters:
datum - the new datum

setDescription

public void setDescription(String description)
Description copied from interface: BallotData
Sets the description.

Specified by:
setDescription in interface BallotData
Parameters:
description - the new description

setId

public void setId(Long id)
Description copied from interface: PersistedModelObject
Sets the id.

Specified by:
setId in interface PersistedModelObject
Parameters:
id - the new id

setImportedDate

public void setImportedDate(Date importedDate)
Description copied from interface: ParliamentImportedData
Sets the imported date.

Specified by:
setImportedDate in interface ParliamentImportedData
Parameters:
importedDate - the new imported date

setImportStatus

public void setImportStatus(ParliamentImportedData.ImportStatus importStatus)
Description copied from interface: ParliamentImportedData
Sets the import status.

Specified by:
setImportStatus in interface ParliamentImportedData
Parameters:
importStatus - the new import status

setOverviewHref

public void setOverviewHref(String overviewHref)
Description copied from interface: BallotData
Sets the overview href.

Specified by:
setOverviewHref in interface BallotData
Parameters:
overviewHref - the new overview href

setPartyBallotResult

public void setPartyBallotResult(List<PartyBallotResult> partyBallotResult)
Sets the party ballot result.

Parameters:
partyBallotResult - the new party ballot result

setResourceType

public void setResourceType(ResourceType resourceType)
Sets the resource type.

Parameters:
resourceType - the new resource type

setVersion

public void setVersion(Long version)
Description copied from interface: PersistedModelObject
Sets the version.

Specified by:
setVersion in interface PersistedModelObject
Parameters:
version - the new version

setVoteResultsHref

public void setVoteResultsHref(String voteResultsHref)
Description copied from interface: BallotData
Sets the vote results href.

Specified by:
setVoteResultsHref in interface BallotData
Parameters:
voteResultsHref - the new vote results href

setVotes

public void setVotes(List<Vote> votes)
Sets the votes.

Parameters:
votes - the new votes

getApplicationTypeContext

protected TypeContext getApplicationTypeContext()
Description copied from class: BaseEntity
Gets the application group specification.

Specified by:
getApplicationTypeContext in class BaseEntity
Returns:
the application group specification


Copyright © 2008-2009 www.hack23.com. All Rights Reserved.