package models;


/**
 * Created by nonoca on 7/12/16.
 */


import com.avaje.ebean.Model;
import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class User extends Model {

    @Id
    public Long id;

    public String name;

    public String passwordDigest;

    public User() {
    }

    public User(String name, String passwordDigest) {
        this.name = name;
        this.passwordDigest = passwordDigest;
    }

    public String getName() {
        return name;
    }

    public String getPasswordDigest() {
        return passwordDigest;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setPasswordDigest(String passwordDigest) {
        this.passwordDigest = passwordDigest;
    }

    public static final Find<Long, String> finder = new Find<Long, String>(){};

}

@@ -84,16 +84,17 @@
 .Model;%0A
+%0A
 import j
@@ -146,16 +146,61 @@
 ence.Id;
+%0Aimport javax.validation.constraints.NotNull;
 %0A%0A@Entit
@@ -265,16 +265,29 @@
 ng id;%0A%0A
+    @NotNull%0A
     publ
@@ -303,16 +303,29 @@
  name;%0A%0A
+    @NotNull%0A
     publ

Change java file