2 * ================================================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ================================================================================
20 package org.openecomp.portalapp.portal.transport;
22 import java.io.Serializable;
23 import java.util.List;
25 import javax.persistence.Column;
26 import javax.persistence.Entity;
27 import javax.persistence.GeneratedValue;
28 import javax.persistence.GenerationType;
29 import javax.persistence.Id;
30 import javax.persistence.Table;
31 import javax.persistence.Transient;
34 @Table(name="fn_menu_functional")
35 public class FunctionalMenuItem implements Serializable {
36 public FunctionalMenuItem(){};
38 private static final long serialVersionUID = 1L;
41 @GeneratedValue(strategy=GenerationType.IDENTITY)
42 @Column(name = "MENU_ID")
45 @Column(name = "COLUMN_NUM")
46 public Integer column;
48 @Column(name = "TEXT")
51 @Column(name = "PARENT_MENU_ID")
52 public Integer parentMenuId;
57 @Column(name="ACTIVE_YN")
58 public String active_yn;
63 public List<Integer> getRoles() {
67 public void setRoles(List<Integer> roles) {
72 private List<Integer> roles;
75 public Boolean restrictedApp;
77 public void normalize() {
78 if (this.column == null)
79 this.column = new Integer(1);
80 this.text = (this.text == null) ? "" : this.text.trim();
81 if (this.parentMenuId == null)
82 this.parentMenuId = new Integer(-1);
83 this.url = (this.url == null) ? "" : this.url.trim();
87 public String toString() {
88 return "FunctionalMenuItem [menuId=" + menuId + ", column=" + column + ", text=" + text + ", parentMenuId="
89 + parentMenuId + ", url=" + url + ", active_yn=" + active_yn + ", appid=" + appid + ", roles=" + roles
90 + ", restrictedApp=" + restrictedApp + "]";
93 public void setUrl(String url) {
97 public void setRestrictedApp(Boolean restrictedApp) {
98 this.restrictedApp = restrictedApp;