package ru.yandex.wmconsole.data.poll;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 * Вариант ответа
 * User: azakharov
 * Date: 14.03.12
 * Time: 17:50
 */
public class AnswerOptionInfo {
    private Long id;
    private Long questionId;
    private String text;
    private String description;
    private int number;
    private Integer score;
    private boolean textExpected;

    public AnswerOptionInfo() {
        // for jaxb
    }

    public AnswerOptionInfo(Long id, Long questionId, String text, String description, int number, Integer score, boolean textExpected) {
        this.id = id;
        this.questionId = questionId;
        this.text = text;
        this.number = number;
        this.score = score;
        this.textExpected = textExpected;
        this.description = description;
    }

    @XmlAttribute(name="id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @XmlTransient
    public Long getQuestionId() {
        return questionId;
    }

    public void setQuestionId(Long questionId) {
        this.questionId = questionId;
    }

    @XmlElement(name = "text")
    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    @XmlAttribute(name="user-text")
    public boolean isTextExpected() {
        return textExpected;
    }

    public void setTextExpected(boolean textExpected) {
        this.textExpected = textExpected;
    }

    @XmlTransient
    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    @XmlTransient
    public Integer getScore() {
        return score;
    }

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

    @XmlElement(name = "description")
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}
