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

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

@Entity
public class Ballot
extends BaseEntity
implements ParliamentData, ParliamentEvent

The Class Ballot.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.hack23.cia.model.sweden.api.ParliamentData
ParliamentData.ImportStatus
 
Field Summary
static int TOTAL_VOTES
          The Constant TOTAL_VOTES.
 
Constructor Summary
Ballot()
           
 
Method Summary
 boolean dataCanBeUpdated()
          Data can be updated.
 boolean generatesParliamentMetaData()
          Generates parliament meta data.
 BallotResult getBallotResult()
          Gets the ballot result.
 CommitteeReport getCommiteeReport()
          Gets the commitee report.
 Date getDatum()
          Gets the datum.
 String getDescription()
          Gets the description.
 Long getId()
          Gets the id.
 Date getImportedDate()
          Gets the imported date.
 ParliamentData.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(ParliamentMember parliamentMember)
          Gets the vote for parliament member.
 String getVoteResultsHref()
          Gets the vote results href.
 List<Vote> getVotes()
          Gets the votes.
 boolean isRebelVote(Vote vote)
          Checks if is rebel vote.
 boolean isWinningPosition(Vote.Position position)
          Checks if is winning position.
 void setBallotResult(BallotResult ballotResult)
          Sets the ballot result.
 void setCommiteeReport(CommitteeReport commiteeReport)
          Sets the commitee report.
 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(ParliamentData.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.common.impl.BaseEntity
equals, 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.common.api.PersistedModelObject
isNew
 

Field Detail

TOTAL_VOTES

public static final int TOTAL_VOTES
The Constant TOTAL_VOTES.

See Also:
Constant Field Values
Constructor Detail

Ballot

public Ballot()
Method Detail

dataCanBeUpdated

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

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

generatesParliamentMetaData

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

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

getBallotResult

public BallotResult getBallotResult()
Gets the ballot result.

Returns:
the ballot result

getCommiteeReport

public CommitteeReport getCommiteeReport()
Gets the commitee report.

Returns:
the commitee report

getDatum

public Date getDatum()
Gets the datum.

Returns:
the datum

getDescription

public String getDescription()
Gets the description.

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: ParliamentData
Gets the imported date.

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

getImportStatus

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

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

getOverviewHref

public String getOverviewHref()
Gets the overview href.

Returns:
the overview href

getParliamentMetaData

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

Specified by:
getParliamentMetaData in interface ParliamentData
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)
Gets the party ballot result.

Parameters:
party - the party
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(ParliamentMember parliamentMember)
Gets the vote for parliament member.

Parameters:
parliamentMember - the parliament member
Returns:
the vote for parliament member

getVoteResultsHref

public String getVoteResultsHref()
Gets the vote results href.

Returns:
the vote results href

getVotes

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

Returns:
the votes

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(Vote.Position 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

setCommiteeReport

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

Parameters:
commiteeReport - the new commitee report

setDatum

public void setDatum(Date datum)
Sets the datum.

Parameters:
datum - the new datum

setDescription

public void setDescription(String description)
Sets the description.

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: ParliamentData
Sets the imported date.

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

setImportStatus

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

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

setOverviewHref

public void setOverviewHref(String overviewHref)
Sets the overview href.

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)
Description copied from interface: Resource
Sets the resource type.

Specified by:
setResourceType in interface Resource
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)
Sets the vote results href.

Parameters:
voteResultsHref - the new vote results href

setVotes

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

Parameters:
votes - the new votes


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