summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-common/src/main/java
diff options
context:
space:
mode:
authorDominik Mizyn <d.mizyn@samsung.com>2019-06-14 11:50:04 +0200
committerDominik Mizyn <d.mizyn@samsung.com>2019-06-14 11:50:26 +0200
commit432a7933d2eab36d95b54e4a9d09a153144cdd76 (patch)
treee140bc20a0c25d9eff09d46ad1942f833d73835a /ecomp-portal-BE-common/src/main/java
parent91346e516f078aff100c0df25621f09950118150 (diff)
PortalAdminUserRole class DB constraints
Java Bean Validation SR 380 annotations added to classes Issue-ID: PORTAL-636 Change-Id: I8fb4f50e672e17b9e169303eb09255fe57288b45 Signed-off-by: Dominik Mizyn <d.mizyn@samsung.com>
Diffstat (limited to 'ecomp-portal-BE-common/src/main/java')
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/PortalAdminUserRole.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/PortalAdminUserRole.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/PortalAdminUserRole.java
index 01cc6941..dd0142c9 100644
--- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/PortalAdminUserRole.java
+++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/PortalAdminUserRole.java
@@ -43,6 +43,7 @@ import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
+import javax.validation.constraints.Digits;
/**
* This is to handle portal admins
@@ -54,13 +55,16 @@ public class PortalAdminUserRole implements Serializable{
@Id
@Column(name = "user_id")
+ @Digits(integer = 10, fraction = 0)
public Long userId;
@Id
@Column(name = "role_id")
+ @Digits(integer = 10, fraction = 0)
public Long roleId;
@Column(name = "app_id")
+ @Digits(integer = 11, fraction = 0)
public Long appId;
}