/** * Counts the total count of votes in the poll. * * @return the total count of votes in the poll */ public int getTotalVotesCount() { return sumFrom(pollItems, PollItem.class).getVotesCount(); }
/** * Creates data transfer object, that represents info about the poll option. * * @param option the poll option */ public PollOptionDto(PollItem option) { this.id = option.getId(); this.votesCount = option.getVotesCount(); }