summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunder Tattavarada <statta@research.att.com>2019-06-14 17:09:31 +0000
committerGerrit Code Review <gerrit@onap.org>2019-06-14 17:09:31 +0000
commite3f250e95491450a1c1040f8fc55c376aca8c072 (patch)
treeb98515d9c820711a9c9d4047d7b507f919621ee5
parent4b12eacf41dd7866039f1b9059188c619c317ad6 (diff)
parent8ed96608658e65670b6846e1c2d131021b6a18dd (diff)
Merge "App class DB constraints"
-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() {