What is the javax.validation
package in Java EE? How to use this with JPA?
I want to validate my JPA Entity with the @NotNull
annotation. My JPA implementation is Hibernate.
Here's my Entity:
public class Employee implements Serializable , EmployeeDetail {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
private int id;
private String name;
private long salary;
...
See Question&Answers more detail:os