Pre-requisites
/**
* TODO: Generate setters/getters
*/
@Entity
public class User implements Serializable {
@Id
@GeneratedValue
private long id;
@NotNull
@Size(min = 5, max = 100)
private String fullName;
@NotNull
@Column(unique = true)
@Pattern(regexp = ".+@.+\\..+", message = "{constraint.email}")
private String email;
@NotNull
@Size(min = 6, max = 10)
private String password;
}
No comments:
Post a Comment