if(this.hasVoted(roomP,rc.getStreamid())){
log.debug("hasVoted: true");
return -1;
} else {
log.debug("hasVoted: false");
RoomPollAnswers rpA = new RoomPollAnswers();
if (pollTypeId==1){
log.debug("boolean");
//Is boolean Question
if (pollvalue==1){
rpA.setAnswer(new Boolean(true));
} else {
rpA.setAnswer(new Boolean(false));
}
} else if(pollTypeId==2){
log.debug("numeric");
rpA.setPointList(pollvalue);
}
rpA.setVotedClients(rc);
rpA.setVoteDate(new Date());
roomP.getRoomPollAnswerList().add(rpA);
return 1;
}
} catch (Exception err){
log.error("vote");