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
8 package org.opendaylight.aaa.api.model;
10 import java.util.Objects;
11 import javax.xml.bind.annotation.XmlRootElement;
13 @XmlRootElement(name = "grant")
15 private String grantid;
16 private String domainid;
17 private String userid;
18 private String roleid;
20 public String getGrantid() {
24 public void setGrantid(final String id) {
28 public String getDomainid() {
32 public void setDomainid(final String id) {
36 public String getUserid() {
40 public void setUserid(final String id) {
44 public String getRoleid() {
48 public void setRoleid(final String id) {
53 public int hashCode() {
54 return getUserid().hashCode();
58 public boolean equals(final Object obj) {
62 if (obj == null || getClass() != obj.getClass()) {
65 final Grant other = (Grant) obj;
66 return Objects.equals(getDomainid(), other.getDomainid()) && Objects.equals(getRoleid(), other.getRoleid())
67 && Objects.equals(getUserid(), other.getUserid());