|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hack23.cia.model.impl.common.BaseEntity com.hack23.cia.model.impl.sweden.Ballot
@Entity public class Ballot
The Class Ballot.
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 |
---|
public Ballot()
Method Detail |
---|
public void addPartyBallotResultData(PartyBallotResultData partyBallotResult)
BallotData
addPartyBallotResultData
in interface BallotData
partyBallotResult
- the party ballot resultpublic void addVoteData(VoteData vote)
BallotData
addVoteData
in interface BallotData
vote
- the votepublic boolean dataCanBeUpdated()
ParliamentImportedData
dataCanBeUpdated
in interface ParliamentImportedData
public boolean generatesParliamentMetaData()
ParliamentImportedData
generatesParliamentMetaData
in interface ParliamentImportedData
public BallotResult getBallotResult()
public BallotResultData getBallotResultData()
BallotData
getBallotResultData
in interface BallotData
public BaseBallotResultData getBaseBallotResultData()
BallotData
getBaseBallotResultData
in interface BallotData
public CommitteeReport getCommiteeReport()
public CommitteeReportData getCommiteeReportData()
BallotData
getCommiteeReportData
in interface BallotData
public Date getDatum()
BallotData
getDatum
in interface BallotData
public String getDescription()
BallotData
getDescription
in interface BallotData
public Long getId()
BaseEntity
getId
in interface PersistedModelObject
getId
in class BaseEntity
public Date getImportedDate()
ParliamentImportedData
getImportedDate
in interface ParliamentImportedData
public ParliamentImportedData.ImportStatus getImportStatus()
ParliamentImportedData
getImportStatus
in interface ParliamentImportedData
public String getOverviewHref()
BallotData
getOverviewHref
in interface BallotData
public ParliamentMetaData getParliamentMetaData()
ParliamentImportedData
getParliamentMetaData
in interface ParliamentImportedData
public List<PartyBallotResult> getPartyBallotResult()
public PartyBallotResult getPartyBallotResult(String party)
BallotData
getPartyBallotResult
in interface BallotData
party
- the short code
public ResourceType getResourceType()
Resource
getResourceType
in interface Resource
public Long getVersion()
BaseEntity
getVersion
in interface PersistedModelObject
getVersion
in class BaseEntity
public Vote getVoteForParliamentMember(ParliamentMemberData parliamentMember)
BallotData
getVoteForParliamentMember
in interface BallotData
parliamentMember
- the parliament member
public String getVoteResultsHref()
BallotData
getVoteResultsHref
in interface BallotData
public List<Vote> getVotes()
public List<VoteData> getVotesData()
BallotData
getVotesData
in interface BallotData
public boolean isRebelVote(Vote vote)
vote
- the vote
public boolean isWinningPosition(VotePosition position)
position
- the position
public void setBallotResult(BallotResult ballotResult)
ballotResult
- the new ballot resultpublic void setBallotResultData(BallotResultData ballotResult)
BallotData
setBallotResultData
in interface BallotData
ballotResult
- the new ballot result datapublic void setCommiteeReport(CommitteeReport commiteeReport)
commiteeReport
- the new commitee reportpublic void setCommiteeReportData(CommitteeReportData commiteeReport)
BallotData
setCommiteeReportData
in interface BallotData
commiteeReport
- the new commitee report datapublic void setDatum(Date datum)
BallotData
setDatum
in interface BallotData
datum
- the new datumpublic void setDescription(String description)
BallotData
setDescription
in interface BallotData
description
- the new descriptionpublic void setId(Long id)
PersistedModelObject
setId
in interface PersistedModelObject
id
- the new idpublic void setImportedDate(Date importedDate)
ParliamentImportedData
setImportedDate
in interface ParliamentImportedData
importedDate
- the new imported datepublic void setImportStatus(ParliamentImportedData.ImportStatus importStatus)
ParliamentImportedData
setImportStatus
in interface ParliamentImportedData
importStatus
- the new import statuspublic void setOverviewHref(String overviewHref)
BallotData
setOverviewHref
in interface BallotData
overviewHref
- the new overview hrefpublic void setPartyBallotResult(List<PartyBallotResult> partyBallotResult)
partyBallotResult
- the new party ballot resultpublic void setResourceType(ResourceType resourceType)
resourceType
- the new resource typepublic void setVersion(Long version)
PersistedModelObject
setVersion
in interface PersistedModelObject
version
- the new versionpublic void setVoteResultsHref(String voteResultsHref)
BallotData
setVoteResultsHref
in interface BallotData
voteResultsHref
- the new vote results hrefpublic void setVotes(List<Vote> votes)
votes
- the new votesprotected TypeContext getApplicationTypeContext()
BaseEntity
getApplicationTypeContext
in class BaseEntity
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |