001    //
002    // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6 
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: 2013.10.14 at 11:56:49 PM IST 
006    //
007    
008    
009    package org.apache.activemq.schema.core;
010    
011    import java.util.HashMap;
012    import java.util.Map;
013    import javax.xml.bind.annotation.XmlAccessType;
014    import javax.xml.bind.annotation.XmlAccessorType;
015    import javax.xml.bind.annotation.XmlAnyAttribute;
016    import javax.xml.bind.annotation.XmlAttribute;
017    import javax.xml.bind.annotation.XmlID;
018    import javax.xml.bind.annotation.XmlRootElement;
019    import javax.xml.bind.annotation.XmlSchemaType;
020    import javax.xml.bind.annotation.XmlType;
021    import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
022    import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
023    import javax.xml.namespace.QName;
024    import org.apache.activemq.plugin.jaxb2_commons.ElementAwareEqualsStrategy;
025    import org.jvnet.jaxb2_commons.lang.Equals;
026    import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
027    import org.jvnet.jaxb2_commons.lang.HashCode;
028    import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
029    import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
030    import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
031    import org.jvnet.jaxb2_commons.lang.ToString;
032    import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
033    import org.jvnet.jaxb2_commons.locator.ObjectLocator;
034    import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
035    
036    
037    /**
038     * <p>Java class for anonymous complex type.
039     * 
040     * <p>The following schema fragment specifies the expected content contained within this class.
041     * 
042     * <pre>
043     * &lt;complexType>
044     *   &lt;complexContent>
045     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
046     *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
047     *       &lt;anyAttribute processContents='lax' namespace='##other'/>
048     *     &lt;/restriction>
049     *   &lt;/complexContent>
050     * &lt;/complexType>
051     * </pre>
052     * 
053     * 
054     */
055    @XmlAccessorType(XmlAccessType.FIELD)
056    @XmlType(name = "")
057    @XmlRootElement(name = "priorityDispatchPolicy")
058    public class DtoPriorityDispatchPolicy
059        implements Equals, HashCode, ToString
060    {
061    
062        @XmlAttribute(name = "id")
063        @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
064        @XmlID
065        @XmlSchemaType(name = "ID")
066        protected String id;
067        @XmlAnyAttribute
068        private Map<QName, String> otherAttributes = new HashMap<QName, String>();
069    
070        /**
071         * Gets the value of the id property.
072         * 
073         * @return
074         *     possible object is
075         *     {@link String }
076         *     
077         */
078        public String getId() {
079            return id;
080        }
081    
082        /**
083         * Sets the value of the id property.
084         * 
085         * @param value
086         *     allowed object is
087         *     {@link String }
088         *     
089         */
090        public void setId(String value) {
091            this.id = value;
092        }
093    
094        /**
095         * Gets a map that contains attributes that aren't bound to any typed property on this class.
096         * 
097         * <p>
098         * the map is keyed by the name of the attribute and 
099         * the value is the string value of the attribute.
100         * 
101         * the map returned by this method is live, and you can add new attribute
102         * by updating the map directly. Because of this design, there's no setter.
103         * 
104         * 
105         * @return
106         *     always non-null
107         */
108        public Map<QName, String> getOtherAttributes() {
109            return otherAttributes;
110        }
111    
112        public String toString() {
113            final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
114            final StringBuilder buffer = new StringBuilder();
115            append(null, buffer, strategy);
116            return buffer.toString();
117        }
118    
119        public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
120            strategy.appendStart(locator, this, buffer);
121            appendFields(locator, buffer, strategy);
122            strategy.appendEnd(locator, this, buffer);
123            return buffer;
124        }
125    
126        public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
127            {
128                String theId;
129                theId = this.getId();
130                strategy.appendField(locator, this, "id", buffer, theId);
131            }
132            return buffer;
133        }
134    
135        public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
136            int currentHashCode = 1;
137            {
138                String theId;
139                theId = this.getId();
140                currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "id", theId), currentHashCode, theId);
141            }
142            return currentHashCode;
143        }
144    
145        public int hashCode() {
146            final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
147            return this.hashCode(null, strategy);
148        }
149    
150        public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
151            if (!(object instanceof DtoPriorityDispatchPolicy)) {
152                return false;
153            }
154            if (this == object) {
155                return true;
156            }
157            final DtoPriorityDispatchPolicy that = ((DtoPriorityDispatchPolicy) object);
158            {
159                String lhsId;
160                lhsId = this.getId();
161                String rhsId;
162                rhsId = that.getId();
163                if (!strategy.equals(LocatorUtils.property(thisLocator, "id", lhsId), LocatorUtils.property(thatLocator, "id", rhsId), lhsId, rhsId)) {
164                    return false;
165                }
166            }
167            return true;
168        }
169    
170        public boolean equals(Object object) {
171            final EqualsStrategy strategy = new ElementAwareEqualsStrategy();
172            return equals(null, null, object, strategy);
173        }
174    
175    }