1 package org.openecomp.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{
22 private static final long serialVersionUID = 1L;
25 @Column(name = "widget_id")
26 @GeneratedValue(strategy=GenerationType.AUTO)
29 @Column(name = "wdg_name")
32 @Column(name = "wdg_desc")
35 @Column(name = "wdg_file_loc")
36 private String fileLocation;
38 @Column(name = "all_user_flag")
39 private String allowAllUser;
41 @Column(name = "service_id")
42 private Long serviceId;
45 private String sortOrder;
48 private String statusCode;
50 @ManyToMany(fetch = FetchType.EAGER, cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH})
51 @JoinTable(name = "ep_widget_catalog_role",
52 joinColumns = {@JoinColumn(name = "WIDGET_ID")},
53 inverseJoinColumns = {@JoinColumn(name = "ROLE_ID")}
55 private Set<RoleApp> widgetRoles;
61 public void setId(long id) {
65 public String getName() {
69 public void setName(String name) {
73 public String getDesc() {
77 public void setDesc(String desc) {
81 public String getFileLocation() {
85 public void setFileLocation(String fileLocation) {
86 this.fileLocation = fileLocation;
89 public Set<RoleApp> getWidgetRoles() {
93 public void setWidgetRoles(Set<RoleApp> widgetRoles) {
94 this.widgetRoles = widgetRoles;
97 public String getAllowAllUser() {
101 public void setAllowAllUser(String allowAllUser) {
102 this.allowAllUser = allowAllUser;
105 public String getSortOrder() {
109 public void setSortOrder(String sortOrder) {
110 this.sortOrder = sortOrder;
113 public String getStatusCode() {
117 public void setStatusCode(String statusCode) {
118 this.statusCode = statusCode;
121 public Long getServiceId() {
125 public void setServiceId(Long serviceId) {
126 this.serviceId = serviceId;
130 public String toString() {
131 return "WidgetCatalog [name=" + name + ", desc=" + desc + ", allowAllUser=" + allowAllUser + "]";