1 package org.openecomp.portalapp.portal.transport;
3 import java.io.Serializable;
5 public class ExternalAccessPerms implements Serializable, Comparable{
10 private static final long serialVersionUID = -200964838466882602L;
12 public String instance;
14 public String description;
17 public ExternalAccessPerms() {
23 public ExternalAccessPerms(String type, String instance, String action, String description) {
26 this.instance = instance;
28 this.description = description;
31 public ExternalAccessPerms(String type, String instance, String action) {
34 this.instance = instance;
42 public String getType() {
46 * @param type the type to set
48 public void setType(String type) {
52 * @return the instance
54 public String getInstance() {
58 * @param instance the instance to set
60 public void setInstance(String instance) {
61 this.instance = instance;
66 public String getAction() {
70 * @param action the action to set
72 public void setAction(String action) {
76 public String getDescription() {
80 public void setDescription(String description) {
81 this.description = description;
86 public int compareTo(Object obj){
87 ExternalAccessPerms other = (ExternalAccessPerms)obj;
89 String c1 = getInstance();
90 String c2 = other.getInstance();
92 return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2);
98 public int hashCode() {
101 result = prime * result + ((action == null) ? 0 : action.hashCode());
102 result = prime * result + ((description == null) ? 0 : description.hashCode());
103 result = prime * result + ((instance == null) ? 0 : instance.hashCode());
104 result = prime * result + ((type == null) ? 0 : type.hashCode());
111 public boolean equals(Object obj) {
116 if (getClass() != obj.getClass())
118 ExternalAccessPerms other = (ExternalAccessPerms) obj;
119 if (action == null) {
120 if (other.action != null)
122 } else if (!action.equals(other.action))
124 if (description == null) {
125 if (other.description != null)
127 } else if (!description.equals(other.description))
129 if (instance == null) {
130 if (other.instance != null)
132 } else if (!instance.equals(other.instance))
135 if (other.type != null)
137 } else if (!type.equals(other.type))