Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

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