Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
20640 amit.gupta 1
/**
2
 * Attachment.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 Attachment  implements java.io.Serializable {
11
    private java.lang.String fileName;
12
 
13
    private java.lang.String fileExtension;
14
 
15
    private byte[] fileContents;
16
 
17
    public Attachment() {
18
    }
19
 
20
    public Attachment(
21
           java.lang.String fileName,
22
           java.lang.String fileExtension,
23
           byte[] fileContents) {
24
           this.fileName = fileName;
25
           this.fileExtension = fileExtension;
26
           this.fileContents = fileContents;
27
    }
28
 
29
 
30
    /**
31
     * Gets the fileName value for this Attachment.
32
     * 
33
     * @return fileName
34
     */
35
    public java.lang.String getFileName() {
36
        return fileName;
37
    }
38
 
39
 
40
    /**
41
     * Sets the fileName value for this Attachment.
42
     * 
43
     * @param fileName
44
     */
45
    public void setFileName(java.lang.String fileName) {
46
        this.fileName = fileName;
47
    }
48
 
49
 
50
    /**
51
     * Gets the fileExtension value for this Attachment.
52
     * 
53
     * @return fileExtension
54
     */
55
    public java.lang.String getFileExtension() {
56
        return fileExtension;
57
    }
58
 
59
 
60
    /**
61
     * Sets the fileExtension value for this Attachment.
62
     * 
63
     * @param fileExtension
64
     */
65
    public void setFileExtension(java.lang.String fileExtension) {
66
        this.fileExtension = fileExtension;
67
    }
68
 
69
 
70
    /**
71
     * Gets the fileContents value for this Attachment.
72
     * 
73
     * @return fileContents
74
     */
75
    public byte[] getFileContents() {
76
        return fileContents;
77
    }
78
 
79
 
80
    /**
81
     * Sets the fileContents value for this Attachment.
82
     * 
83
     * @param fileContents
84
     */
85
    public void setFileContents(byte[] fileContents) {
86
        this.fileContents = fileContents;
87
    }
88
 
89
    private java.lang.Object __equalsCalc = null;
90
    public synchronized boolean equals(java.lang.Object obj) {
91
        if (!(obj instanceof Attachment)) return false;
92
        Attachment other = (Attachment) 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.fileName==null && other.getFileName()==null) || 
102
             (this.fileName!=null &&
103
              this.fileName.equals(other.getFileName()))) &&
104
            ((this.fileExtension==null && other.getFileExtension()==null) || 
105
             (this.fileExtension!=null &&
106
              this.fileExtension.equals(other.getFileExtension()))) &&
107
            ((this.fileContents==null && other.getFileContents()==null) || 
108
             (this.fileContents!=null &&
109
              java.util.Arrays.equals(this.fileContents, other.getFileContents())));
110
        __equalsCalc = null;
111
        return _equals;
112
    }
113
 
114
    private boolean __hashCodeCalc = false;
115
    public synchronized int hashCode() {
116
        if (__hashCodeCalc) {
117
            return 0;
118
        }
119
        __hashCodeCalc = true;
120
        int _hashCode = 1;
121
        if (getFileName() != null) {
122
            _hashCode += getFileName().hashCode();
123
        }
124
        if (getFileExtension() != null) {
125
            _hashCode += getFileExtension().hashCode();
126
        }
127
        if (getFileContents() != null) {
128
            for (int i=0;
129
                 i<java.lang.reflect.Array.getLength(getFileContents());
130
                 i++) {
131
                java.lang.Object obj = java.lang.reflect.Array.get(getFileContents(), i);
132
                if (obj != null &&
133
                    !obj.getClass().isArray()) {
134
                    _hashCode += obj.hashCode();
135
                }
136
            }
137
        }
138
        __hashCodeCalc = false;
139
        return _hashCode;
140
    }
141
 
142
    // Type metadata
143
    private static org.apache.axis.description.TypeDesc typeDesc =
144
        new org.apache.axis.description.TypeDesc(Attachment.class, true);
145
 
146
    static {
147
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://ws.aramex.net/ShippingAPI/v1/", "Attachment"));
148
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
149
        elemField.setFieldName("fileName");
150
        elemField.setXmlName(new javax.xml.namespace.QName("http://ws.aramex.net/ShippingAPI/v1/", "FileName"));
151
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
152
        elemField.setNillable(true);
153
        typeDesc.addFieldDesc(elemField);
154
        elemField = new org.apache.axis.description.ElementDesc();
155
        elemField.setFieldName("fileExtension");
156
        elemField.setXmlName(new javax.xml.namespace.QName("http://ws.aramex.net/ShippingAPI/v1/", "FileExtension"));
157
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
158
        elemField.setNillable(true);
159
        typeDesc.addFieldDesc(elemField);
160
        elemField = new org.apache.axis.description.ElementDesc();
161
        elemField.setFieldName("fileContents");
162
        elemField.setXmlName(new javax.xml.namespace.QName("http://ws.aramex.net/ShippingAPI/v1/", "FileContents"));
163
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "base64Binary"));
164
        elemField.setNillable(true);
165
        typeDesc.addFieldDesc(elemField);
166
    }
167
 
168
    /**
169
     * Return type metadata object
170
     */
171
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
172
        return typeDesc;
173
    }
174
 
175
    /**
176
     * Get Custom Serializer
177
     */
178
    public static org.apache.axis.encoding.Serializer getSerializer(
179
           java.lang.String mechType, 
180
           java.lang.Class _javaType,  
181
           javax.xml.namespace.QName _xmlType) {
182
        return 
183
          new  org.apache.axis.encoding.ser.BeanSerializer(
184
            _javaType, _xmlType, typeDesc);
185
    }
186
 
187
    /**
188
     * Get Custom Deserializer
189
     */
190
    public static org.apache.axis.encoding.Deserializer getDeserializer(
191
           java.lang.String mechType, 
192
           java.lang.Class _javaType,  
193
           javax.xml.namespace.QName _xmlType) {
194
        return 
195
          new  org.apache.axis.encoding.ser.BeanDeserializer(
196
            _javaType, _xmlType, typeDesc);
197
    }
198
 
199
}