Package com.cisco.oss.foundation.configuration.xml.jaxb

Source Code of com.cisco.oss.foundation.configuration.xml.jaxb.StructureMemberValue

//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.06.05 at 10:11:28 AM EDT
//


package com.cisco.oss.foundation.configuration.xml.jaxb;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.jvnet.jaxb2_commons.lang.CopyStrategy;
import org.jvnet.jaxb2_commons.lang.CopyTo;
import org.jvnet.jaxb2_commons.lang.Equals;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;


/**
* <p>Java class for StructureMemberValue complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="StructureMemberValue">
*   &lt;complexContent>
*     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
*       &lt;choice>
*         &lt;sequence>
*           &lt;element name="StructureValue" type="{}StructureValue" maxOccurs="unbounded" minOccurs="0"/>
*         &lt;/sequence>
*         &lt;sequence>
*           &lt;element name="LinkTo" type="{}LinkTo" minOccurs="0"/>
*         &lt;/sequence>
*       &lt;/choice>
*       &lt;attribute name="index" type="{http://www.w3.org/2001/XMLSchema}string" />
*       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
*       &lt;attribute name="value" type="{http://www.w3.org/2001/XMLSchema}string" />
*       &lt;attribute name="valueId" type="{http://www.w3.org/2001/XMLSchema}integer" />
*     &lt;/restriction>
*   &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "StructureMemberValue", propOrder = {
    "linkTo",
    "structureValues"
})
public class StructureMemberValue
    implements Cloneable, CopyTo, Equals, ToString
{

    @XmlElement(name = "LinkTo")
    protected LinkTo linkTo;
    @XmlElement(name = "StructureValue")
    protected List<StructureValue> structureValues;
    @XmlAttribute(name = "index")
    protected String index;
    @XmlAttribute(name = "name", required = true)
    protected String name;
    @XmlAttribute(name = "value")
    protected String value;
    @XmlAttribute(name = "valueId")
    @XmlJavaTypeAdapter(Adapter1 .class)
    @XmlSchemaType(name = "integer")
    protected Integer valueId;

    /**
     * Gets the value of the linkTo property.
     *
     * @return
     *     possible object is
     *     {@link LinkTo }
     *    
     */
    public LinkTo getLinkTo() {
        return linkTo;
    }

    /**
     * Sets the value of the linkTo property.
     *
     * @param value
     *     allowed object is
     *     {@link LinkTo }
     *    
     */
    public void setLinkTo(LinkTo value) {
        this.linkTo = value;
    }

    /**
     * Gets the value of the structureValues property.
     *
     * <p>
     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a <CODE>set</CODE> method for the structureValues property.
     *
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getStructureValues().add(newItem);
     * </pre>
     *
     *
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link StructureValue }
     *
     *
     */
    public List<StructureValue> getStructureValues() {
        if (structureValues == null) {
            structureValues = new ArrayList<StructureValue>();
        }
        return this.structureValues;
    }

    /**
     * Gets the value of the index property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *    
     */
    public String getIndex() {
        return index;
    }

    /**
     * Sets the value of the index property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *    
     */
    public void setIndex(String value) {
        this.index = value;
    }

    /**
     * Gets the value of the name property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *    
     */
    public String getName() {
        return name;
    }

    /**
     * Sets the value of the name property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *    
     */
    public void setName(String value) {
        this.name = value;
    }

    /**
     * Gets the value of the value property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *    
     */
    public String getValue() {
        return value;
    }

    /**
     * Sets the value of the value property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *    
     */
    public void setValue(String value) {
        this.value = value;
    }

    /**
     * Gets the value of the valueId property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *    
     */
    public Integer getValueId() {
        return valueId;
    }

    /**
     * Sets the value of the valueId property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *    
     */
    public void setValueId(Integer value) {
        this.valueId = value;
    }

    /**
     * Sets the value of the structureValues property.
     *
     * @param structureValues
     *     allowed object is
     *     {@link StructureValue }
     *    
     */
    public void setStructureValues(List<StructureValue> structureValues) {
        this.structureValues = structureValues;
    }

    public String toString() {
        final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
        final StringBuilder buffer = new StringBuilder();
        append(null, buffer, strategy);
        return buffer.toString();
    }

    public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
        strategy.appendStart(locator, this, buffer);
        appendFields(locator, buffer, strategy);
        strategy.appendEnd(locator, this, buffer);
        return buffer;
    }

    public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
        {
            LinkTo theLinkTo;
            theLinkTo = this.getLinkTo();
            strategy.appendField(locator, this, "linkTo", buffer, theLinkTo);
        }
        {
            List<StructureValue> theStructureValues;
            theStructureValues = (((this.structureValues!= null)&&(!this.structureValues.isEmpty()))?this.getStructureValues():null);
            strategy.appendField(locator, this, "structureValues", buffer, theStructureValues);
        }
        {
            String theIndex;
            theIndex = this.getIndex();
            strategy.appendField(locator, this, "index", buffer, theIndex);
        }
        {
            String theName;
            theName = this.getName();
            strategy.appendField(locator, this, "name", buffer, theName);
        }
        {
            String theValue;
            theValue = this.getValue();
            strategy.appendField(locator, this, "value", buffer, theValue);
        }
        {
            Integer theValueId;
            theValueId = this.getValueId();
            strategy.appendField(locator, this, "valueId", buffer, theValueId);
        }
        return buffer;
    }

    public Object clone() {
        return copyTo(createNewInstance());
    }

    public Object copyTo(Object target) {
        final CopyStrategy strategy = JAXBCopyStrategy.INSTANCE;
        return copyTo(null, target, strategy);
    }

    public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) {
        final Object draftCopy = ((target == null)?createNewInstance():target);
        if (draftCopy instanceof StructureMemberValue) {
            final StructureMemberValue copy = ((StructureMemberValue) draftCopy);
            if (this.linkTo!= null) {
                LinkTo sourceLinkTo;
                sourceLinkTo = this.getLinkTo();
                LinkTo copyLinkTo = ((LinkTo) strategy.copy(LocatorUtils.property(locator, "linkTo", sourceLinkTo), sourceLinkTo));
                copy.setLinkTo(copyLinkTo);
            } else {
                copy.linkTo = null;
            }
            if ((this.structureValues!= null)&&(!this.structureValues.isEmpty())) {
                List<StructureValue> sourceStructureValues;
                sourceStructureValues = (((this.structureValues!= null)&&(!this.structureValues.isEmpty()))?this.getStructureValues():null);
                @SuppressWarnings("unchecked")
                List<StructureValue> copyStructureValues = ((List<StructureValue> ) strategy.copy(LocatorUtils.property(locator, "structureValues", sourceStructureValues), sourceStructureValues));
                copy.setStructureValues(copyStructureValues);
            } else {
                copy.structureValues = null;
            }
            if (this.index!= null) {
                String sourceIndex;
                sourceIndex = this.getIndex();
                String copyIndex = ((String) strategy.copy(LocatorUtils.property(locator, "index", sourceIndex), sourceIndex));
                copy.setIndex(copyIndex);
            } else {
                copy.index = null;
            }
            if (this.name!= null) {
                String sourceName;
                sourceName = this.getName();
                String copyName = ((String) strategy.copy(LocatorUtils.property(locator, "name", sourceName), sourceName));
                copy.setName(copyName);
            } else {
                copy.name = null;
            }
            if (this.value!= null) {
                String sourceValue;
                sourceValue = this.getValue();
                String copyValue = ((String) strategy.copy(LocatorUtils.property(locator, "value", sourceValue), sourceValue));
                copy.setValue(copyValue);
            } else {
                copy.value = null;
            }
            if (this.valueId!= null) {
                Integer sourceValueId;
                sourceValueId = this.getValueId();
                Integer copyValueId = ((Integer) strategy.copy(LocatorUtils.property(locator, "valueId", sourceValueId), sourceValueId));
                copy.setValueId(copyValueId);
            } else {
                copy.valueId = null;
            }
        }
        return draftCopy;
    }

    public Object createNewInstance() {
        return new StructureMemberValue();
    }

    public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
        if (!(object instanceof StructureMemberValue)) {
            return false;
        }
        if (this == object) {
            return true;
        }
        final StructureMemberValue that = ((StructureMemberValue) object);
        {
            LinkTo lhsLinkTo;
            lhsLinkTo = this.getLinkTo();
            LinkTo rhsLinkTo;
            rhsLinkTo = that.getLinkTo();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "linkTo", lhsLinkTo), LocatorUtils.property(thatLocator, "linkTo", rhsLinkTo), lhsLinkTo, rhsLinkTo)) {
                return false;
            }
        }
        {
            List<StructureValue> lhsStructureValues;
            lhsStructureValues = (((this.structureValues!= null)&&(!this.structureValues.isEmpty()))?this.getStructureValues():null);
            List<StructureValue> rhsStructureValues;
            rhsStructureValues = (((that.structureValues!= null)&&(!that.structureValues.isEmpty()))?that.getStructureValues():null);
            if (!strategy.equals(LocatorUtils.property(thisLocator, "structureValues", lhsStructureValues), LocatorUtils.property(thatLocator, "structureValues", rhsStructureValues), lhsStructureValues, rhsStructureValues)) {
                return false;
            }
        }
        {
            String lhsIndex;
            lhsIndex = this.getIndex();
            String rhsIndex;
            rhsIndex = that.getIndex();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "index", lhsIndex), LocatorUtils.property(thatLocator, "index", rhsIndex), lhsIndex, rhsIndex)) {
                return false;
            }
        }
        {
            String lhsName;
            lhsName = this.getName();
            String rhsName;
            rhsName = that.getName();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "name", lhsName), LocatorUtils.property(thatLocator, "name", rhsName), lhsName, rhsName)) {
                return false;
            }
        }
        {
            String lhsValue;
            lhsValue = this.getValue();
            String rhsValue;
            rhsValue = that.getValue();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "value", lhsValue), LocatorUtils.property(thatLocator, "value", rhsValue), lhsValue, rhsValue)) {
                return false;
            }
        }
        {
            Integer lhsValueId;
            lhsValueId = this.getValueId();
            Integer rhsValueId;
            rhsValueId = that.getValueId();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "valueId", lhsValueId), LocatorUtils.property(thatLocator, "valueId", rhsValueId), lhsValueId, rhsValueId)) {
                return false;
            }
        }
        return true;
    }

    public boolean equals(Object object) {
        final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
        return equals(null, null, object, strategy);
    }

}
TOP

Related Classes of com.cisco.oss.foundation.configuration.xml.jaxb.StructureMemberValue

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.