
org.unece.cefact.namespaces.standardbusinessdocumentheader.StandardBusinessDocumentHeader Maven / Gradle / Ivy
Show all versions of sdp-xsd Show documentation
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2016.05.30 at 01:15:57 PM CEST
//
package org.unece.cefact.namespaces.standardbusinessdocumentheader;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.Equals;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
import org.jvnet.jaxb2_commons.lang.HashCode;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
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.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 StandardBusinessDocumentHeader complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="StandardBusinessDocumentHeader">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="HeaderVersion" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="Sender" type="{http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader}Partner" maxOccurs="unbounded"/>
* <element name="Receiver" type="{http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader}Partner" maxOccurs="unbounded"/>
* <element name="DocumentIdentification" type="{http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader}DocumentIdentification"/>
* <element name="Manifest" type="{http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader}Manifest" minOccurs="0"/>
* <element name="BusinessScope" type="{http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader}BusinessScope" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "StandardBusinessDocumentHeader", propOrder = {
"headerVersion",
"senders",
"receivers",
"documentIdentification",
"manifest",
"businessScope"
})
@XmlRootElement(name = "StandardBusinessDocumentHeader")
public class StandardBusinessDocumentHeader implements Equals, HashCode, ToString
{
@XmlElement(name = "HeaderVersion", required = true)
protected String headerVersion;
@XmlElement(name = "Sender", required = true)
protected List senders;
@XmlElement(name = "Receiver", required = true)
protected List receivers;
@XmlElement(name = "DocumentIdentification", required = true)
protected DocumentIdentification documentIdentification;
@XmlElement(name = "Manifest")
protected Manifest manifest;
@XmlElement(name = "BusinessScope")
protected BusinessScope businessScope;
/**
* Default no-arg constructor
*
*/
public StandardBusinessDocumentHeader() {
super();
}
/**
* Fully-initialising value constructor
*
*/
public StandardBusinessDocumentHeader(final String headerVersion, final List senders, final List receivers, final DocumentIdentification documentIdentification, final Manifest manifest, final BusinessScope businessScope) {
this.headerVersion = headerVersion;
this.senders = senders;
this.receivers = receivers;
this.documentIdentification = documentIdentification;
this.manifest = manifest;
this.businessScope = businessScope;
}
/**
* Gets the value of the headerVersion property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getHeaderVersion() {
return headerVersion;
}
/**
* Sets the value of the headerVersion property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setHeaderVersion(String value) {
this.headerVersion = value;
}
/**
* Gets the value of the senders 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 senders property.
*
*
* For example, to add a new item, do as follows:
*
* getSenders().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Partner }
*
*
*/
public List getSenders() {
if (senders == null) {
senders = new ArrayList();
}
return this.senders;
}
/**
* Gets the value of the receivers 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 receivers property.
*
*
* For example, to add a new item, do as follows:
*
* getReceivers().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Partner }
*
*
*/
public List getReceivers() {
if (receivers == null) {
receivers = new ArrayList();
}
return this.receivers;
}
/**
* Gets the value of the documentIdentification property.
*
* @return
* possible object is
* {@link DocumentIdentification }
*
*/
public DocumentIdentification getDocumentIdentification() {
return documentIdentification;
}
/**
* Sets the value of the documentIdentification property.
*
* @param value
* allowed object is
* {@link DocumentIdentification }
*
*/
public void setDocumentIdentification(DocumentIdentification value) {
this.documentIdentification = value;
}
/**
* Gets the value of the manifest property.
*
* @return
* possible object is
* {@link Manifest }
*
*/
public Manifest getManifest() {
return manifest;
}
/**
* Sets the value of the manifest property.
*
* @param value
* allowed object is
* {@link Manifest }
*
*/
public void setManifest(Manifest value) {
this.manifest = value;
}
/**
* Gets the value of the businessScope property.
*
* @return
* possible object is
* {@link BusinessScope }
*
*/
public BusinessScope getBusinessScope() {
return businessScope;
}
/**
* Sets the value of the businessScope property.
*
* @param value
* allowed object is
* {@link BusinessScope }
*
*/
public void setBusinessScope(BusinessScope value) {
this.businessScope = value;
}
public void setSenders(List value) {
this.senders = null;
List draftl = this.getSenders();
draftl.addAll(value);
}
public void setReceivers(List value) {
this.receivers = null;
List draftl = this.getReceivers();
draftl.addAll(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) {
{
String theHeaderVersion;
theHeaderVersion = this.getHeaderVersion();
strategy.appendField(locator, this, "headerVersion", buffer, theHeaderVersion);
}
{
List theSenders;
theSenders = (((this.senders!= null)&&(!this.senders.isEmpty()))?this.getSenders():null);
strategy.appendField(locator, this, "senders", buffer, theSenders);
}
{
List theReceivers;
theReceivers = (((this.receivers!= null)&&(!this.receivers.isEmpty()))?this.getReceivers():null);
strategy.appendField(locator, this, "receivers", buffer, theReceivers);
}
{
DocumentIdentification theDocumentIdentification;
theDocumentIdentification = this.getDocumentIdentification();
strategy.appendField(locator, this, "documentIdentification", buffer, theDocumentIdentification);
}
{
Manifest theManifest;
theManifest = this.getManifest();
strategy.appendField(locator, this, "manifest", buffer, theManifest);
}
{
BusinessScope theBusinessScope;
theBusinessScope = this.getBusinessScope();
strategy.appendField(locator, this, "businessScope", buffer, theBusinessScope);
}
return buffer;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof StandardBusinessDocumentHeader)) {
return false;
}
if (this == object) {
return true;
}
final StandardBusinessDocumentHeader that = ((StandardBusinessDocumentHeader) object);
{
String lhsHeaderVersion;
lhsHeaderVersion = this.getHeaderVersion();
String rhsHeaderVersion;
rhsHeaderVersion = that.getHeaderVersion();
if (!strategy.equals(LocatorUtils.property(thisLocator, "headerVersion", lhsHeaderVersion), LocatorUtils.property(thatLocator, "headerVersion", rhsHeaderVersion), lhsHeaderVersion, rhsHeaderVersion)) {
return false;
}
}
{
List lhsSenders;
lhsSenders = (((this.senders!= null)&&(!this.senders.isEmpty()))?this.getSenders():null);
List rhsSenders;
rhsSenders = (((that.senders!= null)&&(!that.senders.isEmpty()))?that.getSenders():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "senders", lhsSenders), LocatorUtils.property(thatLocator, "senders", rhsSenders), lhsSenders, rhsSenders)) {
return false;
}
}
{
List lhsReceivers;
lhsReceivers = (((this.receivers!= null)&&(!this.receivers.isEmpty()))?this.getReceivers():null);
List rhsReceivers;
rhsReceivers = (((that.receivers!= null)&&(!that.receivers.isEmpty()))?that.getReceivers():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "receivers", lhsReceivers), LocatorUtils.property(thatLocator, "receivers", rhsReceivers), lhsReceivers, rhsReceivers)) {
return false;
}
}
{
DocumentIdentification lhsDocumentIdentification;
lhsDocumentIdentification = this.getDocumentIdentification();
DocumentIdentification rhsDocumentIdentification;
rhsDocumentIdentification = that.getDocumentIdentification();
if (!strategy.equals(LocatorUtils.property(thisLocator, "documentIdentification", lhsDocumentIdentification), LocatorUtils.property(thatLocator, "documentIdentification", rhsDocumentIdentification), lhsDocumentIdentification, rhsDocumentIdentification)) {
return false;
}
}
{
Manifest lhsManifest;
lhsManifest = this.getManifest();
Manifest rhsManifest;
rhsManifest = that.getManifest();
if (!strategy.equals(LocatorUtils.property(thisLocator, "manifest", lhsManifest), LocatorUtils.property(thatLocator, "manifest", rhsManifest), lhsManifest, rhsManifest)) {
return false;
}
}
{
BusinessScope lhsBusinessScope;
lhsBusinessScope = this.getBusinessScope();
BusinessScope rhsBusinessScope;
rhsBusinessScope = that.getBusinessScope();
if (!strategy.equals(LocatorUtils.property(thisLocator, "businessScope", lhsBusinessScope), LocatorUtils.property(thatLocator, "businessScope", rhsBusinessScope), lhsBusinessScope, rhsBusinessScope)) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
int currentHashCode = 1;
{
String theHeaderVersion;
theHeaderVersion = this.getHeaderVersion();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "headerVersion", theHeaderVersion), currentHashCode, theHeaderVersion);
}
{
List theSenders;
theSenders = (((this.senders!= null)&&(!this.senders.isEmpty()))?this.getSenders():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "senders", theSenders), currentHashCode, theSenders);
}
{
List theReceivers;
theReceivers = (((this.receivers!= null)&&(!this.receivers.isEmpty()))?this.getReceivers():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "receivers", theReceivers), currentHashCode, theReceivers);
}
{
DocumentIdentification theDocumentIdentification;
theDocumentIdentification = this.getDocumentIdentification();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "documentIdentification", theDocumentIdentification), currentHashCode, theDocumentIdentification);
}
{
Manifest theManifest;
theManifest = this.getManifest();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "manifest", theManifest), currentHashCode, theManifest);
}
{
BusinessScope theBusinessScope;
theBusinessScope = this.getBusinessScope();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "businessScope", theBusinessScope), currentHashCode, theBusinessScope);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
public StandardBusinessDocumentHeader withHeaderVersion(String value) {
setHeaderVersion(value);
return this;
}
public StandardBusinessDocumentHeader withSenders(Partner... values) {
if (values!= null) {
for (Partner value: values) {
getSenders().add(value);
}
}
return this;
}
public StandardBusinessDocumentHeader withSenders(Collection values) {
if (values!= null) {
getSenders().addAll(values);
}
return this;
}
public StandardBusinessDocumentHeader withReceivers(Partner... values) {
if (values!= null) {
for (Partner value: values) {
getReceivers().add(value);
}
}
return this;
}
public StandardBusinessDocumentHeader withReceivers(Collection values) {
if (values!= null) {
getReceivers().addAll(values);
}
return this;
}
public StandardBusinessDocumentHeader withDocumentIdentification(DocumentIdentification value) {
setDocumentIdentification(value);
return this;
}
public StandardBusinessDocumentHeader withManifest(Manifest value) {
setManifest(value);
return this;
}
public StandardBusinessDocumentHeader withBusinessScope(BusinessScope value) {
setBusinessScope(value);
return this;
}
public StandardBusinessDocumentHeader withSenders(List value) {
setSenders(value);
return this;
}
public StandardBusinessDocumentHeader withReceivers(List value) {
setReceivers(value);
return this;
}
}