oasis.names.specification.ubl.schema.xsd.commonaggregatecomponents_2.PricingReferenceType 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>Pricing Reference. Details</ccts:DictionaryEntryName><ccts:Definition>A reference to Pricing Information.</ccts:Definition><ccts:ObjectClass>Pricing Reference</ccts:ObjectClass></ccts:Component>
*
*
*
* Java class for PricingReferenceType complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="PricingReferenceType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2}OriginalItemLocationQuantity" minOccurs="0"/>
* <element ref="{urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2}AlternativeConditionPrice" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PricingReferenceType", propOrder = {
"originalItemLocationQuantity",
"alternativeConditionPrice"
})
public class PricingReferenceType implements Serializable
{
@XmlElement(name = "OriginalItemLocationQuantity")
private ItemLocationQuantityType originalItemLocationQuantity;
@XmlElement(name = "AlternativeConditionPrice")
private List alternativeConditionPrice;
/**
* Default constructor
* Created by phloc-ubl-jaxb-plugin -Xphloc-ubl-value
*
*/
public PricingReferenceType() {
}
/**
*
*
* <?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>Pricing Reference. Original_ Item Location Quantity. Item Location Quantity</ccts:DictionaryEntryName><ccts:Definition>An association to the original Item Location Quantity.</ccts:Definition><ccts:Cardinality>0..1</ccts:Cardinality><ccts:ObjectClass>Pricing Reference</ccts:ObjectClass><ccts:PropertyTermQualifier>Original</ccts:PropertyTermQualifier><ccts:PropertyTerm>Item Location Quantity</ccts:PropertyTerm><ccts:AssociatedObjectClass>Item Location Quantity</ccts:AssociatedObjectClass></ccts:Component>
*
*
*
* @return
* possible object is
* {@link ItemLocationQuantityType }
*
*/
@Nullable
public ItemLocationQuantityType getOriginalItemLocationQuantity() {
return originalItemLocationQuantity;
}
/**
* Sets the value of the originalItemLocationQuantity property.
*
* @param value
* allowed object is
* {@link ItemLocationQuantityType }
*
*/
public void setOriginalItemLocationQuantity(
@Nullable
ItemLocationQuantityType value) {
this.originalItemLocationQuantity = 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>Pricing Reference. Alternative Condition_ Price. Price</ccts:DictionaryEntryName><ccts:Definition>The price expressed in terms other than the actual price, e.g., the list price v. the contracted price, or the price in bags v. the price in kilos, or the list price in bags v. the contracted price in kilos.</ccts:Definition><ccts:Cardinality>0..n</ccts:Cardinality><ccts:ObjectClass>Pricing Reference</ccts:ObjectClass><ccts:PropertyTermQualifier>Alternative Condition</ccts:PropertyTermQualifier><ccts:PropertyTerm>Price</ccts:PropertyTerm><ccts:AssociatedObjectClass>Price</ccts:AssociatedObjectClass></ccts:Component>
*
* Gets the value of the alternativeConditionPrice 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 alternativeConditionPrice property.
*
*
* For example, to add a new item, do as follows:
*
* getAlternativeConditionPrice().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link PriceType }
*
*
*/
@Nonnull
@ReturnsMutableObject(reason = "JAXB implementation style")
public List getAlternativeConditionPrice() {
if (alternativeConditionPrice == null) {
alternativeConditionPrice = new ArrayList();
}
return this.alternativeConditionPrice;
}
/**
* 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 PricingReferenceType rhs = ((PricingReferenceType) o);
if (!EqualsUtils.equals(originalItemLocationQuantity, rhs.originalItemLocationQuantity)) {
return false;
}
if (!EqualsUtils.equals(alternativeConditionPrice, rhs.alternativeConditionPrice)) {
return false;
}
return true;
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-equalshashcode
*
*/
@Override
public int hashCode() {
return new HashCodeGenerator(this).append(originalItemLocationQuantity).append(alternativeConditionPrice).getHashCode();
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-tostring
*
*/
@Override
public String toString() {
return new ToStringGenerator(this).append("originalItemLocationQuantity", originalItemLocationQuantity).append("alternativeConditionPrice", alternativeConditionPrice).toString();
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @param aList
* The new list member to set. May be null
.
*/
public void setAlternativeConditionPrice(
@Nullable
final List aList) {
alternativeConditionPrice = aList;
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @return
* true
if at least one item is contained, false
otherwise.
*/
public boolean hasAlternativeConditionPriceEntries() {
return (!getAlternativeConditionPrice().isEmpty());
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @return
* true
if no item is contained, false
otherwise.
*/
public boolean hasNoAlternativeConditionPriceEntries() {
return getAlternativeConditionPrice().isEmpty();
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @return
* The number of contained elements. Always ≥ 0.
*/
@Nonnegative
public int getAlternativeConditionPriceCount() {
return getAlternativeConditionPrice().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 PriceType getAlternativeConditionPriceAtIndex(
@Nonnegative
final int index) {
return getAlternativeConditionPrice().get(index);
}
}