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   * RemotePermissionScheme.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 RemotePermissionScheme  extends com.atlassian.theplugin.jira.api.soap.axis.RemoteScheme  implements java.io.Serializable {
27      private com.atlassian.theplugin.jira.api.soap.axis.RemotePermissionMapping[] permissionMappings;
28  
29      public RemotePermissionScheme() {
30      }
31  
32      public RemotePermissionScheme(
33             java.lang.String description,
34             java.lang.Long id,
35             java.lang.String name,
36             java.lang.String type,
37             com.atlassian.theplugin.jira.api.soap.axis.RemotePermissionMapping[] permissionMappings) {
38          super(
39              description,
40              id,
41              name,
42              type);
43          this.permissionMappings = permissionMappings;
44      }
45  
46  
47      /**
48       * Gets the permissionMappings value for this RemotePermissionScheme.
49       * 
50       * @return permissionMappings
51       */
52      public com.atlassian.theplugin.jira.api.soap.axis.RemotePermissionMapping[] getPermissionMappings() {
53          return permissionMappings;
54      }
55  
56  
57      /**
58       * Sets the permissionMappings value for this RemotePermissionScheme.
59       * 
60       * @param permissionMappings
61       */
62      public void setPermissionMappings(com.atlassian.theplugin.jira.api.soap.axis.RemotePermissionMapping[] permissionMappings) {
63          this.permissionMappings = permissionMappings;
64      }
65  
66      private java.lang.Object __equalsCalc = null;
67      public synchronized boolean equals(java.lang.Object obj) {
68          if (!(obj instanceof RemotePermissionScheme)) return false;
69          RemotePermissionScheme other = (RemotePermissionScheme) obj;
70          if (obj == null) return false;
71          if (this == obj) return true;
72          if (__equalsCalc != null) {
73              return (__equalsCalc == obj);
74          }
75          __equalsCalc = obj;
76          boolean _equals;
77          _equals = super.equals(obj) && 
78              ((this.permissionMappings==null && other.getPermissionMappings()==null) || 
79               (this.permissionMappings!=null &&
80                java.util.Arrays.equals(this.permissionMappings, other.getPermissionMappings())));
81          __equalsCalc = null;
82          return _equals;
83      }
84  
85      private boolean __hashCodeCalc = false;
86      public synchronized int hashCode() {
87          if (__hashCodeCalc) {
88              return 0;
89          }
90          __hashCodeCalc = true;
91          int _hashCode = super.hashCode();
92          if (getPermissionMappings() != null) {
93              for (int i=0;
94                   i<java.lang.reflect.Array.getLength(getPermissionMappings());
95                   i++) {
96                  java.lang.Object obj = java.lang.reflect.Array.get(getPermissionMappings(), i);
97                  if (obj != null &&
98                      !obj.getClass().isArray()) {
99                      _hashCode += obj.hashCode();
100                 }
101             }
102         }
103         __hashCodeCalc = false;
104         return _hashCode;
105     }
106 
107     // Type metadata
108     private static org.apache.axis.description.TypeDesc typeDesc =
109         new org.apache.axis.description.TypeDesc(RemotePermissionScheme.class, true);
110 
111     static {
112         typeDesc.setXmlType(new javax.xml.namespace.QName("http://beans.soap.rpc.jira.atlassian.com", "RemotePermissionScheme"));
113         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
114         elemField.setFieldName("permissionMappings");
115         elemField.setXmlName(new javax.xml.namespace.QName("", "permissionMappings"));
116         elemField.setXmlType(new javax.xml.namespace.QName("http://beans.soap.rpc.jira.atlassian.com", "RemotePermissionMapping"));
117         elemField.setNillable(true);
118         typeDesc.addFieldDesc(elemField);
119     }
120 
121     /**
122      * Return type metadata object
123      */
124     public static org.apache.axis.description.TypeDesc getTypeDesc() {
125         return typeDesc;
126     }
127 
128     /**
129      * Get Custom Serializer
130      */
131     public static org.apache.axis.encoding.Serializer getSerializer(
132            java.lang.String mechType, 
133            java.lang.Class _javaType,  
134            javax.xml.namespace.QName _xmlType) {
135         return 
136           new  org.apache.axis.encoding.ser.BeanSerializer(
137             _javaType, _xmlType, typeDesc);
138     }
139 
140     /**
141      * Get Custom Deserializer
142      */
143     public static org.apache.axis.encoding.Deserializer getDeserializer(
144            java.lang.String mechType, 
145            java.lang.Class _javaType,  
146            javax.xml.namespace.QName _xmlType) {
147         return 
148           new  org.apache.axis.encoding.ser.BeanDeserializer(
149             _javaType, _xmlType, typeDesc);
150     }
151 
152 }