KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > capeclear > www > GlobalWeather_xsd > Precipitation


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

7
8 package com.capeclear.www.GlobalWeather_xsd;
9
10 import java.io.Serializable JavaDoc;
11 import javax.xml.namespace.QName JavaDoc;
12
13 public class Precipitation implements Serializable JavaDoc {
14     private double amount;
15     private int hours;
16     private String JavaDoc string;
17
18     public Precipitation() {
19     }
20
21     public double getAmount() {
22         return amount;
23     }
24
25     public void setAmount(double amount) {
26         this.amount = amount;
27     }
28
29     public int getHours() {
30         return hours;
31     }
32
33     public void setHours(int hours) {
34         this.hours = hours;
35     }
36
37     public String JavaDoc getString() {
38         return string;
39     }
40
41     public void setString(String JavaDoc string) {
42         this.string = string;
43     }
44
45     private Object JavaDoc __equalsCalc = null;
46     public synchronized boolean equals(Object JavaDoc obj) {
47         if (!(obj instanceof Precipitation)) return false;
48         Precipitation other = (Precipitation) obj;
49         if (obj == null) return false;
50         if (this == obj) return true;
51         if (__equalsCalc != null) {
52             return (__equalsCalc == obj);
53         }
54         __equalsCalc = obj;
55         boolean _equals;
56         _equals = true &&
57             this.amount == other.getAmount() &&
58             this.hours == other.getHours() &&
59             ((this.string==null && other.getString()==null) ||
60              (this.string!=null &&
61               this.string.equals(other.getString())));
62         __equalsCalc = null;
63         return _equals;
64     }
65
66     private boolean __hashCodeCalc = false;
67     public synchronized int hashCode() {
68         if (__hashCodeCalc) {
69             return 0;
70         }
71         __hashCodeCalc = true;
72         int _hashCode = 1;
73         _hashCode += new Double JavaDoc(getAmount()).hashCode();
74         _hashCode += getHours();
75         if (getString() != null) {
76             _hashCode += getString().hashCode();
77         }
78         __hashCodeCalc = false;
79         return _hashCode;
80     }
81
82     // Type metadata
83
private static org.apache.axis.description.TypeDesc typeDesc =
84         new org.apache.axis.description.TypeDesc(Precipitation.class);
85
86     static {
87         typeDesc.setXmlType(new QName JavaDoc("http://www.capeclear.com/GlobalWeather.xsd", "Precipitation"));
88         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
89         elemField.setFieldName("amount");
90         elemField.setXmlName(new QName JavaDoc("", "amount"));
91         elemField.setXmlType(new QName JavaDoc("http://www.w3.org/2001/XMLSchema", "double"));
92         typeDesc.addFieldDesc(elemField);
93         elemField = new org.apache.axis.description.ElementDesc();
94         elemField.setFieldName("hours");
95         elemField.setXmlName(new QName JavaDoc("", "hours"));
96         elemField.setXmlType(new QName JavaDoc("http://www.w3.org/2001/XMLSchema", "int"));
97         typeDesc.addFieldDesc(elemField);
98         elemField = new org.apache.axis.description.ElementDesc();
99         elemField.setFieldName("string");
100         elemField.setXmlName(new QName JavaDoc("", "string"));
101         elemField.setXmlType(new QName JavaDoc("http://www.w3.org/2001/XMLSchema", "string"));
102         typeDesc.addFieldDesc(elemField);
103     }
104
105     /**
106      * Return type metadata object
107      */

108     public static org.apache.axis.description.TypeDesc getTypeDesc() {
109         return typeDesc;
110     }
111
112     /**
113      * Get Custom Serializer
114      */

115     public static org.apache.axis.encoding.Serializer getSerializer(
116            String JavaDoc mechType,
117            Class JavaDoc _javaType,
118            QName JavaDoc _xmlType) {
119         return
120           new org.apache.axis.encoding.ser.BeanSerializer(
121             _javaType, _xmlType, typeDesc);
122     }
123
124     /**
125      * Get Custom Deserializer
126      */

127     public static org.apache.axis.encoding.Deserializer getDeserializer(
128            String JavaDoc mechType,
129            java.lang.Class JavaDoc _javaType,
130            QName JavaDoc _xmlType) {
131         return
132           new org.apache.axis.encoding.ser.BeanDeserializer(
133             _javaType, _xmlType, typeDesc);
134     }
135
136 }
137
Popular Tags