Subversion Repositories SmartDukaan

Rev

Rev 22577 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
20640 amit.gupta 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.aramex.stub;
9
 
10
public class Weight  implements java.io.Serializable {
22598 amit.gupta 11
    private java.lang.String unit;
20640 amit.gupta 12
 
13
    private double value;
14
 
15
    public Weight() {
16
    }
17
 
18
    public Weight(
19
           java.lang.String unit,
20
           double value) {
21
           this.unit = unit;
22
           this.value = value;
23
    }
24
 
25
 
26
    /**
27
     * Gets the unit value for this Weight.
28
     * 
29
     * @return unit
30
     */
31
    public java.lang.String getUnit() {
32
        return unit;
33
    }
34
 
35
 
36
    /**
37
     * Sets the unit value for this Weight.
38
     * 
39
     * @param unit
40
     */
41
    public void setUnit(java.lang.String unit) {
42
        this.unit = unit;
43
    }
44
 
45
 
46
    /**
47
     * Gets the value value for this Weight.
48
     * 
49
     * @return value
50
     */
51
    public double getValue() {
52
        return value;
53
    }
54
 
55
 
56
    /**
57
     * Sets the value value for this Weight.
58
     * 
59
     * @param value
60
     */
61
    public void setValue(double value) {
62
        this.value = value;
63
    }
64
 
65
    private java.lang.Object __equalsCalc = null;
66
    public synchronized boolean equals(java.lang.Object obj) {
67
        if (!(obj instanceof Weight)) return false;
68
        Weight other = (Weight) obj;
69
        if (obj == null) return false;
70
        if (this == obj) return true;
71
        if (__equalsCalc != null) {
72
            return (__equalsCalc == obj);
73
        }
74
        __equalsCalc = obj;
75
        boolean _equals;
76
        _equals = true && 
77
            ((this.unit==null && other.getUnit()==null) || 
78
             (this.unit!=null &&
79
              this.unit.equals(other.getUnit()))) &&
80
            this.value == other.getValue();
81
        __equalsCalc = null;
82
        return _equals;
83
    }
84
 
85
    private boolean __hashCodeCalc = false;
86
    public synchronized int hashCode() {
87
        if (__hashCodeCalc) {
88
            return 0;
89
        }
90
        __hashCodeCalc = true;
91
        int _hashCode = 1;
92
        if (getUnit() != null) {
93
            _hashCode += getUnit().hashCode();
94
        }
95
        _hashCode += new Double(getValue()).hashCode();
96
        __hashCodeCalc = false;
97
        return _hashCode;
98
    }
99
 
100
    // Type metadata
101
    private static org.apache.axis.description.TypeDesc typeDesc =
102
        new org.apache.axis.description.TypeDesc(Weight.class, true);
103
 
104
    static {
105
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://ws.aramex.net/ShippingAPI/v1/", "Weight"));
106
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
107
        elemField.setFieldName("unit");
108
        elemField.setXmlName(new javax.xml.namespace.QName("http://ws.aramex.net/ShippingAPI/v1/", "Unit"));
109
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
110
        elemField.setNillable(true);
111
        typeDesc.addFieldDesc(elemField);
112
        elemField = new org.apache.axis.description.ElementDesc();
113
        elemField.setFieldName("value");
114
        elemField.setXmlName(new javax.xml.namespace.QName("http://ws.aramex.net/ShippingAPI/v1/", "Value"));
115
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "double"));
116
        elemField.setNillable(false);
117
        typeDesc.addFieldDesc(elemField);
118
    }
119
 
120
    /**
121
     * Return type metadata object
122
     */
123
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
124
        return typeDesc;
125
    }
126
 
127
    /**
128
     * Get Custom Serializer
129
     */
130
    public static org.apache.axis.encoding.Serializer getSerializer(
131
           java.lang.String mechType, 
132
           java.lang.Class _javaType,  
133
           javax.xml.namespace.QName _xmlType) {
134
        return 
135
          new  org.apache.axis.encoding.ser.BeanSerializer(
136
            _javaType, _xmlType, typeDesc);
137
    }
138
 
139
    /**
140
     * Get Custom Deserializer
141
     */
142
    public static org.apache.axis.encoding.Deserializer getDeserializer(
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.BeanDeserializer(
148
            _javaType, _xmlType, typeDesc);
149
    }
150
 
151
}