oasis.names.specification.ubl.schema.xsd.commonaggregatecomponents_2.OrderedShipmentType Maven / Gradle / Ivy
package oasis.names.specification.ubl.schema.xsd.commonaggregatecomponents_2;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import com.phloc.commons.annotations.ReturnsMutableObject;
import com.phloc.commons.equals.EqualsUtils;
import com.phloc.commons.hash.HashCodeGenerator;
import com.phloc.commons.string.ToStringGenerator;
/**
*
*
* <?xml version="1.0" encoding="UTF-8"?><ccts:Component xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:qdt="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDatatypes-2" xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ccts:ComponentType>ABIE</ccts:ComponentType><ccts:DictionaryEntryName>Ordered Shipment. Details</ccts:DictionaryEntryName><ccts:Definition>Information about an Ordered Shipment.</ccts:Definition><ccts:ObjectClass>Ordered Shipment</ccts:ObjectClass></ccts:Component>
*
*
*
* Java class for OrderedShipmentType complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="OrderedShipmentType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2}Shipment"/>
* <element ref="{urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2}Package" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "OrderedShipmentType", propOrder = {
"shipment",
"_package"
})
public class OrderedShipmentType implements Serializable
{
@XmlElement(name = "Shipment", required = true)
private ShipmentType shipment;
@XmlElement(name = "Package")
private List _package;
/**
* Default constructor
* Created by phloc-ubl-jaxb-plugin -Xphloc-ubl-value
*
*/
public OrderedShipmentType() {
}
/**
*
*
* <?xml version="1.0" encoding="UTF-8"?><ccts:Component xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:qdt="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDatatypes-2" xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ccts:ComponentType>ASBIE</ccts:ComponentType><ccts:DictionaryEntryName>Ordered Shipment. Shipment</ccts:DictionaryEntryName><ccts:Definition>An association to Shipment.</ccts:Definition><ccts:Cardinality>1</ccts:Cardinality><ccts:ObjectClass>Ordered Shipment</ccts:ObjectClass><ccts:PropertyTerm>Shipment</ccts:PropertyTerm><ccts:AssociatedObjectClass>Shipment</ccts:AssociatedObjectClass></ccts:Component>
*
*
*
* @return
* possible object is
* {@link ShipmentType }
*
*/
@Nullable
public ShipmentType getShipment() {
return shipment;
}
/**
* Sets the value of the shipment property.
*
* @param value
* allowed object is
* {@link ShipmentType }
*
*/
public void setShipment(
@Nullable
ShipmentType value) {
this.shipment = value;
}
/**
*
*
* <?xml version="1.0" encoding="UTF-8"?><ccts:Component xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:qdt="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDatatypes-2" xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ccts:ComponentType>ASBIE</ccts:ComponentType><ccts:DictionaryEntryName>Ordered Shipment. Package</ccts:DictionaryEntryName><ccts:Definition>An association to Package.</ccts:Definition><ccts:Cardinality>0..n</ccts:Cardinality><ccts:ObjectClass>Ordered Shipment</ccts:ObjectClass><ccts:PropertyTerm>Package</ccts:PropertyTerm><ccts:AssociatedObjectClass>Package</ccts:AssociatedObjectClass></ccts:Component>
*
* Gets the value of the package 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 package property.
*
*
* For example, to add a new item, do as follows:
*
* getPackage().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link PackageType }
*
*
*/
@Nonnull
@ReturnsMutableObject(reason = "JAXB implementation style")
public List getPackage() {
if (_package == null) {
_package = new ArrayList();
}
return this._package;
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-equalshashcode
*
*/
@Override
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if ((o == null)||(!getClass().equals(o.getClass()))) {
return false;
}
final OrderedShipmentType rhs = ((OrderedShipmentType) o);
if (!EqualsUtils.equals(shipment, rhs.shipment)) {
return false;
}
if (!EqualsUtils.equals(_package, rhs._package)) {
return false;
}
return true;
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-equalshashcode
*
*/
@Override
public int hashCode() {
return new HashCodeGenerator(this).append(shipment).append(_package).getHashCode();
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-tostring
*
*/
@Override
public String toString() {
return new ToStringGenerator(this).append("shipment", shipment).append("_package", _package).toString();
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @param aList
* The new list member to set. May be null
.
*/
public void set_package(
@Nullable
final List aList) {
_package = aList;
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @return
* true
if at least one item is contained, false
otherwise.
*/
public boolean hasPackageEntries() {
return (!getPackage().isEmpty());
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @return
* true
if no item is contained, false
otherwise.
*/
public boolean hasNoPackageEntries() {
return getPackage().isEmpty();
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @return
* The number of contained elements. Always ≥ 0.
*/
@Nonnegative
public int getPackageCount() {
return getPackage().size();
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @param index
* The index to retrieve
* @return
* The element at the specified index. May be null
* @throws ArrayIndexOutOfBoundsException
* if the index is invalid!
*/
@Nullable
public PackageType getPackageAtIndex(
@Nonnegative
final int index) {
return getPackage().get(index);
}
}