com.cisco.oss.foundation.configuration.xml.jaxb.PrimitiveValue Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of configuration-api Show documentation
Show all versions of configuration-api Show documentation
This project is the api library for configuration in the cisco vss foundation runtime
The newest version!
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2016.08.24 at 04:34: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.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;
/**
* Java class for PrimitiveValue complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="PrimitiveValue">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="LinkTo" type="{}LinkTo" minOccurs="0"/>
* </sequence>
* <attribute name="value" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="index" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="valueId" type="{http://www.w3.org/2001/XMLSchema}integer" />
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PrimitiveValue", propOrder = {
"linkTo"
})
public class PrimitiveValue
implements Cloneable, CopyTo, Equals, ToString
{
@XmlElement(name = "LinkTo")
protected LinkTo linkTo;
@XmlAttribute(name = "value", required = true)
protected String value;
@XmlAttribute(name = "index")
protected String index;
@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 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 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 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;
}
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);
}
{
String theValue;
theValue = this.getValue();
strategy.appendField(locator, this, "value", buffer, theValue);
}
{
String theIndex;
theIndex = this.getIndex();
strategy.appendField(locator, this, "index", buffer, theIndex);
}
{
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 PrimitiveValue) {
final PrimitiveValue copy = ((PrimitiveValue) 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.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.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.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 PrimitiveValue();
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof PrimitiveValue)) {
return false;
}
if (this == object) {
return true;
}
final PrimitiveValue that = ((PrimitiveValue) 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;
}
}
{
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;
}
}
{
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;
}
}
{
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);
}
}