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="propertyName" type="{http://www.w3.org/2001/XMLSchema}string" />
049 *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
050 *       &lt;anyAttribute processContents='lax' namespace='##other'/>
051 *     &lt;/restriction>
052 *   &lt;/complexContent>
053 * &lt;/complexType>
054 * </pre>
055 * 
056 * 
057 */
058@XmlAccessorType(XmlAccessType.FIELD)
059@XmlType(name = "")
060@XmlRootElement(name = "uniquePropertyMessageEvictionStrategy")
061public class DtoUniquePropertyMessageEvictionStrategy
062    implements Equals, HashCode, ToString
063{
064
065    @XmlAttribute(name = "evictExpiredMessagesHighWatermark")
066    protected BigInteger evictExpiredMessagesHighWatermark;
067    @XmlAttribute(name = "propertyName")
068    protected String propertyName;
069    @XmlAttribute(name = "id")
070    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
071    @XmlID
072    @XmlSchemaType(name = "ID")
073    protected String id;
074    @XmlAnyAttribute
075    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
076
077    /**
078     * Gets the value of the evictExpiredMessagesHighWatermark property.
079     * 
080     * @return
081     *     possible object is
082     *     {@link BigInteger }
083     *     
084     */
085    public BigInteger getEvictExpiredMessagesHighWatermark() {
086        return evictExpiredMessagesHighWatermark;
087    }
088
089    /**
090     * Sets the value of the evictExpiredMessagesHighWatermark property.
091     * 
092     * @param value
093     *     allowed object is
094     *     {@link BigInteger }
095     *     
096     */
097    public void setEvictExpiredMessagesHighWatermark(BigInteger value) {
098        this.evictExpiredMessagesHighWatermark = value;
099    }
100
101    /**
102     * Gets the value of the propertyName property.
103     * 
104     * @return
105     *     possible object is
106     *     {@link String }
107     *     
108     */
109    public String getPropertyName() {
110        return propertyName;
111    }
112
113    /**
114     * Sets the value of the propertyName property.
115     * 
116     * @param value
117     *     allowed object is
118     *     {@link String }
119     *     
120     */
121    public void setPropertyName(String value) {
122        this.propertyName = value;
123    }
124
125    /**
126     * Gets the value of the id property.
127     * 
128     * @return
129     *     possible object is
130     *     {@link String }
131     *     
132     */
133    public String getId() {
134        return id;
135    }
136
137    /**
138     * Sets the value of the id property.
139     * 
140     * @param value
141     *     allowed object is
142     *     {@link String }
143     *     
144     */
145    public void setId(String value) {
146        this.id = value;
147    }
148
149    /**
150     * Gets a map that contains attributes that aren't bound to any typed property on this class.
151     * 
152     * <p>
153     * the map is keyed by the name of the attribute and 
154     * the value is the string value of the attribute.
155     * 
156     * the map returned by this method is live, and you can add new attribute
157     * by updating the map directly. Because of this design, there's no setter.
158     * 
159     * 
160     * @return
161     *     always non-null
162     */
163    public Map<QName, String> getOtherAttributes() {
164        return otherAttributes;
165    }
166
167    public String toString() {
168        final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
169        final StringBuilder buffer = new StringBuilder();
170        append(null, buffer, strategy);
171        return buffer.toString();
172    }
173
174    public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
175        strategy.appendStart(locator, this, buffer);
176        appendFields(locator, buffer, strategy);
177        strategy.appendEnd(locator, this, buffer);
178        return buffer;
179    }
180
181    public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
182        {
183            BigInteger theEvictExpiredMessagesHighWatermark;
184            theEvictExpiredMessagesHighWatermark = this.getEvictExpiredMessagesHighWatermark();
185            strategy.appendField(locator, this, "evictExpiredMessagesHighWatermark", buffer, theEvictExpiredMessagesHighWatermark);
186        }
187        {
188            String thePropertyName;
189            thePropertyName = this.getPropertyName();
190            strategy.appendField(locator, this, "propertyName", buffer, thePropertyName);
191        }
192        {
193            String theId;
194            theId = this.getId();
195            strategy.appendField(locator, this, "id", buffer, theId);
196        }
197        return buffer;
198    }
199
200    public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
201        int currentHashCode = 1;
202        {
203            BigInteger theEvictExpiredMessagesHighWatermark;
204            theEvictExpiredMessagesHighWatermark = this.getEvictExpiredMessagesHighWatermark();
205            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "evictExpiredMessagesHighWatermark", theEvictExpiredMessagesHighWatermark), currentHashCode, theEvictExpiredMessagesHighWatermark);
206        }
207        {
208            String thePropertyName;
209            thePropertyName = this.getPropertyName();
210            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "propertyName", thePropertyName), currentHashCode, thePropertyName);
211        }
212        {
213            String theId;
214            theId = this.getId();
215            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "id", theId), currentHashCode, theId);
216        }
217        return currentHashCode;
218    }
219
220    public int hashCode() {
221        final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
222        return this.hashCode(null, strategy);
223    }
224
225    public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
226        if (!(object instanceof DtoUniquePropertyMessageEvictionStrategy)) {
227            return false;
228        }
229        if (this == object) {
230            return true;
231        }
232        final DtoUniquePropertyMessageEvictionStrategy that = ((DtoUniquePropertyMessageEvictionStrategy) object);
233        {
234            BigInteger lhsEvictExpiredMessagesHighWatermark;
235            lhsEvictExpiredMessagesHighWatermark = this.getEvictExpiredMessagesHighWatermark();
236            BigInteger rhsEvictExpiredMessagesHighWatermark;
237            rhsEvictExpiredMessagesHighWatermark = that.getEvictExpiredMessagesHighWatermark();
238            if (!strategy.equals(LocatorUtils.property(thisLocator, "evictExpiredMessagesHighWatermark", lhsEvictExpiredMessagesHighWatermark), LocatorUtils.property(thatLocator, "evictExpiredMessagesHighWatermark", rhsEvictExpiredMessagesHighWatermark), lhsEvictExpiredMessagesHighWatermark, rhsEvictExpiredMessagesHighWatermark)) {
239                return false;
240            }
241        }
242        {
243            String lhsPropertyName;
244            lhsPropertyName = this.getPropertyName();
245            String rhsPropertyName;
246            rhsPropertyName = that.getPropertyName();
247            if (!strategy.equals(LocatorUtils.property(thisLocator, "propertyName", lhsPropertyName), LocatorUtils.property(thatLocator, "propertyName", rhsPropertyName), lhsPropertyName, rhsPropertyName)) {
248                return false;
249            }
250        }
251        {
252            String lhsId;
253            lhsId = this.getId();
254            String rhsId;
255            rhsId = that.getId();
256            if (!strategy.equals(LocatorUtils.property(thisLocator, "id", lhsId), LocatorUtils.property(thatLocator, "id", rhsId), lhsId, rhsId)) {
257                return false;
258            }
259        }
260        return true;
261    }
262
263    public boolean equals(Object object) {
264        final EqualsStrategy strategy = new ElementAwareEqualsStrategy();
265        return equals(null, null, object, strategy);
266    }
267
268}