Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
7905 manish.sha 1
/**
2
 * ValidatedHazardousContainer.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
 * Specifies the concept of a container used to package dangerous
13
 * goods commodities.
14
 */
15
public class ValidatedHazardousContainer  implements java.io.Serializable {
16
    /* Indicates that the quantity of the dangerous goods packaged
17
     * is permissible for shipping. This is used to ensure that the dangerous
18
     * goods commodities do not exceed the net quantity per package restrictions. */
19
    private java.math.BigDecimal QValue;
20
 
21
    /* Documents the kinds and quantities of all hazardous commodities
22
     * in the current package. */
23
    private com.fedex.ship.stub.ValidatedHazardousCommodityContent[] hazardousCommodities;
24
 
25
    public ValidatedHazardousContainer() {
26
    }
27
 
28
    public ValidatedHazardousContainer(
29
           java.math.BigDecimal QValue,
30
           com.fedex.ship.stub.ValidatedHazardousCommodityContent[] hazardousCommodities) {
31
           this.QValue = QValue;
32
           this.hazardousCommodities = hazardousCommodities;
33
    }
34
 
35
 
36
    /**
37
     * Gets the QValue value for this ValidatedHazardousContainer.
38
     * 
39
     * @return QValue   * Indicates that the quantity of the dangerous goods packaged
40
     * is permissible for shipping. This is used to ensure that the dangerous
41
     * goods commodities do not exceed the net quantity per package restrictions.
42
     */
43
    public java.math.BigDecimal getQValue() {
44
        return QValue;
45
    }
46
 
47
 
48
    /**
49
     * Sets the QValue value for this ValidatedHazardousContainer.
50
     * 
51
     * @param QValue   * Indicates that the quantity of the dangerous goods packaged
52
     * is permissible for shipping. This is used to ensure that the dangerous
53
     * goods commodities do not exceed the net quantity per package restrictions.
54
     */
55
    public void setQValue(java.math.BigDecimal QValue) {
56
        this.QValue = QValue;
57
    }
58
 
59
 
60
    /**
61
     * Gets the hazardousCommodities value for this ValidatedHazardousContainer.
62
     * 
63
     * @return hazardousCommodities   * Documents the kinds and quantities of all hazardous commodities
64
     * in the current package.
65
     */
66
    public com.fedex.ship.stub.ValidatedHazardousCommodityContent[] getHazardousCommodities() {
67
        return hazardousCommodities;
68
    }
69
 
70
 
71
    /**
72
     * Sets the hazardousCommodities value for this ValidatedHazardousContainer.
73
     * 
74
     * @param hazardousCommodities   * Documents the kinds and quantities of all hazardous commodities
75
     * in the current package.
76
     */
77
    public void setHazardousCommodities(com.fedex.ship.stub.ValidatedHazardousCommodityContent[] hazardousCommodities) {
78
        this.hazardousCommodities = hazardousCommodities;
79
    }
80
 
81
    public com.fedex.ship.stub.ValidatedHazardousCommodityContent getHazardousCommodities(int i) {
82
        return this.hazardousCommodities[i];
83
    }
84
 
85
    public void setHazardousCommodities(int i, com.fedex.ship.stub.ValidatedHazardousCommodityContent _value) {
86
        this.hazardousCommodities[i] = _value;
87
    }
88
 
89
    private java.lang.Object __equalsCalc = null;
90
    public synchronized boolean equals(java.lang.Object obj) {
91
        if (!(obj instanceof ValidatedHazardousContainer)) return false;
92
        ValidatedHazardousContainer other = (ValidatedHazardousContainer) obj;
93
        if (obj == null) return false;
94
        if (this == obj) return true;
95
        if (__equalsCalc != null) {
96
            return (__equalsCalc == obj);
97
        }
98
        __equalsCalc = obj;
99
        boolean _equals;
100
        _equals = true && 
101
            ((this.QValue==null && other.getQValue()==null) || 
102
             (this.QValue!=null &&
103
              this.QValue.equals(other.getQValue()))) &&
104
            ((this.hazardousCommodities==null && other.getHazardousCommodities()==null) || 
105
             (this.hazardousCommodities!=null &&
106
              java.util.Arrays.equals(this.hazardousCommodities, other.getHazardousCommodities())));
107
        __equalsCalc = null;
108
        return _equals;
109
    }
110
 
111
    private boolean __hashCodeCalc = false;
112
    public synchronized int hashCode() {
113
        if (__hashCodeCalc) {
114
            return 0;
115
        }
116
        __hashCodeCalc = true;
117
        int _hashCode = 1;
118
        if (getQValue() != null) {
119
            _hashCode += getQValue().hashCode();
120
        }
121
        if (getHazardousCommodities() != null) {
122
            for (int i=0;
123
                 i<java.lang.reflect.Array.getLength(getHazardousCommodities());
124
                 i++) {
125
                java.lang.Object obj = java.lang.reflect.Array.get(getHazardousCommodities(), i);
126
                if (obj != null &&
127
                    !obj.getClass().isArray()) {
128
                    _hashCode += obj.hashCode();
129
                }
130
            }
131
        }
132
        __hashCodeCalc = false;
133
        return _hashCode;
134
    }
135
 
136
    // Type metadata
137
    private static org.apache.axis.description.TypeDesc typeDesc =
138
        new org.apache.axis.description.TypeDesc(ValidatedHazardousContainer.class, true);
139
 
140
    static {
141
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://fedex.com/ws/ship/v12", "ValidatedHazardousContainer"));
142
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
143
        elemField.setFieldName("QValue");
144
        elemField.setXmlName(new javax.xml.namespace.QName("http://fedex.com/ws/ship/v12", "QValue"));
145
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "decimal"));
146
        elemField.setMinOccurs(0);
147
        elemField.setNillable(false);
148
        typeDesc.addFieldDesc(elemField);
149
        elemField = new org.apache.axis.description.ElementDesc();
150
        elemField.setFieldName("hazardousCommodities");
151
        elemField.setXmlName(new javax.xml.namespace.QName("http://fedex.com/ws/ship/v12", "HazardousCommodities"));
152
        elemField.setXmlType(new javax.xml.namespace.QName("http://fedex.com/ws/ship/v12", "ValidatedHazardousCommodityContent"));
153
        elemField.setMinOccurs(0);
154
        elemField.setNillable(false);
155
        elemField.setMaxOccursUnbounded(true);
156
        typeDesc.addFieldDesc(elemField);
157
    }
158
 
159
    /**
160
     * Return type metadata object
161
     */
162
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
163
        return typeDesc;
164
    }
165
 
166
    /**
167
     * Get Custom Serializer
168
     */
169
    public static org.apache.axis.encoding.Serializer getSerializer(
170
           java.lang.String mechType, 
171
           java.lang.Class _javaType,  
172
           javax.xml.namespace.QName _xmlType) {
173
        return 
174
          new  org.apache.axis.encoding.ser.BeanSerializer(
175
            _javaType, _xmlType, typeDesc);
176
    }
177
 
178
    /**
179
     * Get Custom Deserializer
180
     */
181
    public static org.apache.axis.encoding.Deserializer getDeserializer(
182
           java.lang.String mechType, 
183
           java.lang.Class _javaType,  
184
           javax.xml.namespace.QName _xmlType) {
185
        return 
186
          new  org.apache.axis.encoding.ser.BeanDeserializer(
187
            _javaType, _xmlType, typeDesc);
188
    }
189
 
190
}