Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

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