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

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

//
// 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 Update complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="Update">
*   &lt;complexContent>
*     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
*       &lt;choice>
*         &lt;sequence>
*           &lt;element name="OldPrimitive" type="{}PrimitiveValue" maxOccurs="unbounded"/>
*           &lt;element name="NewPrimitive" type="{}PrimitiveValue" maxOccurs="unbounded"/>
*         &lt;/sequence>
*         &lt;sequence>
*           &lt;element name="OldStructure" type="{}StructureValue" maxOccurs="unbounded"/>
*           &lt;element name="NewStructure" type="{}StructureValue" maxOccurs="unbounded"/>
*         &lt;/sequence>
*       &lt;/choice>
*       &lt;attribute name="paramId" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
*       &lt;attribute name="levelInstanceId" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
*     &lt;/restriction>
*   &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Update", propOrder = {
    "oldStructures",
    "newStructures",
    "oldPrimitives",
    "newPrimitives"
})
public class Update
    implements Cloneable, CopyTo, Equals, ToString
{

    @XmlElement(name = "OldStructure")
    protected List<StructureValue> oldStructures;
    @XmlElement(name = "NewStructure")
    protected List<StructureValue> newStructures;
    @XmlElement(name = "OldPrimitive")
    protected List<PrimitiveValue> oldPrimitives;
    @XmlElement(name = "NewPrimitive")
    protected List<PrimitiveValue> newPrimitives;
    @XmlAttribute(name = "paramId", required = true)
    @XmlJavaTypeAdapter(Adapter1 .class)
    @XmlSchemaType(name = "integer")
    protected Integer paramId;
    @XmlAttribute(name = "levelInstanceId", required = true)
    @XmlJavaTypeAdapter(Adapter1 .class)
    @XmlSchemaType(name = "integer")
    protected Integer levelInstanceId;

    /**
     * Gets the value of the oldStructures 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 oldStructures property.
     *
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getOldStructures().add(newItem);
     * </pre>
     *
     *
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link StructureValue }
     *
     *
     */
    public List<StructureValue> getOldStructures() {
        if (oldStructures == null) {
            oldStructures = new ArrayList<StructureValue>();
        }
        return this.oldStructures;
    }

    /**
     * Gets the value of the newStructures 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 newStructures property.
     *
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getNewStructures().add(newItem);
     * </pre>
     *
     *
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link StructureValue }
     *
     *
     */
    public List<StructureValue> getNewStructures() {
        if (newStructures == null) {
            newStructures = new ArrayList<StructureValue>();
        }
        return this.newStructures;
    }

    /**
     * Gets the value of the oldPrimitives 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 oldPrimitives property.
     *
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getOldPrimitives().add(newItem);
     * </pre>
     *
     *
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link PrimitiveValue }
     *
     *
     */
    public List<PrimitiveValue> getOldPrimitives() {
        if (oldPrimitives == null) {
            oldPrimitives = new ArrayList<PrimitiveValue>();
        }
        return this.oldPrimitives;
    }

    /**
     * Gets the value of the newPrimitives 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 newPrimitives property.
     *
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getNewPrimitives().add(newItem);
     * </pre>
     *
     *
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link PrimitiveValue }
     *
     *
     */
    public List<PrimitiveValue> getNewPrimitives() {
        if (newPrimitives == null) {
            newPrimitives = new ArrayList<PrimitiveValue>();
        }
        return this.newPrimitives;
    }

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

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

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

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

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

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

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

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

    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) {
        {
            List<StructureValue> theOldStructures;
            theOldStructures = (((this.oldStructures!= null)&&(!this.oldStructures.isEmpty()))?this.getOldStructures():null);
            strategy.appendField(locator, this, "oldStructures", buffer, theOldStructures);
        }
        {
            List<StructureValue> theNewStructures;
            theNewStructures = (((this.newStructures!= null)&&(!this.newStructures.isEmpty()))?this.getNewStructures():null);
            strategy.appendField(locator, this, "newStructures", buffer, theNewStructures);
        }
        {
            List<PrimitiveValue> theOldPrimitives;
            theOldPrimitives = (((this.oldPrimitives!= null)&&(!this.oldPrimitives.isEmpty()))?this.getOldPrimitives():null);
            strategy.appendField(locator, this, "oldPrimitives", buffer, theOldPrimitives);
        }
        {
            List<PrimitiveValue> theNewPrimitives;
            theNewPrimitives = (((this.newPrimitives!= null)&&(!this.newPrimitives.isEmpty()))?this.getNewPrimitives():null);
            strategy.appendField(locator, this, "newPrimitives", buffer, theNewPrimitives);
        }
        {
            Integer theParamId;
            theParamId = this.getParamId();
            strategy.appendField(locator, this, "paramId", buffer, theParamId);
        }
        {
            Integer theLevelInstanceId;
            theLevelInstanceId = this.getLevelInstanceId();
            strategy.appendField(locator, this, "levelInstanceId", buffer, theLevelInstanceId);
        }
        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 Update) {
            final Update copy = ((Update) draftCopy);
            if ((this.oldStructures!= null)&&(!this.oldStructures.isEmpty())) {
                List<StructureValue> sourceOldStructures;
                sourceOldStructures = (((this.oldStructures!= null)&&(!this.oldStructures.isEmpty()))?this.getOldStructures():null);
                @SuppressWarnings("unchecked")
                List<StructureValue> copyOldStructures = ((List<StructureValue> ) strategy.copy(LocatorUtils.property(locator, "oldStructures", sourceOldStructures), sourceOldStructures));
                copy.setOldStructures(copyOldStructures);
            } else {
                copy.oldStructures = null;
            }
            if ((this.newStructures!= null)&&(!this.newStructures.isEmpty())) {
                List<StructureValue> sourceNewStructures;
                sourceNewStructures = (((this.newStructures!= null)&&(!this.newStructures.isEmpty()))?this.getNewStructures():null);
                @SuppressWarnings("unchecked")
                List<StructureValue> copyNewStructures = ((List<StructureValue> ) strategy.copy(LocatorUtils.property(locator, "newStructures", sourceNewStructures), sourceNewStructures));
                copy.setNewStructures(copyNewStructures);
            } else {
                copy.newStructures = null;
            }
            if ((this.oldPrimitives!= null)&&(!this.oldPrimitives.isEmpty())) {
                List<PrimitiveValue> sourceOldPrimitives;
                sourceOldPrimitives = (((this.oldPrimitives!= null)&&(!this.oldPrimitives.isEmpty()))?this.getOldPrimitives():null);
                @SuppressWarnings("unchecked")
                List<PrimitiveValue> copyOldPrimitives = ((List<PrimitiveValue> ) strategy.copy(LocatorUtils.property(locator, "oldPrimitives", sourceOldPrimitives), sourceOldPrimitives));
                copy.setOldPrimitives(copyOldPrimitives);
            } else {
                copy.oldPrimitives = null;
            }
            if ((this.newPrimitives!= null)&&(!this.newPrimitives.isEmpty())) {
                List<PrimitiveValue> sourceNewPrimitives;
                sourceNewPrimitives = (((this.newPrimitives!= null)&&(!this.newPrimitives.isEmpty()))?this.getNewPrimitives():null);
                @SuppressWarnings("unchecked")
                List<PrimitiveValue> copyNewPrimitives = ((List<PrimitiveValue> ) strategy.copy(LocatorUtils.property(locator, "newPrimitives", sourceNewPrimitives), sourceNewPrimitives));
                copy.setNewPrimitives(copyNewPrimitives);
            } else {
                copy.newPrimitives = null;
            }
            if (this.paramId!= null) {
                Integer sourceParamId;
                sourceParamId = this.getParamId();
                Integer copyParamId = ((Integer) strategy.copy(LocatorUtils.property(locator, "paramId", sourceParamId), sourceParamId));
                copy.setParamId(copyParamId);
            } else {
                copy.paramId = null;
            }
            if (this.levelInstanceId!= null) {
                Integer sourceLevelInstanceId;
                sourceLevelInstanceId = this.getLevelInstanceId();
                Integer copyLevelInstanceId = ((Integer) strategy.copy(LocatorUtils.property(locator, "levelInstanceId", sourceLevelInstanceId), sourceLevelInstanceId));
                copy.setLevelInstanceId(copyLevelInstanceId);
            } else {
                copy.levelInstanceId = null;
            }
        }
        return draftCopy;
    }

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

    public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
        if (!(object instanceof Update)) {
            return false;
        }
        if (this == object) {
            return true;
        }
        final Update that = ((Update) object);
        {
            List<StructureValue> lhsOldStructures;
            lhsOldStructures = (((this.oldStructures!= null)&&(!this.oldStructures.isEmpty()))?this.getOldStructures():null);
            List<StructureValue> rhsOldStructures;
            rhsOldStructures = (((that.oldStructures!= null)&&(!that.oldStructures.isEmpty()))?that.getOldStructures():null);
            if (!strategy.equals(LocatorUtils.property(thisLocator, "oldStructures", lhsOldStructures), LocatorUtils.property(thatLocator, "oldStructures", rhsOldStructures), lhsOldStructures, rhsOldStructures)) {
                return false;
            }
        }
        {
            List<StructureValue> lhsNewStructures;
            lhsNewStructures = (((this.newStructures!= null)&&(!this.newStructures.isEmpty()))?this.getNewStructures():null);
            List<StructureValue> rhsNewStructures;
            rhsNewStructures = (((that.newStructures!= null)&&(!that.newStructures.isEmpty()))?that.getNewStructures():null);
            if (!strategy.equals(LocatorUtils.property(thisLocator, "newStructures", lhsNewStructures), LocatorUtils.property(thatLocator, "newStructures", rhsNewStructures), lhsNewStructures, rhsNewStructures)) {
                return false;
            }
        }
        {
            List<PrimitiveValue> lhsOldPrimitives;
            lhsOldPrimitives = (((this.oldPrimitives!= null)&&(!this.oldPrimitives.isEmpty()))?this.getOldPrimitives():null);
            List<PrimitiveValue> rhsOldPrimitives;
            rhsOldPrimitives = (((that.oldPrimitives!= null)&&(!that.oldPrimitives.isEmpty()))?that.getOldPrimitives():null);
            if (!strategy.equals(LocatorUtils.property(thisLocator, "oldPrimitives", lhsOldPrimitives), LocatorUtils.property(thatLocator, "oldPrimitives", rhsOldPrimitives), lhsOldPrimitives, rhsOldPrimitives)) {
                return false;
            }
        }
        {
            List<PrimitiveValue> lhsNewPrimitives;
            lhsNewPrimitives = (((this.newPrimitives!= null)&&(!this.newPrimitives.isEmpty()))?this.getNewPrimitives():null);
            List<PrimitiveValue> rhsNewPrimitives;
            rhsNewPrimitives = (((that.newPrimitives!= null)&&(!that.newPrimitives.isEmpty()))?that.getNewPrimitives():null);
            if (!strategy.equals(LocatorUtils.property(thisLocator, "newPrimitives", lhsNewPrimitives), LocatorUtils.property(thatLocator, "newPrimitives", rhsNewPrimitives), lhsNewPrimitives, rhsNewPrimitives)) {
                return false;
            }
        }
        {
            Integer lhsParamId;
            lhsParamId = this.getParamId();
            Integer rhsParamId;
            rhsParamId = that.getParamId();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "paramId", lhsParamId), LocatorUtils.property(thatLocator, "paramId", rhsParamId), lhsParamId, rhsParamId)) {
                return false;
            }
        }
        {
            Integer lhsLevelInstanceId;
            lhsLevelInstanceId = this.getLevelInstanceId();
            Integer rhsLevelInstanceId;
            rhsLevelInstanceId = that.getLevelInstanceId();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "levelInstanceId", lhsLevelInstanceId), LocatorUtils.property(thatLocator, "levelInstanceId", rhsLevelInstanceId), lhsLevelInstanceId, rhsLevelInstanceId)) {
                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.Update

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.