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="backOffMultiplier" type="{http://www.w3.org/2001/XMLSchema}double" />
048 *       &lt;attribute name="initialReconnectDelay" type="{http://www.w3.org/2001/XMLSchema}long" />
049 *       &lt;attribute name="maxInitialConnectAttempts" type="{http://www.w3.org/2001/XMLSchema}integer" />
050 *       &lt;attribute name="maxReconnectAttempts" type="{http://www.w3.org/2001/XMLSchema}integer" />
051 *       &lt;attribute name="maxSendRetries" type="{http://www.w3.org/2001/XMLSchema}integer" />
052 *       &lt;attribute name="maximumReconnectDelay" type="{http://www.w3.org/2001/XMLSchema}long" />
053 *       &lt;attribute name="sendRetyDelay" type="{http://www.w3.org/2001/XMLSchema}long" />
054 *       &lt;attribute name="useExponentialBackOff" type="{http://www.w3.org/2001/XMLSchema}boolean" />
055 *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
056 *       &lt;anyAttribute processContents='lax' namespace='##other'/>
057 *     &lt;/restriction>
058 *   &lt;/complexContent>
059 * &lt;/complexType>
060 * </pre>
061 * 
062 * 
063 */
064@XmlAccessorType(XmlAccessType.FIELD)
065@XmlType(name = "")
066@XmlRootElement(name = "reconnectionPolicy")
067public class DtoReconnectionPolicy
068    implements Equals, HashCode, ToString
069{
070
071    @XmlAttribute(name = "backOffMultiplier")
072    protected Double backOffMultiplier;
073    @XmlAttribute(name = "initialReconnectDelay")
074    protected Long initialReconnectDelay;
075    @XmlAttribute(name = "maxInitialConnectAttempts")
076    protected BigInteger maxInitialConnectAttempts;
077    @XmlAttribute(name = "maxReconnectAttempts")
078    protected BigInteger maxReconnectAttempts;
079    @XmlAttribute(name = "maxSendRetries")
080    protected BigInteger maxSendRetries;
081    @XmlAttribute(name = "maximumReconnectDelay")
082    protected Long maximumReconnectDelay;
083    @XmlAttribute(name = "sendRetyDelay")
084    protected Long sendRetyDelay;
085    @XmlAttribute(name = "useExponentialBackOff")
086    protected Boolean useExponentialBackOff;
087    @XmlAttribute(name = "id")
088    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
089    @XmlID
090    @XmlSchemaType(name = "ID")
091    protected String id;
092    @XmlAnyAttribute
093    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
094
095    /**
096     * Gets the value of the backOffMultiplier property.
097     * 
098     * @return
099     *     possible object is
100     *     {@link Double }
101     *     
102     */
103    public Double getBackOffMultiplier() {
104        return backOffMultiplier;
105    }
106
107    /**
108     * Sets the value of the backOffMultiplier property.
109     * 
110     * @param value
111     *     allowed object is
112     *     {@link Double }
113     *     
114     */
115    public void setBackOffMultiplier(Double value) {
116        this.backOffMultiplier = value;
117    }
118
119    /**
120     * Gets the value of the initialReconnectDelay property.
121     * 
122     * @return
123     *     possible object is
124     *     {@link Long }
125     *     
126     */
127    public Long getInitialReconnectDelay() {
128        return initialReconnectDelay;
129    }
130
131    /**
132     * Sets the value of the initialReconnectDelay property.
133     * 
134     * @param value
135     *     allowed object is
136     *     {@link Long }
137     *     
138     */
139    public void setInitialReconnectDelay(Long value) {
140        this.initialReconnectDelay = value;
141    }
142
143    /**
144     * Gets the value of the maxInitialConnectAttempts property.
145     * 
146     * @return
147     *     possible object is
148     *     {@link BigInteger }
149     *     
150     */
151    public BigInteger getMaxInitialConnectAttempts() {
152        return maxInitialConnectAttempts;
153    }
154
155    /**
156     * Sets the value of the maxInitialConnectAttempts property.
157     * 
158     * @param value
159     *     allowed object is
160     *     {@link BigInteger }
161     *     
162     */
163    public void setMaxInitialConnectAttempts(BigInteger value) {
164        this.maxInitialConnectAttempts = value;
165    }
166
167    /**
168     * Gets the value of the maxReconnectAttempts property.
169     * 
170     * @return
171     *     possible object is
172     *     {@link BigInteger }
173     *     
174     */
175    public BigInteger getMaxReconnectAttempts() {
176        return maxReconnectAttempts;
177    }
178
179    /**
180     * Sets the value of the maxReconnectAttempts property.
181     * 
182     * @param value
183     *     allowed object is
184     *     {@link BigInteger }
185     *     
186     */
187    public void setMaxReconnectAttempts(BigInteger value) {
188        this.maxReconnectAttempts = value;
189    }
190
191    /**
192     * Gets the value of the maxSendRetries property.
193     * 
194     * @return
195     *     possible object is
196     *     {@link BigInteger }
197     *     
198     */
199    public BigInteger getMaxSendRetries() {
200        return maxSendRetries;
201    }
202
203    /**
204     * Sets the value of the maxSendRetries property.
205     * 
206     * @param value
207     *     allowed object is
208     *     {@link BigInteger }
209     *     
210     */
211    public void setMaxSendRetries(BigInteger value) {
212        this.maxSendRetries = value;
213    }
214
215    /**
216     * Gets the value of the maximumReconnectDelay property.
217     * 
218     * @return
219     *     possible object is
220     *     {@link Long }
221     *     
222     */
223    public Long getMaximumReconnectDelay() {
224        return maximumReconnectDelay;
225    }
226
227    /**
228     * Sets the value of the maximumReconnectDelay property.
229     * 
230     * @param value
231     *     allowed object is
232     *     {@link Long }
233     *     
234     */
235    public void setMaximumReconnectDelay(Long value) {
236        this.maximumReconnectDelay = value;
237    }
238
239    /**
240     * Gets the value of the sendRetyDelay property.
241     * 
242     * @return
243     *     possible object is
244     *     {@link Long }
245     *     
246     */
247    public Long getSendRetyDelay() {
248        return sendRetyDelay;
249    }
250
251    /**
252     * Sets the value of the sendRetyDelay property.
253     * 
254     * @param value
255     *     allowed object is
256     *     {@link Long }
257     *     
258     */
259    public void setSendRetyDelay(Long value) {
260        this.sendRetyDelay = value;
261    }
262
263    /**
264     * Gets the value of the useExponentialBackOff property.
265     * 
266     * @return
267     *     possible object is
268     *     {@link Boolean }
269     *     
270     */
271    public Boolean isUseExponentialBackOff() {
272        return useExponentialBackOff;
273    }
274
275    /**
276     * Sets the value of the useExponentialBackOff property.
277     * 
278     * @param value
279     *     allowed object is
280     *     {@link Boolean }
281     *     
282     */
283    public void setUseExponentialBackOff(Boolean value) {
284        this.useExponentialBackOff = value;
285    }
286
287    /**
288     * Gets the value of the id property.
289     * 
290     * @return
291     *     possible object is
292     *     {@link String }
293     *     
294     */
295    public String getId() {
296        return id;
297    }
298
299    /**
300     * Sets the value of the id property.
301     * 
302     * @param value
303     *     allowed object is
304     *     {@link String }
305     *     
306     */
307    public void setId(String value) {
308        this.id = value;
309    }
310
311    /**
312     * Gets a map that contains attributes that aren't bound to any typed property on this class.
313     * 
314     * <p>
315     * the map is keyed by the name of the attribute and 
316     * the value is the string value of the attribute.
317     * 
318     * the map returned by this method is live, and you can add new attribute
319     * by updating the map directly. Because of this design, there's no setter.
320     * 
321     * 
322     * @return
323     *     always non-null
324     */
325    public Map<QName, String> getOtherAttributes() {
326        return otherAttributes;
327    }
328
329    public String toString() {
330        final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
331        final StringBuilder buffer = new StringBuilder();
332        append(null, buffer, strategy);
333        return buffer.toString();
334    }
335
336    public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
337        strategy.appendStart(locator, this, buffer);
338        appendFields(locator, buffer, strategy);
339        strategy.appendEnd(locator, this, buffer);
340        return buffer;
341    }
342
343    public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
344        {
345            Double theBackOffMultiplier;
346            theBackOffMultiplier = this.getBackOffMultiplier();
347            strategy.appendField(locator, this, "backOffMultiplier", buffer, theBackOffMultiplier);
348        }
349        {
350            Long theInitialReconnectDelay;
351            theInitialReconnectDelay = this.getInitialReconnectDelay();
352            strategy.appendField(locator, this, "initialReconnectDelay", buffer, theInitialReconnectDelay);
353        }
354        {
355            BigInteger theMaxInitialConnectAttempts;
356            theMaxInitialConnectAttempts = this.getMaxInitialConnectAttempts();
357            strategy.appendField(locator, this, "maxInitialConnectAttempts", buffer, theMaxInitialConnectAttempts);
358        }
359        {
360            BigInteger theMaxReconnectAttempts;
361            theMaxReconnectAttempts = this.getMaxReconnectAttempts();
362            strategy.appendField(locator, this, "maxReconnectAttempts", buffer, theMaxReconnectAttempts);
363        }
364        {
365            BigInteger theMaxSendRetries;
366            theMaxSendRetries = this.getMaxSendRetries();
367            strategy.appendField(locator, this, "maxSendRetries", buffer, theMaxSendRetries);
368        }
369        {
370            Long theMaximumReconnectDelay;
371            theMaximumReconnectDelay = this.getMaximumReconnectDelay();
372            strategy.appendField(locator, this, "maximumReconnectDelay", buffer, theMaximumReconnectDelay);
373        }
374        {
375            Long theSendRetyDelay;
376            theSendRetyDelay = this.getSendRetyDelay();
377            strategy.appendField(locator, this, "sendRetyDelay", buffer, theSendRetyDelay);
378        }
379        {
380            Boolean theUseExponentialBackOff;
381            theUseExponentialBackOff = this.isUseExponentialBackOff();
382            strategy.appendField(locator, this, "useExponentialBackOff", buffer, theUseExponentialBackOff);
383        }
384        {
385            String theId;
386            theId = this.getId();
387            strategy.appendField(locator, this, "id", buffer, theId);
388        }
389        return buffer;
390    }
391
392    public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
393        int currentHashCode = 1;
394        {
395            Double theBackOffMultiplier;
396            theBackOffMultiplier = this.getBackOffMultiplier();
397            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "backOffMultiplier", theBackOffMultiplier), currentHashCode, theBackOffMultiplier);
398        }
399        {
400            Long theInitialReconnectDelay;
401            theInitialReconnectDelay = this.getInitialReconnectDelay();
402            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "initialReconnectDelay", theInitialReconnectDelay), currentHashCode, theInitialReconnectDelay);
403        }
404        {
405            BigInteger theMaxInitialConnectAttempts;
406            theMaxInitialConnectAttempts = this.getMaxInitialConnectAttempts();
407            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "maxInitialConnectAttempts", theMaxInitialConnectAttempts), currentHashCode, theMaxInitialConnectAttempts);
408        }
409        {
410            BigInteger theMaxReconnectAttempts;
411            theMaxReconnectAttempts = this.getMaxReconnectAttempts();
412            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "maxReconnectAttempts", theMaxReconnectAttempts), currentHashCode, theMaxReconnectAttempts);
413        }
414        {
415            BigInteger theMaxSendRetries;
416            theMaxSendRetries = this.getMaxSendRetries();
417            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "maxSendRetries", theMaxSendRetries), currentHashCode, theMaxSendRetries);
418        }
419        {
420            Long theMaximumReconnectDelay;
421            theMaximumReconnectDelay = this.getMaximumReconnectDelay();
422            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "maximumReconnectDelay", theMaximumReconnectDelay), currentHashCode, theMaximumReconnectDelay);
423        }
424        {
425            Long theSendRetyDelay;
426            theSendRetyDelay = this.getSendRetyDelay();
427            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "sendRetyDelay", theSendRetyDelay), currentHashCode, theSendRetyDelay);
428        }
429        {
430            Boolean theUseExponentialBackOff;
431            theUseExponentialBackOff = this.isUseExponentialBackOff();
432            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "useExponentialBackOff", theUseExponentialBackOff), currentHashCode, theUseExponentialBackOff);
433        }
434        {
435            String theId;
436            theId = this.getId();
437            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "id", theId), currentHashCode, theId);
438        }
439        return currentHashCode;
440    }
441
442    public int hashCode() {
443        final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
444        return this.hashCode(null, strategy);
445    }
446
447    public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
448        if (!(object instanceof DtoReconnectionPolicy)) {
449            return false;
450        }
451        if (this == object) {
452            return true;
453        }
454        final DtoReconnectionPolicy that = ((DtoReconnectionPolicy) object);
455        {
456            Double lhsBackOffMultiplier;
457            lhsBackOffMultiplier = this.getBackOffMultiplier();
458            Double rhsBackOffMultiplier;
459            rhsBackOffMultiplier = that.getBackOffMultiplier();
460            if (!strategy.equals(LocatorUtils.property(thisLocator, "backOffMultiplier", lhsBackOffMultiplier), LocatorUtils.property(thatLocator, "backOffMultiplier", rhsBackOffMultiplier), lhsBackOffMultiplier, rhsBackOffMultiplier)) {
461                return false;
462            }
463        }
464        {
465            Long lhsInitialReconnectDelay;
466            lhsInitialReconnectDelay = this.getInitialReconnectDelay();
467            Long rhsInitialReconnectDelay;
468            rhsInitialReconnectDelay = that.getInitialReconnectDelay();
469            if (!strategy.equals(LocatorUtils.property(thisLocator, "initialReconnectDelay", lhsInitialReconnectDelay), LocatorUtils.property(thatLocator, "initialReconnectDelay", rhsInitialReconnectDelay), lhsInitialReconnectDelay, rhsInitialReconnectDelay)) {
470                return false;
471            }
472        }
473        {
474            BigInteger lhsMaxInitialConnectAttempts;
475            lhsMaxInitialConnectAttempts = this.getMaxInitialConnectAttempts();
476            BigInteger rhsMaxInitialConnectAttempts;
477            rhsMaxInitialConnectAttempts = that.getMaxInitialConnectAttempts();
478            if (!strategy.equals(LocatorUtils.property(thisLocator, "maxInitialConnectAttempts", lhsMaxInitialConnectAttempts), LocatorUtils.property(thatLocator, "maxInitialConnectAttempts", rhsMaxInitialConnectAttempts), lhsMaxInitialConnectAttempts, rhsMaxInitialConnectAttempts)) {
479                return false;
480            }
481        }
482        {
483            BigInteger lhsMaxReconnectAttempts;
484            lhsMaxReconnectAttempts = this.getMaxReconnectAttempts();
485            BigInteger rhsMaxReconnectAttempts;
486            rhsMaxReconnectAttempts = that.getMaxReconnectAttempts();
487            if (!strategy.equals(LocatorUtils.property(thisLocator, "maxReconnectAttempts", lhsMaxReconnectAttempts), LocatorUtils.property(thatLocator, "maxReconnectAttempts", rhsMaxReconnectAttempts), lhsMaxReconnectAttempts, rhsMaxReconnectAttempts)) {
488                return false;
489            }
490        }
491        {
492            BigInteger lhsMaxSendRetries;
493            lhsMaxSendRetries = this.getMaxSendRetries();
494            BigInteger rhsMaxSendRetries;
495            rhsMaxSendRetries = that.getMaxSendRetries();
496            if (!strategy.equals(LocatorUtils.property(thisLocator, "maxSendRetries", lhsMaxSendRetries), LocatorUtils.property(thatLocator, "maxSendRetries", rhsMaxSendRetries), lhsMaxSendRetries, rhsMaxSendRetries)) {
497                return false;
498            }
499        }
500        {
501            Long lhsMaximumReconnectDelay;
502            lhsMaximumReconnectDelay = this.getMaximumReconnectDelay();
503            Long rhsMaximumReconnectDelay;
504            rhsMaximumReconnectDelay = that.getMaximumReconnectDelay();
505            if (!strategy.equals(LocatorUtils.property(thisLocator, "maximumReconnectDelay", lhsMaximumReconnectDelay), LocatorUtils.property(thatLocator, "maximumReconnectDelay", rhsMaximumReconnectDelay), lhsMaximumReconnectDelay, rhsMaximumReconnectDelay)) {
506                return false;
507            }
508        }
509        {
510            Long lhsSendRetyDelay;
511            lhsSendRetyDelay = this.getSendRetyDelay();
512            Long rhsSendRetyDelay;
513            rhsSendRetyDelay = that.getSendRetyDelay();
514            if (!strategy.equals(LocatorUtils.property(thisLocator, "sendRetyDelay", lhsSendRetyDelay), LocatorUtils.property(thatLocator, "sendRetyDelay", rhsSendRetyDelay), lhsSendRetyDelay, rhsSendRetyDelay)) {
515                return false;
516            }
517        }
518        {
519            Boolean lhsUseExponentialBackOff;
520            lhsUseExponentialBackOff = this.isUseExponentialBackOff();
521            Boolean rhsUseExponentialBackOff;
522            rhsUseExponentialBackOff = that.isUseExponentialBackOff();
523            if (!strategy.equals(LocatorUtils.property(thisLocator, "useExponentialBackOff", lhsUseExponentialBackOff), LocatorUtils.property(thatLocator, "useExponentialBackOff", rhsUseExponentialBackOff), lhsUseExponentialBackOff, rhsUseExponentialBackOff)) {
524                return false;
525            }
526        }
527        {
528            String lhsId;
529            lhsId = this.getId();
530            String rhsId;
531            rhsId = that.getId();
532            if (!strategy.equals(LocatorUtils.property(thisLocator, "id", lhsId), LocatorUtils.property(thatLocator, "id", rhsId), lhsId, rhsId)) {
533                return false;
534            }
535        }
536        return true;
537    }
538
539    public boolean equals(Object object) {
540        final EqualsStrategy strategy = new ElementAwareEqualsStrategy();
541        return equals(null, null, object, strategy);
542    }
543
544}