diff options
author | Sunder Tattavarada <statta@research.att.com> | 2019-06-14 17:30:28 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-06-14 17:30:28 +0000 |
commit | c56b27404151b0d283cd16f7c5311ee4fb67936f (patch) | |
tree | a6025fe1d40d676cc0ca684dffd48e6d84f201ec | |
parent | 2aed32aa93c86ae3685b3134f10d884d1a34582a (diff) | |
parent | 3a922655ab8f6a6a4ed1a006a720b70e5bc21aa8 (diff) |
Merge "WidgetCatalog class DB constraints"
-rw-r--r-- | ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/domain/WidgetCatalog.java | 93 |
1 files changed, 21 insertions, 72 deletions
diff --git a/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/domain/WidgetCatalog.java b/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/domain/WidgetCatalog.java index 9d153e2a..1dc0582c 100644 --- a/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/domain/WidgetCatalog.java +++ b/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/domain/WidgetCatalog.java @@ -14,30 +14,51 @@ import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.Table; import javax.persistence.Transient; +import javax.validation.constraints.Digits; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; +import lombok.Getter; +import lombok.Setter; +import org.hibernate.validator.constraints.SafeHtml; @Entity @Table(name="EP_WIDGET_CATALOG") +@Getter +@Setter public class WidgetCatalog{ @Id @Column(name = "widget_id") @GeneratedValue(strategy=GenerationType.AUTO) + @Digits(integer = 11, fraction = 0) private long id; @Column(name = "wdg_name") + @Size(max = 100) + @SafeHtml + @NotNull private String name; @Column(name = "wdg_desc") + @Size(max = 200) + @SafeHtml private String desc; @Column(name = "wdg_file_loc") + @Size(max = 256) + @SafeHtml + @NotNull private String fileLocation; @Column(name = "all_user_flag") + @Size(max = 1) + @SafeHtml + @NotNull private String allowAllUser; @Column(name = "service_id") + @Digits(integer = 11, fraction = 0) private Long serviceId; @Transient @@ -53,78 +74,6 @@ public class WidgetCatalog{ ) private Set<RoleApp> widgetRoles; - public long getId() { - return id; - } - - public void setId(long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDesc() { - return desc; - } - - public void setDesc(String desc) { - this.desc = desc; - } - - public String getFileLocation() { - return fileLocation; - } - - public void setFileLocation(String fileLocation) { - this.fileLocation = fileLocation; - } - - public Set<RoleApp> getWidgetRoles() { - return widgetRoles; - } - - public void setWidgetRoles(Set<RoleApp> widgetRoles) { - this.widgetRoles = widgetRoles; - } - - public String getAllowAllUser() { - return allowAllUser; - } - - public void setAllowAllUser(String allowAllUser) { - this.allowAllUser = allowAllUser; - } - - public String getSortOrder() { - return sortOrder; - } - - public void setSortOrder(String sortOrder) { - this.sortOrder = sortOrder; - } - - public String getStatusCode() { - return statusCode; - } - - public void setStatusCode(String statusCode) { - this.statusCode = statusCode; - } - - public Long getServiceId() { - return serviceId; - } - - public void setServiceId(Long serviceId) { - this.serviceId = serviceId; - } - @Override public String toString() { return "WidgetCatalog [id=" + id + ", name=" + name + ", desc=" + desc + ", fileLocation=" + fileLocation |