View Javadoc

1   /**
2    * Copyright (C) 2008 Atlassian
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *    http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  /**
18   * RemotePermission.java
19   *
20   * This file was auto-generated from WSDL
21   * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
22   */
23  
24  package com.atlassian.theplugin.jira.api.soap.axis;
25  
26  public class RemotePermission  implements java.io.Serializable {
27      private java.lang.String name;
28  
29      private java.lang.Long permission;
30  
31      public RemotePermission() {
32      }
33  
34      public RemotePermission(
35             java.lang.String name,
36             java.lang.Long permission) {
37             this.name = name;
38             this.permission = permission;
39      }
40  
41  
42      /**
43       * Gets the name value for this RemotePermission.
44       * 
45       * @return name
46       */
47      public java.lang.String getName() {
48          return name;
49      }
50  
51  
52      /**
53       * Sets the name value for this RemotePermission.
54       * 
55       * @param name
56       */
57      public void setName(java.lang.String name) {
58          this.name = name;
59      }
60  
61  
62      /**
63       * Gets the permission value for this RemotePermission.
64       * 
65       * @return permission
66       */
67      public java.lang.Long getPermission() {
68          return permission;
69      }
70  
71  
72      /**
73       * Sets the permission value for this RemotePermission.
74       * 
75       * @param permission
76       */
77      public void setPermission(java.lang.Long permission) {
78          this.permission = permission;
79      }
80  
81      private java.lang.Object __equalsCalc = null;
82      public synchronized boolean equals(java.lang.Object obj) {
83          if (!(obj instanceof RemotePermission)) return false;
84          RemotePermission other = (RemotePermission) obj;
85          if (obj == null) return false;
86          if (this == obj) return true;
87          if (__equalsCalc != null) {
88              return (__equalsCalc == obj);
89          }
90          __equalsCalc = obj;
91          boolean _equals;
92          _equals = true && 
93              ((this.name==null && other.getName()==null) || 
94               (this.name!=null &&
95                this.name.equals(other.getName()))) &&
96              ((this.permission==null && other.getPermission()==null) || 
97               (this.permission!=null &&
98                this.permission.equals(other.getPermission())));
99          __equalsCalc = null;
100         return _equals;
101     }
102 
103     private boolean __hashCodeCalc = false;
104     public synchronized int hashCode() {
105         if (__hashCodeCalc) {
106             return 0;
107         }
108         __hashCodeCalc = true;
109         int _hashCode = 1;
110         if (getName() != null) {
111             _hashCode += getName().hashCode();
112         }
113         if (getPermission() != null) {
114             _hashCode += getPermission().hashCode();
115         }
116         __hashCodeCalc = false;
117         return _hashCode;
118     }
119 
120     // Type metadata
121     private static org.apache.axis.description.TypeDesc typeDesc =
122         new org.apache.axis.description.TypeDesc(RemotePermission.class, true);
123 
124     static {
125         typeDesc.setXmlType(new javax.xml.namespace.QName("http://beans.soap.rpc.jira.atlassian.com", "RemotePermission"));
126         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
127         elemField.setFieldName("name");
128         elemField.setXmlName(new javax.xml.namespace.QName("", "name"));
129         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
130         elemField.setNillable(true);
131         typeDesc.addFieldDesc(elemField);
132         elemField = new org.apache.axis.description.ElementDesc();
133         elemField.setFieldName("permission");
134         elemField.setXmlName(new javax.xml.namespace.QName("", "permission"));
135         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"));
136         elemField.setNillable(true);
137         typeDesc.addFieldDesc(elemField);
138     }
139 
140     /**
141      * Return type metadata object
142      */
143     public static org.apache.axis.description.TypeDesc getTypeDesc() {
144         return typeDesc;
145     }
146 
147     /**
148      * Get Custom Serializer
149      */
150     public static org.apache.axis.encoding.Serializer getSerializer(
151            java.lang.String mechType, 
152            java.lang.Class _javaType,  
153            javax.xml.namespace.QName _xmlType) {
154         return 
155           new  org.apache.axis.encoding.ser.BeanSerializer(
156             _javaType, _xmlType, typeDesc);
157     }
158 
159     /**
160      * Get Custom Deserializer
161      */
162     public static org.apache.axis.encoding.Deserializer getDeserializer(
163            java.lang.String mechType, 
164            java.lang.Class _javaType,  
165            javax.xml.namespace.QName _xmlType) {
166         return 
167           new  org.apache.axis.encoding.ser.BeanDeserializer(
168             _javaType, _xmlType, typeDesc);
169     }
170 
171 }