public void trueOrFalseDone() {
   TrueOrFalse trueOrFalse = (TrueOrFalse) TrueOrFalseUI.getInstance().convertToModel();
   trueOrFalse.setUnit(AdminService.getInstance().getSelectedUnit());
   if (MainService.getInstance().getCurrentState().equals(MainState.AdminNewQuestion)) {
     TrueOrFalseRepository.getInstance().save(trueOrFalse);
     TrueOrFalseUI.getInstance().resetTextArea();
   } else if (MainService.getInstance().getCurrentState().equals(MainState.AdminUpdateQuestion)) {
     TrueOrFalseRepository.getInstance().update(trueOrFalse);
   }
 }
Exemplo n.º 2
0
 public QuestionRepository getQuestionRepository() {
   return TrueOrFalseRepository.getInstance();
 }