Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
7908 manish.sha 1
/**
2
 * Notification.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.track.stub;
9
 
10
 
11
/**
12
 * The descriptive data regarding the result of the submitted transaction.
13
 */
14
public class Notification  implements java.io.Serializable {
15
    /* The severity of this notification. This can indicate success
16
     * or failure or some other information about the request. The values
17
     * that can be returned are SUCCESS - Your transaction succeeded with
18
     * no other applicable information. NOTE - Additional information that
19
     * may be of interest to you about your transaction. WARNING - Additional
20
     * information that you need to know about your transaction that you
21
     * may need to take action on. ERROR - Information about an error that
22
     * occurred while processing your transaction. FAILURE - FedEx was unable
23
     * to process your transaction at this time due to a system failure.
24
     * Please try again later */
25
    private com.fedex.track.stub.NotificationSeverityType severity;
26
 
27
    /* Indicates the source of this notification. Combined with the
28
     * Code it uniquely identifies this notification */
29
    private java.lang.String source;
30
 
31
    /* A code that represents this notification. Combined with the
32
     * Source it uniquely identifies this notification. */
33
    private java.lang.String code;
34
 
35
    /* Human-readable text that explains this notification. */
36
    private java.lang.String message;
37
 
38
    /* The translated message. The language and locale specified in
39
     * the ClientDetail. Localization are used to determine the representation.
40
     * Currently only supported in a TrackReply. */
41
    private java.lang.String localizedMessage;
42
 
43
    /* A collection of name/value pairs that provide specific data
44
     * to help the client determine the nature of an error (or warning, etc.)
45
     * witout having to parse the message string. */
46
    private com.fedex.track.stub.NotificationParameter[] messageParameters;
47
 
48
    public Notification() {
49
    }
50
 
51
    public Notification(
52
           com.fedex.track.stub.NotificationSeverityType severity,
53
           java.lang.String source,
54
           java.lang.String code,
55
           java.lang.String message,
56
           java.lang.String localizedMessage,
57
           com.fedex.track.stub.NotificationParameter[] messageParameters) {
58
           this.severity = severity;
59
           this.source = source;
60
           this.code = code;
61
           this.message = message;
62
           this.localizedMessage = localizedMessage;
63
           this.messageParameters = messageParameters;
64
    }
65
 
66
 
67
    /**
68
     * Gets the severity value for this Notification.
69
     * 
70
     * @return severity   * The severity of this notification. This can indicate success
71
     * or failure or some other information about the request. The values
72
     * that can be returned are SUCCESS - Your transaction succeeded with
73
     * no other applicable information. NOTE - Additional information that
74
     * may be of interest to you about your transaction. WARNING - Additional
75
     * information that you need to know about your transaction that you
76
     * may need to take action on. ERROR - Information about an error that
77
     * occurred while processing your transaction. FAILURE - FedEx was unable
78
     * to process your transaction at this time due to a system failure.
79
     * Please try again later
80
     */
81
    public com.fedex.track.stub.NotificationSeverityType getSeverity() {
82
        return severity;
83
    }
84
 
85
 
86
    /**
87
     * Sets the severity value for this Notification.
88
     * 
89
     * @param severity   * The severity of this notification. This can indicate success
90
     * or failure or some other information about the request. The values
91
     * that can be returned are SUCCESS - Your transaction succeeded with
92
     * no other applicable information. NOTE - Additional information that
93
     * may be of interest to you about your transaction. WARNING - Additional
94
     * information that you need to know about your transaction that you
95
     * may need to take action on. ERROR - Information about an error that
96
     * occurred while processing your transaction. FAILURE - FedEx was unable
97
     * to process your transaction at this time due to a system failure.
98
     * Please try again later
99
     */
100
    public void setSeverity(com.fedex.track.stub.NotificationSeverityType severity) {
101
        this.severity = severity;
102
    }
103
 
104
 
105
    /**
106
     * Gets the source value for this Notification.
107
     * 
108
     * @return source   * Indicates the source of this notification. Combined with the
109
     * Code it uniquely identifies this notification
110
     */
111
    public java.lang.String getSource() {
112
        return source;
113
    }
114
 
115
 
116
    /**
117
     * Sets the source value for this Notification.
118
     * 
119
     * @param source   * Indicates the source of this notification. Combined with the
120
     * Code it uniquely identifies this notification
121
     */
122
    public void setSource(java.lang.String source) {
123
        this.source = source;
124
    }
125
 
126
 
127
    /**
128
     * Gets the code value for this Notification.
129
     * 
130
     * @return code   * A code that represents this notification. Combined with the
131
     * Source it uniquely identifies this notification.
132
     */
133
    public java.lang.String getCode() {
134
        return code;
135
    }
136
 
137
 
138
    /**
139
     * Sets the code value for this Notification.
140
     * 
141
     * @param code   * A code that represents this notification. Combined with the
142
     * Source it uniquely identifies this notification.
143
     */
144
    public void setCode(java.lang.String code) {
145
        this.code = code;
146
    }
147
 
148
 
149
    /**
150
     * Gets the message value for this Notification.
151
     * 
152
     * @return message   * Human-readable text that explains this notification.
153
     */
154
    public java.lang.String getMessage() {
155
        return message;
156
    }
157
 
158
 
159
    /**
160
     * Sets the message value for this Notification.
161
     * 
162
     * @param message   * Human-readable text that explains this notification.
163
     */
164
    public void setMessage(java.lang.String message) {
165
        this.message = message;
166
    }
167
 
168
 
169
    /**
170
     * Gets the localizedMessage value for this Notification.
171
     * 
172
     * @return localizedMessage   * The translated message. The language and locale specified in
173
     * the ClientDetail. Localization are used to determine the representation.
174
     * Currently only supported in a TrackReply.
175
     */
176
    public java.lang.String getLocalizedMessage() {
177
        return localizedMessage;
178
    }
179
 
180
 
181
    /**
182
     * Sets the localizedMessage value for this Notification.
183
     * 
184
     * @param localizedMessage   * The translated message. The language and locale specified in
185
     * the ClientDetail. Localization are used to determine the representation.
186
     * Currently only supported in a TrackReply.
187
     */
188
    public void setLocalizedMessage(java.lang.String localizedMessage) {
189
        this.localizedMessage = localizedMessage;
190
    }
191
 
192
 
193
    /**
194
     * Gets the messageParameters value for this Notification.
195
     * 
196
     * @return messageParameters   * A collection of name/value pairs that provide specific data
197
     * to help the client determine the nature of an error (or warning, etc.)
198
     * witout having to parse the message string.
199
     */
200
    public com.fedex.track.stub.NotificationParameter[] getMessageParameters() {
201
        return messageParameters;
202
    }
203
 
204
 
205
    /**
206
     * Sets the messageParameters value for this Notification.
207
     * 
208
     * @param messageParameters   * A collection of name/value pairs that provide specific data
209
     * to help the client determine the nature of an error (or warning, etc.)
210
     * witout having to parse the message string.
211
     */
212
    public void setMessageParameters(com.fedex.track.stub.NotificationParameter[] messageParameters) {
213
        this.messageParameters = messageParameters;
214
    }
215
 
216
    public com.fedex.track.stub.NotificationParameter getMessageParameters(int i) {
217
        return this.messageParameters[i];
218
    }
219
 
220
    public void setMessageParameters(int i, com.fedex.track.stub.NotificationParameter _value) {
221
        this.messageParameters[i] = _value;
222
    }
223
 
224
    private java.lang.Object __equalsCalc = null;
225
    public synchronized boolean equals(java.lang.Object obj) {
226
        if (!(obj instanceof Notification)) return false;
227
        Notification other = (Notification) obj;
228
        if (obj == null) return false;
229
        if (this == obj) return true;
230
        if (__equalsCalc != null) {
231
            return (__equalsCalc == obj);
232
        }
233
        __equalsCalc = obj;
234
        boolean _equals;
235
        _equals = true && 
236
            ((this.severity==null && other.getSeverity()==null) || 
237
             (this.severity!=null &&
238
              this.severity.equals(other.getSeverity()))) &&
239
            ((this.source==null && other.getSource()==null) || 
240
             (this.source!=null &&
241
              this.source.equals(other.getSource()))) &&
242
            ((this.code==null && other.getCode()==null) || 
243
             (this.code!=null &&
244
              this.code.equals(other.getCode()))) &&
245
            ((this.message==null && other.getMessage()==null) || 
246
             (this.message!=null &&
247
              this.message.equals(other.getMessage()))) &&
248
            ((this.localizedMessage==null && other.getLocalizedMessage()==null) || 
249
             (this.localizedMessage!=null &&
250
              this.localizedMessage.equals(other.getLocalizedMessage()))) &&
251
            ((this.messageParameters==null && other.getMessageParameters()==null) || 
252
             (this.messageParameters!=null &&
253
              java.util.Arrays.equals(this.messageParameters, other.getMessageParameters())));
254
        __equalsCalc = null;
255
        return _equals;
256
    }
257
 
258
    private boolean __hashCodeCalc = false;
259
    public synchronized int hashCode() {
260
        if (__hashCodeCalc) {
261
            return 0;
262
        }
263
        __hashCodeCalc = true;
264
        int _hashCode = 1;
265
        if (getSeverity() != null) {
266
            _hashCode += getSeverity().hashCode();
267
        }
268
        if (getSource() != null) {
269
            _hashCode += getSource().hashCode();
270
        }
271
        if (getCode() != null) {
272
            _hashCode += getCode().hashCode();
273
        }
274
        if (getMessage() != null) {
275
            _hashCode += getMessage().hashCode();
276
        }
277
        if (getLocalizedMessage() != null) {
278
            _hashCode += getLocalizedMessage().hashCode();
279
        }
280
        if (getMessageParameters() != null) {
281
            for (int i=0;
282
                 i<java.lang.reflect.Array.getLength(getMessageParameters());
283
                 i++) {
284
                java.lang.Object obj = java.lang.reflect.Array.get(getMessageParameters(), i);
285
                if (obj != null &&
286
                    !obj.getClass().isArray()) {
287
                    _hashCode += obj.hashCode();
288
                }
289
            }
290
        }
291
        __hashCodeCalc = false;
292
        return _hashCode;
293
    }
294
 
295
    // Type metadata
296
    private static org.apache.axis.description.TypeDesc typeDesc =
297
        new org.apache.axis.description.TypeDesc(Notification.class, true);
298
 
299
    static {
300
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://fedex.com/ws/track/v6", "Notification"));
301
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
302
        elemField.setFieldName("severity");
303
        elemField.setXmlName(new javax.xml.namespace.QName("http://fedex.com/ws/track/v6", "Severity"));
304
        elemField.setXmlType(new javax.xml.namespace.QName("http://fedex.com/ws/track/v6", "NotificationSeverityType"));
305
        elemField.setNillable(false);
306
        typeDesc.addFieldDesc(elemField);
307
        elemField = new org.apache.axis.description.ElementDesc();
308
        elemField.setFieldName("source");
309
        elemField.setXmlName(new javax.xml.namespace.QName("http://fedex.com/ws/track/v6", "Source"));
310
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
311
        elemField.setNillable(false);
312
        typeDesc.addFieldDesc(elemField);
313
        elemField = new org.apache.axis.description.ElementDesc();
314
        elemField.setFieldName("code");
315
        elemField.setXmlName(new javax.xml.namespace.QName("http://fedex.com/ws/track/v6", "Code"));
316
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
317
        elemField.setMinOccurs(0);
318
        elemField.setNillable(false);
319
        typeDesc.addFieldDesc(elemField);
320
        elemField = new org.apache.axis.description.ElementDesc();
321
        elemField.setFieldName("message");
322
        elemField.setXmlName(new javax.xml.namespace.QName("http://fedex.com/ws/track/v6", "Message"));
323
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
324
        elemField.setMinOccurs(0);
325
        elemField.setNillable(false);
326
        typeDesc.addFieldDesc(elemField);
327
        elemField = new org.apache.axis.description.ElementDesc();
328
        elemField.setFieldName("localizedMessage");
329
        elemField.setXmlName(new javax.xml.namespace.QName("http://fedex.com/ws/track/v6", "LocalizedMessage"));
330
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
331
        elemField.setMinOccurs(0);
332
        elemField.setNillable(false);
333
        typeDesc.addFieldDesc(elemField);
334
        elemField = new org.apache.axis.description.ElementDesc();
335
        elemField.setFieldName("messageParameters");
336
        elemField.setXmlName(new javax.xml.namespace.QName("http://fedex.com/ws/track/v6", "MessageParameters"));
337
        elemField.setXmlType(new javax.xml.namespace.QName("http://fedex.com/ws/track/v6", "NotificationParameter"));
338
        elemField.setMinOccurs(0);
339
        elemField.setNillable(false);
340
        elemField.setMaxOccursUnbounded(true);
341
        typeDesc.addFieldDesc(elemField);
342
    }
343
 
344
    /**
345
     * Return type metadata object
346
     */
347
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
348
        return typeDesc;
349
    }
350
 
351
    /**
352
     * Get Custom Serializer
353
     */
354
    public static org.apache.axis.encoding.Serializer getSerializer(
355
           java.lang.String mechType, 
356
           java.lang.Class _javaType,  
357
           javax.xml.namespace.QName _xmlType) {
358
        return 
359
          new  org.apache.axis.encoding.ser.BeanSerializer(
360
            _javaType, _xmlType, typeDesc);
361
    }
362
 
363
    /**
364
     * Get Custom Deserializer
365
     */
366
    public static org.apache.axis.encoding.Deserializer getDeserializer(
367
           java.lang.String mechType, 
368
           java.lang.Class _javaType,  
369
           javax.xml.namespace.QName _xmlType) {
370
        return 
371
          new  org.apache.axis.encoding.ser.BeanDeserializer(
372
            _javaType, _xmlType, typeDesc);
373
    }
374
 
375
}