summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-common
diff options
context:
space:
mode:
authorDominik Mizyn <d.mizyn@samsung.com>2019-06-18 10:44:10 +0200
committerDominik Mizyn <d.mizyn@samsung.com>2019-06-18 10:44:13 +0200
commita8d8fd9d5c8dbfa166c85d2a97184dea9cbcff69 (patch)
tree9a6065297770eb09d0ce1309125c7eea3cfd556a /ecomp-portal-BE-common
parent78d64f8cb1694b4260b6f188aa0b90bf13fc1369 (diff)
FavoritesFunctionalMenuItemJson class DB constraints
Java Bean Validation SR 380 annotations added to classes Issue-ID: PORTAL-640 Change-Id: I5080e848de12669db9cdd24afe86510dcd82c3e2 Signed-off-by: Dominik Mizyn <d.mizyn@samsung.com>
Diffstat (limited to 'ecomp-portal-BE-common')
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/FavoritesFunctionalMenuItemJson.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/FavoritesFunctionalMenuItemJson.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/FavoritesFunctionalMenuItemJson.java
index 71004cc4..1c444a9f 100644
--- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/FavoritesFunctionalMenuItemJson.java
+++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/FavoritesFunctionalMenuItemJson.java
@@ -44,7 +44,7 @@ import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
-
+import javax.validation.constraints.Digits;
/**
@@ -55,21 +55,23 @@ import javax.persistence.Transient;
public class FavoritesFunctionalMenuItemJson implements Serializable {
private static final long serialVersionUID = 1L;
-
+
@Id
@Column(name = "user_id")
+ @Digits(integer = 11, fraction = 0)
public Long userId;
-
+
@Id
@Column(name = "menu_id")
+ @Digits(integer = 11, fraction = 0)
public Long menuId;
-
+
@Column(name = "text")
public String text;
-
+
@Column(name = "url")
public String url;
-
+
@Transient
public Boolean restrictedApp;
}