All Downloads are FREE. Search and download functionalities are using the official Maven repository.

no.digipost.org.unece.cefact.namespaces.standardbusinessdocumentheader.Scope Maven / Gradle / Ivy

//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0 
// See https://javaee.github.io/jaxb-v2/ 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2022.11.16 at 09:22:53 AM UTC 
//


package no.digipost.org.unece.cefact.namespaces.standardbusinessdocumentheader;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.HashCode2;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy2;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
import org.w3c.dom.Element;


/**
 * 

Java class for Scope complex type. * *

The following schema fragment specifies the expected content contained within this class. * *

 * <complexType name="Scope">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <group ref="{http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader}ScopeAttributes"/>
 *         <element ref="{http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader}ScopeInformation" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Scope", propOrder = { "type", "instanceIdentifier", "identifier", "scopeInformations" }) public class Scope implements Equals2, HashCode2, ToString2 { @XmlElement(name = "Type", required = true) protected String type; @XmlElement(name = "InstanceIdentifier", required = true) protected String instanceIdentifier; @XmlElement(name = "Identifier") protected String identifier; @XmlElementRef(name = "ScopeInformation", namespace = "http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader", type = JAXBElement.class, required = false) @XmlAnyElement(lax = true) protected List scopeInformations; /** * Default no-arg constructor * */ public Scope() { super(); } /** * Fully-initialising value constructor * */ public Scope(final String type, final String instanceIdentifier, final String identifier, final List scopeInformations) { this.type = type; this.instanceIdentifier = instanceIdentifier; this.identifier = identifier; this.scopeInformations = scopeInformations; } /** * Gets the value of the type property. * * @return * possible object is * {@link String } * */ public String getType() { return type; } /** * Sets the value of the type property. * * @param value * allowed object is * {@link String } * */ public void setType(String value) { this.type = value; } /** * Gets the value of the instanceIdentifier property. * * @return * possible object is * {@link String } * */ public String getInstanceIdentifier() { return instanceIdentifier; } /** * Sets the value of the instanceIdentifier property. * * @param value * allowed object is * {@link String } * */ public void setInstanceIdentifier(String value) { this.instanceIdentifier = value; } /** * Gets the value of the identifier property. * * @return * possible object is * {@link String } * */ public String getIdentifier() { return identifier; } /** * Sets the value of the identifier property. * * @param value * allowed object is * {@link String } * */ public void setIdentifier(String value) { this.identifier = value; } /** * Gets the value of the scopeInformations 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 scopeInformations property. * *

* For example, to add a new item, do as follows: *

     *    getScopeInformations().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link JAXBElement }{@code <}{@link CorrelationInformation }{@code >} * {@link JAXBElement }{@code <}{@link BusinessService }{@code >} * {@link JAXBElement }{@code <}{@link Object }{@code >} * {@link Element } * {@link Object } * * */ public List getScopeInformations() { if (scopeInformations == null) { scopeInformations = new ArrayList(); } return this.scopeInformations; } public void setScopeInformations(List value) { this.scopeInformations = null; if (value!= null) { List draftl = this.getScopeInformations(); draftl.addAll(value); } } public String toString() { final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE2; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; } public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { { String theType; theType = this.getType(); strategy.appendField(locator, this, "type", buffer, theType, (this.type!= null)); } { String theInstanceIdentifier; theInstanceIdentifier = this.getInstanceIdentifier(); strategy.appendField(locator, this, "instanceIdentifier", buffer, theInstanceIdentifier, (this.instanceIdentifier!= null)); } { String theIdentifier; theIdentifier = this.getIdentifier(); strategy.appendField(locator, this, "identifier", buffer, theIdentifier, (this.identifier!= null)); } { List theScopeInformations; theScopeInformations = (((this.scopeInformations!= null)&&(!this.scopeInformations.isEmpty()))?this.getScopeInformations():null); strategy.appendField(locator, this, "scopeInformations", buffer, theScopeInformations, ((this.scopeInformations!= null)&&(!this.scopeInformations.isEmpty()))); } return buffer; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } final Scope that = ((Scope) object); { String lhsType; lhsType = this.getType(); String rhsType; rhsType = that.getType(); if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType, (this.type!= null), (that.type!= null))) { return false; } } { String lhsInstanceIdentifier; lhsInstanceIdentifier = this.getInstanceIdentifier(); String rhsInstanceIdentifier; rhsInstanceIdentifier = that.getInstanceIdentifier(); if (!strategy.equals(LocatorUtils.property(thisLocator, "instanceIdentifier", lhsInstanceIdentifier), LocatorUtils.property(thatLocator, "instanceIdentifier", rhsInstanceIdentifier), lhsInstanceIdentifier, rhsInstanceIdentifier, (this.instanceIdentifier!= null), (that.instanceIdentifier!= null))) { return false; } } { String lhsIdentifier; lhsIdentifier = this.getIdentifier(); String rhsIdentifier; rhsIdentifier = that.getIdentifier(); if (!strategy.equals(LocatorUtils.property(thisLocator, "identifier", lhsIdentifier), LocatorUtils.property(thatLocator, "identifier", rhsIdentifier), lhsIdentifier, rhsIdentifier, (this.identifier!= null), (that.identifier!= null))) { return false; } } { List lhsScopeInformations; lhsScopeInformations = (((this.scopeInformations!= null)&&(!this.scopeInformations.isEmpty()))?this.getScopeInformations():null); List rhsScopeInformations; rhsScopeInformations = (((that.scopeInformations!= null)&&(!that.scopeInformations.isEmpty()))?that.getScopeInformations():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "scopeInformations", lhsScopeInformations), LocatorUtils.property(thatLocator, "scopeInformations", rhsScopeInformations), lhsScopeInformations, rhsScopeInformations, ((this.scopeInformations!= null)&&(!this.scopeInformations.isEmpty())), ((that.scopeInformations!= null)&&(!that.scopeInformations.isEmpty())))) { return false; } } return true; } public boolean equals(Object object) { final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE2; return equals(null, null, object, strategy); } public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) { int currentHashCode = 1; { String theType; theType = this.getType(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType, (this.type!= null)); } { String theInstanceIdentifier; theInstanceIdentifier = this.getInstanceIdentifier(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "instanceIdentifier", theInstanceIdentifier), currentHashCode, theInstanceIdentifier, (this.instanceIdentifier!= null)); } { String theIdentifier; theIdentifier = this.getIdentifier(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "identifier", theIdentifier), currentHashCode, theIdentifier, (this.identifier!= null)); } { List theScopeInformations; theScopeInformations = (((this.scopeInformations!= null)&&(!this.scopeInformations.isEmpty()))?this.getScopeInformations():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "scopeInformations", theScopeInformations), currentHashCode, theScopeInformations, ((this.scopeInformations!= null)&&(!this.scopeInformations.isEmpty()))); } return currentHashCode; } public int hashCode() { final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.INSTANCE2; return this.hashCode(null, strategy); } public Scope withType(String value) { setType(value); return this; } public Scope withInstanceIdentifier(String value) { setInstanceIdentifier(value); return this; } public Scope withIdentifier(String value) { setIdentifier(value); return this; } public Scope withScopeInformations(Object... values) { if (values!= null) { for (Object value: values) { getScopeInformations().add(value); } } return this; } public Scope withScopeInformations(Collection values) { if (values!= null) { getScopeInformations().addAll(values); } return this; } public Scope withScopeInformations(List value) { setScopeInformations(value); return this; } }