From: Dominik Mizyn Date: Tue, 18 Jun 2019 08:44:10 +0000 (+0200) Subject: FavoritesFunctionalMenuItemJson class DB constraints X-Git-Tag: 3.2.0~254^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=a8d8fd9d5c8dbfa166c85d2a97184dea9cbcff69;hp=78d64f8cb1694b4260b6f188aa0b90bf13fc1369;p=portal.git 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 --- 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; }