com.avalara.avatax.services.address
Class ArrayOfMessage

java.lang.Object
  extended by com.avalara.avatax.services.address.ArrayOfMessage
All Implemented Interfaces:
java.io.Serializable

public class ArrayOfMessage
extends java.lang.Object
implements java.io.Serializable

A wrapper object used by Axis to encapsulate an array of zero or more Message objects for SOAP transmission via the Web returned as part of a method call's result object. Note: The internally kept Message array is not guaranteed to be properly initialized (this is generally true for Axis ArrayOfX wrapper objects); one should always test that it is not null before using.
Example:

 [Java]
 ArrayOfMessage arrMessage = result.getMessages();
 Message[] messages = arrMessage.getMessage();
 int numMessages = (messages == null ? 0 : messages.length);
 for (int i = 0; i < numMessages; i++)
 {
     // These are equivalent ways of accessing the messages in the
     // ArrayOfMessage object
     System.out.println("Message " + i + ": " + messages[i].getName());
     System.out.println("Message " + i + ": " + arrMessage.getMessage(i).getName());
 }
 

See Also:
Serialized Form

Constructor Summary
ArrayOfMessage()
          Initializes a new instance of the class with an empty array of Message objects.
ArrayOfMessage(Message[] message)
          Initializes a new instance of the class and its internal array of Message objects.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Determines if two ArrayOfMessage objects are the same.
static org.apache.axis.encoding.Deserializer getDeserializer(java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType)
          Get Custom Deserializer for use with this object with Axis; this method is used internally by the adapter and not intended to be used by external implementation code.
 Message[] getMessage()
          Retrieves the raw array of Message objects encapsulated in this object.
 Message getMessage(int i)
          Retrieves the ith Message object (counting from 0) from the array of Messages encapsulated in this object.
static org.apache.axis.encoding.Serializer getSerializer(java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType)
          Get Custom Serializer for use with this object with Axis; this method is used internally by the adapter and not intended to be used by external implementation code.
static org.apache.axis.description.TypeDesc getTypeDesc()
          Return Axis type metadata object; this method is used internally by the adapter and not intended to be used by external implementation code.
 boolean hasClientMetricMessage()
          Function to remove clientmetricsrequest message from the list.
 boolean hasClientMetricMessage(int i, Message _value)
           
 int hashCode()
          Calculates a unique integer code for this object and its contents based on the Object.hashCode() for the Message objects contained within.
 void setMessage(int i, Message _value)
          Allows one to replace the ith Message object (counting from 0) within the array of Messages encapsulated in this object.
 void setMessage(Message[] message)
          Allows one to programatically set the raw array of Message objects encapsulated by this object.
 int size()
          Gets the size of the array.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayOfMessage

public ArrayOfMessage()
Initializes a new instance of the class with an empty array of Message objects.


ArrayOfMessage

public ArrayOfMessage(Message[] message)
Initializes a new instance of the class and its internal array of Message objects.

Parameters:
message -
Method Detail

getMessage

public Message[] getMessage()
Retrieves the raw array of Message objects encapsulated in this object.

Returns:
message warning this may be null, depending on how the object was initialized.

setMessage

public void setMessage(Message[] message)
Allows one to programatically set the raw array of Message objects encapsulated by this object.

Parameters:
message -

getMessage

public Message getMessage(int i)
Retrieves the ith Message object (counting from 0) from the array of Messages encapsulated in this object. Should only be used if its known that getMessage() returns a non-null value and that i < number of messages actually in that array.

Parameters:
i - integer from 0 to (number of messages -1)
Returns:
Message

setMessage

public void setMessage(int i,
                       Message _value)
Allows one to replace the ith Message object (counting from 0) within the array of Messages encapsulated in this object. Should only be used if its known that getMessage() returns a non-null value and that i < number of messages actually in that array.

Parameters:
i - integer from 0 to (number of messages -1)
_value - Message object to place in the indicated position of the Message array

hasClientMetricMessage

public boolean hasClientMetricMessage(int i,
                                      Message _value)

hasClientMetricMessage

public boolean hasClientMetricMessage()
Function to remove clientmetricsrequest message from the list. Note: This function must be called while dealing with clientmetricsrequest message else caller code will receive clientmetricsrequest message back from server

Returns:
returns True if clientmetricsrequest message is found

equals

public boolean equals(java.lang.Object obj)
Determines if two ArrayOfMessage objects are the same. In current implementation, the contents of the Message objects in each array must be exactly equal, including in text case, for the function to return true.

Overrides:
equals in class java.lang.Object
Parameters:
obj -
Returns:
boolean value indicating whether the ArrayOfMessage objects are equal.

hashCode

public int hashCode()
Calculates a unique integer code for this object and its contents based on the Object.hashCode() for the Message objects contained within.

Overrides:
hashCode in class java.lang.Object
Returns:
hashcode

getTypeDesc

public static org.apache.axis.description.TypeDesc getTypeDesc()
Return Axis type metadata object; this method is used internally by the adapter and not intended to be used by external implementation code.

Returns:
Type Description

getSerializer

public static org.apache.axis.encoding.Serializer getSerializer(java.lang.String mechType,
                                                                java.lang.Class _javaType,
                                                                javax.xml.namespace.QName _xmlType)
Get Custom Serializer for use with this object with Axis; this method is used internally by the adapter and not intended to be used by external implementation code.

Parameters:
mechType -
_javaType -
_xmlType -
Returns:
See Also:
Serializer, org.apache.axis.encoding.ser.BeanSerializer

getDeserializer

public static org.apache.axis.encoding.Deserializer getDeserializer(java.lang.String mechType,
                                                                    java.lang.Class _javaType,
                                                                    javax.xml.namespace.QName _xmlType)
Get Custom Deserializer for use with this object with Axis; this method is used internally by the adapter and not intended to be used by external implementation code.

Parameters:
mechType -
_javaType -
_xmlType -
Returns:
See Also:
Deserializer, com.avalara.avatax.services.base.ser.BeanDeserializer

size

public int size()
Gets the size of the array.

Returns:
size