package studentcapture.feedback;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * This model takes care of the feedback of an assignment. It is used to gather
 * all information possible.
 *
 * @author Group6
 * @version 0.1
 * @see studentcapture.datalayer.database.Submission
 */
public class FeedbackModel {
    @NotNull @Min(1)
    private int studentID;
    @NotNull @Min(1)
    private int assignmentID;
    @Min(1) @Max(10)
    private String courseID;

    @Min(1) @Max(6)
    private String courseCode;

    private String grade, feedbackText;

    public void setTeacherID(String teacherID) {
        this.teacherID = teacherID;
    }

    private String teacherID;


    /**
     * @return the StudentID of the feedback.
     */
    public int getStudentID() {
        return studentID;
    }

    /**
     * @param studentID set the studentID of feedback.
     */
    public void setStudentID(int studentID) {
        this.studentID = studentID;
    }

    /**
     * @return the AssigmentID of the feedback
     */
    public int getAssignmentID() {
        return assignmentID;
    }

    /**
     * @param assignmentID sets the assignmentID
     */
    public void setAssignmentID(int assignmentID) {
        this.assignmentID = assignmentID;
    }

    /**
     * @return Returns the grade of the assignment.
     */
    public String getGrade() {
        return grade;
    }

    /**
     * @param grade will set the grade of the Submission
     */
    public void setGrade(String grade) {
        this.grade = grade;
    }

    /**
     * @return the given feedback text appointed towards the submission.
     */
    public String getFeedbackText() {
        return feedbackText;
    }

    /**
     * @param feedbackText The feedback in text form by the user.
     */
    public void setFeedbackText(String feedbackText) {
        this.feedbackText = feedbackText;
    }

    /**
     * @return courseID of the feedback.
     */
    public String getCourseID() {
        return courseID;
    }

    /**
     * @param courseID the courseID of the feedback.
     */
    public void setCourseID(String courseID) {
        this.courseID = courseID;
    }

    /**
     * @return teacherID of the current feedback.
     */
    public String getTeacherID() {
        return teacherID;
    }

    public String getCourseCode() {
        return courseCode;
    }

    public void setCourseCode(String courseCode) {
        this.courseCode = courseCode;
    }
}

@@ -153,16 +153,58 @@
 NotNull;
+%0Aimport javax.validation.constraints.Size;
 %0A%0A/**%0A *
@@ -477,24 +477,25 @@
  studentID;%0A
+%0A
     @NotNull
@@ -533,33 +533,38 @@
 mentID;%0A
+%0A
     @
-Min(1) @Max(
+Size(min=1, max=
 10)%0A    
@@ -598,20 +598,24 @@
    @
-Min(1) @Max(
+Size(min=1, max=
 6)%0A 

Update the validation to work correctly on strings