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 
  22 import java.io.Serializable;
\r 
  24 import javax.persistence.Column;
\r 
  25 import javax.persistence.Entity;
\r 
  26 import javax.persistence.Id;
\r 
  28 import com.fasterxml.jackson.annotation.JsonInclude;
\r 
  31 @JsonInclude(JsonInclude.Include.NON_NULL)
\r 
  32 public class BusinessCardApplicationRole implements Serializable{
\r 
  37         private static final long serialVersionUID = 1L;
\r 
  40         public BusinessCardApplicationRole() {
\r 
  45         @Column(name="app_name")
\r 
  46         private String appName;
\r 
  49         @Column(name="role_name")
\r 
  50         private String roleName;
\r 
  53         public String getAppName() {
\r 
  57         public void setAppName(String appName) {
\r 
  58                 this.appName = appName;
\r 
  63         public String getRoleName() {
\r 
  67         public void setRoleName(String roleName) {
\r 
  68                 this.roleName = roleName;
\r 
  72         public String toString() {
\r 
  73                 return "BusinessCardUserApplicationRoles [appName=" + appName + ", roleName=" + roleName + "]";
\r 
  77         public int hashCode() {
\r 
  78                 final int prime = 31;
\r 
  80                 result = prime * result + ((appName == null) ? 0 : appName.hashCode());
\r 
  81                 result = prime * result + ((roleName == null) ? 0 : roleName.hashCode());
\r 
  86         public boolean equals(Object obj) {
\r 
  91                 if (getClass() != obj.getClass())
\r 
  93                 BusinessCardApplicationRole other = (BusinessCardApplicationRole) obj;
\r 
  94                 if (appName == null) {
\r 
  95                         if (other.appName != null)
\r 
  97                 } else if (!appName.equals(other.appName))
\r 
  99                 if (roleName == null) {
\r 
 100                         if (other.roleName != null)
\r 
 102                 } else if (!roleName.equals(other.roleName))
\r