Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
7908 manish.sha 1
/**
2
 * Distance.java
3
 *
4
 * This file was auto-generated from WSDL
5
 * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
6
 */
7
 
8
package com.fedex.track.stub;
9
 
10
 
11
/**
12
 * Driving or other transportation distances, distinct from dimension
13
 * measurements.
14
 */
15
public class Distance  implements java.io.Serializable {
16
    /* Identifies the distance quantity. */
17
    private java.math.BigDecimal value;
18
 
19
    /* Identifies the unit of measure for the distance value. */
20
    private com.fedex.track.stub.DistanceUnits units;
21
 
22
    public Distance() {
23
    }
24
 
25
    public Distance(
26
           java.math.BigDecimal value,
27
           com.fedex.track.stub.DistanceUnits units) {
28
           this.value = value;
29
           this.units = units;
30
    }
31
 
32
 
33
    /**
34
     * Gets the value value for this Distance.
35
     * 
36
     * @return value   * Identifies the distance quantity.
37
     */
38
    public java.math.BigDecimal getValue() {
39
        return value;
40
    }
41
 
42
 
43
    /**
44
     * Sets the value value for this Distance.
45
     * 
46
     * @param value   * Identifies the distance quantity.
47
     */
48
    public void setValue(java.math.BigDecimal value) {
49
        this.value = value;
50
    }
51
 
52
 
53
    /**
54
     * Gets the units value for this Distance.
55
     * 
56
     * @return units   * Identifies the unit of measure for the distance value.
57
     */
58
    public com.fedex.track.stub.DistanceUnits getUnits() {
59
        return units;
60
    }
61
 
62
 
63
    /**
64
     * Sets the units value for this Distance.
65
     * 
66
     * @param units   * Identifies the unit of measure for the distance value.
67
     */
68
    public void setUnits(com.fedex.track.stub.DistanceUnits units) {
69
        this.units = units;
70
    }
71
 
72
    private java.lang.Object __equalsCalc = null;
73
    public synchronized boolean equals(java.lang.Object obj) {
74
        if (!(obj instanceof Distance)) return false;
75
        Distance other = (Distance) obj;
76
        if (obj == null) return false;
77
        if (this == obj) return true;
78
        if (__equalsCalc != null) {
79
            return (__equalsCalc == obj);
80
        }
81
        __equalsCalc = obj;
82
        boolean _equals;
83
        _equals = true && 
84
            ((this.value==null && other.getValue()==null) || 
85
             (this.value!=null &&
86
              this.value.equals(other.getValue()))) &&
87
            ((this.units==null && other.getUnits()==null) || 
88
             (this.units!=null &&
89
              this.units.equals(other.getUnits())));
90
        __equalsCalc = null;
91
        return _equals;
92
    }
93
 
94
    private boolean __hashCodeCalc = false;
95
    public synchronized int hashCode() {
96
        if (__hashCodeCalc) {
97
            return 0;
98
        }
99
        __hashCodeCalc = true;
100
        int _hashCode = 1;
101
        if (getValue() != null) {
102
            _hashCode += getValue().hashCode();
103
        }
104
        if (getUnits() != null) {
105
            _hashCode += getUnits().hashCode();
106
        }
107
        __hashCodeCalc = false;
108
        return _hashCode;
109
    }
110
 
111
    // Type metadata
112
    private static org.apache.axis.description.TypeDesc typeDesc =
113
        new org.apache.axis.description.TypeDesc(Distance.class, true);
114
 
115
    static {
116
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://fedex.com/ws/track/v6", "Distance"));
117
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
118
        elemField.setFieldName("value");
119
        elemField.setXmlName(new javax.xml.namespace.QName("http://fedex.com/ws/track/v6", "Value"));
120
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "decimal"));
121
        elemField.setMinOccurs(0);
122
        elemField.setNillable(false);
123
        typeDesc.addFieldDesc(elemField);
124
        elemField = new org.apache.axis.description.ElementDesc();
125
        elemField.setFieldName("units");
126
        elemField.setXmlName(new javax.xml.namespace.QName("http://fedex.com/ws/track/v6", "Units"));
127
        elemField.setXmlType(new javax.xml.namespace.QName("http://fedex.com/ws/track/v6", "DistanceUnits"));
128
        elemField.setMinOccurs(0);
129
        elemField.setNillable(false);
130
        typeDesc.addFieldDesc(elemField);
131
    }
132
 
133
    /**
134
     * Return type metadata object
135
     */
136
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
137
        return typeDesc;
138
    }
139
 
140
    /**
141
     * Get Custom Serializer
142
     */
143
    public static org.apache.axis.encoding.Serializer getSerializer(
144
           java.lang.String mechType, 
145
           java.lang.Class _javaType,  
146
           javax.xml.namespace.QName _xmlType) {
147
        return 
148
          new  org.apache.axis.encoding.ser.BeanSerializer(
149
            _javaType, _xmlType, typeDesc);
150
    }
151
 
152
    /**
153
     * Get Custom Deserializer
154
     */
155
    public static org.apache.axis.encoding.Deserializer getDeserializer(
156
           java.lang.String mechType, 
157
           java.lang.Class _javaType,  
158
           javax.xml.namespace.QName _xmlType) {
159
        return 
160
          new  org.apache.axis.encoding.ser.BeanDeserializer(
161
            _javaType, _xmlType, typeDesc);
162
    }
163
 
164
}