1 package org.onap.portalapp.widget.domain;
5 import javax.persistence.CascadeType;
6 import javax.persistence.Column;
7 import javax.persistence.Entity;
8 import javax.persistence.FetchType;
9 import javax.persistence.GeneratedValue;
10 import javax.persistence.GenerationType;
11 import javax.persistence.Id;
12 import javax.persistence.JoinColumn;
13 import javax.persistence.JoinTable;
14 import javax.persistence.ManyToMany;
15 import javax.persistence.Table;
16 import javax.persistence.Transient;
20 @Table(name="EP_WIDGET_CATALOG")
21 public class WidgetCatalog{
24 @Column(name = "widget_id")
25 @GeneratedValue(strategy=GenerationType.AUTO)
28 @Column(name = "wdg_name")
31 @Column(name = "wdg_desc")
34 @Column(name = "wdg_file_loc")
35 private String fileLocation;
37 @Column(name = "all_user_flag")
38 private String allowAllUser;
40 @Column(name = "service_id")
41 private Long serviceId;
44 private String sortOrder;
47 private String statusCode;
49 @ManyToMany(fetch = FetchType.EAGER, cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH})
50 @JoinTable(name = "ep_widget_catalog_role",
51 joinColumns = {@JoinColumn(name = "WIDGET_ID")},
52 inverseJoinColumns = {@JoinColumn(name = "ROLE_ID")}
54 private Set<RoleApp> widgetRoles;
60 public void setId(long id) {
64 public String getName() {
68 public void setName(String name) {
72 public String getDesc() {
76 public void setDesc(String desc) {
80 public String getFileLocation() {
84 public void setFileLocation(String fileLocation) {
85 this.fileLocation = fileLocation;
88 public Set<RoleApp> getWidgetRoles() {
92 public void setWidgetRoles(Set<RoleApp> widgetRoles) {
93 this.widgetRoles = widgetRoles;
96 public String getAllowAllUser() {
100 public void setAllowAllUser(String allowAllUser) {
101 this.allowAllUser = allowAllUser;
104 public String getSortOrder() {
108 public void setSortOrder(String sortOrder) {
109 this.sortOrder = sortOrder;
112 public String getStatusCode() {
116 public void setStatusCode(String statusCode) {
117 this.statusCode = statusCode;
120 public Long getServiceId() {
124 public void setServiceId(Long serviceId) {
125 this.serviceId = serviceId;
129 public String toString() {
130 return "WidgetCatalog [id=" + id + ", name=" + name + ", desc=" + desc + ", fileLocation=" + fileLocation
131 + ", allowAllUser=" + allowAllUser + ", serviceId=" + serviceId + ", sortOrder=" + sortOrder
132 + ", statusCode=" + statusCode + ", widgetRoles=" + widgetRoles + "]";