com.cisco.oss.foundation.configuration.xml.jaxb.Update Maven / Gradle / Ivy
Show all versions of configuration-api Show documentation
//
// 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 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;
/**
* Java class for Update complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Update">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <choice>
* <sequence>
* <element name="OldPrimitive" type="{}PrimitiveValue" maxOccurs="unbounded"/>
* <element name="NewPrimitive" type="{}PrimitiveValue" maxOccurs="unbounded"/>
* </sequence>
* <sequence>
* <element name="OldStructure" type="{}StructureValue" maxOccurs="unbounded"/>
* <element name="NewStructure" type="{}StructureValue" maxOccurs="unbounded"/>
* </sequence>
* </choice>
* <attribute name="paramId" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
* <attribute name="levelInstanceId" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Update", propOrder = {
"oldStructures",
"newStructures",
"oldPrimitives",
"newPrimitives"
})
public class Update
implements Cloneable, CopyTo, Equals, ToString
{
@XmlElement(name = "OldStructure")
protected List oldStructures;
@XmlElement(name = "NewStructure")
protected List newStructures;
@XmlElement(name = "OldPrimitive")
protected List oldPrimitives;
@XmlElement(name = "NewPrimitive")
protected List 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.
*
*
* 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 set
method for the oldStructures property.
*
*
* For example, to add a new item, do as follows:
*
* getOldStructures().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link StructureValue }
*
*
*/
public List getOldStructures() {
if (oldStructures == null) {
oldStructures = new ArrayList();
}
return this.oldStructures;
}
/**
* Gets the value of the newStructures property.
*
*
* 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 set
method for the newStructures property.
*
*
* For example, to add a new item, do as follows:
*
* getNewStructures().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link StructureValue }
*
*
*/
public List getNewStructures() {
if (newStructures == null) {
newStructures = new ArrayList();
}
return this.newStructures;
}
/**
* Gets the value of the oldPrimitives property.
*
*
* 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 set
method for the oldPrimitives property.
*
*
* For example, to add a new item, do as follows:
*
* getOldPrimitives().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link PrimitiveValue }
*
*
*/
public List getOldPrimitives() {
if (oldPrimitives == null) {
oldPrimitives = new ArrayList();
}
return this.oldPrimitives;
}
/**
* Gets the value of the newPrimitives property.
*
*
* 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 set
method for the newPrimitives property.
*
*
* For example, to add a new item, do as follows:
*
* getNewPrimitives().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link PrimitiveValue }
*
*
*/
public List getNewPrimitives() {
if (newPrimitives == null) {
newPrimitives = new ArrayList();
}
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 oldStructures) {
this.oldStructures = oldStructures;
}
/**
* Sets the value of the newStructures property.
*
* @param newStructures
* allowed object is
* {@link StructureValue }
*
*/
public void setNewStructures(List newStructures) {
this.newStructures = newStructures;
}
/**
* Sets the value of the oldPrimitives property.
*
* @param oldPrimitives
* allowed object is
* {@link PrimitiveValue }
*
*/
public void setOldPrimitives(List oldPrimitives) {
this.oldPrimitives = oldPrimitives;
}
/**
* Sets the value of the newPrimitives property.
*
* @param newPrimitives
* allowed object is
* {@link PrimitiveValue }
*
*/
public void setNewPrimitives(List 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 theOldStructures;
theOldStructures = (((this.oldStructures!= null)&&(!this.oldStructures.isEmpty()))?this.getOldStructures():null);
strategy.appendField(locator, this, "oldStructures", buffer, theOldStructures);
}
{
List theNewStructures;
theNewStructures = (((this.newStructures!= null)&&(!this.newStructures.isEmpty()))?this.getNewStructures():null);
strategy.appendField(locator, this, "newStructures", buffer, theNewStructures);
}
{
List theOldPrimitives;
theOldPrimitives = (((this.oldPrimitives!= null)&&(!this.oldPrimitives.isEmpty()))?this.getOldPrimitives():null);
strategy.appendField(locator, this, "oldPrimitives", buffer, theOldPrimitives);
}
{
List 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 sourceOldStructures;
sourceOldStructures = (((this.oldStructures!= null)&&(!this.oldStructures.isEmpty()))?this.getOldStructures():null);
@SuppressWarnings("unchecked")
List copyOldStructures = ((List ) strategy.copy(LocatorUtils.property(locator, "oldStructures", sourceOldStructures), sourceOldStructures));
copy.setOldStructures(copyOldStructures);
} else {
copy.oldStructures = null;
}
if ((this.newStructures!= null)&&(!this.newStructures.isEmpty())) {
List sourceNewStructures;
sourceNewStructures = (((this.newStructures!= null)&&(!this.newStructures.isEmpty()))?this.getNewStructures():null);
@SuppressWarnings("unchecked")
List copyNewStructures = ((List ) strategy.copy(LocatorUtils.property(locator, "newStructures", sourceNewStructures), sourceNewStructures));
copy.setNewStructures(copyNewStructures);
} else {
copy.newStructures = null;
}
if ((this.oldPrimitives!= null)&&(!this.oldPrimitives.isEmpty())) {
List sourceOldPrimitives;
sourceOldPrimitives = (((this.oldPrimitives!= null)&&(!this.oldPrimitives.isEmpty()))?this.getOldPrimitives():null);
@SuppressWarnings("unchecked")
List copyOldPrimitives = ((List ) strategy.copy(LocatorUtils.property(locator, "oldPrimitives", sourceOldPrimitives), sourceOldPrimitives));
copy.setOldPrimitives(copyOldPrimitives);
} else {
copy.oldPrimitives = null;
}
if ((this.newPrimitives!= null)&&(!this.newPrimitives.isEmpty())) {
List sourceNewPrimitives;
sourceNewPrimitives = (((this.newPrimitives!= null)&&(!this.newPrimitives.isEmpty()))?this.getNewPrimitives():null);
@SuppressWarnings("unchecked")
List copyNewPrimitives = ((List ) 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 lhsOldStructures;
lhsOldStructures = (((this.oldStructures!= null)&&(!this.oldStructures.isEmpty()))?this.getOldStructures():null);
List 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 lhsNewStructures;
lhsNewStructures = (((this.newStructures!= null)&&(!this.newStructures.isEmpty()))?this.getNewStructures():null);
List 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 lhsOldPrimitives;
lhsOldPrimitives = (((this.oldPrimitives!= null)&&(!this.oldPrimitives.isEmpty()))?this.getOldPrimitives():null);
List 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 lhsNewPrimitives;
lhsNewPrimitives = (((this.newPrimitives!= null)&&(!this.newPrimitives.isEmpty()))?this.getNewPrimitives():null);
List 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);
}
}