2 * ============LICENSE_START==========================================
4 * ===================================================================
5 * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6 * ===================================================================
8 * Unless otherwise specified, all software contained herein is licensed
9 * under the Apache License, Version 2.0 (the “License”);
10 * you may not use this software except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
21 * Unless otherwise specified, all documentation contained herein is licensed
22 * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
23 * you may not use this documentation except in compliance with the License.
24 * You may obtain a copy of the License at
26 * https://creativecommons.org/licenses/by/4.0/
28 * Unless required by applicable law or agreed to in writing, documentation
29 * distributed under the License is distributed on an "AS IS" BASIS,
30 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31 * See the License for the specific language governing permissions and
32 * limitations under the License.
34 * ============LICENSE_END============================================
36 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
38 package org.openecomp.portalapp.widget.domain;
42 import javax.persistence.CascadeType;
43 import javax.persistence.Column;
44 import javax.persistence.Entity;
45 import javax.persistence.FetchType;
46 import javax.persistence.GeneratedValue;
47 import javax.persistence.GenerationType;
48 import javax.persistence.Id;
49 import javax.persistence.JoinColumn;
50 import javax.persistence.JoinTable;
51 import javax.persistence.ManyToMany;
52 import javax.persistence.Table;
53 import javax.persistence.Transient;
57 @Table(name="EP_WIDGET_CATALOG")
58 public class WidgetCatalog{
61 @Column(name = "widget_id")
62 @GeneratedValue(strategy=GenerationType.AUTO)
65 @Column(name = "wdg_name")
68 @Column(name = "wdg_desc")
71 @Column(name = "wdg_file_loc")
72 private String fileLocation;
74 @Column(name = "all_user_flag")
75 private String allowAllUser;
77 @Column(name = "service_id")
78 private Long serviceId;
81 private String sortOrder;
84 private String statusCode;
86 @ManyToMany(fetch = FetchType.EAGER, cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH})
87 @JoinTable(name = "ep_widget_catalog_role",
88 joinColumns = {@JoinColumn(name = "WIDGET_ID")},
89 inverseJoinColumns = {@JoinColumn(name = "ROLE_ID")}
91 private Set<RoleApp> widgetRoles;
97 public void setId(long id) {
101 public String getName() {
105 public void setName(String name) {
109 public String getDesc() {
113 public void setDesc(String desc) {
117 public String getFileLocation() {
121 public void setFileLocation(String fileLocation) {
122 this.fileLocation = fileLocation;
125 public Set<RoleApp> getWidgetRoles() {
129 public void setWidgetRoles(Set<RoleApp> widgetRoles) {
130 this.widgetRoles = widgetRoles;
133 public String getAllowAllUser() {
137 public void setAllowAllUser(String allowAllUser) {
138 this.allowAllUser = allowAllUser;
141 public String getSortOrder() {
145 public void setSortOrder(String sortOrder) {
146 this.sortOrder = sortOrder;
149 public String getStatusCode() {
153 public void setStatusCode(String statusCode) {
154 this.statusCode = statusCode;
157 public Long getServiceId() {
161 public void setServiceId(Long serviceId) {
162 this.serviceId = serviceId;
166 public String toString() {
167 return "WidgetCatalog [id=" + id + ", name=" + name + ", desc=" + desc + ", fileLocation=" + fileLocation
168 + ", allowAllUser=" + allowAllUser + ", serviceId=" + serviceId + ", sortOrder=" + sortOrder
169 + ", statusCode=" + statusCode + ", widgetRoles=" + widgetRoles + "]";