Class AbstractMatrixExportHandler
java.lang.Object
ch.tocco.nice2.optional.survey.impl.action.export.questionhandlers.AbstractQuestionExportHandler
ch.tocco.nice2.optional.survey.impl.action.export.questionhandlers.AbstractMatrixExportHandler
- All Implemented Interfaces:
QuestionExportHandler
- Direct Known Subclasses:
MatrixQuestionExportHandler, TextChoiceQuestionExportHandler
abstract class that handles matrix specific methods
- get answers sorted by x axis
- get label from x axis
- get values for selected answers
-
Field Summary
Fields inherited from class AbstractQuestionExportHandler
ANSWER_FIELD, LABEL_FIELD, POINTS_FIELD, REL_SURVEY_ANSWER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetLabelFromAxis(Entity sourceEntity, String axis) get the label from a related axisgetListForChoice(Entity answer, SurveyBean surveyBean) either returns the values for a selected or unselected answer values for selected answer (1, points) values for unselected answer (0, "")protected EntityListgetSurveyAnswersSortedByMatrixX(SurveyBean surveyBean) resolve all answers from the question and order them by the x axis sortingMethods inherited from class AbstractQuestionExportHandler
createImmutableList, getAnswerData, getColumnData, getData, getEntitiesToCreateLinesForMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface QuestionExportHandler
getTypes
-
Constructor Details
-
AbstractMatrixExportHandler
public AbstractMatrixExportHandler()
-
-
Method Details
-
getSurveyAnswersSortedByMatrixX
resolve all answers from the question and order them by the x axis sorting- Parameters:
surveyBean- the bean to get the question from- Returns:
- the ordered entity list
-
getLabelFromAxis
-
getListForChoice
either returns the values for a selected or unselected answer values for selected answer (1, points) values for unselected answer (0, "")- Parameters:
answer- the answer to checksurveyBean- the bean to get the selected answers from- Returns:
- a list of values to display
-