Question.java

/*
 * +====================================================================+
 * |         Copyright (C) 2015 Rochester Institute of Technology,      |
 * |            103 Lomb Memorial Drive, Rochester, NY - 14623          |
 * |                        All Rights Reserved.                        |
 * +====================================================================+
 *   FILENAME
 *    Question.java
 *
 *   AUTHOR
 *    @author mhickson
 *
 * =====================================================================
 */

package edu.rit.coopeval.model;

import javax.persistence.*;

@Entity
@Table(name = "QUESTION")
public class Question extends AuditableEntity {

    @Id
    @Column(name = "QUESTIONID", nullable = false, insertable = true, updatable = true, precision = 0)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "questionId_seq")
    @SequenceGenerator(name = "questionId_seq", sequenceName = "SEQ_Question_questionId", allocationSize = 1)
    private long questionId;

    @Lob
    @Column(name = "TEXT", nullable = true, insertable = true, updatable = true)
    private String text;

    @Lob
    @Column(name = "HELPTEXT", nullable = true, insertable = true, updatable = true)
    private String helpText;

    @ManyToOne
    @JoinColumn(name = "QUESTIONCATAGORYID")
    private QuestionCatagory questionCatagoryByQuestionCatagoryId;

    @ManyToOne
    @JoinColumn(name = "QUESTIONTYPEID")
    private QuestionType questionTypeByQuestionTypeId;

    public Long getQuestionId() {
        return questionId;
    }

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

    public String getText() {
        return text;
    }

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

    public String getHelpText() {
        return helpText;
    }

    public void setHelpText(String helpText) {
        this.helpText = helpText;
    }

    public QuestionCatagory getQuestionCatagoryByQuestionCatagoryId() {
        return questionCatagoryByQuestionCatagoryId;
    }

    public void setQuestionCatagoryByQuestionCatagoryId(QuestionCatagory questionCatagoryByQuestionCatagoryId) {
        this.questionCatagoryByQuestionCatagoryId = questionCatagoryByQuestionCatagoryId;
    }

    public QuestionType getQuestionTypeByQuestionTypeId() {
        return questionTypeByQuestionTypeId;
    }

    public void setQuestionTypeByQuestionTypeId(QuestionType questionTypeByQuestionTypeId) {
        this.questionTypeByQuestionTypeId = questionTypeByQuestionTypeId;
    }
}