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

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

//
// 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 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.XmlType;
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 Parameter complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="Parameter">
*   &lt;complexContent>
*     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
*       &lt;choice>
*         &lt;sequence>
*           &lt;element name="StructureDefinition" type="{}StructureDefinition"/>
*           &lt;element name="Value" type="{}ParameterValue" minOccurs="0"/>
*           &lt;element name="DefaultValue" type="{}ParameterValue" minOccurs="0"/>
*           &lt;element name="EnabledBy" type="{}EnabledBy" minOccurs="0"/>
*           &lt;element name="DiscoveredBy" type="{}DiscoveredBy" minOccurs="0"/>
*         &lt;/sequence>
*         &lt;sequence>
*           &lt;element name="Value" type="{}ParameterValue" minOccurs="0"/>
*           &lt;element name="DefaultValue" type="{}ParameterValue" minOccurs="0"/>
*           &lt;element name="Range" type="{}ParameterRange" minOccurs="0"/>
*           &lt;element name="EnabledBy" type="{}EnabledBy" minOccurs="0"/>
*           &lt;element name="DiscoveredBy" type="{}DiscoveredBy" minOccurs="0"/>
*         &lt;/sequence>
*       &lt;/choice>
*       &lt;attribute name="paramId" 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="type" use="required" type="{}ParameterKind" />
*       &lt;attribute name="instantiationLevelId" type="{http://www.w3.org/2001/XMLSchema}string" />
*       &lt;attribute name="instantiationLevelName" type="{http://www.w3.org/2001/XMLSchema}string" />
*       &lt;attribute name="instantiationLevel" type="{}HierarchyLevel" />
*       &lt;attribute name="defaultInstantiationLevelId" type="{http://www.w3.org/2001/XMLSchema}string" />
*       &lt;attribute name="description" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
*       &lt;attribute name="isArray" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
*       &lt;attribute name="mergeOverrides" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
*       &lt;attribute name="required" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
*       &lt;attribute name="hidden" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
*       &lt;attribute name="readOnly" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
*       &lt;attribute name="advanced" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
*       &lt;attribute name="requiresRestart" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
*       &lt;attribute name="unit" type="{http://www.w3.org/2001/XMLSchema}string" />
*       &lt;attribute name="base" type="{http://www.w3.org/2001/XMLSchema}string" />
*     &lt;/restriction>
*   &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Parameter", propOrder = {
    "structureDefinition",
    "value",
    "defaultValue",
    "range",
    "enabledBy",
    "discoveredBy"
})
public class Parameter
    implements Cloneable, CopyTo, Equals, ToString
{

    @XmlElement(name = "StructureDefinition")
    protected StructureDefinition structureDefinition;
    @XmlElement(name = "Value")
    protected ParameterValue value;
    @XmlElement(name = "DefaultValue")
    protected ParameterValue defaultValue;
    @XmlElement(name = "Range")
    protected ParameterRange range;
    @XmlElement(name = "EnabledBy")
    protected EnabledBy enabledBy;
    @XmlElement(name = "DiscoveredBy")
    protected DiscoveredBy discoveredBy;
    @XmlAttribute(name = "paramId")
    protected String paramId;
    @XmlAttribute(name = "name", required = true)
    protected String name;
    @XmlAttribute(name = "type", required = true)
    protected ParameterKind type;
    @XmlAttribute(name = "instantiationLevelId")
    protected String instantiationLevelId;
    @XmlAttribute(name = "instantiationLevelName")
    protected String instantiationLevelName;
    @XmlAttribute(name = "instantiationLevel")
    protected HierarchyLevel instantiationLevel;
    @XmlAttribute(name = "defaultInstantiationLevelId")
    protected String defaultInstantiationLevelId;
    @XmlAttribute(name = "description", required = true)
    protected String description;
    @XmlAttribute(name = "isArray")
    protected Boolean isArray;
    @XmlAttribute(name = "mergeOverrides")
    protected Boolean mergeOverrides;
    @XmlAttribute(name = "required")
    protected Boolean required;
    @XmlAttribute(name = "hidden")
    protected Boolean hidden;
    @XmlAttribute(name = "readOnly")
    protected Boolean readOnly;
    @XmlAttribute(name = "advanced")
    protected Boolean advanced;
    @XmlAttribute(name = "requiresRestart")
    protected Boolean requiresRestart;
    @XmlAttribute(name = "unit")
    protected String unit;
    @XmlAttribute(name = "base")
    protected String base;

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * Sets the value of the paramId property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *    
     */
    public void setParamId(String value) {
        this.paramId = 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 type property.
     *
     * @return
     *     possible object is
     *     {@link ParameterKind }
     *    
     */
    public ParameterKind getType() {
        return type;
    }

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

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

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

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

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

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

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

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

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

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

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

    /**
     * Gets the value of the isArray property.
     *
     * @return
     *     possible object is
     *     {@link Boolean }
     *    
     */
    public boolean isIsArray() {
        if (isArray == null) {
            return false;
        } else {
            return isArray;
        }
    }

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

    /**
     * Gets the value of the mergeOverrides property.
     *
     * @return
     *     possible object is
     *     {@link Boolean }
     *    
     */
    public boolean isMergeOverrides() {
        if (mergeOverrides == null) {
            return false;
        } else {
            return mergeOverrides;
        }
    }

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

    /**
     * Gets the value of the required property.
     *
     * @return
     *     possible object is
     *     {@link Boolean }
     *    
     */
    public boolean isRequired() {
        if (required == null) {
            return true;
        } else {
            return required;
        }
    }

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

    /**
     * Gets the value of the hidden property.
     *
     * @return
     *     possible object is
     *     {@link Boolean }
     *    
     */
    public boolean isHidden() {
        if (hidden == null) {
            return false;
        } else {
            return hidden;
        }
    }

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

    /**
     * Gets the value of the readOnly property.
     *
     * @return
     *     possible object is
     *     {@link Boolean }
     *    
     */
    public boolean isReadOnly() {
        if (readOnly == null) {
            return false;
        } else {
            return readOnly;
        }
    }

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

    /**
     * Gets the value of the advanced property.
     *
     * @return
     *     possible object is
     *     {@link Boolean }
     *    
     */
    public boolean isAdvanced() {
        if (advanced == null) {
            return false;
        } else {
            return advanced;
        }
    }

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

    /**
     * Gets the value of the requiresRestart property.
     *
     * @return
     *     possible object is
     *     {@link Boolean }
     *    
     */
    public boolean isRequiresRestart() {
        if (requiresRestart == null) {
            return true;
        } else {
            return requiresRestart;
        }
    }

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

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

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

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

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

    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) {
        {
            StructureDefinition theStructureDefinition;
            theStructureDefinition = this.getStructureDefinition();
            strategy.appendField(locator, this, "structureDefinition", buffer, theStructureDefinition);
        }
        {
            ParameterValue theValue;
            theValue = this.getValue();
            strategy.appendField(locator, this, "value", buffer, theValue);
        }
        {
            ParameterValue theDefaultValue;
            theDefaultValue = this.getDefaultValue();
            strategy.appendField(locator, this, "defaultValue", buffer, theDefaultValue);
        }
        {
            ParameterRange theRange;
            theRange = this.getRange();
            strategy.appendField(locator, this, "range", buffer, theRange);
        }
        {
            EnabledBy theEnabledBy;
            theEnabledBy = this.getEnabledBy();
            strategy.appendField(locator, this, "enabledBy", buffer, theEnabledBy);
        }
        {
            DiscoveredBy theDiscoveredBy;
            theDiscoveredBy = this.getDiscoveredBy();
            strategy.appendField(locator, this, "discoveredBy", buffer, theDiscoveredBy);
        }
        {
            String theParamId;
            theParamId = this.getParamId();
            strategy.appendField(locator, this, "paramId", buffer, theParamId);
        }
        {
            String theName;
            theName = this.getName();
            strategy.appendField(locator, this, "name", buffer, theName);
        }
        {
            ParameterKind theType;
            theType = this.getType();
            strategy.appendField(locator, this, "type", buffer, theType);
        }
        {
            String theInstantiationLevelId;
            theInstantiationLevelId = this.getInstantiationLevelId();
            strategy.appendField(locator, this, "instantiationLevelId", buffer, theInstantiationLevelId);
        }
        {
            String theInstantiationLevelName;
            theInstantiationLevelName = this.getInstantiationLevelName();
            strategy.appendField(locator, this, "instantiationLevelName", buffer, theInstantiationLevelName);
        }
        {
            HierarchyLevel theInstantiationLevel;
            theInstantiationLevel = this.getInstantiationLevel();
            strategy.appendField(locator, this, "instantiationLevel", buffer, theInstantiationLevel);
        }
        {
            String theDefaultInstantiationLevelId;
            theDefaultInstantiationLevelId = this.getDefaultInstantiationLevelId();
            strategy.appendField(locator, this, "defaultInstantiationLevelId", buffer, theDefaultInstantiationLevelId);
        }
        {
            String theDescription;
            theDescription = this.getDescription();
            strategy.appendField(locator, this, "description", buffer, theDescription);
        }
        {
            boolean theIsArray;
            theIsArray = ((this.isArray!= null)?this.isIsArray():false);
            strategy.appendField(locator, this, "isArray", buffer, theIsArray);
        }
        {
            boolean theMergeOverrides;
            theMergeOverrides = ((this.mergeOverrides!= null)?this.isMergeOverrides():false);
            strategy.appendField(locator, this, "mergeOverrides", buffer, theMergeOverrides);
        }
        {
            boolean theRequired;
            theRequired = ((this.required!= null)?this.isRequired():false);
            strategy.appendField(locator, this, "required", buffer, theRequired);
        }
        {
            boolean theHidden;
            theHidden = ((this.hidden!= null)?this.isHidden():false);
            strategy.appendField(locator, this, "hidden", buffer, theHidden);
        }
        {
            boolean theReadOnly;
            theReadOnly = ((this.readOnly!= null)?this.isReadOnly():false);
            strategy.appendField(locator, this, "readOnly", buffer, theReadOnly);
        }
        {
            boolean theAdvanced;
            theAdvanced = ((this.advanced!= null)?this.isAdvanced():false);
            strategy.appendField(locator, this, "advanced", buffer, theAdvanced);
        }
        {
            boolean theRequiresRestart;
            theRequiresRestart = ((this.requiresRestart!= null)?this.isRequiresRestart():false);
            strategy.appendField(locator, this, "requiresRestart", buffer, theRequiresRestart);
        }
        {
            String theUnit;
            theUnit = this.getUnit();
            strategy.appendField(locator, this, "unit", buffer, theUnit);
        }
        {
            String theBase;
            theBase = this.getBase();
            strategy.appendField(locator, this, "base", buffer, theBase);
        }
        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 Parameter) {
            final Parameter copy = ((Parameter) draftCopy);
            if (this.structureDefinition!= null) {
                StructureDefinition sourceStructureDefinition;
                sourceStructureDefinition = this.getStructureDefinition();
                StructureDefinition copyStructureDefinition = ((StructureDefinition) strategy.copy(LocatorUtils.property(locator, "structureDefinition", sourceStructureDefinition), sourceStructureDefinition));
                copy.setStructureDefinition(copyStructureDefinition);
            } else {
                copy.structureDefinition = null;
            }
            if (this.value!= null) {
                ParameterValue sourceValue;
                sourceValue = this.getValue();
                ParameterValue copyValue = ((ParameterValue) strategy.copy(LocatorUtils.property(locator, "value", sourceValue), sourceValue));
                copy.setValue(copyValue);
            } else {
                copy.value = null;
            }
            if (this.defaultValue!= null) {
                ParameterValue sourceDefaultValue;
                sourceDefaultValue = this.getDefaultValue();
                ParameterValue copyDefaultValue = ((ParameterValue) strategy.copy(LocatorUtils.property(locator, "defaultValue", sourceDefaultValue), sourceDefaultValue));
                copy.setDefaultValue(copyDefaultValue);
            } else {
                copy.defaultValue = null;
            }
            if (this.range!= null) {
                ParameterRange sourceRange;
                sourceRange = this.getRange();
                ParameterRange copyRange = ((ParameterRange) strategy.copy(LocatorUtils.property(locator, "range", sourceRange), sourceRange));
                copy.setRange(copyRange);
            } else {
                copy.range = null;
            }
            if (this.enabledBy!= null) {
                EnabledBy sourceEnabledBy;
                sourceEnabledBy = this.getEnabledBy();
                EnabledBy copyEnabledBy = ((EnabledBy) strategy.copy(LocatorUtils.property(locator, "enabledBy", sourceEnabledBy), sourceEnabledBy));
                copy.setEnabledBy(copyEnabledBy);
            } else {
                copy.enabledBy = null;
            }
            if (this.discoveredBy!= null) {
                DiscoveredBy sourceDiscoveredBy;
                sourceDiscoveredBy = this.getDiscoveredBy();
                DiscoveredBy copyDiscoveredBy = ((DiscoveredBy) strategy.copy(LocatorUtils.property(locator, "discoveredBy", sourceDiscoveredBy), sourceDiscoveredBy));
                copy.setDiscoveredBy(copyDiscoveredBy);
            } else {
                copy.discoveredBy = null;
            }
            if (this.paramId!= null) {
                String sourceParamId;
                sourceParamId = this.getParamId();
                String copyParamId = ((String) strategy.copy(LocatorUtils.property(locator, "paramId", sourceParamId), sourceParamId));
                copy.setParamId(copyParamId);
            } else {
                copy.paramId = 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.type!= null) {
                ParameterKind sourceType;
                sourceType = this.getType();
                ParameterKind copyType = ((ParameterKind) strategy.copy(LocatorUtils.property(locator, "type", sourceType), sourceType));
                copy.setType(copyType);
            } else {
                copy.type = null;
            }
            if (this.instantiationLevelId!= null) {
                String sourceInstantiationLevelId;
                sourceInstantiationLevelId = this.getInstantiationLevelId();
                String copyInstantiationLevelId = ((String) strategy.copy(LocatorUtils.property(locator, "instantiationLevelId", sourceInstantiationLevelId), sourceInstantiationLevelId));
                copy.setInstantiationLevelId(copyInstantiationLevelId);
            } else {
                copy.instantiationLevelId = null;
            }
            if (this.instantiationLevelName!= null) {
                String sourceInstantiationLevelName;
                sourceInstantiationLevelName = this.getInstantiationLevelName();
                String copyInstantiationLevelName = ((String) strategy.copy(LocatorUtils.property(locator, "instantiationLevelName", sourceInstantiationLevelName), sourceInstantiationLevelName));
                copy.setInstantiationLevelName(copyInstantiationLevelName);
            } else {
                copy.instantiationLevelName = null;
            }
            if (this.instantiationLevel!= null) {
                HierarchyLevel sourceInstantiationLevel;
                sourceInstantiationLevel = this.getInstantiationLevel();
                HierarchyLevel copyInstantiationLevel = ((HierarchyLevel) strategy.copy(LocatorUtils.property(locator, "instantiationLevel", sourceInstantiationLevel), sourceInstantiationLevel));
                copy.setInstantiationLevel(copyInstantiationLevel);
            } else {
                copy.instantiationLevel = null;
            }
            if (this.defaultInstantiationLevelId!= null) {
                String sourceDefaultInstantiationLevelId;
                sourceDefaultInstantiationLevelId = this.getDefaultInstantiationLevelId();
                String copyDefaultInstantiationLevelId = ((String) strategy.copy(LocatorUtils.property(locator, "defaultInstantiationLevelId", sourceDefaultInstantiationLevelId), sourceDefaultInstantiationLevelId));
                copy.setDefaultInstantiationLevelId(copyDefaultInstantiationLevelId);
            } else {
                copy.defaultInstantiationLevelId = null;
            }
            if (this.description!= null) {
                String sourceDescription;
                sourceDescription = this.getDescription();
                String copyDescription = ((String) strategy.copy(LocatorUtils.property(locator, "description", sourceDescription), sourceDescription));
                copy.setDescription(copyDescription);
            } else {
                copy.description = null;
            }
            if (this.isArray!= null) {
                boolean sourceIsArray;
                sourceIsArray = ((this.isArray!= null)?this.isIsArray():false);
                boolean copyIsArray = strategy.copy(LocatorUtils.property(locator, "isArray", sourceIsArray), sourceIsArray);
                copy.setIsArray(copyIsArray);
            } else {
                copy.isArray = null;
            }
            if (this.mergeOverrides!= null) {
                boolean sourceMergeOverrides;
                sourceMergeOverrides = ((this.mergeOverrides!= null)?this.isMergeOverrides():false);
                boolean copyMergeOverrides = strategy.copy(LocatorUtils.property(locator, "mergeOverrides", sourceMergeOverrides), sourceMergeOverrides);
                copy.setMergeOverrides(copyMergeOverrides);
            } else {
                copy.mergeOverrides = null;
            }
            if (this.required!= null) {
                boolean sourceRequired;
                sourceRequired = ((this.required!= null)?this.isRequired():false);
                boolean copyRequired = strategy.copy(LocatorUtils.property(locator, "required", sourceRequired), sourceRequired);
                copy.setRequired(copyRequired);
            } else {
                copy.required = null;
            }
            if (this.hidden!= null) {
                boolean sourceHidden;
                sourceHidden = ((this.hidden!= null)?this.isHidden():false);
                boolean copyHidden = strategy.copy(LocatorUtils.property(locator, "hidden", sourceHidden), sourceHidden);
                copy.setHidden(copyHidden);
            } else {
                copy.hidden = null;
            }
            if (this.readOnly!= null) {
                boolean sourceReadOnly;
                sourceReadOnly = ((this.readOnly!= null)?this.isReadOnly():false);
                boolean copyReadOnly = strategy.copy(LocatorUtils.property(locator, "readOnly", sourceReadOnly), sourceReadOnly);
                copy.setReadOnly(copyReadOnly);
            } else {
                copy.readOnly = null;
            }
            if (this.advanced!= null) {
                boolean sourceAdvanced;
                sourceAdvanced = ((this.advanced!= null)?this.isAdvanced():false);
                boolean copyAdvanced = strategy.copy(LocatorUtils.property(locator, "advanced", sourceAdvanced), sourceAdvanced);
                copy.setAdvanced(copyAdvanced);
            } else {
                copy.advanced = null;
            }
            if (this.requiresRestart!= null) {
                boolean sourceRequiresRestart;
                sourceRequiresRestart = ((this.requiresRestart!= null)?this.isRequiresRestart():false);
                boolean copyRequiresRestart = strategy.copy(LocatorUtils.property(locator, "requiresRestart", sourceRequiresRestart), sourceRequiresRestart);
                copy.setRequiresRestart(copyRequiresRestart);
            } else {
                copy.requiresRestart = null;
            }
            if (this.unit!= null) {
                String sourceUnit;
                sourceUnit = this.getUnit();
                String copyUnit = ((String) strategy.copy(LocatorUtils.property(locator, "unit", sourceUnit), sourceUnit));
                copy.setUnit(copyUnit);
            } else {
                copy.unit = null;
            }
            if (this.base!= null) {
                String sourceBase;
                sourceBase = this.getBase();
                String copyBase = ((String) strategy.copy(LocatorUtils.property(locator, "base", sourceBase), sourceBase));
                copy.setBase(copyBase);
            } else {
                copy.base = null;
            }
        }
        return draftCopy;
    }

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

    public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
        if (!(object instanceof Parameter)) {
            return false;
        }
        if (this == object) {
            return true;
        }
        final Parameter that = ((Parameter) object);
        {
            StructureDefinition lhsStructureDefinition;
            lhsStructureDefinition = this.getStructureDefinition();
            StructureDefinition rhsStructureDefinition;
            rhsStructureDefinition = that.getStructureDefinition();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "structureDefinition", lhsStructureDefinition), LocatorUtils.property(thatLocator, "structureDefinition", rhsStructureDefinition), lhsStructureDefinition, rhsStructureDefinition)) {
                return false;
            }
        }
        {
            ParameterValue lhsValue;
            lhsValue = this.getValue();
            ParameterValue rhsValue;
            rhsValue = that.getValue();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "value", lhsValue), LocatorUtils.property(thatLocator, "value", rhsValue), lhsValue, rhsValue)) {
                return false;
            }
        }
        {
            ParameterValue lhsDefaultValue;
            lhsDefaultValue = this.getDefaultValue();
            ParameterValue rhsDefaultValue;
            rhsDefaultValue = that.getDefaultValue();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "defaultValue", lhsDefaultValue), LocatorUtils.property(thatLocator, "defaultValue", rhsDefaultValue), lhsDefaultValue, rhsDefaultValue)) {
                return false;
            }
        }
        {
            ParameterRange lhsRange;
            lhsRange = this.getRange();
            ParameterRange rhsRange;
            rhsRange = that.getRange();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "range", lhsRange), LocatorUtils.property(thatLocator, "range", rhsRange), lhsRange, rhsRange)) {
                return false;
            }
        }
        {
            EnabledBy lhsEnabledBy;
            lhsEnabledBy = this.getEnabledBy();
            EnabledBy rhsEnabledBy;
            rhsEnabledBy = that.getEnabledBy();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "enabledBy", lhsEnabledBy), LocatorUtils.property(thatLocator, "enabledBy", rhsEnabledBy), lhsEnabledBy, rhsEnabledBy)) {
                return false;
            }
        }
        {
            DiscoveredBy lhsDiscoveredBy;
            lhsDiscoveredBy = this.getDiscoveredBy();
            DiscoveredBy rhsDiscoveredBy;
            rhsDiscoveredBy = that.getDiscoveredBy();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "discoveredBy", lhsDiscoveredBy), LocatorUtils.property(thatLocator, "discoveredBy", rhsDiscoveredBy), lhsDiscoveredBy, rhsDiscoveredBy)) {
                return false;
            }
        }
        {
            String lhsParamId;
            lhsParamId = this.getParamId();
            String rhsParamId;
            rhsParamId = that.getParamId();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "paramId", lhsParamId), LocatorUtils.property(thatLocator, "paramId", rhsParamId), lhsParamId, rhsParamId)) {
                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;
            }
        }
        {
            ParameterKind lhsType;
            lhsType = this.getType();
            ParameterKind rhsType;
            rhsType = that.getType();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType)) {
                return false;
            }
        }
        {
            String lhsInstantiationLevelId;
            lhsInstantiationLevelId = this.getInstantiationLevelId();
            String rhsInstantiationLevelId;
            rhsInstantiationLevelId = that.getInstantiationLevelId();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "instantiationLevelId", lhsInstantiationLevelId), LocatorUtils.property(thatLocator, "instantiationLevelId", rhsInstantiationLevelId), lhsInstantiationLevelId, rhsInstantiationLevelId)) {
                return false;
            }
        }
        {
            String lhsInstantiationLevelName;
            lhsInstantiationLevelName = this.getInstantiationLevelName();
            String rhsInstantiationLevelName;
            rhsInstantiationLevelName = that.getInstantiationLevelName();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "instantiationLevelName", lhsInstantiationLevelName), LocatorUtils.property(thatLocator, "instantiationLevelName", rhsInstantiationLevelName), lhsInstantiationLevelName, rhsInstantiationLevelName)) {
                return false;
            }
        }
        {
            HierarchyLevel lhsInstantiationLevel;
            lhsInstantiationLevel = this.getInstantiationLevel();
            HierarchyLevel rhsInstantiationLevel;
            rhsInstantiationLevel = that.getInstantiationLevel();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "instantiationLevel", lhsInstantiationLevel), LocatorUtils.property(thatLocator, "instantiationLevel", rhsInstantiationLevel), lhsInstantiationLevel, rhsInstantiationLevel)) {
                return false;
            }
        }
        {
            String lhsDefaultInstantiationLevelId;
            lhsDefaultInstantiationLevelId = this.getDefaultInstantiationLevelId();
            String rhsDefaultInstantiationLevelId;
            rhsDefaultInstantiationLevelId = that.getDefaultInstantiationLevelId();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "defaultInstantiationLevelId", lhsDefaultInstantiationLevelId), LocatorUtils.property(thatLocator, "defaultInstantiationLevelId", rhsDefaultInstantiationLevelId), lhsDefaultInstantiationLevelId, rhsDefaultInstantiationLevelId)) {
                return false;
            }
        }
        {
            String lhsDescription;
            lhsDescription = this.getDescription();
            String rhsDescription;
            rhsDescription = that.getDescription();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "description", lhsDescription), LocatorUtils.property(thatLocator, "description", rhsDescription), lhsDescription, rhsDescription)) {
                return false;
            }
        }
        {
            boolean lhsIsArray;
            lhsIsArray = ((this.isArray!= null)?this.isIsArray():false);
            boolean rhsIsArray;
            rhsIsArray = ((that.isArray!= null)?that.isIsArray():false);
            if (!strategy.equals(LocatorUtils.property(thisLocator, "isArray", lhsIsArray), LocatorUtils.property(thatLocator, "isArray", rhsIsArray), lhsIsArray, rhsIsArray)) {
                return false;
            }
        }
        {
            boolean lhsMergeOverrides;
            lhsMergeOverrides = ((this.mergeOverrides!= null)?this.isMergeOverrides():false);
            boolean rhsMergeOverrides;
            rhsMergeOverrides = ((that.mergeOverrides!= null)?that.isMergeOverrides():false);
            if (!strategy.equals(LocatorUtils.property(thisLocator, "mergeOverrides", lhsMergeOverrides), LocatorUtils.property(thatLocator, "mergeOverrides", rhsMergeOverrides), lhsMergeOverrides, rhsMergeOverrides)) {
                return false;
            }
        }
        {
            boolean lhsRequired;
            lhsRequired = ((this.required!= null)?this.isRequired():false);
            boolean rhsRequired;
            rhsRequired = ((that.required!= null)?that.isRequired():false);
            if (!strategy.equals(LocatorUtils.property(thisLocator, "required", lhsRequired), LocatorUtils.property(thatLocator, "required", rhsRequired), lhsRequired, rhsRequired)) {
                return false;
            }
        }
        {
            boolean lhsHidden;
            lhsHidden = ((this.hidden!= null)?this.isHidden():false);
            boolean rhsHidden;
            rhsHidden = ((that.hidden!= null)?that.isHidden():false);
            if (!strategy.equals(LocatorUtils.property(thisLocator, "hidden", lhsHidden), LocatorUtils.property(thatLocator, "hidden", rhsHidden), lhsHidden, rhsHidden)) {
                return false;
            }
        }
        {
            boolean lhsReadOnly;
            lhsReadOnly = ((this.readOnly!= null)?this.isReadOnly():false);
            boolean rhsReadOnly;
            rhsReadOnly = ((that.readOnly!= null)?that.isReadOnly():false);
            if (!strategy.equals(LocatorUtils.property(thisLocator, "readOnly", lhsReadOnly), LocatorUtils.property(thatLocator, "readOnly", rhsReadOnly), lhsReadOnly, rhsReadOnly)) {
                return false;
            }
        }
        {
            boolean lhsAdvanced;
            lhsAdvanced = ((this.advanced!= null)?this.isAdvanced():false);
            boolean rhsAdvanced;
            rhsAdvanced = ((that.advanced!= null)?that.isAdvanced():false);
            if (!strategy.equals(LocatorUtils.property(thisLocator, "advanced", lhsAdvanced), LocatorUtils.property(thatLocator, "advanced", rhsAdvanced), lhsAdvanced, rhsAdvanced)) {
                return false;
            }
        }
        {
            boolean lhsRequiresRestart;
            lhsRequiresRestart = ((this.requiresRestart!= null)?this.isRequiresRestart():false);
            boolean rhsRequiresRestart;
            rhsRequiresRestart = ((that.requiresRestart!= null)?that.isRequiresRestart():false);
            if (!strategy.equals(LocatorUtils.property(thisLocator, "requiresRestart", lhsRequiresRestart), LocatorUtils.property(thatLocator, "requiresRestart", rhsRequiresRestart), lhsRequiresRestart, rhsRequiresRestart)) {
                return false;
            }
        }
        {
            String lhsUnit;
            lhsUnit = this.getUnit();
            String rhsUnit;
            rhsUnit = that.getUnit();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "unit", lhsUnit), LocatorUtils.property(thatLocator, "unit", rhsUnit), lhsUnit, rhsUnit)) {
                return false;
            }
        }
        {
            String lhsBase;
            lhsBase = this.getBase();
            String rhsBase;
            rhsBase = that.getBase();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "base", lhsBase), LocatorUtils.property(thatLocator, "base", rhsBase), lhsBase, rhsBase)) {
                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.Parameter

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.