KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > localjava > client > stub > addressbook > wsiftypes > Address


1 /**
2  * Address.java
3  *
4  * This file was auto-generated from WSDL
5  * by the Apache Axis WSDL2Java emitter.
6  */

7
8 package localjava.client.stub.addressbook.wsiftypes;
9
10 public class Address implements java.io.Serializable JavaDoc {
11     private int streetNum;
12     private java.lang.String JavaDoc streetName;
13     private java.lang.String JavaDoc city;
14     private java.lang.String JavaDoc state;
15     private int zip;
16     private localjava.client.stub.addressbook.wsiftypes.Phone phoneNumber;
17
18     public Address() {
19     }
20
21     public int getStreetNum() {
22         return streetNum;
23     }
24
25     public void setStreetNum(int streetNum) {
26         this.streetNum = streetNum;
27     }
28
29     public java.lang.String JavaDoc getStreetName() {
30         return streetName;
31     }
32
33     public void setStreetName(java.lang.String JavaDoc streetName) {
34         this.streetName = streetName;
35     }
36
37     public java.lang.String JavaDoc getCity() {
38         return city;
39     }
40
41     public void setCity(java.lang.String JavaDoc city) {
42         this.city = city;
43     }
44
45     public java.lang.String JavaDoc getState() {
46         return state;
47     }
48
49     public void setState(java.lang.String JavaDoc state) {
50         this.state = state;
51     }
52
53     public int getZip() {
54         return zip;
55     }
56
57     public void setZip(int zip) {
58         this.zip = zip;
59     }
60
61     public localjava.client.stub.addressbook.wsiftypes.Phone getPhoneNumber() {
62         return phoneNumber;
63     }
64
65     public void setPhoneNumber(localjava.client.stub.addressbook.wsiftypes.Phone phoneNumber) {
66         this.phoneNumber = phoneNumber;
67     }
68
69     private java.lang.Object JavaDoc __equalsCalc = null;
70     public synchronized boolean equals(java.lang.Object JavaDoc obj) {
71         if (!(obj instanceof Address)) return false;
72         Address other = (Address) obj;
73         if (obj == null) return false;
74         if (this == obj) return true;
75         if (__equalsCalc != null) {
76             return (__equalsCalc == obj);
77         }
78         __equalsCalc = obj;
79         boolean _equals;
80         _equals = true &&
81             streetNum == other.getStreetNum() &&
82             ((streetName==null && other.getStreetName()==null) ||
83              (streetName!=null &&
84               streetName.equals(other.getStreetName()))) &&
85             ((city==null && other.getCity()==null) ||
86              (city!=null &&
87               city.equals(other.getCity()))) &&
88             ((state==null && other.getState()==null) ||
89              (state!=null &&
90               state.equals(other.getState()))) &&
91             zip == other.getZip() &&
92             ((phoneNumber==null && other.getPhoneNumber()==null) ||
93              (phoneNumber!=null &&
94               phoneNumber.equals(other.getPhoneNumber())));
95         __equalsCalc = null;
96         return _equals;
97     }
98
99     private boolean __hashCodeCalc = false;
100     public synchronized int hashCode() {
101         if (__hashCodeCalc) {
102             return 0;
103         }
104         __hashCodeCalc = true;
105         int _hashCode = 1;
106         _hashCode += getStreetNum();
107         if (getStreetName() != null) {
108             _hashCode += getStreetName().hashCode();
109         }
110         if (getCity() != null) {
111             _hashCode += getCity().hashCode();
112         }
113         if (getState() != null) {
114             _hashCode += getState().hashCode();
115         }
116         _hashCode += getZip();
117         if (getPhoneNumber() != null) {
118             _hashCode += getPhoneNumber().hashCode();
119         }
120         __hashCodeCalc = false;
121         return _hashCode;
122     }
123
124     // Type metadata
125
private static org.apache.axis.description.TypeDesc typeDesc =
126         new org.apache.axis.description.TypeDesc(Address.class);
127
128     static {
129         org.apache.axis.description.FieldDesc field = new org.apache.axis.description.ElementDesc();
130         field.setFieldName("streetNum");
131         field.setXmlName(new javax.xml.namespace.QName JavaDoc("", "streetNum"));
132         field.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.w3.org/1999/XMLSchema", "int"));
133         typeDesc.addFieldDesc(field);
134         field = new org.apache.axis.description.ElementDesc();
135         field.setFieldName("streetName");
136         field.setXmlName(new javax.xml.namespace.QName JavaDoc("", "streetName"));
137         field.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.w3.org/1999/XMLSchema", "string"));
138         typeDesc.addFieldDesc(field);
139         field = new org.apache.axis.description.ElementDesc();
140         field.setFieldName("city");
141         field.setXmlName(new javax.xml.namespace.QName JavaDoc("", "city"));
142         field.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.w3.org/1999/XMLSchema", "string"));
143         typeDesc.addFieldDesc(field);
144         field = new org.apache.axis.description.ElementDesc();
145         field.setFieldName("state");
146         field.setXmlName(new javax.xml.namespace.QName JavaDoc("", "state"));
147         field.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.w3.org/1999/XMLSchema", "string"));
148         typeDesc.addFieldDesc(field);
149         field = new org.apache.axis.description.ElementDesc();
150         field.setFieldName("zip");
151         field.setXmlName(new javax.xml.namespace.QName JavaDoc("", "zip"));
152         field.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.w3.org/1999/XMLSchema", "int"));
153         typeDesc.addFieldDesc(field);
154         field = new org.apache.axis.description.ElementDesc();
155         field.setFieldName("phoneNumber");
156         field.setXmlName(new javax.xml.namespace.QName JavaDoc("", "phoneNumber"));
157         field.setXmlType(new javax.xml.namespace.QName JavaDoc("http://wsiftypes.addressbook/", "phone"));
158         typeDesc.addFieldDesc(field);
159     };
160
161     /**
162      * Return type metadata object
163      */

164     public static org.apache.axis.description.TypeDesc getTypeDesc() {
165         return typeDesc;
166     }
167
168     /**
169      * Get Custom Serializer
170      */

171     public static org.apache.axis.encoding.Serializer getSerializer(
172            java.lang.String JavaDoc mechType,
173            java.lang.Class JavaDoc _javaType,
174            javax.xml.namespace.QName JavaDoc _xmlType) {
175         return
176           new org.apache.axis.encoding.ser.BeanSerializer(
177             _javaType, _xmlType, typeDesc);
178     }
179
180     /**
181      * Get Custom Deserializer
182      */

183     public static org.apache.axis.encoding.Deserializer getDeserializer(
184            java.lang.String JavaDoc mechType,
185            java.lang.Class JavaDoc _javaType,
186            javax.xml.namespace.QName JavaDoc _xmlType) {
187         return
188           new org.apache.axis.encoding.ser.BeanDeserializer(
189             _javaType, _xmlType, typeDesc);
190     }
191
192 }
193
Popular Tags