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: 2019.03.15 at 09:00:08 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.XmlElementRefs;
023import javax.xml.bind.annotation.XmlID;
024import javax.xml.bind.annotation.XmlRootElement;
025import javax.xml.bind.annotation.XmlSchemaType;
026import javax.xml.bind.annotation.XmlType;
027import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
028import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
029import javax.xml.namespace.QName;
030import org.jvnet.jaxb2_commons.lang.Equals;
031import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
032import org.jvnet.jaxb2_commons.lang.HashCode;
033import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
034import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
035import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
036import org.jvnet.jaxb2_commons.lang.ToString;
037import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
038import org.jvnet.jaxb2_commons.locator.ObjectLocator;
039import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
040
041
042/**
043 * <p>Java class for anonymous complex type.
044 * 
045 * <p>The following schema fragment specifies the expected content contained within this class.
046 * 
047 * <pre>
048 * &lt;complexType>
049 *   &lt;complexContent>
050 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
051 *       &lt;choice maxOccurs="unbounded" minOccurs="0">
052 *         &lt;choice>
053 *           &lt;element name="virtualDestinations" maxOccurs="unbounded" minOccurs="0">
054 *             &lt;complexType>
055 *               &lt;complexContent>
056 *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
057 *                   &lt;choice maxOccurs="unbounded" minOccurs="0">
058 *                     &lt;element ref="{http://activemq.apache.org/schema/core}compositeQueue"/>
059 *                     &lt;element ref="{http://activemq.apache.org/schema/core}compositeTopic"/>
060 *                     &lt;element ref="{http://activemq.apache.org/schema/core}virtualTopic"/>
061 *                     &lt;any namespace='##other'/>
062 *                   &lt;/choice>
063 *                 &lt;/restriction>
064 *               &lt;/complexContent>
065 *             &lt;/complexType>
066 *           &lt;/element>
067 *           &lt;any namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
068 *         &lt;/choice>
069 *       &lt;/choice>
070 *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
071 *       &lt;anyAttribute processContents='lax' namespace='##other'/>
072 *     &lt;/restriction>
073 *   &lt;/complexContent>
074 * &lt;/complexType>
075 * </pre>
076 * 
077 * 
078 */
079@XmlAccessorType(XmlAccessType.FIELD)
080@XmlType(name = "", propOrder = {
081    "contents"
082})
083@XmlRootElement(name = "virtualDestinationInterceptor")
084public class DtoVirtualDestinationInterceptor implements Equals, HashCode, ToString
085{
086
087    @XmlElementRef(name = "virtualDestinations", namespace = "http://activemq.apache.org/schema/core", type = JAXBElement.class, required = false)
088    @XmlAnyElement(lax = true)
089    protected List<Object> contents;
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 contents 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 contents property.
106     * 
107     * <p>
108     * For example, to add a new item, do as follows:
109     * <pre>
110     *    getContents().add(newItem);
111     * </pre>
112     * 
113     * 
114     * <p>
115     * Objects of the following type(s) are allowed in the list
116     * {@link JAXBElement }{@code <}{@link DtoVirtualDestinationInterceptor.VirtualDestinations }{@code >}
117     * {@link Object }
118     * 
119     * 
120     */
121    public List<Object> getContents() {
122        if (contents == null) {
123            contents = new ArrayList<Object>();
124        }
125        return this.contents;
126    }
127
128    /**
129     * Gets the value of the id property.
130     * 
131     * @return
132     *     possible object is
133     *     {@link String }
134     *     
135     */
136    public String getId() {
137        return id;
138    }
139
140    /**
141     * Sets the value of the id property.
142     * 
143     * @param value
144     *     allowed object is
145     *     {@link String }
146     *     
147     */
148    public void setId(String value) {
149        this.id = value;
150    }
151
152    /**
153     * Gets a map that contains attributes that aren't bound to any typed property on this class.
154     * 
155     * <p>
156     * the map is keyed by the name of the attribute and 
157     * the value is the string value of the attribute.
158     * 
159     * the map returned by this method is live, and you can add new attribute
160     * by updating the map directly. Because of this design, there's no setter.
161     * 
162     * 
163     * @return
164     *     always non-null
165     */
166    public Map<QName, String> getOtherAttributes() {
167        return otherAttributes;
168    }
169
170    public String toString() {
171        final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
172        final StringBuilder buffer = new StringBuilder();
173        append(null, buffer, strategy);
174        return buffer.toString();
175    }
176
177    public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
178        strategy.appendStart(locator, this, buffer);
179        appendFields(locator, buffer, strategy);
180        strategy.appendEnd(locator, this, buffer);
181        return buffer;
182    }
183
184    public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
185        {
186            List<Object> theContents;
187            theContents = (((this.contents!= null)&&(!this.contents.isEmpty()))?this.getContents():null);
188            strategy.appendField(locator, this, "contents", buffer, theContents);
189        }
190        {
191            String theId;
192            theId = this.getId();
193            strategy.appendField(locator, this, "id", buffer, theId);
194        }
195        return buffer;
196    }
197
198    public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
199        int currentHashCode = 1;
200        {
201            List<Object> theContents;
202            theContents = (((this.contents!= null)&&(!this.contents.isEmpty()))?this.getContents():null);
203            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "contents", theContents), currentHashCode, theContents);
204        }
205        {
206            String theId;
207            theId = this.getId();
208            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "id", theId), currentHashCode, theId);
209        }
210        return currentHashCode;
211    }
212
213    public int hashCode() {
214        final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
215        return this.hashCode(null, strategy);
216    }
217
218    public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
219        if (!(object instanceof DtoVirtualDestinationInterceptor)) {
220            return false;
221        }
222        if (this == object) {
223            return true;
224        }
225        final DtoVirtualDestinationInterceptor that = ((DtoVirtualDestinationInterceptor) object);
226        {
227            List<Object> lhsContents;
228            lhsContents = (((this.contents!= null)&&(!this.contents.isEmpty()))?this.getContents():null);
229            List<Object> rhsContents;
230            rhsContents = (((that.contents!= null)&&(!that.contents.isEmpty()))?that.getContents():null);
231            if (!strategy.equals(LocatorUtils.property(thisLocator, "contents", lhsContents), LocatorUtils.property(thatLocator, "contents", rhsContents), lhsContents, rhsContents)) {
232                return false;
233            }
234        }
235        {
236            String lhsId;
237            lhsId = this.getId();
238            String rhsId;
239            rhsId = that.getId();
240            if (!strategy.equals(LocatorUtils.property(thisLocator, "id", lhsId), LocatorUtils.property(thatLocator, "id", rhsId), lhsId, rhsId)) {
241                return false;
242            }
243        }
244        return true;
245    }
246
247    public boolean equals(Object object) {
248        final EqualsStrategy strategy = new org.apache.activemq.plugin.jaxb2_commons.ElementAwareEqualsStrategy();
249        return equals(null, null, object, strategy);
250    }
251
252
253    /**
254     * <p>Java class for anonymous complex type.
255     * 
256     * <p>The following schema fragment specifies the expected content contained within this class.
257     * 
258     * <pre>
259     * &lt;complexType>
260     *   &lt;complexContent>
261     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
262     *       &lt;choice maxOccurs="unbounded" minOccurs="0">
263     *         &lt;element ref="{http://activemq.apache.org/schema/core}compositeQueue"/>
264     *         &lt;element ref="{http://activemq.apache.org/schema/core}compositeTopic"/>
265     *         &lt;element ref="{http://activemq.apache.org/schema/core}virtualTopic"/>
266     *         &lt;any namespace='##other'/>
267     *       &lt;/choice>
268     *     &lt;/restriction>
269     *   &lt;/complexContent>
270     * &lt;/complexType>
271     * </pre>
272     * 
273     * 
274     */
275    @XmlAccessorType(XmlAccessType.FIELD)
276    @XmlType(name = "", propOrder = {
277        "contents"
278    })
279    public static class VirtualDestinations
280        implements Equals, HashCode, ToString
281    {
282
283        @XmlElementRefs({
284            @XmlElementRef(name = "virtualTopic", namespace = "http://activemq.apache.org/schema/core", type = DtoVirtualTopic.class, required = false),
285            @XmlElementRef(name = "compositeQueue", namespace = "http://activemq.apache.org/schema/core", type = DtoCompositeQueue.class, required = false),
286            @XmlElementRef(name = "compositeTopic", namespace = "http://activemq.apache.org/schema/core", type = DtoCompositeTopic.class, required = false)
287        })
288        @XmlAnyElement(lax = true)
289        protected List<Object> contents;
290
291        /**
292         * Gets the value of the contents property.
293         * 
294         * <p>
295         * This accessor method returns a reference to the live list,
296         * not a snapshot. Therefore any modification you make to the
297         * returned list will be present inside the JAXB object.
298         * This is why there is not a <CODE>set</CODE> method for the contents property.
299         * 
300         * <p>
301         * For example, to add a new item, do as follows:
302         * <pre>
303         *    getContents().add(newItem);
304         * </pre>
305         * 
306         * 
307         * <p>
308         * Objects of the following type(s) are allowed in the list
309         * {@link DtoVirtualTopic }
310         * {@link Object }
311         * {@link DtoCompositeQueue }
312         * {@link DtoCompositeTopic }
313         * 
314         * 
315         */
316        public List<Object> getContents() {
317            if (contents == null) {
318                contents = new ArrayList<Object>();
319            }
320            return this.contents;
321        }
322
323        public String toString() {
324            final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
325            final StringBuilder buffer = new StringBuilder();
326            append(null, buffer, strategy);
327            return buffer.toString();
328        }
329
330        public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
331            strategy.appendStart(locator, this, buffer);
332            appendFields(locator, buffer, strategy);
333            strategy.appendEnd(locator, this, buffer);
334            return buffer;
335        }
336
337        public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
338            {
339                List<Object> theContents;
340                theContents = (((this.contents!= null)&&(!this.contents.isEmpty()))?this.getContents():null);
341                strategy.appendField(locator, this, "contents", buffer, theContents);
342            }
343            return buffer;
344        }
345
346        public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
347            int currentHashCode = 1;
348            {
349                List<Object> theContents;
350                theContents = (((this.contents!= null)&&(!this.contents.isEmpty()))?this.getContents():null);
351                currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "contents", theContents), currentHashCode, theContents);
352            }
353            return currentHashCode;
354        }
355
356        public int hashCode() {
357            final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
358            return this.hashCode(null, strategy);
359        }
360
361        public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
362            if (!(object instanceof DtoVirtualDestinationInterceptor.VirtualDestinations)) {
363                return false;
364            }
365            if (this == object) {
366                return true;
367            }
368            final DtoVirtualDestinationInterceptor.VirtualDestinations that = ((DtoVirtualDestinationInterceptor.VirtualDestinations) object);
369            {
370                List<Object> lhsContents;
371                lhsContents = (((this.contents!= null)&&(!this.contents.isEmpty()))?this.getContents():null);
372                List<Object> rhsContents;
373                rhsContents = (((that.contents!= null)&&(!that.contents.isEmpty()))?that.getContents():null);
374                if (!strategy.equals(LocatorUtils.property(thisLocator, "contents", lhsContents), LocatorUtils.property(thatLocator, "contents", rhsContents), lhsContents, rhsContents)) {
375                    return false;
376                }
377            }
378            return true;
379        }
380
381        public boolean equals(Object object) {
382            final EqualsStrategy strategy = new org.apache.activemq.plugin.jaxb2_commons.ElementAwareEqualsStrategy();
383            return equals(null, null, object, strategy);
384        }
385
386    }
387
388}