package com.cygnusa.hyperm.wrappers;

public class QuestionOption {

    private String optid;
    private String opttext;
    private String score;
    private String iscorrect;
    private boolean isChecked;
    private String selected;
    private boolean isCheckedSurvey;

    public String getOptid() {
        return optid;
    }

    public void setOptid(String optid) {
        this.optid = optid;
    }

    public String getOpttext() {
        return opttext;
    }

    public void setOpttext(String opttext) {
        this.opttext = opttext;
    }

    public String getScore() {
        return score;
    }

    public void setScore(String score) {
        this.score = score;
    }

    public String getIscorrect() {
        return iscorrect;
    }

    public void setIscorrect(String iscorrect) {
        this.iscorrect = iscorrect;
    }

    public boolean isChecked() {
        return isChecked;
    }

    public void setChecked(boolean checked) {
        isChecked = checked;
    }

    public String getSelected() {
        return selected;
    }

    public void setSelected(String selected) {
        this.selected = selected;
    }

    public boolean isCheckedSurvey() {
        return selected == null ? isCheckedSurvey : selected.trim().equalsIgnoreCase("1");
    }

    public void setCheckedSurvey(boolean checkedSurvey) {
        isCheckedSurvey = checkedSurvey;
        selected = isCheckedSurvey ? "1" : "0";
    }
}
