예제 #1
0
 public void removePollingQuestion(AbstractPollingQuestion pollingQuestion)
     throws UsedQuestionException {
   if (!voteDao.isUsedQuestion(pollingQuestion)) {
     voteDao.remove(pollingQuestion);
   } else {
     throw new UsedQuestionException("question_is_used");
   }
 }
예제 #2
0
  public void removePollingTemplate(AbstractPollingTemplate pollingTemplate)
      throws UsedTemplateException {
    if (!voteDao.isUsedTemplate(pollingTemplate)) {
      voteDao.remove(pollingTemplate);
    } else {
      throw new UsedTemplateException("template_is_used");
    }

    //        pollingTemplate = findTemplateByName(pollingTemplate.getName());
    //        List<AbstractVomte> relatedPollingList = findAllVotesByTemplate(pollingTemplate);
    //        if (!relatedPollingList.isEmpty()){
    //            //throws exception
    //            return;
    //        }
  }
예제 #3
0
 public void remove(EntityObject obj) throws Exception {
   voteDao.remove(obj);
 }
예제 #4
0
 public void removeVote(Vote vote) {
   voteDao.remove(vote);
 }