1   /**
2    * TelephoneNum.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 TelephoneNum  implements java.io.Serializable {
11      private java.lang.String intcode;
12      private java.lang.String loccode;
13      private java.lang.String number;
14      private java.lang.String ext;
15      private java.lang.String comment;
16      private oasis.names.tc.wsrp.v1.types.Extension[] extensions;
17  
18      public TelephoneNum() {
19      }
20  
21      public TelephoneNum(
22             java.lang.String comment,
23             java.lang.String ext,
24             oasis.names.tc.wsrp.v1.types.Extension[] extensions,
25             java.lang.String intcode,
26             java.lang.String loccode,
27             java.lang.String number) {
28             this.intcode = intcode;
29             this.loccode = loccode;
30             this.number = number;
31             this.ext = ext;
32             this.comment = comment;
33             this.extensions = extensions;
34      }
35  
36  
37      /**
38       * Gets the intcode value for this TelephoneNum.
39       * 
40       * @return intcode
41       */
42      public java.lang.String getIntcode() {
43          return intcode;
44      }
45  
46  
47      /**
48       * Sets the intcode value for this TelephoneNum.
49       * 
50       * @param intcode
51       */
52      public void setIntcode(java.lang.String intcode) {
53          this.intcode = intcode;
54      }
55  
56  
57      /**
58       * Gets the loccode value for this TelephoneNum.
59       * 
60       * @return loccode
61       */
62      public java.lang.String getLoccode() {
63          return loccode;
64      }
65  
66  
67      /**
68       * Sets the loccode value for this TelephoneNum.
69       * 
70       * @param loccode
71       */
72      public void setLoccode(java.lang.String loccode) {
73          this.loccode = loccode;
74      }
75  
76  
77      /**
78       * Gets the number value for this TelephoneNum.
79       * 
80       * @return number
81       */
82      public java.lang.String getNumber() {
83          return number;
84      }
85  
86  
87      /**
88       * Sets the number value for this TelephoneNum.
89       * 
90       * @param number
91       */
92      public void setNumber(java.lang.String number) {
93          this.number = number;
94      }
95  
96  
97      /**
98       * Gets the ext value for this TelephoneNum.
99       * 
100      * @return ext
101      */
102     public java.lang.String getExt() {
103         return ext;
104     }
105 
106 
107     /**
108      * Sets the ext value for this TelephoneNum.
109      * 
110      * @param ext
111      */
112     public void setExt(java.lang.String ext) {
113         this.ext = ext;
114     }
115 
116 
117     /**
118      * Gets the comment value for this TelephoneNum.
119      * 
120      * @return comment
121      */
122     public java.lang.String getComment() {
123         return comment;
124     }
125 
126 
127     /**
128      * Sets the comment value for this TelephoneNum.
129      * 
130      * @param comment
131      */
132     public void setComment(java.lang.String comment) {
133         this.comment = comment;
134     }
135 
136 
137     /**
138      * Gets the extensions value for this TelephoneNum.
139      * 
140      * @return extensions
141      */
142     public oasis.names.tc.wsrp.v1.types.Extension[] getExtensions() {
143         return extensions;
144     }
145 
146 
147     /**
148      * Sets the extensions value for this TelephoneNum.
149      * 
150      * @param extensions
151      */
152     public void setExtensions(oasis.names.tc.wsrp.v1.types.Extension[] extensions) {
153         this.extensions = extensions;
154     }
155 
156     public oasis.names.tc.wsrp.v1.types.Extension getExtensions(int i) {
157         return this.extensions[i];
158     }
159 
160     public void setExtensions(int i, oasis.names.tc.wsrp.v1.types.Extension _value) {
161         this.extensions[i] = _value;
162     }
163 
164     private java.lang.Object __equalsCalc = null;
165     public synchronized boolean equals(java.lang.Object obj) {
166         if (!(obj instanceof TelephoneNum)) return false;
167         TelephoneNum other = (TelephoneNum) obj;
168         if (obj == null) return false;
169         if (this == obj) return true;
170         if (__equalsCalc != null) {
171             return (__equalsCalc == obj);
172         }
173         __equalsCalc = obj;
174         boolean _equals;
175         _equals = true && 
176             ((this.intcode==null && other.getIntcode()==null) || 
177              (this.intcode!=null &&
178               this.intcode.equals(other.getIntcode()))) &&
179             ((this.loccode==null && other.getLoccode()==null) || 
180              (this.loccode!=null &&
181               this.loccode.equals(other.getLoccode()))) &&
182             ((this.number==null && other.getNumber()==null) || 
183              (this.number!=null &&
184               this.number.equals(other.getNumber()))) &&
185             ((this.ext==null && other.getExt()==null) || 
186              (this.ext!=null &&
187               this.ext.equals(other.getExt()))) &&
188             ((this.comment==null && other.getComment()==null) || 
189              (this.comment!=null &&
190               this.comment.equals(other.getComment()))) &&
191             ((this.extensions==null && other.getExtensions()==null) || 
192              (this.extensions!=null &&
193               java.util.Arrays.equals(this.extensions, other.getExtensions())));
194         __equalsCalc = null;
195         return _equals;
196     }
197 
198     private boolean __hashCodeCalc = false;
199     public synchronized int hashCode() {
200         if (__hashCodeCalc) {
201             return 0;
202         }
203         __hashCodeCalc = true;
204         int _hashCode = 1;
205         if (getIntcode() != null) {
206             _hashCode += getIntcode().hashCode();
207         }
208         if (getLoccode() != null) {
209             _hashCode += getLoccode().hashCode();
210         }
211         if (getNumber() != null) {
212             _hashCode += getNumber().hashCode();
213         }
214         if (getExt() != null) {
215             _hashCode += getExt().hashCode();
216         }
217         if (getComment() != null) {
218             _hashCode += getComment().hashCode();
219         }
220         if (getExtensions() != null) {
221             for (int i=0;
222                  i<java.lang.reflect.Array.getLength(getExtensions());
223                  i++) {
224                 java.lang.Object obj = java.lang.reflect.Array.get(getExtensions(), i);
225                 if (obj != null &&
226                     !obj.getClass().isArray()) {
227                     _hashCode += obj.hashCode();
228                 }
229             }
230         }
231         __hashCodeCalc = false;
232         return _hashCode;
233     }
234 
235     // Type metadata
236     private static org.apache.axis.description.TypeDesc typeDesc =
237         new org.apache.axis.description.TypeDesc(TelephoneNum.class, true);
238 
239     static {
240         typeDesc.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "TelephoneNum"));
241         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
242         elemField.setFieldName("intcode");
243         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "intcode"));
244         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
245         elemField.setMinOccurs(0);
246         typeDesc.addFieldDesc(elemField);
247         elemField = new org.apache.axis.description.ElementDesc();
248         elemField.setFieldName("loccode");
249         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "loccode"));
250         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
251         elemField.setMinOccurs(0);
252         typeDesc.addFieldDesc(elemField);
253         elemField = new org.apache.axis.description.ElementDesc();
254         elemField.setFieldName("number");
255         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "number"));
256         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
257         elemField.setMinOccurs(0);
258         typeDesc.addFieldDesc(elemField);
259         elemField = new org.apache.axis.description.ElementDesc();
260         elemField.setFieldName("ext");
261         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "ext"));
262         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
263         elemField.setMinOccurs(0);
264         typeDesc.addFieldDesc(elemField);
265         elemField = new org.apache.axis.description.ElementDesc();
266         elemField.setFieldName("comment");
267         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "comment"));
268         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
269         elemField.setMinOccurs(0);
270         typeDesc.addFieldDesc(elemField);
271         elemField = new org.apache.axis.description.ElementDesc();
272         elemField.setFieldName("extensions");
273         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "extensions"));
274         elemField.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "Extension"));
275         elemField.setMinOccurs(0);
276         typeDesc.addFieldDesc(elemField);
277     }
278 
279     /**
280      * Return type metadata object
281      */
282     public static org.apache.axis.description.TypeDesc getTypeDesc() {
283         return typeDesc;
284     }
285 
286     /**
287      * Get Custom Serializer
288      */
289     public static org.apache.axis.encoding.Serializer getSerializer(
290            java.lang.String mechType, 
291            java.lang.Class _javaType,  
292            javax.xml.namespace.QName _xmlType) {
293         return 
294           new  org.apache.axis.encoding.ser.BeanSerializer(
295             _javaType, _xmlType, typeDesc);
296     }
297 
298     /**
299      * Get Custom Deserializer
300      */
301     public static org.apache.axis.encoding.Deserializer getDeserializer(
302            java.lang.String mechType, 
303            java.lang.Class _javaType,  
304            javax.xml.namespace.QName _xmlType) {
305         return 
306           new  org.apache.axis.encoding.ser.BeanDeserializer(
307             _javaType, _xmlType, typeDesc);
308     }
309 
310 }
311