oasis.names.specification.ubl.schema.xsd.commonaggregatecomponents_2.BillingReferenceLineType Maven / Gradle / Ivy
package oasis.names.specification.ubl.schema.xsd.commonaggregatecomponents_2;
import java.io.Serializable;
import java.math.BigDecimal;
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;
import oasis.names.specification.ubl.schema.xsd.commonbasiccomponents_2.AmountType;
import oasis.names.specification.ubl.schema.xsd.commonbasiccomponents_2.IDType;
/**
*
*
* <?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>Billing Reference Line. Details</ccts:DictionaryEntryName><ccts:Definition>Information about a Billing Line.</ccts:Definition><ccts:ObjectClass>Billing Reference Line</ccts:ObjectClass></ccts:Component>
*
*
*
* Java class for BillingReferenceLineType complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="BillingReferenceLineType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2}ID"/>
* <element ref="{urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2}Amount" minOccurs="0"/>
* <element ref="{urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2}AllowanceCharge" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "BillingReferenceLineType", propOrder = {
"id",
"amount",
"allowanceCharge"
})
public class BillingReferenceLineType implements Serializable
{
@XmlElement(name = "ID", namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", required = true)
private IDType id;
@XmlElement(name = "Amount", namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2")
private AmountType amount;
@XmlElement(name = "AllowanceCharge")
private List allowanceCharge;
/**
* Default constructor
* Created by phloc-ubl-jaxb-plugin -Xphloc-ubl-value
*
*/
public BillingReferenceLineType() {
}
/**
*
*
* <?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>BBIE</ccts:ComponentType><ccts:DictionaryEntryName>Billing Reference Line. Identifier</ccts:DictionaryEntryName><ccts:Definition>An identifier for the Billing Line.</ccts:Definition><ccts:Cardinality>1</ccts:Cardinality><ccts:ObjectClass>Billing Reference Line</ccts:ObjectClass><ccts:PropertyTerm>Identifier</ccts:PropertyTerm><ccts:RepresentationTerm>Identifier</ccts:RepresentationTerm><ccts:DataType>Identifier. Type</ccts:DataType></ccts:Component>
*
*
*
* @return
* possible object is
* {@link IDType }
*
*/
@Nullable
public IDType getID() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link IDType }
*
*/
public void setID(
@Nullable
IDType value) {
this.id = 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>BBIE</ccts:ComponentType><ccts:DictionaryEntryName>Billing Reference Line. Amount</ccts:DictionaryEntryName><ccts:Definition>The amount of the Billing Line, including Allowance Charges but net of taxes.</ccts:Definition><ccts:Cardinality>0..1</ccts:Cardinality><ccts:ObjectClass>Billing Reference Line</ccts:ObjectClass><ccts:PropertyTerm>Amount</ccts:PropertyTerm><ccts:RepresentationTerm>Amount</ccts:RepresentationTerm><ccts:DataType>Amount. Type</ccts:DataType></ccts:Component>
*
*
*
* @return
* possible object is
* {@link AmountType }
*
*/
@Nullable
public AmountType getAmount() {
return amount;
}
/**
* Sets the value of the amount property.
*
* @param value
* allowed object is
* {@link AmountType }
*
*/
public void setAmount(
@Nullable
AmountType value) {
this.amount = 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>Billing Reference Line. Allowance Charge</ccts:DictionaryEntryName><ccts:Definition>An association to Allowance Charge.</ccts:Definition><ccts:Cardinality>0..n</ccts:Cardinality><ccts:ObjectClass>Billing Reference Line</ccts:ObjectClass><ccts:PropertyTerm>Allowance Charge</ccts:PropertyTerm><ccts:AssociatedObjectClass>Allowance Charge</ccts:AssociatedObjectClass></ccts:Component>
*
* Gets the value of the allowanceCharge 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 allowanceCharge property.
*
*
* For example, to add a new item, do as follows:
*
* getAllowanceCharge().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link AllowanceChargeType }
*
*
*/
@Nonnull
@ReturnsMutableObject(reason = "JAXB implementation style")
public List getAllowanceCharge() {
if (allowanceCharge == null) {
allowanceCharge = new ArrayList();
}
return this.allowanceCharge;
}
/**
* 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 BillingReferenceLineType rhs = ((BillingReferenceLineType) o);
if (!EqualsUtils.equals(id, rhs.id)) {
return false;
}
if (!EqualsUtils.equals(amount, rhs.amount)) {
return false;
}
if (!EqualsUtils.equals(allowanceCharge, rhs.allowanceCharge)) {
return false;
}
return true;
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-equalshashcode
*
*/
@Override
public int hashCode() {
return new HashCodeGenerator(this).append(id).append(amount).append(allowanceCharge).getHashCode();
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-tostring
*
*/
@Override
public String toString() {
return new ToStringGenerator(this).append("id", id).append("amount", amount).append("allowanceCharge", allowanceCharge).toString();
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @param aList
* The new list member to set. May be null
.
*/
public void setAllowanceCharge(
@Nullable
final List aList) {
allowanceCharge = aList;
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @return
* true
if at least one item is contained, false
otherwise.
*/
public boolean hasAllowanceChargeEntries() {
return (!getAllowanceCharge().isEmpty());
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @return
* true
if no item is contained, false
otherwise.
*/
public boolean hasNoAllowanceChargeEntries() {
return getAllowanceCharge().isEmpty();
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @return
* The number of contained elements. Always ≥ 0.
*/
@Nonnegative
public int getAllowanceChargeCount() {
return getAllowanceCharge().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 AllowanceChargeType getAllowanceChargeAtIndex(
@Nonnegative
final int index) {
return getAllowanceCharge().get(index);
}
/**
* Special setter with value of type String
* Created by phloc-ubl-jaxb-plugin -Xphloc-ubl-value
*
* @param valueParam
* The value to be set. May be null
.
* @return
* The created intermediary object of type IDType and never null
*/
@Nonnull
public IDType setID(
@Nullable
final String valueParam) {
IDType aObj = getID();
if (aObj == null) {
aObj = new IDType(valueParam);
setID(aObj);
} else {
aObj.setValue(valueParam);
}
return aObj;
}
/**
* Special setter with value of type BigDecimal
* Created by phloc-ubl-jaxb-plugin -Xphloc-ubl-value
*
* @param valueParam
* The value to be set. May be null
.
* @return
* The created intermediary object of type AmountType and never null
*/
@Nonnull
public AmountType setAmount(
@Nullable
final BigDecimal valueParam) {
AmountType aObj = getAmount();
if (aObj == null) {
aObj = new AmountType(valueParam);
setAmount(aObj);
} else {
aObj.setValue(valueParam);
}
return aObj;
}
/**
* Get the value of the contained IDType object
* Created by phloc-ubl-jaxb-plugin -Xphloc-ubl-value
*
* @return
* Either the value of the contained IDType object or null
*/
@Nullable
public String getIDValue() {
IDType aObj = getID();
return ((aObj == null)?null:aObj.getValue());
}
/**
* Get the value of the contained AmountType object
* Created by phloc-ubl-jaxb-plugin -Xphloc-ubl-value
*
* @return
* Either the value of the contained AmountType object or null
*/
@Nullable
public BigDecimal getAmountValue() {
AmountType aObj = getAmount();
return ((aObj == null)?null:aObj.getValue());
}
}