2 * ================================================================================
\r
4 * ================================================================================
\r
5 * Copyright (C) 2017 AT&T Intellectual Property
\r
6 * ================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ================================================================================
\r
20 package org.openecomp.portalapp.portal.transport;
\r
21 import java.io.Serializable;
\r
23 import javax.persistence.Column;
\r
24 import javax.persistence.Entity;
\r
25 import javax.persistence.GeneratedValue;
\r
26 import javax.persistence.GenerationType;
\r
27 import javax.persistence.Id;
\r
28 import javax.persistence.Table;
\r
31 @Table(name="fn_menu_functional_roles")
\r
32 public class FunctionalMenuRole implements Serializable {
\r
33 private static final long serialVersionUID = 1L;
\r
36 @GeneratedValue(strategy=GenerationType.IDENTITY)
\r
37 @Column(name = "ID")
\r
40 @Column(name = "MENU_ID")
\r
43 @Column(name = "APP_ID")
\r
44 public Integer appId;
\r
46 @Column(name = "ROLE_ID")
\r
47 public Integer roleId;
\r
49 public Integer getId() {
\r
53 public void setId(Integer id) {
\r
57 public Long getMenuId() {
\r
61 public void setMenuId(Long menuId) {
\r
62 this.menuId = menuId;
\r
65 public Integer getAppId() {
\r
69 public void setAppId(Integer appId) {
\r
73 public Integer getRoleId() {
\r
77 public void setRoleId(Integer roleId) {
\r
78 this.roleId = roleId;
\r
82 public String toString() {
\r
83 return "FunctionalMenuRole [id=" + id + ", menuId=" + menuId + ", appId=" + appId + ", roleId=" + roleId + "]";
\r
87 public int hashCode() {
\r
88 final int prime = 31;
\r
90 result = prime * result + ((appId == null) ? 0 : appId.hashCode());
\r
91 result = prime * result + ((id == null) ? 0 : id.hashCode());
\r
92 result = prime * result + ((menuId == null) ? 0 : menuId.hashCode());
\r
93 result = prime * result + ((roleId == null) ? 0 : roleId.hashCode());
\r
98 public boolean equals(Object o) {
\r
100 if (o == this) return true;
\r
101 if (!(o instanceof FunctionalMenuRole)) {
\r
104 FunctionalMenuRole functionalMenuRole = (FunctionalMenuRole) o;
\r
105 System.out.println("test");
\r
106 return id.equals(functionalMenuRole.getId()) &&
\r
107 menuId.equals(functionalMenuRole.menuId) &&
\r
108 appId.equals(functionalMenuRole.appId) &&
\r
109 roleId.equals(functionalMenuRole.roleId) ;
\r