summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-widget-ms/widget-ms/src/main
diff options
context:
space:
mode:
authorDominik Mizyn <d.mizyn@samsung.com>2019-06-13 16:22:28 +0200
committerDominik Mizyn <d.mizyn@samsung.com>2019-06-13 16:22:31 +0200
commit8ed96608658e65670b6846e1c2d131021b6a18dd (patch)
treed8a7d060dbb38e8849506507feb5886ff5f2b50b /ecomp-portal-widget-ms/widget-ms/src/main
parent569390d96ef6c23d9bd1654bf5288f52865af647 (diff)
App class DB constraints
Java Bean Validation SR 380 annotations added to classes Issue-ID: PORTAL-627 Change-Id: I827f99ef75c6af3f9881fe68f1cb245795ba2734 Signed-off-by: Dominik Mizyn <d.mizyn@samsung.com>
Diffstat (limited to 'ecomp-portal-widget-ms/widget-ms/src/main')
-rw-r--r--ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/domain/App.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/domain/App.java b/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/domain/App.java
index d950d035..212826cd 100644
--- a/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/domain/App.java
+++ b/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/domain/App.java
@@ -8,6 +8,10 @@ import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
+import javax.validation.constraints.Digits;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+import org.hibernate.validator.constraints.SafeHtml;
@Entity
@Table(name = "FN_APP")
@@ -18,9 +22,13 @@ public class App implements Serializable{
@Id
@Column(name = "APP_ID")
@GeneratedValue(strategy=GenerationType.AUTO)
+ @Digits(integer = 11, fraction = 0)
private Long appId;
-
+
@Column(name = "APP_Name")
+ @SafeHtml
+ @Size(max = 100)
+ @NotNull
private String appName;
public Long getAppId() {