Package org.motechproject.mots.mapper
Class EnumsMapper
- java.lang.Object
-
- org.motechproject.mots.mapper.EnumsMapper
-
public class EnumsMapper extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description EnumsMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringfromChoiceType(ChoiceType choiceType)Get display name from ChoiceType.java.lang.StringfromGender(Gender gender)Get display name from Gender.java.lang.StringfromQuestionType(QuestionType questionType)Get display name from QuestionType.ChoiceTypetoChoiceType(java.lang.String displayName)Get ChoiceType object from display name.GendertoGender(java.lang.String displayName)Get Gender object from display name.QuestionTypetoQuestionType(java.lang.String displayName)Get QuestionType object from display name.
-
-
-
Method Detail
-
toGender
public Gender toGender(java.lang.String displayName)
Get Gender object from display name.- Parameters:
displayName- display name of Gender- Returns:
- Gender object
-
fromGender
public java.lang.String fromGender(Gender gender)
Get display name from Gender.- Parameters:
gender- gender to get display name- Returns:
- display name of Gender
-
toQuestionType
public QuestionType toQuestionType(java.lang.String displayName)
Get QuestionType object from display name.- Parameters:
displayName- display name of QuestionType- Returns:
- QuestionType object
-
fromQuestionType
public java.lang.String fromQuestionType(QuestionType questionType)
Get display name from QuestionType.- Parameters:
questionType- question type to get display name- Returns:
- display name of QuestionType
-
toChoiceType
public ChoiceType toChoiceType(java.lang.String displayName)
Get ChoiceType object from display name.- Parameters:
displayName- display name of ChoiceType- Returns:
- ChoiceType object
-
fromChoiceType
public java.lang.String fromChoiceType(ChoiceType choiceType)
Get display name from ChoiceType.- Parameters:
choiceType- choice type to get display name- Returns:
- display name of ChoiceType
-
-