Browse Source

User_Role composite key: add NotNull constraint annotation

Signed-off-by: Pekka Helenius <fincer89@hotmail.com>
v0.0.4-alpha
Pekka Helenius 4 years ago
parent
commit
6269a9c549
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      bookstore/src/main/java/com/fjordtek/bookstore/model/auth/UserRoleCompositeKey.java

+ 3
- 1
bookstore/src/main/java/com/fjordtek/bookstore/model/auth/UserRoleCompositeKey.java View File

@ -6,6 +6,7 @@ import java.io.Serializable;
import java.util.Objects; import java.util.Objects;
import javax.persistence.Embeddable; import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;
/** /**
* This class implements a composite primary key based on * This class implements a composite primary key based on
@ -21,8 +22,9 @@ public class UserRoleCompositeKey implements Serializable {
private static final long serialVersionUID = 2889337731246989510L; private static final long serialVersionUID = 2889337731246989510L;
@NotNull
private Long userId; private Long userId;
@NotNull
private Long roleId; private Long roleId;
//////////////////// ////////////////////


Loading…
Cancel
Save