/*******************************************************************************
* Copyright (c) 2006-2010 eBay Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*******************************************************************************/
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.1.2-b01-fcs
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2007.03.12 at 11:08:34 PM PDT
//
package org.ebayopensource.turmeric.runtime.tests.service1.sample.types1;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import javax.activation.DataHandler;
import javax.xml.datatype.XMLGregorianCalendar;
import org.ebayopensource.turmeric.runtime.tests.service1.sample.errors.ErrorType;
import org.ebayopensource.turmeric.runtime.tests.service1.sample.util.TestUtils;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="body" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="createTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
* <element name="recipients" type="{http://www.ebay.com/test/soafw/service/message}AddressList"/>
* <element name="subject" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*/
public class MyMessage {
private String m_body;
private Calendar m_createTime;
private HashMap<String, Address> m_recipients = new HashMap<String, Address>();
private String m_subject;
private Object m_anyObject;
private DataHandler m_binaryData;
List<ErrorType> error;
public List<ErrorType> getError() {
if (error == null) {
error = new ArrayList<ErrorType>();
}
return error;
}
public void setError(List<ErrorType> value) {
error = value;
}
/**
* Gets the value of the body property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getBody() {
return m_body;
}
/**
* Sets the value of the body property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setBody(String value) {
this.m_body = value;
}
/**
* Gets the value of the createTime property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public Calendar getCreateTime() {
return m_createTime;
}
/**
* Sets the value of the createTime property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setCreateTime(Calendar value) {
this.m_createTime = value;
}
/**
* Gets the value of the recipients property.
*
* @return
* possible object is
* {@link AddressList }
*
*/
public HashMap<String, Address> getRecipients() {
return m_recipients;
}
/**
* Sets the value of the recipients property.
*
* @param value
* allowed object is
* {@link AddressList }
*
*/
public void setRecipients(HashMap<String, Address> value) {
m_recipients = value;
}
public void addRecipient(Address recipient) {
m_recipients.put(recipient.getEmailAddress(), recipient);
}
/**
* Gets the value of the subject property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSubject() {
return m_subject;
}
/**
* Sets the value of the subject property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSubject(String value) {
this.m_subject = value;
}
@Override
public boolean equals(Object other) {
if (other == null) {
return false;
}
if (!(other instanceof MyMessage)) {
return false;
}
MyMessage otherAddr = (MyMessage) other;
return TestUtils.equals(m_body, otherAddr.m_body)
&& TestUtils.equals(m_createTime, otherAddr.m_createTime)
&& TestUtils.equals(m_recipients, otherAddr.m_recipients)
&& TestUtils.equals(m_subject, otherAddr.m_subject);
}
@Override
public int hashCode() {
int hash = 7;
hash = 31 * hash + (m_body == null ? 0 : m_body.hashCode());
hash = 31 * hash + (m_createTime == null ? 0 : m_createTime.hashCode());
hash = 31 * hash + (m_recipients == null ? 0 : m_recipients.hashCode());
hash = 31 * hash + (m_subject == null ? 0 : m_subject.hashCode());
return hash;
}
public Object getSomething() {
return m_anyObject;
}
public void setSomething(Object any) {
this.m_anyObject = any;
}
public DataHandler getBinaryData() {
return m_binaryData;
}
public void setBinaryData(DataHandler binaryData) {
this.m_binaryData = binaryData;
}
}