Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
7905 manish.sha 1
/**
2
 * Money.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
 * The descriptive data for the medium of exchange for FedEx services.
13
 */
14
public class Money  implements java.io.Serializable {
15
    /* Identifies the currency of the monetary amount. */
16
    private java.lang.String currency;
17
 
18
    /* Identifies the monetary amount. */
19
    private java.math.BigDecimal amount;
20
 
21
    public Money() {
22
    }
23
 
24
    public Money(
25
           java.lang.String currency,
26
           java.math.BigDecimal amount) {
27
           this.currency = currency;
28
           this.amount = amount;
29
    }
30
 
31
 
32
    /**
33
     * Gets the currency value for this Money.
34
     * 
35
     * @return currency   * Identifies the currency of the monetary amount.
36
     */
37
    public java.lang.String getCurrency() {
38
        return currency;
39
    }
40
 
41
 
42
    /**
43
     * Sets the currency value for this Money.
44
     * 
45
     * @param currency   * Identifies the currency of the monetary amount.
46
     */
47
    public void setCurrency(java.lang.String currency) {
48
        this.currency = currency;
49
    }
50
 
51
 
52
    /**
53
     * Gets the amount value for this Money.
54
     * 
55
     * @return amount   * Identifies the monetary amount.
56
     */
57
    public java.math.BigDecimal getAmount() {
58
        return amount;
59
    }
60
 
61
 
62
    /**
63
     * Sets the amount value for this Money.
64
     * 
65
     * @param amount   * Identifies the monetary amount.
66
     */
67
    public void setAmount(java.math.BigDecimal amount) {
68
        this.amount = amount;
69
    }
70
 
71
    private java.lang.Object __equalsCalc = null;
72
    public synchronized boolean equals(java.lang.Object obj) {
73
        if (!(obj instanceof Money)) return false;
74
        Money other = (Money) 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.currency==null && other.getCurrency()==null) || 
84
             (this.currency!=null &&
85
              this.currency.equals(other.getCurrency()))) &&
86
            ((this.amount==null && other.getAmount()==null) || 
87
             (this.amount!=null &&
88
              this.amount.equals(other.getAmount())));
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 (getCurrency() != null) {
101
            _hashCode += getCurrency().hashCode();
102
        }
103
        if (getAmount() != null) {
104
            _hashCode += getAmount().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(Money.class, true);
113
 
114
    static {
115
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://fedex.com/ws/ship/v12", "Money"));
116
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
117
        elemField.setFieldName("currency");
118
        elemField.setXmlName(new javax.xml.namespace.QName("http://fedex.com/ws/ship/v12", "Currency"));
119
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
120
        elemField.setNillable(false);
121
        typeDesc.addFieldDesc(elemField);
122
        elemField = new org.apache.axis.description.ElementDesc();
123
        elemField.setFieldName("amount");
124
        elemField.setXmlName(new javax.xml.namespace.QName("http://fedex.com/ws/ship/v12", "Amount"));
125
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "decimal"));
126
        elemField.setNillable(false);
127
        typeDesc.addFieldDesc(elemField);
128
    }
129
 
130
    /**
131
     * Return type metadata object
132
     */
133
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
134
        return typeDesc;
135
    }
136
 
137
    /**
138
     * Get Custom Serializer
139
     */
140
    public static org.apache.axis.encoding.Serializer getSerializer(
141
           java.lang.String mechType, 
142
           java.lang.Class _javaType,  
143
           javax.xml.namespace.QName _xmlType) {
144
        return 
145
          new  org.apache.axis.encoding.ser.BeanSerializer(
146
            _javaType, _xmlType, typeDesc);
147
    }
148
 
149
    /**
150
     * Get Custom Deserializer
151
     */
152
    public static org.apache.axis.encoding.Deserializer getDeserializer(
153
           java.lang.String mechType, 
154
           java.lang.Class _javaType,  
155
           javax.xml.namespace.QName _xmlType) {
156
        return 
157
          new  org.apache.axis.encoding.ser.BeanDeserializer(
158
            _javaType, _xmlType, typeDesc);
159
    }
160
 
161
}