org.chorem.pollen.services.impl
Class VoteService
java.lang.Object
org.chorem.pollen.services.PollenServiceSupport
org.chorem.pollen.services.impl.VoteService
- All Implemented Interfaces:
- PollenService
public class VoteService
- extends PollenServiceSupport
|
Method Summary |
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. |
protected void |
generatePollResult(Poll poll)
|
List<Vote> |
getAllVotes(Poll poll)
|
Vote |
getNewVote(Poll poll,
PollAccount account)
|
Vote |
getVoteEditable(Poll poll,
PollAccount accountEditable)
|
List<Vote> |
getVotesByPoll(Poll poll,
org.nuiton.topia.persistence.TopiaFilterPagerUtil.FilterPagerBean pager)
|
boolean |
hasAlreadyVoted(Poll poll,
String votingId)
|
List<Vote> |
selectVotes(Map<String,Object> properties)
|
Vote |
updateVote(Poll poll,
Vote vote)
|
| Methods inherited from class org.chorem.pollen.services.PollenServiceSupport |
commitTransaction, create, createWithProperties, decorateDate, decorateDateTime, delete, flushTransaction, generateId, getConfiguration, getDAO, getDatePattern, getDateTimePattern, getEntities, getEntities, getEntityById, getLocale, getTransaction, newInstance, newService, setServiceContext, update |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VoteService
public VoteService()
getNewVote
public Vote getNewVote(Poll poll,
PollAccount account)
getVoteEditable
public Vote getVoteEditable(Poll poll,
PollAccount accountEditable)
createVote
public Vote createVote(Poll poll,
Vote vote)
throws PollAccountNotFound
- Throws:
PollAccountNotFound
updateVote
public Vote updateVote(Poll poll,
Vote vote)
throws VoteNotFoundException
- Throws:
VoteNotFoundException
deleteVote
public void deleteVote(Poll poll,
String voteId,
String reason)
throws VoteNotFoundException
- Delete vote referenced by
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.
- Parameters:
voteId - TopiaId of the votereason - reason to delete this vote
- Throws:
VoteNotFoundException - if vote doesn't exist
getAllVotes
public List<Vote> getAllVotes(Poll poll)
getVotesByPoll
public List<Vote> getVotesByPoll(Poll poll,
org.nuiton.topia.persistence.TopiaFilterPagerUtil.FilterPagerBean pager)
hasAlreadyVoted
public boolean hasAlreadyVoted(Poll poll,
String votingId)
selectVotes
public List<Vote> selectVotes(Map<String,Object> properties)
createVoteToChoice
protected VoteToChoice createVoteToChoice(Vote vote,
VoteToChoice source)
generatePollResult
protected void generatePollResult(Poll poll)
Copyright © 2009-2012 CodeLutin. All Rights Reserved.