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 private static final long serialVersionUID = 1L;
39 @GeneratedValue(strategy=GenerationType.IDENTITY)
40 @Column(name = "MENU_ID")
43 @Column(name = "COLUMN_NUM")
44 public Integer column;
46 @Column(name = "TEXT")
49 @Column(name = "PARENT_MENU_ID")
50 public Integer parentMenuId;
55 @Column(name="ACTIVE_YN")
56 public String active_yn;
62 public List<Integer> roles;
65 public Boolean restrictedApp;
67 public void normalize() {
68 if (this.column == null)
69 this.column = new Integer(1);
70 this.text = (this.text == null) ? "" : this.text.trim();
71 if (this.parentMenuId == null)
72 this.parentMenuId = new Integer(-1);
73 this.url = (this.url == null) ? "" : this.url.trim();
77 public String toString() {
78 return "FunctionalMenuItem [menuId=" + menuId + ", column=" + column + ", text=" + text + ", parentMenuId="
79 + parentMenuId + ", url=" + url + ", active_yn=" + active_yn + ", appid=" + appid + ", roles=" + roles
80 + ", restrictedApp=" + restrictedApp + "]";
83 public void setUrl(String url) {
87 public void setRestrictedApp(Boolean restrictedApp) {
88 this.restrictedApp = restrictedApp;