com.objectplanet.survey.plugin.api
Class ResponseRating

java.lang.Object
  extended by com.objectplanet.survey.plugin.api.Response
      extended by com.objectplanet.survey.plugin.api.ResponseRating

public class ResponseRating
extends Response

Represents a response to the rating question. Response to a rating question is the position of the selected value. Set value to 0 if N/A field is selected.

Author:
Irina Brun
Created:
2 April 2003

Method Summary
 int getValue()
          Gets the answer to the rating question.
 void keepBusinessObject()
          Get and keep business object.
 void releaseBusinessObject()
          Release business object.
 void setValue(int answer)
          Sets the answer to the rating question.
 
Methods inherited from class com.objectplanet.survey.plugin.api.Response
deleteEssayResponse, deleteIntextResponse, getErrorMessage, getErrorMessage, getEssayResponse, getFreeText, getIntextResponse, getQuestionNo, getRespondentId, getResponseDate, hasBusinessObject, isPersisted, isValid, isValid, setEssayResponse, setFreeText, setIntextResponse
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setValue

public void setValue(int answer)
              throws java.lang.IllegalArgumentException,
                     SurveySystemException
Sets the answer to the rating question. intValue is a rating option position, from 1 to rating level. 0 is used for N/A (if applicable)

Parameters:
intValue - Response to rating question.
Throws:
java.lang.IllegalArgumentException - If the answer is invalid
SurveySystemException - If an error occurs in the system.

getValue

public int getValue()
             throws SurveySystemException
Gets the answer to the rating question. Returns chosen rating option position, from 1 to rating level. 0 is used for N/A (if applicable). -1 means that no response to the rating question exists.

Returns:
The answer to the rating question
Throws:
SurveySystemException - If an error occurs in the system.

keepBusinessObject

public void keepBusinessObject()
                        throws SurveySystemException
Get and keep business object. See ATTENTION .

Overrides:
keepBusinessObject in class Response
Throws:
SurveySystemException - If an error occurs in the system.

releaseBusinessObject

public void releaseBusinessObject()
Release business object. See ATTENTION .

Overrides:
releaseBusinessObject in class Response

Copyright ? ObjectPlanet Inc. All Rights Reserved.

Built on December 20 2016