|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectVote
@ThreadRestricted(value="touch") public final class Vote
A voter's input to an election, backed by a row of the election's voter input table.
| Nested Class Summary | |
|---|---|
static class |
Vote.CastEvent
An event that records the casting of a vote. |
static class |
Vote.VotingEvent
An event that records the casting or withdrawal of a vote. |
static class |
Vote.WithdrawalEvent
An event that records the withdrawal of a vote. |
| Constructor Summary | |
|---|---|
Vote(String voterEmail)
Constructs a Vote with default initial data. |
|
Vote(String voterEmail,
String xml)
Constructs a Vote from the specified initial data. |
|
Vote(String voterEmail,
VoterInputTable voterInputTable)
Constructs a Vote, reading its initial state from the voter input table. |
|
| Method Summary | |
|---|---|
Vote |
clone()
|
(package private) void |
commit(VoterInputTable voterInputTable,
ElectoralSubserver.UserSession userSession)
Writes this voter input to the table, if it has uncommitted changes; or removes it, if it is at default. |
(package private) void |
commit(VoterInputTable voterInputTable,
ElectoralSubserver.UserSession userSession,
boolean toForce)
Writes this voter input to the table; or removes it, if it is at default. |
String |
getCandidateEmail()
Identifies the candidate for whom the voter is voting. |
void |
setCandidateEmail(String newCandidateEmail)
Changes the candidate for whom the voter is voting. |
(package private) String |
voterEmail()
Identifies the voter. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Vote(String voterEmail,
VoterInputTable voterInputTable)
throws SQLException
voterEmail - per voterEmail()voterInputTable - of the election
SQLException
Vote(String voterEmail,
String xml)
throws XMLStreamException
voterEmail - per voterEmail()xml - initial data from the 'xml'
column of the voter input table, or null to use defaults
XMLStreamExceptionVote(String voterEmail)
voterEmail - per voterEmail()| Method Detail |
|---|
void commit(VoterInputTable voterInputTable,
ElectoralSubserver.UserSession userSession)
throws SQLException,
VoterInputTable.BadInputException
voterInputTable - of the election
SQLException
VoterInputTable.BadInputException
void commit(VoterInputTable voterInputTable,
ElectoralSubserver.UserSession userSession,
boolean toForce)
throws SQLException,
VoterInputTable.BadInputException
voterInputTable - of the electiontoForce - false to commit only if changes were made in this instance
of voter input; true to force the commit, regardless
SQLException
VoterInputTable.BadInputExceptionpublic String getCandidateEmail()
setCandidateEmail(String)public void setCandidateEmail(String newCandidateEmail)
getCandidateEmail()String voterEmail()
public final Vote clone()
clone in class Object
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||