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.math.BigInteger;
012import java.util.HashMap;
013import java.util.Map;
014import javax.xml.bind.annotation.XmlAccessType;
015import javax.xml.bind.annotation.XmlAccessorType;
016import javax.xml.bind.annotation.XmlAnyAttribute;
017import javax.xml.bind.annotation.XmlAttribute;
018import javax.xml.bind.annotation.XmlID;
019import javax.xml.bind.annotation.XmlRootElement;
020import javax.xml.bind.annotation.XmlSchemaType;
021import javax.xml.bind.annotation.XmlType;
022import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
023import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
024import javax.xml.namespace.QName;
025import org.apache.activemq.plugin.jaxb2_commons.ElementAwareEqualsStrategy;
026import org.jvnet.jaxb2_commons.lang.Equals;
027import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
028import org.jvnet.jaxb2_commons.lang.HashCode;
029import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
030import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
031import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
032import org.jvnet.jaxb2_commons.lang.ToString;
033import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
034import org.jvnet.jaxb2_commons.locator.ObjectLocator;
035import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
036
037
038/**
039 * <p>Java class for anonymous complex type.
040 * 
041 * <p>The following schema fragment specifies the expected content contained within this class.
042 * 
043 * <pre>
044 * &lt;complexType>
045 *   &lt;complexContent>
046 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
047 *       &lt;attribute name="evictExpiredMessagesHighWatermark" type="{http://www.w3.org/2001/XMLSchema}integer" />
048 *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
049 *       &lt;anyAttribute processContents='lax' namespace='##other'/>
050 *     &lt;/restriction>
051 *   &lt;/complexContent>
052 * &lt;/complexType>
053 * </pre>
054 * 
055 * 
056 */
057@XmlAccessorType(XmlAccessType.FIELD)
058@XmlType(name = "")
059@XmlRootElement(name = "oldestMessageWithLowestPriorityEvictionStrategy")
060public class DtoOldestMessageWithLowestPriorityEvictionStrategy
061    implements Equals, HashCode, ToString
062{
063
064    @XmlAttribute(name = "evictExpiredMessagesHighWatermark")
065    protected BigInteger evictExpiredMessagesHighWatermark;
066    @XmlAttribute(name = "id")
067    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
068    @XmlID
069    @XmlSchemaType(name = "ID")
070    protected String id;
071    @XmlAnyAttribute
072    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
073
074    /**
075     * Gets the value of the evictExpiredMessagesHighWatermark property.
076     * 
077     * @return
078     *     possible object is
079     *     {@link BigInteger }
080     *     
081     */
082    public BigInteger getEvictExpiredMessagesHighWatermark() {
083        return evictExpiredMessagesHighWatermark;
084    }
085
086    /**
087     * Sets the value of the evictExpiredMessagesHighWatermark property.
088     * 
089     * @param value
090     *     allowed object is
091     *     {@link BigInteger }
092     *     
093     */
094    public void setEvictExpiredMessagesHighWatermark(BigInteger value) {
095        this.evictExpiredMessagesHighWatermark = value;
096    }
097
098    /**
099     * Gets the value of the id property.
100     * 
101     * @return
102     *     possible object is
103     *     {@link String }
104     *     
105     */
106    public String getId() {
107        return id;
108    }
109
110    /**
111     * Sets the value of the id property.
112     * 
113     * @param value
114     *     allowed object is
115     *     {@link String }
116     *     
117     */
118    public void setId(String value) {
119        this.id = value;
120    }
121
122    /**
123     * Gets a map that contains attributes that aren't bound to any typed property on this class.
124     * 
125     * <p>
126     * the map is keyed by the name of the attribute and 
127     * the value is the string value of the attribute.
128     * 
129     * the map returned by this method is live, and you can add new attribute
130     * by updating the map directly. Because of this design, there's no setter.
131     * 
132     * 
133     * @return
134     *     always non-null
135     */
136    public Map<QName, String> getOtherAttributes() {
137        return otherAttributes;
138    }
139
140    public String toString() {
141        final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
142        final StringBuilder buffer = new StringBuilder();
143        append(null, buffer, strategy);
144        return buffer.toString();
145    }
146
147    public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
148        strategy.appendStart(locator, this, buffer);
149        appendFields(locator, buffer, strategy);
150        strategy.appendEnd(locator, this, buffer);
151        return buffer;
152    }
153
154    public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
155        {
156            BigInteger theEvictExpiredMessagesHighWatermark;
157            theEvictExpiredMessagesHighWatermark = this.getEvictExpiredMessagesHighWatermark();
158            strategy.appendField(locator, this, "evictExpiredMessagesHighWatermark", buffer, theEvictExpiredMessagesHighWatermark);
159        }
160        {
161            String theId;
162            theId = this.getId();
163            strategy.appendField(locator, this, "id", buffer, theId);
164        }
165        return buffer;
166    }
167
168    public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
169        int currentHashCode = 1;
170        {
171            BigInteger theEvictExpiredMessagesHighWatermark;
172            theEvictExpiredMessagesHighWatermark = this.getEvictExpiredMessagesHighWatermark();
173            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "evictExpiredMessagesHighWatermark", theEvictExpiredMessagesHighWatermark), currentHashCode, theEvictExpiredMessagesHighWatermark);
174        }
175        {
176            String theId;
177            theId = this.getId();
178            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "id", theId), currentHashCode, theId);
179        }
180        return currentHashCode;
181    }
182
183    public int hashCode() {
184        final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
185        return this.hashCode(null, strategy);
186    }
187
188    public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
189        if (!(object instanceof DtoOldestMessageWithLowestPriorityEvictionStrategy)) {
190            return false;
191        }
192        if (this == object) {
193            return true;
194        }
195        final DtoOldestMessageWithLowestPriorityEvictionStrategy that = ((DtoOldestMessageWithLowestPriorityEvictionStrategy) object);
196        {
197            BigInteger lhsEvictExpiredMessagesHighWatermark;
198            lhsEvictExpiredMessagesHighWatermark = this.getEvictExpiredMessagesHighWatermark();
199            BigInteger rhsEvictExpiredMessagesHighWatermark;
200            rhsEvictExpiredMessagesHighWatermark = that.getEvictExpiredMessagesHighWatermark();
201            if (!strategy.equals(LocatorUtils.property(thisLocator, "evictExpiredMessagesHighWatermark", lhsEvictExpiredMessagesHighWatermark), LocatorUtils.property(thatLocator, "evictExpiredMessagesHighWatermark", rhsEvictExpiredMessagesHighWatermark), lhsEvictExpiredMessagesHighWatermark, rhsEvictExpiredMessagesHighWatermark)) {
202                return false;
203            }
204        }
205        {
206            String lhsId;
207            lhsId = this.getId();
208            String rhsId;
209            rhsId = that.getId();
210            if (!strategy.equals(LocatorUtils.property(thisLocator, "id", lhsId), LocatorUtils.property(thatLocator, "id", rhsId), lhsId, rhsId)) {
211                return false;
212            }
213        }
214        return true;
215    }
216
217    public boolean equals(Object object) {
218        final EqualsStrategy strategy = new ElementAwareEqualsStrategy();
219        return equals(null, null, object, strategy);
220    }
221
222}