001//
002// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.10-b140310.1920 
003// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
004// Any modifications to this file will be lost upon recompilation of the source schema. 
005// Generated on: 2020.08.16 at 01:13:55 AM EDT 
006//
007
008
009package org.apache.activemq.schema.core;
010
011import java.util.ArrayList;
012import java.util.HashMap;
013import java.util.List;
014import java.util.Map;
015import javax.xml.bind.JAXBElement;
016import javax.xml.bind.annotation.XmlAccessType;
017import javax.xml.bind.annotation.XmlAccessorType;
018import javax.xml.bind.annotation.XmlAnyAttribute;
019import javax.xml.bind.annotation.XmlAnyElement;
020import javax.xml.bind.annotation.XmlAttribute;
021import javax.xml.bind.annotation.XmlElementRef;
022import javax.xml.bind.annotation.XmlID;
023import javax.xml.bind.annotation.XmlRootElement;
024import javax.xml.bind.annotation.XmlSchemaType;
025import javax.xml.bind.annotation.XmlType;
026import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
027import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
028import javax.xml.namespace.QName;
029import org.jvnet.jaxb2_commons.lang.Equals;
030import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
031import org.jvnet.jaxb2_commons.lang.HashCode;
032import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
033import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
034import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
035import org.jvnet.jaxb2_commons.lang.ToString;
036import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
037import org.jvnet.jaxb2_commons.locator.ObjectLocator;
038import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
039
040
041/**
042 * <p>Java class for anonymous complex type.
043 * 
044 * <p>The following schema fragment specifies the expected content contained within this class.
045 * 
046 * <pre>
047 * &lt;complexType>
048 *   &lt;complexContent>
049 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
050 *       &lt;choice maxOccurs="unbounded" minOccurs="0">
051 *         &lt;choice>
052 *           &lt;element name="connection" minOccurs="0">
053 *             &lt;complexType>
054 *               &lt;complexContent>
055 *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
056 *                   &lt;sequence minOccurs="0">
057 *                     &lt;any maxOccurs="unbounded" minOccurs="0"/>
058 *                   &lt;/sequence>
059 *                 &lt;/restriction>
060 *               &lt;/complexContent>
061 *             &lt;/complexType>
062 *           &lt;/element>
063 *           &lt;any namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
064 *         &lt;/choice>
065 *       &lt;/choice>
066 *       &lt;attribute name="connection" type="{http://www.w3.org/2001/XMLSchema}string" />
067 *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
068 *       &lt;anyAttribute processContents='lax' namespace='##other'/>
069 *     &lt;/restriction>
070 *   &lt;/complexContent>
071 * &lt;/complexType>
072 * </pre>
073 * 
074 * 
075 */
076@XmlAccessorType(XmlAccessType.FIELD)
077@XmlType(name = "", propOrder = {
078    "connectionOrAny"
079})
080@XmlRootElement(name = "simpleJmsMessageConvertor")
081public class DtoSimpleJmsMessageConvertor
082    implements Equals, HashCode, ToString
083{
084
085    @XmlElementRef(name = "connection", namespace = "http://activemq.apache.org/schema/core", type = JAXBElement.class, required = false)
086    @XmlAnyElement(lax = true)
087    protected List<Object> connectionOrAny;
088    @XmlAttribute(name = "connection")
089    protected String connection;
090    @XmlAttribute(name = "id")
091    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
092    @XmlID
093    @XmlSchemaType(name = "ID")
094    protected String id;
095    @XmlAnyAttribute
096    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
097
098    /**
099     * Gets the value of the connectionOrAny property.
100     * 
101     * <p>
102     * This accessor method returns a reference to the live list,
103     * not a snapshot. Therefore any modification you make to the
104     * returned list will be present inside the JAXB object.
105     * This is why there is not a <CODE>set</CODE> method for the connectionOrAny property.
106     * 
107     * <p>
108     * For example, to add a new item, do as follows:
109     * <pre>
110     *    getConnectionOrAny().add(newItem);
111     * </pre>
112     * 
113     * 
114     * <p>
115     * Objects of the following type(s) are allowed in the list
116     * {@link Object }
117     * {@link JAXBElement }{@code <}{@link DtoSimpleJmsMessageConvertor.Connection }{@code >}
118     * 
119     * 
120     */
121    public List<Object> getConnectionOrAny() {
122        if (connectionOrAny == null) {
123            connectionOrAny = new ArrayList<Object>();
124        }
125        return this.connectionOrAny;
126    }
127
128    /**
129     * Gets the value of the connection property.
130     * 
131     * @return
132     *     possible object is
133     *     {@link String }
134     *     
135     */
136    public String getConnection() {
137        return connection;
138    }
139
140    /**
141     * Sets the value of the connection property.
142     * 
143     * @param value
144     *     allowed object is
145     *     {@link String }
146     *     
147     */
148    public void setConnection(String value) {
149        this.connection = value;
150    }
151
152    /**
153     * Gets the value of the id property.
154     * 
155     * @return
156     *     possible object is
157     *     {@link String }
158     *     
159     */
160    public String getId() {
161        return id;
162    }
163
164    /**
165     * Sets the value of the id property.
166     * 
167     * @param value
168     *     allowed object is
169     *     {@link String }
170     *     
171     */
172    public void setId(String value) {
173        this.id = value;
174    }
175
176    /**
177     * Gets a map that contains attributes that aren't bound to any typed property on this class.
178     * 
179     * <p>
180     * the map is keyed by the name of the attribute and 
181     * the value is the string value of the attribute.
182     * 
183     * the map returned by this method is live, and you can add new attribute
184     * by updating the map directly. Because of this design, there's no setter.
185     * 
186     * 
187     * @return
188     *     always non-null
189     */
190    public Map<QName, String> getOtherAttributes() {
191        return otherAttributes;
192    }
193
194    public String toString() {
195        final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
196        final StringBuilder buffer = new StringBuilder();
197        append(null, buffer, strategy);
198        return buffer.toString();
199    }
200
201    public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
202        strategy.appendStart(locator, this, buffer);
203        appendFields(locator, buffer, strategy);
204        strategy.appendEnd(locator, this, buffer);
205        return buffer;
206    }
207
208    public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
209        {
210            List<Object> theConnectionOrAny;
211            theConnectionOrAny = (((this.connectionOrAny!= null)&&(!this.connectionOrAny.isEmpty()))?this.getConnectionOrAny():null);
212            strategy.appendField(locator, this, "connectionOrAny", buffer, theConnectionOrAny);
213        }
214        {
215            String theConnection;
216            theConnection = this.getConnection();
217            strategy.appendField(locator, this, "connection", buffer, theConnection);
218        }
219        {
220            String theId;
221            theId = this.getId();
222            strategy.appendField(locator, this, "id", buffer, theId);
223        }
224        return buffer;
225    }
226
227    public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
228        int currentHashCode = 1;
229        {
230            List<Object> theConnectionOrAny;
231            theConnectionOrAny = (((this.connectionOrAny!= null)&&(!this.connectionOrAny.isEmpty()))?this.getConnectionOrAny():null);
232            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "connectionOrAny", theConnectionOrAny), currentHashCode, theConnectionOrAny);
233        }
234        {
235            String theConnection;
236            theConnection = this.getConnection();
237            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "connection", theConnection), currentHashCode, theConnection);
238        }
239        {
240            String theId;
241            theId = this.getId();
242            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "id", theId), currentHashCode, theId);
243        }
244        return currentHashCode;
245    }
246
247    public int hashCode() {
248        final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
249        return this.hashCode(null, strategy);
250    }
251
252    public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
253        if (!(object instanceof DtoSimpleJmsMessageConvertor)) {
254            return false;
255        }
256        if (this == object) {
257            return true;
258        }
259        final DtoSimpleJmsMessageConvertor that = ((DtoSimpleJmsMessageConvertor) object);
260        {
261            List<Object> lhsConnectionOrAny;
262            lhsConnectionOrAny = (((this.connectionOrAny!= null)&&(!this.connectionOrAny.isEmpty()))?this.getConnectionOrAny():null);
263            List<Object> rhsConnectionOrAny;
264            rhsConnectionOrAny = (((that.connectionOrAny!= null)&&(!that.connectionOrAny.isEmpty()))?that.getConnectionOrAny():null);
265            if (!strategy.equals(LocatorUtils.property(thisLocator, "connectionOrAny", lhsConnectionOrAny), LocatorUtils.property(thatLocator, "connectionOrAny", rhsConnectionOrAny), lhsConnectionOrAny, rhsConnectionOrAny)) {
266                return false;
267            }
268        }
269        {
270            String lhsConnection;
271            lhsConnection = this.getConnection();
272            String rhsConnection;
273            rhsConnection = that.getConnection();
274            if (!strategy.equals(LocatorUtils.property(thisLocator, "connection", lhsConnection), LocatorUtils.property(thatLocator, "connection", rhsConnection), lhsConnection, rhsConnection)) {
275                return false;
276            }
277        }
278        {
279            String lhsId;
280            lhsId = this.getId();
281            String rhsId;
282            rhsId = that.getId();
283            if (!strategy.equals(LocatorUtils.property(thisLocator, "id", lhsId), LocatorUtils.property(thatLocator, "id", rhsId), lhsId, rhsId)) {
284                return false;
285            }
286        }
287        return true;
288    }
289
290    public boolean equals(Object object) {
291        final EqualsStrategy strategy = new org.apache.activemq.plugin.jaxb2_commons.ElementAwareEqualsStrategy();
292        return equals(null, null, object, strategy);
293    }
294
295
296    /**
297     * <p>Java class for anonymous complex type.
298     * 
299     * <p>The following schema fragment specifies the expected content contained within this class.
300     * 
301     * <pre>
302     * &lt;complexType>
303     *   &lt;complexContent>
304     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
305     *       &lt;sequence minOccurs="0">
306     *         &lt;any maxOccurs="unbounded" minOccurs="0"/>
307     *       &lt;/sequence>
308     *     &lt;/restriction>
309     *   &lt;/complexContent>
310     * &lt;/complexType>
311     * </pre>
312     * 
313     * 
314     */
315    @XmlAccessorType(XmlAccessType.FIELD)
316    @XmlType(name = "", propOrder = {
317        "any"
318    })
319    public static class Connection
320        implements Equals, HashCode, ToString
321    {
322
323        @XmlAnyElement(lax = true)
324        protected List<Object> any;
325
326        /**
327         * Gets the value of the any property.
328         * 
329         * <p>
330         * This accessor method returns a reference to the live list,
331         * not a snapshot. Therefore any modification you make to the
332         * returned list will be present inside the JAXB object.
333         * This is why there is not a <CODE>set</CODE> method for the any property.
334         * 
335         * <p>
336         * For example, to add a new item, do as follows:
337         * <pre>
338         *    getAny().add(newItem);
339         * </pre>
340         * 
341         * 
342         * <p>
343         * Objects of the following type(s) are allowed in the list
344         * {@link Object }
345         * 
346         * 
347         */
348        public List<Object> getAny() {
349            if (any == null) {
350                any = new ArrayList<Object>();
351            }
352            return this.any;
353        }
354
355        public String toString() {
356            final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
357            final StringBuilder buffer = new StringBuilder();
358            append(null, buffer, strategy);
359            return buffer.toString();
360        }
361
362        public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
363            strategy.appendStart(locator, this, buffer);
364            appendFields(locator, buffer, strategy);
365            strategy.appendEnd(locator, this, buffer);
366            return buffer;
367        }
368
369        public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
370            {
371                List<Object> theAny;
372                theAny = (((this.any!= null)&&(!this.any.isEmpty()))?this.getAny():null);
373                strategy.appendField(locator, this, "any", buffer, theAny);
374            }
375            return buffer;
376        }
377
378        public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
379            int currentHashCode = 1;
380            {
381                List<Object> theAny;
382                theAny = (((this.any!= null)&&(!this.any.isEmpty()))?this.getAny():null);
383                currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "any", theAny), currentHashCode, theAny);
384            }
385            return currentHashCode;
386        }
387
388        public int hashCode() {
389            final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
390            return this.hashCode(null, strategy);
391        }
392
393        public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
394            if (!(object instanceof DtoSimpleJmsMessageConvertor.Connection)) {
395                return false;
396            }
397            if (this == object) {
398                return true;
399            }
400            final DtoSimpleJmsMessageConvertor.Connection that = ((DtoSimpleJmsMessageConvertor.Connection) object);
401            {
402                List<Object> lhsAny;
403                lhsAny = (((this.any!= null)&&(!this.any.isEmpty()))?this.getAny():null);
404                List<Object> rhsAny;
405                rhsAny = (((that.any!= null)&&(!that.any.isEmpty()))?that.getAny():null);
406                if (!strategy.equals(LocatorUtils.property(thisLocator, "any", lhsAny), LocatorUtils.property(thatLocator, "any", rhsAny), lhsAny, rhsAny)) {
407                    return false;
408                }
409            }
410            return true;
411        }
412
413        public boolean equals(Object object) {
414            final EqualsStrategy strategy = new org.apache.activemq.plugin.jaxb2_commons.ElementAwareEqualsStrategy();
415            return equals(null, null, object, strategy);
416        }
417
418    }
419
420}