Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
7905 manish.sha 1
/**
2
 * RateDiscount.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
 * Identifies a discount applied to the shipment.
13
 */
14
public class RateDiscount  implements java.io.Serializable {
15
    /* Identifies the type of discount applied to the shipment. */
16
    private com.fedex.ship.stub.RateDiscountType rateDiscountType;
17
 
18
    private java.lang.String description;
19
 
20
    /* The amount of the discount applied to the shipment. */
21
    private com.fedex.ship.stub.Money amount;
22
 
23
    /* The percentage of the discount applied to the shipment. */
24
    private java.math.BigDecimal percent;
25
 
26
    public RateDiscount() {
27
    }
28
 
29
    public RateDiscount(
30
           com.fedex.ship.stub.RateDiscountType rateDiscountType,
31
           java.lang.String description,
32
           com.fedex.ship.stub.Money amount,
33
           java.math.BigDecimal percent) {
34
           this.rateDiscountType = rateDiscountType;
35
           this.description = description;
36
           this.amount = amount;
37
           this.percent = percent;
38
    }
39
 
40
 
41
    /**
42
     * Gets the rateDiscountType value for this RateDiscount.
43
     * 
44
     * @return rateDiscountType   * Identifies the type of discount applied to the shipment.
45
     */
46
    public com.fedex.ship.stub.RateDiscountType getRateDiscountType() {
47
        return rateDiscountType;
48
    }
49
 
50
 
51
    /**
52
     * Sets the rateDiscountType value for this RateDiscount.
53
     * 
54
     * @param rateDiscountType   * Identifies the type of discount applied to the shipment.
55
     */
56
    public void setRateDiscountType(com.fedex.ship.stub.RateDiscountType rateDiscountType) {
57
        this.rateDiscountType = rateDiscountType;
58
    }
59
 
60
 
61
    /**
62
     * Gets the description value for this RateDiscount.
63
     * 
64
     * @return description
65
     */
66
    public java.lang.String getDescription() {
67
        return description;
68
    }
69
 
70
 
71
    /**
72
     * Sets the description value for this RateDiscount.
73
     * 
74
     * @param description
75
     */
76
    public void setDescription(java.lang.String description) {
77
        this.description = description;
78
    }
79
 
80
 
81
    /**
82
     * Gets the amount value for this RateDiscount.
83
     * 
84
     * @return amount   * The amount of the discount applied to the shipment.
85
     */
86
    public com.fedex.ship.stub.Money getAmount() {
87
        return amount;
88
    }
89
 
90
 
91
    /**
92
     * Sets the amount value for this RateDiscount.
93
     * 
94
     * @param amount   * The amount of the discount applied to the shipment.
95
     */
96
    public void setAmount(com.fedex.ship.stub.Money amount) {
97
        this.amount = amount;
98
    }
99
 
100
 
101
    /**
102
     * Gets the percent value for this RateDiscount.
103
     * 
104
     * @return percent   * The percentage of the discount applied to the shipment.
105
     */
106
    public java.math.BigDecimal getPercent() {
107
        return percent;
108
    }
109
 
110
 
111
    /**
112
     * Sets the percent value for this RateDiscount.
113
     * 
114
     * @param percent   * The percentage of the discount applied to the shipment.
115
     */
116
    public void setPercent(java.math.BigDecimal percent) {
117
        this.percent = percent;
118
    }
119
 
120
    private java.lang.Object __equalsCalc = null;
121
    public synchronized boolean equals(java.lang.Object obj) {
122
        if (!(obj instanceof RateDiscount)) return false;
123
        RateDiscount other = (RateDiscount) obj;
124
        if (obj == null) return false;
125
        if (this == obj) return true;
126
        if (__equalsCalc != null) {
127
            return (__equalsCalc == obj);
128
        }
129
        __equalsCalc = obj;
130
        boolean _equals;
131
        _equals = true && 
132
            ((this.rateDiscountType==null && other.getRateDiscountType()==null) || 
133
             (this.rateDiscountType!=null &&
134
              this.rateDiscountType.equals(other.getRateDiscountType()))) &&
135
            ((this.description==null && other.getDescription()==null) || 
136
             (this.description!=null &&
137
              this.description.equals(other.getDescription()))) &&
138
            ((this.amount==null && other.getAmount()==null) || 
139
             (this.amount!=null &&
140
              this.amount.equals(other.getAmount()))) &&
141
            ((this.percent==null && other.getPercent()==null) || 
142
             (this.percent!=null &&
143
              this.percent.equals(other.getPercent())));
144
        __equalsCalc = null;
145
        return _equals;
146
    }
147
 
148
    private boolean __hashCodeCalc = false;
149
    public synchronized int hashCode() {
150
        if (__hashCodeCalc) {
151
            return 0;
152
        }
153
        __hashCodeCalc = true;
154
        int _hashCode = 1;
155
        if (getRateDiscountType() != null) {
156
            _hashCode += getRateDiscountType().hashCode();
157
        }
158
        if (getDescription() != null) {
159
            _hashCode += getDescription().hashCode();
160
        }
161
        if (getAmount() != null) {
162
            _hashCode += getAmount().hashCode();
163
        }
164
        if (getPercent() != null) {
165
            _hashCode += getPercent().hashCode();
166
        }
167
        __hashCodeCalc = false;
168
        return _hashCode;
169
    }
170
 
171
    // Type metadata
172
    private static org.apache.axis.description.TypeDesc typeDesc =
173
        new org.apache.axis.description.TypeDesc(RateDiscount.class, true);
174
 
175
    static {
176
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://fedex.com/ws/ship/v12", "RateDiscount"));
177
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
178
        elemField.setFieldName("rateDiscountType");
179
        elemField.setXmlName(new javax.xml.namespace.QName("http://fedex.com/ws/ship/v12", "RateDiscountType"));
180
        elemField.setXmlType(new javax.xml.namespace.QName("http://fedex.com/ws/ship/v12", "RateDiscountType"));
181
        elemField.setMinOccurs(0);
182
        elemField.setNillable(false);
183
        typeDesc.addFieldDesc(elemField);
184
        elemField = new org.apache.axis.description.ElementDesc();
185
        elemField.setFieldName("description");
186
        elemField.setXmlName(new javax.xml.namespace.QName("http://fedex.com/ws/ship/v12", "Description"));
187
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
188
        elemField.setMinOccurs(0);
189
        elemField.setNillable(false);
190
        typeDesc.addFieldDesc(elemField);
191
        elemField = new org.apache.axis.description.ElementDesc();
192
        elemField.setFieldName("amount");
193
        elemField.setXmlName(new javax.xml.namespace.QName("http://fedex.com/ws/ship/v12", "Amount"));
194
        elemField.setXmlType(new javax.xml.namespace.QName("http://fedex.com/ws/ship/v12", "Money"));
195
        elemField.setMinOccurs(0);
196
        elemField.setNillable(false);
197
        typeDesc.addFieldDesc(elemField);
198
        elemField = new org.apache.axis.description.ElementDesc();
199
        elemField.setFieldName("percent");
200
        elemField.setXmlName(new javax.xml.namespace.QName("http://fedex.com/ws/ship/v12", "Percent"));
201
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "decimal"));
202
        elemField.setMinOccurs(0);
203
        elemField.setNillable(false);
204
        typeDesc.addFieldDesc(elemField);
205
    }
206
 
207
    /**
208
     * Return type metadata object
209
     */
210
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
211
        return typeDesc;
212
    }
213
 
214
    /**
215
     * Get Custom Serializer
216
     */
217
    public static org.apache.axis.encoding.Serializer getSerializer(
218
           java.lang.String mechType, 
219
           java.lang.Class _javaType,  
220
           javax.xml.namespace.QName _xmlType) {
221
        return 
222
          new  org.apache.axis.encoding.ser.BeanSerializer(
223
            _javaType, _xmlType, typeDesc);
224
    }
225
 
226
    /**
227
     * Get Custom Deserializer
228
     */
229
    public static org.apache.axis.encoding.Deserializer getDeserializer(
230
           java.lang.String mechType, 
231
           java.lang.Class _javaType,  
232
           javax.xml.namespace.QName _xmlType) {
233
        return 
234
          new  org.apache.axis.encoding.ser.BeanDeserializer(
235
            _javaType, _xmlType, typeDesc);
236
    }
237
 
238
}