Package org.encuestame.persistence.domain.survey

Examples of org.encuestame.persistence.domain.survey.SurveyResult


                        .getSurveyById(surveyId);
                final QuestionAnswer qAnswer = getSurveyService()
                        .getQuestionAnswerById(qanswer);
                final Question question = getSurveyService().getQuestionById(
                        questionId);
                final SurveyResult surveyResult = getSurveyService()
                        .saveSurveyResult(qAnswer, survey, question,
                                txtResponse);
                jsonResponse.put("surveyResult", surveyResult);
                setItemResponse(jsonResponse);
            }
View Full Code Here


   * encuestame.persistence.domain.question.QuestionAnswer,
   * org.encuestame.persistence.domain.survey.Survey,
   * org.encuestame.persistence.domain.question.Question, java.lang.String)
   */
  public SurveyResult saveSurveyResult(final QuestionAnswer answer, final Survey survey, final Question question, final String response){
    final SurveyResult result = new SurveyResult();
    result.setAnswer(answer);
    result.setSurvey(survey);
    result.setQuestion(question);
    result.setTxtResponse(response == " " ? null : response);
    getSurveyDaoImp().saveOrUpdate(result);
    return result;
  }
View Full Code Here

     * @param survey
     * @return
     */
    public SurveyResult createSurveyResult(final QuestionAnswer answer,
            final Question question, final Survey survey) {
        final SurveyResult result = new SurveyResult();
        result.setAnswer(answer);
        result.setQuestion(question);
        result.setSurvey(survey);
        getSurveyDaoImp().saveOrUpdate(result);
        return result;
    }
View Full Code Here

    /**
     * Test {@link SurveyResult} domain.
     */
    @Test
    public void testSurveyResult() {
        final SurveyResult result = new SurveyResult();
        final QuestionAnswer qAnswers = createQuestionAnswer("Spain",
                this.initQuestion, "ORFQT29");
        result.setAnswer(qAnswers);
        result.setQuestion(this.initQuestion);
        result.setSurvey(this.initSurvey);
        result.setTxtResponse("20");
        getSurveyDaoImp().saveOrUpdate(result);
        assertNotNull(result.getAnswer());
        assertNotNull(result.getQuestion());
    assertNotNull(result.getTxtResponse());
    assertNotNull(result.getSurvey());
    }
View Full Code Here

TOP

Related Classes of org.encuestame.persistence.domain.survey.SurveyResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.