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;
21 import java.io.Serializable;
23 import javax.persistence.Column;
24 import javax.persistence.Entity;
25 import javax.persistence.GeneratedValue;
26 import javax.persistence.GenerationType;
27 import javax.persistence.Id;
28 import javax.persistence.Table;
31 @Table(name="fn_menu_functional_roles")
32 public class FunctionalMenuRole implements Serializable {
33 private static final long serialVersionUID = 1L;
36 @GeneratedValue(strategy=GenerationType.IDENTITY)
40 @Column(name = "MENU_ID")
43 @Column(name = "APP_ID")
46 @Column(name = "ROLE_ID")
47 public Integer roleId;
49 public Integer getId() {
53 public void setId(Integer id) {
57 public Long getMenuId() {
61 public void setMenuId(Long menuId) {
65 public Integer getAppId() {
69 public void setAppId(Integer appId) {
73 public Integer getRoleId() {
77 public void setRoleId(Integer roleId) {
82 public String toString() {
83 return "FunctionalMenuRole [id=" + id + ", menuId=" + menuId + ", appId=" + appId + ", roleId=" + roleId + "]";
87 public int hashCode() {
90 result = prime * result + ((appId == null) ? 0 : appId.hashCode());
91 result = prime * result + ((id == null) ? 0 : id.hashCode());
92 result = prime * result + ((menuId == null) ? 0 : menuId.hashCode());
93 result = prime * result + ((roleId == null) ? 0 : roleId.hashCode());
98 public boolean equals(Object o) {
100 if (o == this) return true;
101 if (!(o instanceof FunctionalMenuRole)) {
104 FunctionalMenuRole functionalMenuRole = (FunctionalMenuRole) o;
105 System.out.println("test");
106 return id.equals(functionalMenuRole.getId()) &&
107 menuId.equals(functionalMenuRole.menuId) &&
108 appId.equals(functionalMenuRole.appId) &&
109 roleId.equals(functionalMenuRole.roleId) ;