1   /**
2    * ResourceList.java
3    *
4    * This file was auto-generated from WSDL
5    * by the Apache Axis 1.2RC3 Feb 28, 2005 (10:15:14 EST) WSDL2Java emitter.
6    */
7   
8   package oasis.names.tc.wsrp.v1.types;
9   
10  public class ResourceList  implements java.io.Serializable {
11      private oasis.names.tc.wsrp.v1.types.Resource[] resources;
12      private oasis.names.tc.wsrp.v1.types.Extension[] extensions;
13  
14      public ResourceList() {
15      }
16  
17      public ResourceList(
18             oasis.names.tc.wsrp.v1.types.Extension[] extensions,
19             oasis.names.tc.wsrp.v1.types.Resource[] resources) {
20             this.resources = resources;
21             this.extensions = extensions;
22      }
23  
24  
25      /**
26       * Gets the resources value for this ResourceList.
27       * 
28       * @return resources
29       */
30      public oasis.names.tc.wsrp.v1.types.Resource[] getResources() {
31          return resources;
32      }
33  
34  
35      /**
36       * Sets the resources value for this ResourceList.
37       * 
38       * @param resources
39       */
40      public void setResources(oasis.names.tc.wsrp.v1.types.Resource[] resources) {
41          this.resources = resources;
42      }
43  
44      public oasis.names.tc.wsrp.v1.types.Resource getResources(int i) {
45          return this.resources[i];
46      }
47  
48      public void setResources(int i, oasis.names.tc.wsrp.v1.types.Resource _value) {
49          this.resources[i] = _value;
50      }
51  
52  
53      /**
54       * Gets the extensions value for this ResourceList.
55       * 
56       * @return extensions
57       */
58      public oasis.names.tc.wsrp.v1.types.Extension[] getExtensions() {
59          return extensions;
60      }
61  
62  
63      /**
64       * Sets the extensions value for this ResourceList.
65       * 
66       * @param extensions
67       */
68      public void setExtensions(oasis.names.tc.wsrp.v1.types.Extension[] extensions) {
69          this.extensions = extensions;
70      }
71  
72      public oasis.names.tc.wsrp.v1.types.Extension getExtensions(int i) {
73          return this.extensions[i];
74      }
75  
76      public void setExtensions(int i, oasis.names.tc.wsrp.v1.types.Extension _value) {
77          this.extensions[i] = _value;
78      }
79  
80      private java.lang.Object __equalsCalc = null;
81      public synchronized boolean equals(java.lang.Object obj) {
82          if (!(obj instanceof ResourceList)) return false;
83          ResourceList other = (ResourceList) obj;
84          if (obj == null) return false;
85          if (this == obj) return true;
86          if (__equalsCalc != null) {
87              return (__equalsCalc == obj);
88          }
89          __equalsCalc = obj;
90          boolean _equals;
91          _equals = true && 
92              ((this.resources==null && other.getResources()==null) || 
93               (this.resources!=null &&
94                java.util.Arrays.equals(this.resources, other.getResources()))) &&
95              ((this.extensions==null && other.getExtensions()==null) || 
96               (this.extensions!=null &&
97                java.util.Arrays.equals(this.extensions, other.getExtensions())));
98          __equalsCalc = null;
99          return _equals;
100     }
101 
102     private boolean __hashCodeCalc = false;
103     public synchronized int hashCode() {
104         if (__hashCodeCalc) {
105             return 0;
106         }
107         __hashCodeCalc = true;
108         int _hashCode = 1;
109         if (getResources() != null) {
110             for (int i=0;
111                  i<java.lang.reflect.Array.getLength(getResources());
112                  i++) {
113                 java.lang.Object obj = java.lang.reflect.Array.get(getResources(), i);
114                 if (obj != null &&
115                     !obj.getClass().isArray()) {
116                     _hashCode += obj.hashCode();
117                 }
118             }
119         }
120         if (getExtensions() != null) {
121             for (int i=0;
122                  i<java.lang.reflect.Array.getLength(getExtensions());
123                  i++) {
124                 java.lang.Object obj = java.lang.reflect.Array.get(getExtensions(), i);
125                 if (obj != null &&
126                     !obj.getClass().isArray()) {
127                     _hashCode += obj.hashCode();
128                 }
129             }
130         }
131         __hashCodeCalc = false;
132         return _hashCode;
133     }
134 
135     // Type metadata
136     private static org.apache.axis.description.TypeDesc typeDesc =
137         new org.apache.axis.description.TypeDesc(ResourceList.class, true);
138 
139     static {
140         typeDesc.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "ResourceList"));
141         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
142         elemField.setFieldName("resources");
143         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "resources"));
144         elemField.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "Resource"));
145         typeDesc.addFieldDesc(elemField);
146         elemField = new org.apache.axis.description.ElementDesc();
147         elemField.setFieldName("extensions");
148         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "extensions"));
149         elemField.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "Extension"));
150         elemField.setMinOccurs(0);
151         typeDesc.addFieldDesc(elemField);
152     }
153 
154     /**
155      * Return type metadata object
156      */
157     public static org.apache.axis.description.TypeDesc getTypeDesc() {
158         return typeDesc;
159     }
160 
161     /**
162      * Get Custom Serializer
163      */
164     public static org.apache.axis.encoding.Serializer getSerializer(
165            java.lang.String mechType, 
166            java.lang.Class _javaType,  
167            javax.xml.namespace.QName _xmlType) {
168         return 
169           new  org.apache.axis.encoding.ser.BeanSerializer(
170             _javaType, _xmlType, typeDesc);
171     }
172 
173     /**
174      * Get Custom Deserializer
175      */
176     public static org.apache.axis.encoding.Deserializer getDeserializer(
177            java.lang.String mechType, 
178            java.lang.Class _javaType,  
179            javax.xml.namespace.QName _xmlType) {
180         return 
181           new  org.apache.axis.encoding.ser.BeanDeserializer(
182             _javaType, _xmlType, typeDesc);
183     }
184 
185 }
186