2 * Copyright (c) 2014, 2017 Hewlett-Packard Development Company, L.P. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.aaa.api.model;
11 import java.util.Objects;
15 * @author peter.mellquist@hp.com
19 import javax.xml.bind.annotation.XmlRootElement;
21 @XmlRootElement(name = "grant")
23 private String grantid;
24 private String domainid;
25 private String userid;
26 private String roleid;
28 public String getGrantid() {
32 public void setGrantid(String id) {
36 public String getDomainid() {
40 public void setDomainid(String id) {
44 public String getUserid() {
48 public void setUserid(String id) {
52 public String getRoleid() {
56 public void setRoleid(String id) {
61 public int hashCode() {
62 return this.getUserid().hashCode();
66 public boolean equals(Object obj) {
71 if (obj == null || getClass() != obj.getClass()) {
75 Grant other = (Grant) obj;
76 if (Objects.equals(getDomainid(), other.getDomainid()) && Objects.equals(getRoleid(), other.getRoleid())
77 && Objects.equals(getUserid(), other.getUserid())) {