org.chorem.pollen.business.services
Interface ServiceVote

All Known Implementing Classes:
ServiceVoteImpl

public interface ServiceVote

Interface du service de vote.

Version:
$Id: ServiceVote.java 2912 2010-03-09 16:44:39Z fdesbois $

Method Summary
 String createVote(VoteDTO voteDTO, PollAccountDTO pollAccountDTO)
          Rajouter un vote à un sondage
 boolean deleteVote(String voteId)
          Supprime un vote de la base de données
 List<VoteDTO> getVotesByPoll(PollDTO poll, int startIndex, int endIndex)
          Retrieve existings votes from the poll.
 boolean hasAlreadyVoted(String votingId, PollDTO poll)
          Test if the votingId has already voted for the poll.
 List<VoteDTO> selectVotes(Map<String,Object> properties)
          Retourne les votes d'un sondage
 boolean updateVote(VoteDTO voteDTO)
          Mise à jour d'un vote
 

Method Detail

createVote

String createVote(VoteDTO voteDTO,
                  PollAccountDTO pollAccountDTO)
Rajouter un vote à un sondage

Parameters:
voteDTO - Le DTO du vote
Returns:
L'ID du vote créé

updateVote

boolean updateVote(VoteDTO voteDTO)
Mise à jour d'un vote

Parameters:
voteDTO - Le DTO du vote
Returns:
Retourne TRUE si la mise à jour s'est correctement déroulée

deleteVote

boolean deleteVote(String voteId)
Supprime un vote de la base de données

Parameters:
voteId - L'identifiant du vote
Returns:
Retourne TRUE si la suppression s'est correctement déroulée

getVotesByPoll

List<VoteDTO> getVotesByPoll(PollDTO poll,
                             int startIndex,
                             int endIndex)
Retrieve existings votes from the poll. Only needed votes inside the range (startIndex and endIndex) will be retrieve. The results will be ordered by creationDate (the last vote done will be at the end of the list).

Parameters:
poll - to retrieve votes
startIndex - begin range for resulting votes
endIndex - end range for resulting votes
Returns:
the votes corresponding to the poll between the range

hasAlreadyVoted

boolean hasAlreadyVoted(String votingId,
                        PollDTO poll)
Test if the votingId has already voted for the poll.

Parameters:
votingId - to test existing vote
poll - where the votingId can have already voted
Returns:
true if the votingId has already voted or false otherwise

selectVotes

List<VoteDTO> selectVotes(Map<String,Object> properties)
Retourne les votes d'un sondage

Parameters:
properties - La HashMap pour sélectionner les votes d'un sondage. Il faut y mettre le bon champs pollId
Returns:
Les votes d'un sondage dans un DTO, le tout stocké dans une liste.


Copyright © 2009-2010 CodeLutin. All Rights Reserved.