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