package edu.virginia.psyc.r01.persistence;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.mindtrails.domain.questionnaire.LinkedQuestionnaireData;

import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;

/**
 * Created by Diheng on 7/27/17.
 */

@Entity
@Table(name="ReturnIntention")
@EqualsAndHashCode(callSuper = true)
@Data
public class ReturnIntention extends LinkedQuestionnaireData {
    private int returnIntention;

    @Lob
    private String notReturnReason;
}
@@ -253,16 +253,61 @@
 e.Table;
+%0Aimport javax.validation.constraints.NotNull;
 %0A%0A/**%0A *
@@ -486,16 +486,30 @@
 reData %7B
+%0A%0A    @NotNull
 %0A    pri
@@ -513,19 +513,23 @@
 private 
-i
+I
 nt
+eger
  returnI

Add @NotNull validation to the Return Intention Java file. Keep all the form hydration logic in the HTML, because that form depends on Javascript to conditionally display a text box.