001/* 002 * Copyright 2011 Anyware Services 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.ametys.plugins.survey.data; 017 018/** 019 * Class representing a survey answer, i.e. the response of a user to a question of the survey. 020 */ 021public class SurveyAnswer 022{ 023 024 /** The question ID. */ 025 protected String _questionId; 026 027 /** The answer value. */ 028 protected String _value; 029 030 /** 031 * Build a SurveyAnswer object. 032 */ 033 public SurveyAnswer() 034 { 035 this(null, null); 036 } 037 038 /** 039 * Build a SurveyAnswer object. 040 * @param questionId the question ID. 041 * @param value the answer value. 042 */ 043 public SurveyAnswer(String questionId, String value) 044 { 045 super(); 046 this._questionId = questionId; 047 this._value = value; 048 } 049 050 /** 051 * Get the questionId. 052 * @return the questionId 053 */ 054 public String getQuestionId() 055 { 056 return _questionId; 057 } 058 059 /** 060 * Set the questionId. 061 * @param questionId the questionId to set 062 */ 063 public void setQuestionId(String questionId) 064 { 065 this._questionId = questionId; 066 } 067 068 /** 069 * Get the value. 070 * @return the value 071 */ 072 public String getValue() 073 { 074 return _value; 075 } 076 077 /** 078 * Set the value. 079 * @param value the value to set 080 */ 081 public void setValue(String value) 082 { 083 this._value = value; 084 } 085 086}