public class VoteService extends PollenServiceSupport
serviceContext
Constructor and Description |
---|
VoteService() |
Modifier and Type | Method and Description |
---|---|
Vote |
createVote(Poll poll,
Vote vote) |
protected VoteToChoice |
createVoteToChoice(Vote vote,
VoteToChoice source) |
void |
deleteVote(Poll poll,
String voteId,
String reason)
Delete vote referenced by
voteId . |
List<Vote> |
getAllVotes(Poll poll) |
Vote |
getVoteEditable(Poll poll,
PollAccount accountEditable) |
List<Vote> |
getVotesByPoll(Poll poll,
org.nuiton.topia.persistence.pager.TopiaPagerBean pager) |
boolean |
isVotingIdFree(Poll poll,
String pollAccountId,
String votingId) |
Vote |
updateVote(Poll poll,
Vote vote) |
commitTransaction, create, createWithProperties, decorateDate, decorateDateTime, delete, flushTransaction, getConfiguration, getDAO, getDatePattern, getDateTimePattern, getEntities, getEntities, getEntityById, getLocale, getTransaction, newInstance, newService, setServiceContext, update
public Vote getVoteEditable(Poll poll, PollAccount accountEditable)
public Vote createVote(Poll poll, Vote vote) throws PollAccountNotFound
PollAccountNotFound
public Vote updateVote(Poll poll, Vote vote) throws VoteNotFoundException
VoteNotFoundException
public void deleteVote(Poll poll, String voteId, String reason) throws VoteNotFoundException
voteId
. This will also delete all
associated VoteToChoice
. The PollAccount
could also be
deleted for a PollType.FREE
poll where vote will be removed. This
remove implied an new execution of poll vote counting if continuous results
is activated.voteId
- TopiaId of the votereason
- reason to delete this voteVoteNotFoundException
- if vote doesn't existpublic List<Vote> getVotesByPoll(Poll poll, org.nuiton.topia.persistence.pager.TopiaPagerBean pager)
protected VoteToChoice createVoteToChoice(Vote vote, VoteToChoice source)
Copyright © 2009–2014 CodeLutin. All rights reserved.