1   /**
2    * Postal.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 Postal  implements java.io.Serializable {
11      private java.lang.String name;
12      private java.lang.String street;
13      private java.lang.String city;
14      private java.lang.String stateprov;
15      private java.lang.String postalcode;
16      private java.lang.String country;
17      private java.lang.String organization;
18      private oasis.names.tc.wsrp.v1.types.Extension[] extensions;
19  
20      public Postal() {
21      }
22  
23      public Postal(
24             java.lang.String city,
25             java.lang.String country,
26             oasis.names.tc.wsrp.v1.types.Extension[] extensions,
27             java.lang.String name,
28             java.lang.String organization,
29             java.lang.String postalcode,
30             java.lang.String stateprov,
31             java.lang.String street) {
32             this.name = name;
33             this.street = street;
34             this.city = city;
35             this.stateprov = stateprov;
36             this.postalcode = postalcode;
37             this.country = country;
38             this.organization = organization;
39             this.extensions = extensions;
40      }
41  
42  
43      /**
44       * Gets the name value for this Postal.
45       * 
46       * @return name
47       */
48      public java.lang.String getName() {
49          return name;
50      }
51  
52  
53      /**
54       * Sets the name value for this Postal.
55       * 
56       * @param name
57       */
58      public void setName(java.lang.String name) {
59          this.name = name;
60      }
61  
62  
63      /**
64       * Gets the street value for this Postal.
65       * 
66       * @return street
67       */
68      public java.lang.String getStreet() {
69          return street;
70      }
71  
72  
73      /**
74       * Sets the street value for this Postal.
75       * 
76       * @param street
77       */
78      public void setStreet(java.lang.String street) {
79          this.street = street;
80      }
81  
82  
83      /**
84       * Gets the city value for this Postal.
85       * 
86       * @return city
87       */
88      public java.lang.String getCity() {
89          return city;
90      }
91  
92  
93      /**
94       * Sets the city value for this Postal.
95       * 
96       * @param city
97       */
98      public void setCity(java.lang.String city) {
99          this.city = city;
100     }
101 
102 
103     /**
104      * Gets the stateprov value for this Postal.
105      * 
106      * @return stateprov
107      */
108     public java.lang.String getStateprov() {
109         return stateprov;
110     }
111 
112 
113     /**
114      * Sets the stateprov value for this Postal.
115      * 
116      * @param stateprov
117      */
118     public void setStateprov(java.lang.String stateprov) {
119         this.stateprov = stateprov;
120     }
121 
122 
123     /**
124      * Gets the postalcode value for this Postal.
125      * 
126      * @return postalcode
127      */
128     public java.lang.String getPostalcode() {
129         return postalcode;
130     }
131 
132 
133     /**
134      * Sets the postalcode value for this Postal.
135      * 
136      * @param postalcode
137      */
138     public void setPostalcode(java.lang.String postalcode) {
139         this.postalcode = postalcode;
140     }
141 
142 
143     /**
144      * Gets the country value for this Postal.
145      * 
146      * @return country
147      */
148     public java.lang.String getCountry() {
149         return country;
150     }
151 
152 
153     /**
154      * Sets the country value for this Postal.
155      * 
156      * @param country
157      */
158     public void setCountry(java.lang.String country) {
159         this.country = country;
160     }
161 
162 
163     /**
164      * Gets the organization value for this Postal.
165      * 
166      * @return organization
167      */
168     public java.lang.String getOrganization() {
169         return organization;
170     }
171 
172 
173     /**
174      * Sets the organization value for this Postal.
175      * 
176      * @param organization
177      */
178     public void setOrganization(java.lang.String organization) {
179         this.organization = organization;
180     }
181 
182 
183     /**
184      * Gets the extensions value for this Postal.
185      * 
186      * @return extensions
187      */
188     public oasis.names.tc.wsrp.v1.types.Extension[] getExtensions() {
189         return extensions;
190     }
191 
192 
193     /**
194      * Sets the extensions value for this Postal.
195      * 
196      * @param extensions
197      */
198     public void setExtensions(oasis.names.tc.wsrp.v1.types.Extension[] extensions) {
199         this.extensions = extensions;
200     }
201 
202     public oasis.names.tc.wsrp.v1.types.Extension getExtensions(int i) {
203         return this.extensions[i];
204     }
205 
206     public void setExtensions(int i, oasis.names.tc.wsrp.v1.types.Extension _value) {
207         this.extensions[i] = _value;
208     }
209 
210     private java.lang.Object __equalsCalc = null;
211     public synchronized boolean equals(java.lang.Object obj) {
212         if (!(obj instanceof Postal)) return false;
213         Postal other = (Postal) obj;
214         if (obj == null) return false;
215         if (this == obj) return true;
216         if (__equalsCalc != null) {
217             return (__equalsCalc == obj);
218         }
219         __equalsCalc = obj;
220         boolean _equals;
221         _equals = true && 
222             ((this.name==null && other.getName()==null) || 
223              (this.name!=null &&
224               this.name.equals(other.getName()))) &&
225             ((this.street==null && other.getStreet()==null) || 
226              (this.street!=null &&
227               this.street.equals(other.getStreet()))) &&
228             ((this.city==null && other.getCity()==null) || 
229              (this.city!=null &&
230               this.city.equals(other.getCity()))) &&
231             ((this.stateprov==null && other.getStateprov()==null) || 
232              (this.stateprov!=null &&
233               this.stateprov.equals(other.getStateprov()))) &&
234             ((this.postalcode==null && other.getPostalcode()==null) || 
235              (this.postalcode!=null &&
236               this.postalcode.equals(other.getPostalcode()))) &&
237             ((this.country==null && other.getCountry()==null) || 
238              (this.country!=null &&
239               this.country.equals(other.getCountry()))) &&
240             ((this.organization==null && other.getOrganization()==null) || 
241              (this.organization!=null &&
242               this.organization.equals(other.getOrganization()))) &&
243             ((this.extensions==null && other.getExtensions()==null) || 
244              (this.extensions!=null &&
245               java.util.Arrays.equals(this.extensions, other.getExtensions())));
246         __equalsCalc = null;
247         return _equals;
248     }
249 
250     private boolean __hashCodeCalc = false;
251     public synchronized int hashCode() {
252         if (__hashCodeCalc) {
253             return 0;
254         }
255         __hashCodeCalc = true;
256         int _hashCode = 1;
257         if (getName() != null) {
258             _hashCode += getName().hashCode();
259         }
260         if (getStreet() != null) {
261             _hashCode += getStreet().hashCode();
262         }
263         if (getCity() != null) {
264             _hashCode += getCity().hashCode();
265         }
266         if (getStateprov() != null) {
267             _hashCode += getStateprov().hashCode();
268         }
269         if (getPostalcode() != null) {
270             _hashCode += getPostalcode().hashCode();
271         }
272         if (getCountry() != null) {
273             _hashCode += getCountry().hashCode();
274         }
275         if (getOrganization() != null) {
276             _hashCode += getOrganization().hashCode();
277         }
278         if (getExtensions() != null) {
279             for (int i=0;
280                  i<java.lang.reflect.Array.getLength(getExtensions());
281                  i++) {
282                 java.lang.Object obj = java.lang.reflect.Array.get(getExtensions(), i);
283                 if (obj != null &&
284                     !obj.getClass().isArray()) {
285                     _hashCode += obj.hashCode();
286                 }
287             }
288         }
289         __hashCodeCalc = false;
290         return _hashCode;
291     }
292 
293     // Type metadata
294     private static org.apache.axis.description.TypeDesc typeDesc =
295         new org.apache.axis.description.TypeDesc(Postal.class, true);
296 
297     static {
298         typeDesc.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "Postal"));
299         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
300         elemField.setFieldName("name");
301         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "name"));
302         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
303         elemField.setMinOccurs(0);
304         typeDesc.addFieldDesc(elemField);
305         elemField = new org.apache.axis.description.ElementDesc();
306         elemField.setFieldName("street");
307         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "street"));
308         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
309         elemField.setMinOccurs(0);
310         typeDesc.addFieldDesc(elemField);
311         elemField = new org.apache.axis.description.ElementDesc();
312         elemField.setFieldName("city");
313         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "city"));
314         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
315         elemField.setMinOccurs(0);
316         typeDesc.addFieldDesc(elemField);
317         elemField = new org.apache.axis.description.ElementDesc();
318         elemField.setFieldName("stateprov");
319         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "stateprov"));
320         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
321         elemField.setMinOccurs(0);
322         typeDesc.addFieldDesc(elemField);
323         elemField = new org.apache.axis.description.ElementDesc();
324         elemField.setFieldName("postalcode");
325         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "postalcode"));
326         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
327         elemField.setMinOccurs(0);
328         typeDesc.addFieldDesc(elemField);
329         elemField = new org.apache.axis.description.ElementDesc();
330         elemField.setFieldName("country");
331         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "country"));
332         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
333         elemField.setMinOccurs(0);
334         typeDesc.addFieldDesc(elemField);
335         elemField = new org.apache.axis.description.ElementDesc();
336         elemField.setFieldName("organization");
337         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "organization"));
338         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
339         elemField.setMinOccurs(0);
340         typeDesc.addFieldDesc(elemField);
341         elemField = new org.apache.axis.description.ElementDesc();
342         elemField.setFieldName("extensions");
343         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "extensions"));
344         elemField.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "Extension"));
345         elemField.setMinOccurs(0);
346         typeDesc.addFieldDesc(elemField);
347     }
348 
349     /**
350      * Return type metadata object
351      */
352     public static org.apache.axis.description.TypeDesc getTypeDesc() {
353         return typeDesc;
354     }
355 
356     /**
357      * Get Custom Serializer
358      */
359     public static org.apache.axis.encoding.Serializer getSerializer(
360            java.lang.String mechType, 
361            java.lang.Class _javaType,  
362            javax.xml.namespace.QName _xmlType) {
363         return 
364           new  org.apache.axis.encoding.ser.BeanSerializer(
365             _javaType, _xmlType, typeDesc);
366     }
367 
368     /**
369      * Get Custom Deserializer
370      */
371     public static org.apache.axis.encoding.Deserializer getDeserializer(
372            java.lang.String mechType, 
373            java.lang.Class _javaType,  
374            javax.xml.namespace.QName _xmlType) {
375         return 
376           new  org.apache.axis.encoding.ser.BeanDeserializer(
377             _javaType, _xmlType, typeDesc);
378     }
379 
380 }
381