Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
7905 manish.sha 1
/**
2
 * BinaryBarcode.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
 * Each instance of this data type represents a barcode whose content
13
 * must be represented as binary data (i.e. not ASCII text).
14
 */
15
public class BinaryBarcode  implements java.io.Serializable {
16
    /* The kind of barcode data in this instance. */
17
    private com.fedex.ship.stub.BinaryBarcodeType type;
18
 
19
    /* The data content of this instance. */
20
    private byte[] value;
21
 
22
    public BinaryBarcode() {
23
    }
24
 
25
    public BinaryBarcode(
26
           com.fedex.ship.stub.BinaryBarcodeType type,
27
           byte[] value) {
28
           this.type = type;
29
           this.value = value;
30
    }
31
 
32
 
33
    /**
34
     * Gets the type value for this BinaryBarcode.
35
     * 
36
     * @return type   * The kind of barcode data in this instance.
37
     */
38
    public com.fedex.ship.stub.BinaryBarcodeType getType() {
39
        return type;
40
    }
41
 
42
 
43
    /**
44
     * Sets the type value for this BinaryBarcode.
45
     * 
46
     * @param type   * The kind of barcode data in this instance.
47
     */
48
    public void setType(com.fedex.ship.stub.BinaryBarcodeType type) {
49
        this.type = type;
50
    }
51
 
52
 
53
    /**
54
     * Gets the value value for this BinaryBarcode.
55
     * 
56
     * @return value   * The data content of this instance.
57
     */
58
    public byte[] getValue() {
59
        return value;
60
    }
61
 
62
 
63
    /**
64
     * Sets the value value for this BinaryBarcode.
65
     * 
66
     * @param value   * The data content of this instance.
67
     */
68
    public void setValue(byte[] value) {
69
        this.value = value;
70
    }
71
 
72
    private java.lang.Object __equalsCalc = null;
73
    public synchronized boolean equals(java.lang.Object obj) {
74
        if (!(obj instanceof BinaryBarcode)) return false;
75
        BinaryBarcode other = (BinaryBarcode) obj;
76
        if (obj == null) return false;
77
        if (this == obj) return true;
78
        if (__equalsCalc != null) {
79
            return (__equalsCalc == obj);
80
        }
81
        __equalsCalc = obj;
82
        boolean _equals;
83
        _equals = true && 
84
            ((this.type==null && other.getType()==null) || 
85
             (this.type!=null &&
86
              this.type.equals(other.getType()))) &&
87
            ((this.value==null && other.getValue()==null) || 
88
             (this.value!=null &&
89
              java.util.Arrays.equals(this.value, other.getValue())));
90
        __equalsCalc = null;
91
        return _equals;
92
    }
93
 
94
    private boolean __hashCodeCalc = false;
95
    public synchronized int hashCode() {
96
        if (__hashCodeCalc) {
97
            return 0;
98
        }
99
        __hashCodeCalc = true;
100
        int _hashCode = 1;
101
        if (getType() != null) {
102
            _hashCode += getType().hashCode();
103
        }
104
        if (getValue() != null) {
105
            for (int i=0;
106
                 i<java.lang.reflect.Array.getLength(getValue());
107
                 i++) {
108
                java.lang.Object obj = java.lang.reflect.Array.get(getValue(), i);
109
                if (obj != null &&
110
                    !obj.getClass().isArray()) {
111
                    _hashCode += obj.hashCode();
112
                }
113
            }
114
        }
115
        __hashCodeCalc = false;
116
        return _hashCode;
117
    }
118
 
119
    // Type metadata
120
    private static org.apache.axis.description.TypeDesc typeDesc =
121
        new org.apache.axis.description.TypeDesc(BinaryBarcode.class, true);
122
 
123
    static {
124
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://fedex.com/ws/ship/v12", "BinaryBarcode"));
125
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
126
        elemField.setFieldName("type");
127
        elemField.setXmlName(new javax.xml.namespace.QName("http://fedex.com/ws/ship/v12", "Type"));
128
        elemField.setXmlType(new javax.xml.namespace.QName("http://fedex.com/ws/ship/v12", "BinaryBarcodeType"));
129
        elemField.setMinOccurs(0);
130
        elemField.setNillable(false);
131
        typeDesc.addFieldDesc(elemField);
132
        elemField = new org.apache.axis.description.ElementDesc();
133
        elemField.setFieldName("value");
134
        elemField.setXmlName(new javax.xml.namespace.QName("http://fedex.com/ws/ship/v12", "Value"));
135
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "base64Binary"));
136
        elemField.setMinOccurs(0);
137
        elemField.setNillable(false);
138
        typeDesc.addFieldDesc(elemField);
139
    }
140
 
141
    /**
142
     * Return type metadata object
143
     */
144
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
145
        return typeDesc;
146
    }
147
 
148
    /**
149
     * Get Custom Serializer
150
     */
151
    public static org.apache.axis.encoding.Serializer getSerializer(
152
           java.lang.String mechType, 
153
           java.lang.Class _javaType,  
154
           javax.xml.namespace.QName _xmlType) {
155
        return 
156
          new  org.apache.axis.encoding.ser.BeanSerializer(
157
            _javaType, _xmlType, typeDesc);
158
    }
159
 
160
    /**
161
     * Get Custom Deserializer
162
     */
163
    public static org.apache.axis.encoding.Deserializer getDeserializer(
164
           java.lang.String mechType, 
165
           java.lang.Class _javaType,  
166
           javax.xml.namespace.QName _xmlType) {
167
        return 
168
          new  org.apache.axis.encoding.ser.BeanDeserializer(
169
            _javaType, _xmlType, typeDesc);
170
    }
171
 
172
}