Package ejava.jpa.example.validation
Class Person
- java.lang.Object
-
- ejava.jpa.example.validation.Person
-
-
Field Summary
Fields Modifier and Type Field Description private @NotNull(groups={Drivers.class,POCs.class}) @Past(groups=Drivers.class) Date
birthDate
private @NotNull(groups=POCs.class) @Size(min=7,max=50) @Pattern(regexp="^.+@.+\\..+$") String
email
private String
firstName
private int
id
private String
lastName
-
Constructor Summary
Constructors Constructor Description Person()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Date
getBirthDate()
String
getEmail()
String
getFirstName()
int
getId()
String
getLastName()
Person
setBirthDate(Date birthDate)
Person
setEmail(String email)
Person
setFirstName(String firstName)
Person
setLastName(String lastName)
String
toString()
-
-
-
Field Detail
-
id
private int id
-
firstName
@ValidName(min=1, max=12, regexp="^[a-zA-Z\\ \\-]+$", message="invalid first name") private String firstName
-
lastName
@ValidName(min=1, max=20, regexp="^[a-zA-Z\\ \\-]+$", message="invalid last name") private String lastName
-
birthDate
@NotNull(groups={Drivers.class,POCs.class}) @Past(groups=Drivers.class) @MinAge(age=18,groups=POCs.class) @MinAge(age=16,groups=Drivers.class) private @NotNull(groups={Drivers.class,POCs.class}) @Past(groups=Drivers.class) Date birthDate
-
email
@NotNull(groups=POCs.class) @Size(min=7, max=50) @Pattern(regexp="^.+@.+\\..+$") private @NotNull(groups=POCs.class) @Size(min=7,max=50) @Pattern(regexp="^.+@.+\\..+$") String email
-
-