232425262728293031
this.voteService = voteService; } protected Object doExecute() throws Exception { System.out.println("Executing command list"); Voting voting = voteService.getVoting(topic); System.out.println(voting.getStats()); return null; }
21222324252627282930
@Override public Voting getVoting(String topic) { if (this.votingMap.containsKey(topic)) { return votingMap.get(topic); } else { Voting voting = new Voting(topic); this.votingMap.put(topic, voting); return voting; } }