|
||||||||||
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.content.Ballot
@Entity public class Ballot extends BaseEntity implements BallotData, ParliamentEvent
The Class Ballot.
Modifier and Type | Interface and Description |
---|
Nested classes/interfaces inherited from interface com.hack23.cia.model.api.sweden.common.ImportedData |
---|
ImportedData.ImportStatus |
Modifier and Type | Field and Description |
---|
Fields inherited from interface com.hack23.cia.model.api.sweden.configuration.BallotData |
---|
TOTAL_VOTES |
Constructor and Description |
---|
Ballot()
|
Modifier and Type | Method and Description |
---|---|
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 type context. |
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. |
ImportedData.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(ImportedData.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()
ParliamentMappedData
dataCanBeUpdated
in interface ParliamentMappedData
public boolean generatesParliamentMetaData()
ParliamentMappedData
generatesParliamentMetaData
in interface ParliamentMappedData
protected TypeContext getApplicationTypeContext()
BaseEntity
getApplicationTypeContext
in class BaseEntity
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()
ImportedData
getImportedDate
in interface ImportedData
public ImportedData.ImportStatus getImportStatus()
ImportedData
getImportStatus
in interface ImportedData
public String getOverviewHref()
BallotData
getOverviewHref
in interface BallotData
public ParliamentMetaData getParliamentMetaData()
ParliamentMappedData
getParliamentMetaData
in interface ParliamentMappedData
public List<PartyBallotResult> getPartyBallotResult()
public PartyBallotResult getPartyBallotResult(String party)
BallotData
getPartyBallotResult
in interface BallotData
party
- the short codepublic 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 memberpublic 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 votepublic boolean isWinningPosition(VotePosition position)
position
- the positionpublic 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)
ImportedData
setImportedDate
in interface ImportedData
importedDate
- the new imported datepublic void setImportStatus(ImportedData.ImportStatus importStatus)
ImportedData
setImportStatus
in interface ImportedData
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 votes
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |