1   /**
2    * Contact.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 Contact  implements java.io.Serializable {
11      private oasis.names.tc.wsrp.v1.types.Postal postal;
12      private oasis.names.tc.wsrp.v1.types.Telecom telecom;
13      private oasis.names.tc.wsrp.v1.types.Online online;
14      private oasis.names.tc.wsrp.v1.types.Extension[] extensions;
15  
16      public Contact() {
17      }
18  
19      public Contact(
20             oasis.names.tc.wsrp.v1.types.Extension[] extensions,
21             oasis.names.tc.wsrp.v1.types.Online online,
22             oasis.names.tc.wsrp.v1.types.Postal postal,
23             oasis.names.tc.wsrp.v1.types.Telecom telecom) {
24             this.postal = postal;
25             this.telecom = telecom;
26             this.online = online;
27             this.extensions = extensions;
28      }
29  
30  
31      /**
32       * Gets the postal value for this Contact.
33       * 
34       * @return postal
35       */
36      public oasis.names.tc.wsrp.v1.types.Postal getPostal() {
37          return postal;
38      }
39  
40  
41      /**
42       * Sets the postal value for this Contact.
43       * 
44       * @param postal
45       */
46      public void setPostal(oasis.names.tc.wsrp.v1.types.Postal postal) {
47          this.postal = postal;
48      }
49  
50  
51      /**
52       * Gets the telecom value for this Contact.
53       * 
54       * @return telecom
55       */
56      public oasis.names.tc.wsrp.v1.types.Telecom getTelecom() {
57          return telecom;
58      }
59  
60  
61      /**
62       * Sets the telecom value for this Contact.
63       * 
64       * @param telecom
65       */
66      public void setTelecom(oasis.names.tc.wsrp.v1.types.Telecom telecom) {
67          this.telecom = telecom;
68      }
69  
70  
71      /**
72       * Gets the online value for this Contact.
73       * 
74       * @return online
75       */
76      public oasis.names.tc.wsrp.v1.types.Online getOnline() {
77          return online;
78      }
79  
80  
81      /**
82       * Sets the online value for this Contact.
83       * 
84       * @param online
85       */
86      public void setOnline(oasis.names.tc.wsrp.v1.types.Online online) {
87          this.online = online;
88      }
89  
90  
91      /**
92       * Gets the extensions value for this Contact.
93       * 
94       * @return extensions
95       */
96      public oasis.names.tc.wsrp.v1.types.Extension[] getExtensions() {
97          return extensions;
98      }
99  
100 
101     /**
102      * Sets the extensions value for this Contact.
103      * 
104      * @param extensions
105      */
106     public void setExtensions(oasis.names.tc.wsrp.v1.types.Extension[] extensions) {
107         this.extensions = extensions;
108     }
109 
110     public oasis.names.tc.wsrp.v1.types.Extension getExtensions(int i) {
111         return this.extensions[i];
112     }
113 
114     public void setExtensions(int i, oasis.names.tc.wsrp.v1.types.Extension _value) {
115         this.extensions[i] = _value;
116     }
117 
118     private java.lang.Object __equalsCalc = null;
119     public synchronized boolean equals(java.lang.Object obj) {
120         if (!(obj instanceof Contact)) return false;
121         Contact other = (Contact) obj;
122         if (obj == null) return false;
123         if (this == obj) return true;
124         if (__equalsCalc != null) {
125             return (__equalsCalc == obj);
126         }
127         __equalsCalc = obj;
128         boolean _equals;
129         _equals = true && 
130             ((this.postal==null && other.getPostal()==null) || 
131              (this.postal!=null &&
132               this.postal.equals(other.getPostal()))) &&
133             ((this.telecom==null && other.getTelecom()==null) || 
134              (this.telecom!=null &&
135               this.telecom.equals(other.getTelecom()))) &&
136             ((this.online==null && other.getOnline()==null) || 
137              (this.online!=null &&
138               this.online.equals(other.getOnline()))) &&
139             ((this.extensions==null && other.getExtensions()==null) || 
140              (this.extensions!=null &&
141               java.util.Arrays.equals(this.extensions, other.getExtensions())));
142         __equalsCalc = null;
143         return _equals;
144     }
145 
146     private boolean __hashCodeCalc = false;
147     public synchronized int hashCode() {
148         if (__hashCodeCalc) {
149             return 0;
150         }
151         __hashCodeCalc = true;
152         int _hashCode = 1;
153         if (getPostal() != null) {
154             _hashCode += getPostal().hashCode();
155         }
156         if (getTelecom() != null) {
157             _hashCode += getTelecom().hashCode();
158         }
159         if (getOnline() != null) {
160             _hashCode += getOnline().hashCode();
161         }
162         if (getExtensions() != null) {
163             for (int i=0;
164                  i<java.lang.reflect.Array.getLength(getExtensions());
165                  i++) {
166                 java.lang.Object obj = java.lang.reflect.Array.get(getExtensions(), i);
167                 if (obj != null &&
168                     !obj.getClass().isArray()) {
169                     _hashCode += obj.hashCode();
170                 }
171             }
172         }
173         __hashCodeCalc = false;
174         return _hashCode;
175     }
176 
177     // Type metadata
178     private static org.apache.axis.description.TypeDesc typeDesc =
179         new org.apache.axis.description.TypeDesc(Contact.class, true);
180 
181     static {
182         typeDesc.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "Contact"));
183         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
184         elemField.setFieldName("postal");
185         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "postal"));
186         elemField.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "Postal"));
187         elemField.setMinOccurs(0);
188         typeDesc.addFieldDesc(elemField);
189         elemField = new org.apache.axis.description.ElementDesc();
190         elemField.setFieldName("telecom");
191         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "telecom"));
192         elemField.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "Telecom"));
193         elemField.setMinOccurs(0);
194         typeDesc.addFieldDesc(elemField);
195         elemField = new org.apache.axis.description.ElementDesc();
196         elemField.setFieldName("online");
197         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "online"));
198         elemField.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "Online"));
199         elemField.setMinOccurs(0);
200         typeDesc.addFieldDesc(elemField);
201         elemField = new org.apache.axis.description.ElementDesc();
202         elemField.setFieldName("extensions");
203         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "extensions"));
204         elemField.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "Extension"));
205         elemField.setMinOccurs(0);
206         typeDesc.addFieldDesc(elemField);
207     }
208 
209     /**
210      * Return type metadata object
211      */
212     public static org.apache.axis.description.TypeDesc getTypeDesc() {
213         return typeDesc;
214     }
215 
216     /**
217      * Get Custom Serializer
218      */
219     public static org.apache.axis.encoding.Serializer getSerializer(
220            java.lang.String mechType, 
221            java.lang.Class _javaType,  
222            javax.xml.namespace.QName _xmlType) {
223         return 
224           new  org.apache.axis.encoding.ser.BeanSerializer(
225             _javaType, _xmlType, typeDesc);
226     }
227 
228     /**
229      * Get Custom Deserializer
230      */
231     public static org.apache.axis.encoding.Deserializer getDeserializer(
232            java.lang.String mechType, 
233            java.lang.Class _javaType,  
234            javax.xml.namespace.QName _xmlType) {
235         return 
236           new  org.apache.axis.encoding.ser.BeanDeserializer(
237             _javaType, _xmlType, typeDesc);
238     }
239 
240 }
241